How to achieve more physically accurate motion in the game engine? I have a character with a very simple motion control: when I press W the character moves forward, with S they it goes backwards and so on. The problem is that unlike what is possible in the real world, releasing the movement button halts the character instantly; the same happens in mid air - if you were going forward and, mid air pressed the button to go backwards, you will, which us impossible IRL and, thus, not what I want. How can I make it so the character has to first slow down, before being able to switch direction (for large-ish turn angles)?

The problem with the current suggestions is that it only partly fixes my problem, in that if I try to switch direction mid-air, it starts to move backwards with the same velocity it had when moving forward (i.e. the speed suddenly becomes negative), which is not what I want.

All of the answers here so far do not quite fix your problem. it is actually quite easy to fix. Radish Has the right idea (using linear velocity set to Add). This answer also expands (and says more clearly) what StealthyRobot said in his answer. (Although the numbers which he gave there do not work as expected)

First you need to use linear velocity with the settings local and add enabled.  (I assume you already have this)

Now we can fix the overshoot problem. to do this increase the damping on the Translation for your character.

If you are using Torque to steer, also set Rotation dampening.

It also might be useful to view this question

Realistic Jet Flight

You can see it working here

If you had trouble following that, (hopefully you did not) or if you just want to see it working, feel free to take apart/play with the blend file.


Slow sculpting on high density meshes iv'e seen people sculpt meshes around 5 mil verts with no lag whatsoever, but everytime i come close to like 1m and above the lag starts to be noticeable and soon any sculpting becomes unusable.

Im well aware that this requires good rig, but i belive that with 32gb ram and gtx1080 i've got that covered.

Tried dyntopo and multires, seems that multires is slightly better performance wise, but it is still far from smooth on high poly counts.

using blender 2.79

but you are referring to lag when nagivating or when sculpting? dyntpo its better for having less polycount when sculpting but it affects the mesh and without a way to to delete it or undo what you done after finished the sculpt and also it works with triangules instead or quads. multires instead save this information in the modifier and makes a even subdivision in the whole mesh, but some times not necesary to have all the mesh subvided in areas that you wont sculpt, and it stays the original polycount and topology of the original low poly base mesh used. but you can use both like he does https://www.youtube.com/watch?v=Nc3cRVG3me4 also avoid to have matcaps and the outline select option checked because it will put it more slower when its very high poly.


How can I get Blender to just do Matcap shading for the selected object? I have noticed that the behavior of MatCap shading has changed in recent versions of Blender (at least by 2.72b). When I turn Matcap on, all objects are shaded with the same Matcap texture. For sculpting, I only want the selected object shaded with Matcap (as in numerous tutorials).

How can I get it to just do Matcap shading for the selected object (primarily in Sculpt mode)?

Even better would be if we could select a different MatCap material by object or vertex group.

I am afraid you can do it now only in blender internal in GLSL shading. But that shouldn't matter if you want it for sculpting. You only need some matcap textures. Here is what to set:

Good thing is you can setup as many matcaps as you want for your objects:)


Blender Emission Without Blowing Out Texture (Eevee) So, I want to add emission to an object without blowing out the texture underneath it. Here's my material setup so far:

What would I add (and where) to make add the emission? Thank you!

I think the usual Light Path/Is Camera Ray node would work for you. Basically, showing only the original non-emission color to the Camera and using Emission node for everything else. This allows you to increase the Emission Strength without affecting the color reaching the camera.


How to bake multiple sounds to f-curve to the same object So im animating a characters mouth using shapekeys and baking them to an audio clip. I want to add three different audio clips to the same character's mouth using bake sound to f curve. But, when i try baking the second audio clip, it replaces the previous audio clip.

My question is, how do I add multiple audio clips to same object using bake sound to f-curve. (I don't want to use armatures)

I've heard that you can use the NLA editor in order to then push the action from the action editor or something... I have no idea how that works, can you help me?

Thanks in advance!

Pushing Down (or Stashing) to the NLA

Bake your fcurve as you've done.

Give the action a meaningful name, I've switched to dope sheet shape key editor mode to do this. Can push down / stash / rename directly from the NLA editor too.
Hit the push down button
Switch to the NLA editor and move your strip where you wish to play in the timeline.

Consult the docs re the difference between push down and stash, and other info re using the NLA Editor.

Repeat.  Notice in image above I have already done this once.. with the previous bake "MyAction.001".

Custom Properties and drivers.

How to bake multiple audio sounds to f curve?

A suggestion is add a speaker, parent it such that it sticks out the mouth. When a speaker has a sound loaded it is loaded as an audio strip in the NLA. It never has the correct length. Match it to the length of your sound bake for that sound.

SoundAction is a baked sound on a custom property on a speaker.
NLAStrip (in aqua) is the sound the speaker plays resized to match.

I used this concept for the now defunct sound drivers addon. https://blender.stackexchange.com/a/39241/15543

No armatures have been used in this answer


Is there an Edge Crease tool for the Smooth option (similar to that used for the Sub surf modifier) I know this is a long shot (and I'm going to have to go back and delete/recreate my arrays with a subsurf mod) but since I've already locked in most of them:

I was wondering if there is a tool that acts as an Edge Crease (for the smooth option) that'll allow me to sharpen up some of the edges on a tire.

Currently my rendered tire looks like this:

When smoothing things definitely get a little TOO smooth.

In the end, I'm ok if there's not, just hoping to save some time :)

Edge Split modifier may be the thing you are looking for?

After applying the modifier to the object you could use "Mark sharp"
to further modify the behavior of the modifier.

Hope it helps.


Is it possible to lock the scale when entering dimensions? I have a Grid Floor with an area of one square kilometer and an origin at (0,0,0).

I would like to add a wireframe cube centered at (0,0,0) with a with dimensions 250 m by 250 m by 250 m.

On the Transform panel, when I lock the Location at (0,0,0) and lock the Scale at (1,1,1) and set the dimensions, the scale; although locked changes to (250,250,250).

Is there any way to lock the scale at (1,1,1)?

There are two alternatives:

Scale your object in Object Mode as you describe, and then Apply the scale (Ctrl+A). Your object will then have the correct dimensions and the scale will be reset to 1,1,1

As an alternative create your object and do all of the scaling in Edit Mode, that will not affect the scale of the object.


Material only applies to some of the Mesh Finished 60% of my character, I made the head separately from the body, I used "append" option to bring the head into the body scene and then merge it.

For some reason, even after connecting  the neck vertices to the head, when I add skin material, it only applies to the head and not the rest of the body, I don't know why this happens, I select everything but only the head changes.

BTW the head mesh looks more glossy than the body , I don't know what caused this

The rest of the body is part of a different material slot, the last one, in fact.

You can either:

Assign the material to both texture slots
Merge the texture slots to the same slot

To merge:

Go to edit mode
Go to the materials tab
Click the last material slot
Click the "Select" Button under the material slot listings
Click The first material slot (the one currently with the material)
Click "Select" again
Click "Assign"

To Assign:

Go to edit mode
Go to the materials tab
Click the last material slot
Click the color globe (Next to "+ New")
Choose the material


Select all targets of an object's Boolean modifiers If i have a cube A and sphere B. I apply boolean modifier (difference) to A and use B as cutter. So B is 'linked' to A via boolean modifier but B is not a child of A.
When A is selected , is there a method to select all of its cutters ?

Here's a script that adds an operator to do that in the "Select" menu.
I added 3 checkboxes to specifiy if you want to include hidden (eye icon), disabled (monitor icon) or unselectable objects, since by default they can't be selected if they are in either of these states.
The operator selects everything by default, hidden, selectable or not.
import bpy

class SelectBooleansOperator(bpy.types.Operator):
    bl_label = "Select Linked Booleans"
    bl_idname = "object.select_linked_booleans"
    bl_options = {'REGISTER', 'UNDO'}

    extend: bpy.props.BoolProperty(
        name="Extend",
        default=False,
        )

    select_hidden: bpy.props.BoolProperty(
        name="Select Hidden",
        default=True,
        )

    select_disabled: bpy.props.BoolProperty(
        name="Select Disabled",
        default=True,
        )

    select_unselectable: bpy.props.BoolProperty(
        name="Select Unselectable",
        default=True,
        )

    @classmethod
    def poll(cls, context):
        return context.active_object and context.active_object.type == 'MESH'

    def execute(self, context):
        layout = self.layout

        mods = context.active_object.modifiers

        for mod in mods:
            if mod.type != 'BOOLEAN':
                continue

            obj = mod.object

            # Logic from https://blenderartists.org/t/blender-2-8-python-hide-unhide-objects/1141228/2

            if (not obj.hide_viewport and not obj.visible_get()) and self.select_hidden:
                # Hidden with the eye icon
                obj.hide_set(False)

            if obj.hide_viewport:
                obj.hide_viewport = False #  Toggle to test visibility

                if obj.visible_get() and self.select_disabled:
                    # Hidden with the monitor icon
                    obj.hide_viewport = False
                elif self.select_disabled and self.select_hidden:
                    # Hidden both ways
                    obj.hide_viewport = False
                    obj.hide_set(False)
                else:
                    obj.hide_viewport = True #  Toggle back

            if obj.hide_select and self.select_unselectable:
                obj.hide_select = False

            mod.object.select_set(True)

        context.active_object.select_set(self.extend)

        return {'FINISHED'}

def draw_item(self, context):
    self.layout.operator(SelectBooleansOperator.bl_idname)

def register():
    bpy.utils.register_class(SelectBooleansOperator)
    bpy.types.VIEW3D_MT_select_object.append(draw_item)

def unregister():
    bpy.utils.unregister_class(SelectBooleansOperator)
    bpy.types.VIEW3D_MT_select_object.remove(draw_item)

if __name__ == "__main__":
    register()

How to use :
How to run a script

Note that you would have to re-run the script every time you close and open Blender. If you want it to be persistent, make it into an add-on.
You can also add a shortcut to the operator by right clicking it in the menu.


UV map for hemisphere and other primitives completly newb here.
I need to construct some primitives for my ParticleSystems in Unity3D, but i have issues with UV maps. There is some mesh like a hemisphere

I need to put textures on this sphere, like this one

I just select all entire mesh by (A)>Unwarp, so its create default UV map, but this one is not much correct, like some distortion on top and not clear on bot.

Trying to google how to apply UV maps, but there is a lot of tutorials for hard-constructed mesh/texture but not a for simple one.

What i need is simple primitives and use non-unique textures for them correctly, would be nice if you have some tutros or w/e for learning.

Weird that you have this result because with a simple UV Unwrap> Unwrap, it's automatically good, I just redesigned your texture so that I have a higher resolution but that's all. Maybe you have forgotten to give your object a Subdivision modifier, it will make your sphere smoother.

here is what it gives without the Subdivision modifier:


Solidify Modifier going in all directions I was trying to create a different version of a stylized archway.  I used a couple of bezier curves to get the basic shape then borrowed some of the shapes from the original archway.  I got everything lined up, then joined the mesh created from the curves to the shapes from the archway.  Then I painstakingly went thru and connected the shapes to the curve and then used F to fill them in. Then I removed the original shapes by separating as I wanted holes there and tried to solidify the results.  Oh lordy, I did something very wrong somewhere because this is not what I was expecting.  In the video, I show my mesh and what it does and then the original exhibiting the desired behavior.

The problem with this mesh is it's mb its topology in order to fix that,  first go into edit mode and select all faces and then press shift+N to calculate normals, then try pressing alt+M and selecting merge by distance for removing double, if that still doesn't solve the problem then apply a remedy modifier above solidify (you even remedy manually or by some other add-on).  Try these one by one or all at the same time.


Copy center of mass of an object to another object Im trying to mod a model for a game. Theres no way of editing the position in space in the game, so I need to basically copy the position of the center of mass of the old object to the new one. Is there a way to do this?

Never mind. I got it. Cursor to Selected, then Center to Cursor.


How to edit second skin of mesh created using solidify Hello everyone I've come across a bit of a problem that I have been stuck on for quite some time now. I am currently making a prop revolver for an upcoming photoshoot, but I actually plan on making it look as realistic as possible with some blank gun internals. I followed a nice tutorial on how to use solidify on Youtube, but I haven't been able to replicate a specific move the demonstrator does.Tutorial on hollowing an object It's at the 11:28 mark of this video where I am currently stumped. The guy manages to separate the outside skin from the wall created using the solidify modifier. He then goes on to edit the inside skin. When I press the command V and L it selects the entire object not just the inner layer that was created. Any help towards finding a solution here would be greatly appreciated. I have linked the model below upon inspection you'll see that some parts the mesh has been compromised. The red highlighted area in the picture is really the only area that needs that second skin, the rest needs to remain more sturdy. The Blender file is downloadable below.

https://www.dropbox.com/s/z17lkxoug7hjhgp/Redesigned%20Grip%20Frame%20.blend?dl=0

The deer in your tutorial was topologically a sphere with one hole in it, so only one rim between inside and outside had to be found, and ripped.

Your gun has more holes than that; if you cut one rim, there are more left connecting the inside and outside.

A possible method:

Before applying the modifier, while editing edges, in the Select Menu in the header, go for 'All by Trait' > 'Non Manifold'. This will select all the holes in your mesh before solidification.
Apply the Modifier without changing that selection
After applying the modifier, in Edit Mode, V rip the still selected (and duplicated) edges.

This will separate your object into 3. Inside, Outside, and Rim.

You will note that the modifier has thickened some areas which are already shells with thickness, (e.g. around the barrel) and so some of the  'inside' surfaces are outside some of the 'outside' surfaces. This is quite confusing, and unprintable. I guess you're going to remove those, and seal up the holes.


Position and Scale resetting on render I have an FBX model I'm using in blender. I've worked with FBX before in blender with no problems. But every time I change the position, size,  or pose of this one it resets as soon as I render an image, going back to the pose, size and position it was before I changed it. I've tried numerous fixes from the web but nothing is helping. I've never had this problem with any other model FBX,  obj,  blend, or any other. Does anyone have a fix for this?

For anyone else having this problem I fixed it by first make sure you have no keyframes. If there are none and your object still resets position on render position your object how you want it than add that position as a keyframe.


What coordinates are chosen by default in Texture nodes? I have created a texture coordinate node and then deleted it. This action shows a small difference after rendering and I'm interested in describing this difference in words.

As Christopher Bennett says in the comments, when you have no texture coordinate attached, it is picking a default for you, that default uses UV coordinates for mapping.
When you use Generated coordinates something interesting is happening.  It's attempting to map the image on the Z axis to your object, and since that axis doesn't exist for your two dimensional image, it's repeating the pixels at the edge of the texture along the Z axis of the object.


Permanently expanded submenu in pie menu Is it possible to add submenu (from another custom class) in pie menu is a such way as to make it always expanded (without howering over it). Or maybe it possible with popup menu as submenu? (For example, there is “Expand Popup Dialog” checkbox in Pie Menu Editor addon).
And second question is how to insert panels in pie menu? Again, it is possible with Pie Menu Editor but I want to know how do it by myself, without addons.

import bpy
from bpy.types import Menu, Operator

class CUSTOM_MT_menu(Menu):
    bl_label = "Main Menu"
    bl_idname = "CUSTOM_MT_menu"

    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()

        pie.menu("CUSTOM_MT_submenu", text='SubMenu')

        pie.operator("object.custom_operator", text='Operator')

        col = pie.column()
        col.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")
        col.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")
        col.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")

class CUSTOM_MT_submenu(Menu):
    bl_label = "Sub Menu"
    bl_idname = "CUSTOM_MT_submenu"

    def draw(self, context):
        layout = self.layout

        layout.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")
        layout.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")
        layout.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")

class CUSTOM_OT_operator(Operator):
    bl_idname = "object.custom_operator"
    bl_label = "Operator"

    def execute(self, context):
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self, width=70)

    def draw(self, context):
        layout = self.layout

        layout.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")
        layout.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")
        layout.operator("mesh.primitive_cube_add", text = "Cube", icon = "MESH_CUBE")

classes = (
    CUSTOM_MT_menu,
    CUSTOM_MT_submenu,
    CUSTOM_OT_operator
    )

register, unregister = bpy.utils.register_classes_factory(classes)

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="CUSTOM_MT_menu")

All the credit goes to iceythe
discussion thread
If you just want the menu items expanded, just like your manual column of operators:
col1 = pie.column()
col1.menu_contents("CUSTOM_MT_submenu")

Panels, like menus are just draw functions. You can funnel them through any layout.
You can use something like this to pass as override layout:
class Layout:
    def __init__(self, layout):
        self.layout = layout

then
col2 = pie.column()
override = Layout(col2)
bpy.types.OBJECT_PT_display.draw(override, context)

context.armature doesn’t exist outside of properties, so you must generate a new context and manually add armature to it.
Good news is, the procedure is same as with the layout override. Adding a check to emulate a poll is a good idea since drawing the panel yourself circumvents the original one. The bad news is, well, there are no bad news.
class Context(dict):
    def __init__(self, context=None, **kwargs):
        super().__init__()
        self.__dict__ = self

        if context is not None:
            self.update(context.copy())
        self.update(**kwargs)

Then draw the armature panel like this:
if context.object.type == 'ARMATURE':
    context_ = Context(context, armature=context.object.data)
    col3 = pie.column()
    override = Layout(col3)
    bpy.types.DATA_PT_display.draw(override, context_)

Custom operators no longer go into bpy.types. Instead you reference the class itself:
col4 = pie.column()
override = Layout(col4)
CUSTOM_OT_operator.draw(override, context)


How to Interpolate vectors in Python? How to interpolate vector between 2 vectors in blender-python?
I hope you get my question.
Example:

See mathutils.Vector:

Vector.lerp for linear interpolation.
Vector.slerp for spherical interpolation. https://en.wikipedia.org/wiki/Slerp

c = a.lerp(b, 0.0)
# c == a
c = a.lerp(b, 0.5)
# c == (a + b) / 2
c = a.lerp(b, 1.0)
# c == b


How to run some functions in an addon in blender start? Is there anybody who know how can I run some functions in an addon in blender start?

In user preferences choose add-ons tab check the box of the plugin you want to use and hit save user settings in lower left corner.
If the plugin is not enabled next time you open blender then either you are doing something wrong (like, the shortcut of the plugin activation is diffrent than you think or plugin is updated and changed it's interface so it doesn't appears in the same spot as shown in tutorials) or the plugin is glitched.

Try repeating these steps and downloading and using latest version of the plugin.


Change camera start tracking time / change values How to make the camera start tracking the object for example in the 80 frame of the animation and stop in 200, and how to do that influence value in "Track To" also changes over time?

You need to animate the influence value on the "Track To" constraint.

If the value is 0 the camera will not track the object.

When the value is 1 the camera will track the selected object.

To animate the value you need to create keyframes, just place your cusor over the Influence value, right click and select Insert Keyframe (or simply press I while the cursor is over the value).

Keep in mind that when the influence is 1 the tracked object's origin will be in the center of the frame, so going from 0 to 1, or from 1 to 0 might change placement of the object within the frame. For smoother transitions make the value change over the course of several frames.


Outline works, but badly I'm very new at Blender but have (or had) a pretty extensive knowledge of 3dsmax.  So I've managed to make this shape, and even managed to do outlines to make it look like a drawing, which is what I'm going for.  But as you can see Blender has taken it upon itself to add some lines where there shouldn't be any, most notably between hole three to hole four. I made this by making a cube and then making a bunch of smaller cubes and then difference-booleaning them out.

Q: Any way to convince Blender that there shouldn't actually be lines where it mistakenly drew extra lines?  Or do I have to paint them out using Photoshop?

This was an wild hunting ... uf :)
The issue comes from N-gon faces generated by the boolean operation.
When model consists from quad or tris faces it works fine.
Solution is to add a Triangulate Modifier at the end of modifier stack like so:


Selective collision with particles I have two collision objects and two particle systems.
I want P1 to interact with collision 1
       P2 to interact with collision 2
Can you help me to achieve that ?

Now both are interacting with collision 1 :(

One will collide with it. One should pass through it.
How can

See [Collision Collection] value on Deflection Panel of the Particle information as indicated by the arrows above.  The outliner window shows how the [collection] is visible.  This is how you restrict influence between particles and a Physics Collision object.

The collision object needs to be placed in the collection specified in the particle system.

Click on the image to see a larger image to read the detail.


Active Gizmo show all even when axis locked Just a general question, which has puzzled me. The 2.81 active gizmo whether in Move, Rotate or Scale always shows everything. Previously it would only show the axis which were unlocked. When locking, as in the photo, only the Z arrow would appear in previous versions.
Am I missing something, can this be changed?

You have changed the orientation for the gizmo. Locking the global X,Y-axes will cause the X,Y-axes to be hidden in the gizmo only if the gizmo is set to global or default orientation.

The setting for this is found in the top left of your screen. Do not confuse the Gizmo Orientation with Transform Orientation. The transform orientation (middle of screen) is used as the when you use a hotkey such as G to edit an object.


Nothing shows under Summary on Dope Sheet and cannot insert keyframes, either - Blender 2.8 Beta I had prepared everything, following a video-tutorial step by step, to do a little animation (with armature) of this 2D zombie character and when I go to dope sheet, nothing appears under Summary.

I don´t know what I´m doing wrong, what I´m not clicking or have clicked, what needs to be selected.

I have tried everything I can think of in my limited beginner stage, as well as looked for answers on the net to this specific problem and nothing works. Including a screen-shot in case you are able to see what the problem might be right away.

I can´t finish this learning project.

Select the rig model by pressing A in your keyboard the rig will get highlighted in orange in blender 2.8.3 that means everything is selected. right click outside the model but in the same panel ex : 3DViewport. press "I" to insert keyframe. it works for blender 2.8.3.


How should I weight paint for shoulder Region? I was trying to make my character do wave in air but the mesh seems to fall off everytime.
I cannot identify the problem. See the images.

You need to change the IK Pole Angles to -90° so that it doesn't deform your mesh:

Also you need to change the modifiers stack, this seems to be more logical (and enable the Armature modifier's Preserve Volume option):


modifier in python works, but not the same as in the gui I'm trying to use a boolean modifier to difference two objects.  This works, but what it creates is incomplete vs what happens in blender itself.

Here's relevant code:

def difference(self, source_object, modifier_object):
    ## select the object
    bpy.ops.object.select_all(action = 'DESELECT')
    bpy.context.scene.objects.active = source_object

    ## add the boolean modifier to the selected object and apply it.
    bpy.ops.object.modifier_add(type='BOOLEAN')
    bpy.context.object.modifiers["Boolean"].operation = 'DIFFERENCE'
    bpy.context.object.modifiers["Boolean"].object = modifier_object
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean")
    modifier_object.hide = True ## hide the second object

If I call this with a cube and a sphere, the sphere is "cut" from the cube as expected, but there's a hole in the cube instead of a complete surface.  What am I doing wrong?  I've looked at a few different answers, for example using object.modifier.new -- but none have worked so far.

Testing your code, it look to works fine with python 2.73, but i was able to reproduce your result with 2.78.

So, first of all, blender boolean are very bad, sometime they fail for no "good" reason caused by overlapping geometry, edges, holes,... In your case the sphere has a ring exactly aligned with the cube face.

A general solution would be so move slightly the sphere, let say positionning it in 2.001 would be enough.

Another solution for Blender 2.78, the boolean now have two solvers, bmesh and Carve. Using carve seems to work better

bpy.context.object.modifiers["Boolean"].solver = 'CARVE'


Decimate only "bad" objects in a scene I'm working for a company and they have to optimize 3d scenes to be rendered in virtual reality. The problem is that the people who are modeling the scenes are really bad at doing that. I've seen scenes where small objects had a really large amount of vertices (imagine a scene where a building has, let's say, 100 k vertices, and only one lamp has 15 k vertices...)

I want to write a script that decimates the geometry only for those objects that have an insane number of vertices but, how do I detect them?

I was thinking about computing the volume for each mesh and compare it with the number of vertices, but this would be really expensive and I'm not sure It's a good way to detect such meshes.

Any suggestions?

This script:

import bpy, bmesh

THR = 4  # <-- the only parameter. The smaller, the stricter

for element in bpy.data.objects:
    if element.type != "MESH": continue

    # reset
    for m in element.modifiers:
        if m.name == 'ScriptedDecimate':
            element.modifiers.remove(m)

    # scoring function
    vert = len(element.data.vertices)
    areabbox = (element.dimensions.x*element.dimensions.y
               + element.dimensions.y*element.dimensions.z
               + element.dimensions.x*element.dimensions.z)*2
    indicator = vert/areabbox

    # select and decimate!
    if (indicator > THR):
        element.select=True
        decimator = element.modifiers.new("ScriptedDecimate", type = "DECIMATE")
        decimator.ratio = (THR/indicator)**(2/3)
        bpy.context.scene.update()
    else:
        element.select=False

can be useful.

It creates a Decimate modifier for each element where the number of vertices, divided by the surface area of the bounding box, is greater than a set threshold THR. It also adds these object to your selection (and removes all the unaffected meshes). It resets its actions every time you run it again (to avoid double modifiers).

The Decimate Ratio depends on "how far" the original vertex count per area was from the threshold (but it doesn't try to decimate it right to the point where it doesn't exceed the threshold!).

↑↑   verts, faces (tris): 6171, 7182 (12218) → 1743, 2601 (3374)


A light rendering problem or an export problem? I'm encountering a problem, as usual I tried to make it smaller and smaller until I would reach a point where it becomes clear what I've done wrong and after repairing that I rebuild.

But now I run into something I actually don't understand well enough. Let me start from the beginning:

I trying to create an object with Blender that is suitable for use on a 3D-printer. At one point I loose the color I've put via the lamp. Attached the Blender-file stripped of all unnecessary things down to the point I think is the core problem.

What I did basically:

Used Blender v.2.77a, platform Mac OS X;
Started with the default cube, fresh reload;
I set the screen layout to scripting (because I use it later on)
Next I open up a new window, set this to UV/Image-editor;
In the 3D-View, I selected the default cube, go into edit mode, select all;
Then I unwrap the default cube, I used the Smart UV Project, this shows a map (unwrap) of the cube;
In the UV-Editor window I choose image, opened the image (prepared before in Photoshop, a sixfold copy of the same image, saved as Hazel2Cube.png);
In the 3D-view in Viewport Shading I select the Texture option
To light the object I've placed six area lamps, each parallel to one of the sides. I used a very small python script for this, licht-basis.py, go to the editor window open file licht-basis.py and run it via the run script button (once). When I project white light here (RGB colors 1, 1, 1) this shows as a crisp and clear object. I can export this cube to a Wavefront .OBJ file, open it in another program (e.g. MeshLab) and it looks good;
This can be seen in file: cube-problem-1.blend;
And I can export it to a wavefront file, see files: cube-problem-1.obj and cube-problem-1.mtl

The cube shows with the selected image on all sides, just open the attached .blend file to see this. So far, so good.

Problems:

Now I change the scene by changing the color of the six area lights, I  change the varycolor parameter to True (last line in the editor window and immediately I see the result, but exporting this does NOT show these additional colors, the system uses the Blender and built-in Texture rendering by default. This can be seen in file: cube-problem-2.blend, after exporting to a second set of files and comparing the files cube-problem-1.obj and cube-problem-2.obj only differ in the name and referencing to the .mtl-files. It seems that the color of the light is left out when exporting.

So is this an exporting problem or something that goes wrong in the render?

Trying to use a more explicit render, I tried both the Blender and the Cycles, used viewport shading to rendering, they start, run for a few seconds (7?) and show "Done". In the 3D-view I see the lamp colors (although faintly, but they are there) But no image. Saving it in .obj shows the image again without the lamp colors, identical to the other files.

What am I doing wrong here?

How can I combine an image with other colors like the lamps here?

Files:

cube-problem-1.blend
cube-problem-2.blend
Hazel2Cube.png
licht-basis.py
cube-problem-1.obj
cube-problem-1.mtl
cube-problem-2.obj
cube-problem-2.mtl
PROBLEM.txt     - this text

(I tried to attach all files, but failed in doing that...)

Thanks for at least reading this!

Regards,
Wim.

I think the issue is that the OBJ file format does not support any type of lighting information. It simply saves geometry, simple materials, and links to image textures (via the .mtl file).

I think perhaps your first example with the white lights is misleading you, as I don't think you're actually seeing the surfaces lit by the lights in the other 3d app, you're just seeing the image textures shown on the surfaces?


Get a list of all mesh vertices that have a non-zero vertex group value in Animation Nodes How do I get a list of all mesh vertices that have a non-zero vertex group value in Animation Nodes.

Vertex Group Input node can be used as a mask in the Mask List Node to only return vertices locations of those vertices that have non zero vertex group values:


How to render emission materials in 3D viewport? I'm a omplete beginner in blender

I tried to do a 'low poly' volcano. Everything went well, for the lava I have a material, set on 'emission', that emits a glowing red.

However, I can't make it appear in the 3D viewport. It seems like I have a 'viewport display' window, which is set to white, but I don't want to set an other color and would like my material, set on emission, red,  to show on the viewport.

It happens that when I export the volcano on fbx, the material isn't shown either, and I don't manage to see a solution. Has someone ever encountered this problem ?

Do you know about the rendering view and object view?

If so then your emission is too powerful that it becomes white. Reduce its strength.

For the fbx the materials are directly tied to the render engine so exporting it results just the model, there is no solution so far.


How to enable ambient occlusion in the Viewport with Python? I have been trying to access different functionality in blender using python and I stumbled upon this really difficult problem. I can’t find out how to enable or disable the Ambient Occlusion using Python in the viewport. I have looked at the info panel that records the Python actions and it returns a weird (null) method. I did some research on the python function and found their operations, but I can’t figure out how to get Blender to recognize it. I checked all the buttons around it but they didn’t lead to any conclusion. I am at a complete loss of what to do and any help would be awesome

These types of properties are properties of the 3D view, and so that's what you need to access to access them.

This following code accesses the Ambient Occlusion property but this is dependent on how your screen is laid out:

bpy.data.screens['Default'].areas[4].spaces[0].fx_settings.use_ssao = True

'Default' relates to the current screen layout and 'areas' to the various views that might be open (we need the 3D view). The problem with this is if the screen layout changes then the 3D view might not be in areas[4] anymore (as the list of areas will have changed). To solve this we can instead use the following code which will loop through the areas until we find a 3D view:

for area in bpy.context.screen.areas:
    if area.type == "VIEW_3D":
        area.spaces[0].fx_settings.use_ssao = True


How to create old looking/ cracked glass I am looking for old looking cracked glass for a window in a shack scene.
I have looked everywhere but can find a tutorial or material or model on this
please can someone help me on this
thanks

Here, try this:

As Eric pointed out in the comments, the secret here is a Voronai texture set to "distance to edge". I used ColorRamps to remove all the grayscale and leave only black outlines. I made a large, medium, and small set of cracks and mixed them together. I then used this combo as a main image (BaseColor), as a basis for a normal map, and I also inverted it to make an alpha mask.

Final result looks like this:

This can obviously be made better by creating more distortion among the cracks, but I feel this is a good place to start. I'll upload the .blend file so you can experiment.
File is here -
Hope this helps.


What does this dotted box mean in the viewport? A while ago, I realized there was a dotted box at the origin of my chair object. I don't remember when it appeared. It moves whenever I re-position the origin, and it only appears in the layer my object is in. What does this box represent? Is there a way to turn it on and off for any object? It hasn't caused any problems for me, I'm just interested in what it is.

You might have pressed Shift+T, or enabled Texture Space in the Object tab of the Properties panel.

The size and location of the Texture Space are found here, in the Object Data tab:


Lost the workspace menu...how to get it back? Using blender 2.80 stable on Linux with openbox / nvidia.
Once in a sudden the top menu with all my workspace was gone.
Restarting blender does not help. Blender without the related file
shows the menu. As soon the file is loaded it is gone.
How can I get it back?

File New General Click Default View port ...

or

Blender Open another file ... and a menu may be created ...

When you first start Blender
Blender has a program folder and a user settings folder. If you delete the default settings folder, Blender will run by default. Windows 10 exists in the app data folder. I don't know Linux. If it's resolved, you'll find Save Blender Default Startup in the Blender File menu. Be sure to save it and work with it.


What would be the easiest way to UV map a complex object? I'm attempting to make a texture for a model i've been working on, so i've been trying to get a decent UV map, However whenever I do it usually ends up either very distorted or a lot of unrecognizable pieces or several different UV maps. What are some easier ways of unwrapping/UV Mapping?

Model your own UV Map

This technique allows precision control over the geometry of your layout by unwrapping from a Shape Key pose.

"Project From View" allows anything we are looking at in the 3D Viewport to be stamped into 2D space (a UV layout). The trouble is that even if we can get a good projection angle there are usually some pieces of geometry on the other side of the model that will overlap in 2D. The solution I came up with is to model exactly what gets projected. Luckily UV projection takes Shape Keys into account, and we can reseal a ripped mesh without doing harm to the UV Map.

While it is powerful, this approach is not the most appropriate solution for every case. It is best to become familiar with the traditional UV unwrapping methods because often those will suffice. For example, if you have a cylindrical shape then Cylinder Projection is probably the best approach. The following technique is for getting at the hard-to-reach places and it can spare you many UV mapping headaches. It seems the standard unwrapping techniques weren't enough in your case, so hopefully this will help you.

Save a backup copy of your mesh and let's begin.

1. Rip it

Select the edges where you would normally mark seams and instead rip the vertices V, then press Esc to snap them back into place.

You can then select any individual piece or "island" by selecting a single part of the geometry and then Selecting Linked (CtrlL).

Another way is to mark all of your seams first (CtrlE > "Mark Seam"), then select a face and choose Select Linked (CtrlL). The selection will by default be delimited by the seams. (This must be done using Face Selection, not Vertex or Edge Selection.) Then choose Select > Select Boundary Loop, and Rip (V).

2. Add shape keys

From Object Mode, in the Mesh Context, add a shape key for the base mesh, then a second one. Label the second one "UV" and make sure it's selected before proceeding.

3. Flatten it out

In Edit Mode, Edit your model to be flat and fit nicely within a square area. Actually, it doesn't need to be totally flat as long as it appears flat from the projected view angle - that is, no faces overlapping. I found it easier to manage flattening each piece as I finished it. To flatten simply scale along the axis you will project along. In my example it would be SYNum 0. Of course it's not just a matter of flattening, but modeling it into a shape with no overlap and then flattening.

The goal is to end up with a mesh that is flat in its "UV" Shape Key:

This step is a modeling process that will vary from model to model. Here are a few of the tools you will probably find useful during this process:

Select Linked CtrlL - Selects all connected geometry. Use it to select each "island".
Hide Unselected ShiftH - Hides everything except what you have selected.
Unhide AltH - Puts hidden geometry back in view.
Proportional Editing (Connected) AltO - Influences the verts around your selection too.
Shrink/Fatten AltS - Pushes out or pulls in selected geometry relative to the Pivot Point.
Edge Slide GG - Slides an edge loop toward or away from neighboring edge loops.

Remember: Do not add or remove any geometry. When editing a Shape Key pose you are only pushing verts around, not adding, deleting, welding, or extruding. Reshape the geometry by moving positions of the vertices, that's all.

Make sure face normals are pointing toward the direction you will be looking from when you project your UV layout. Do not simply flip the normals. Instead rotate the piece to be facing the correct direction - outer part facing forward.

An animation showing the shape key transition of a model from 3D to 2D for UV unwrapping:

For hard surface modeling especially, such as with the model in your .blend, you will want there to be minimal stretching. So whenever possible, instead of stretching, rotate with the 3D Cursor as your Pivot Point.

Also, for hard surface modeling you have the luxury of separating large mesh objects into smaller, more manageable ones. Separate in places where you can hide the seams, or where seams occur anyway, such as where panels connect. You can then make a UV Map for each object. Each object can have a maximum of 8 UV Maps.

4. Unwrap

Method 1: The simple way

Put your 3D Viewport in Orthographic view. Look at your flattened mesh straight on and Unwrap (U) using > "Project From View". Scale it to fit nicely within the square grid of the the UV/Image Editor.

Method 2: Unwrapping for symmetrical objects

One limitation with Shape Keys is that modifiers cannot be applied while the mesh object is using them. So if your mesh has symmetry generated by a Mirror Modifier, project onto just one half of the UV area. To get the projection perfectly centered, set your Camera to Orthographic, make the dimensions square, and make sure the camera is directly aligned with your object. Enter Camera View (Num 0). The unwrapping will use the camera's bounds as the UV Map bounds. Press U and choose "Project From View".

5. Adjustments

At this stage you can refine the UV Map.
You can grab, rotate, and scale the UV islands to pack them together more efficiently. You may want to check your UV density by creating a UV Grid and nudging the verts of the UV Map so that the size of the texture becomes uniform over the model.

Do an incremental Save As, because next comes a destructive edit.

6. Piece it back together

From Object Mode, delete the shape keys. First the "UV" shape key, then the "Basis" shape key.

From Edit Mode, select the entire mesh, press W, and select Remove Doubles. The vertices we ripped before are now mended.

Applying the Mirror Modifier on symmetrical objects

If your mesh object is using a Mirror Modifier you can leave it on for now in case you want to keep your options open. But if or when you would like to texture the left and right sides differently you will need to apply the Mirror Modifier. (Note that if you plan to use a normal map the two sides must be unique in order to avoid shading problems; the normal map cannot simply be mirrored the way a diffuse texture can.)

Apply the modifier from Object Mode, then from Edit Mode select the newly generated half of your model, including the center vertices. The selected vertices will show up in the UV/Image Editor, however they are lying directly under the vertices that were originally projected. To flip them over to the opposite side, place the 2D Cursor in the center of the UV area on the X axis, set the Pivot Point to be the 2D Cursor, then scale -1 along the X axis.

And that's it, now you have a UV Map that looks exactly the way you want!


version 6100 unsupported must be 7100 or later error! I`ve got this problem when I want import an FBX. Object in Blender.
Did some one know how to fix it?

As already answered (and promptly marked as off-topic) on StackOverflow...

  Try the Autodesk FBX Converter. Unfortunately it is no longer
  maintained, but it can converts many file formats, up to FBX 2013
  format.

  Alternatively, if you know a bit of C++ you can write a simple
  command-line file converter using the FBX SDK.

You can convert older formats to a compatible format using this utility and then import it into Blender.


Blender 2.8 make objects unaffected by light I created this scene by placing lights on each corner of the octahedron. Obviously the rest of my objects in the scene now reflect the lights.

Is there a way to exclude objects in Blender 2.8 from reflecting light? (with EEVEE or Cycles) In this example I'd like the arm to not be affected by the lights.

Alternatively maybe someone could show me how I can color each one of the vertices of the octahedron with e.g. a material emittin the light. I didn't get a helpful answer here. How to color vertices of cube

I would maybe try to limit the Custom Distance of this specific light (so it wont really reflect on the arm) + add a clone of that light near the ground to make it reflect there.

When I cant solve issues i usually try to fake them.


Creating a curve from selected edge and extruding? I'm trying to make a cupboard, and I stumbled upon a problem (I'm a total beginner). I want to convert the edges shown in the picture to curves, bend them a little, and convert back to edge (in order to extrude the whole thing). I created the shown shape using the Knife tool. The reason is I'm trying to recreate a cupboard that has an negatively extruded design in a "smooth fashion" (see pic, kinda hard to explain). I'd really appreciate some help or a link to a youtube tutorial, I can't seem to find an answer to that.

Why don't you make the drawers separate meshes? It's more logical and it will facilitate your work. Also, rather than converting curve to mesh, you should just draw the 3D profile with edge loops, then extrude, then bevel, etc...


How do I bake/add material colors onto my UVmap? I looked everywhere from tutorials to documents and either they only talk about texturing or they are doing the tutorial in 'blender render' when I need it in 'cycles render'.

I have a cube that is toon shaded red. And as you can see it is unwrapped to show the map.

Now I would like to add the color that's on the cube onto the map.

As you can see at the bottom of the image that I created a new image called 'untitled'. Now the next step of baking the colors onto the map is where I become lost. Regardless of which 'Bake Type' that I used, I keep getting error messages like: No valid selected objects.

Everything looks selected to me. No, I am not new to Blender but I am new to color baking. Thank you for any help provided; I used a simple cube first before using other models I already created.

Befor baking you need to open the Node editor and there add an image to bake to.

It is very important that this Image Texture node is selected before baking.

1: Open a node editor window.

2: Put a check against the Use Nodes option.

3: Add an Image Texture node.

4: Load the image that you want to bake to into the Image Texture node.

5: Before leaving the Node editor make sure that the Image Texture node is selected.

6: Hit that bake button.

Hope this helps some  :)


Animation of series of rotations I have many lists of rotation matrices for one object. The lists have different lengths. For each list I would like to obtain an animation where the rotations are performed one after the other in the order of the list.

This could be done with a sequence of "animate matrix" nodes where the result of the first node goes into the "start" input of the second node etc. "Delay time nodes" would control the start of rotations.

However, this approach requires that the node tree is changed for each list, depending on the length of the list.

Is there a way to obtain a node tree that works for any length of the list of rotation matrices?

First, we are going to compute what you might call the Accumulated Transformation of each matrix in the list, this accumulated transformation is simply the result of multiplication of all the matrices in the list before that matrix. This is done using this simple loop:

Notice that the Matrix parameter is initially identity matrix. Then we are going to use the same principle describe in this answer to animate between all the accumulated transformations as follows:


How do I make a pop up dialog that goes away when pressed "ok"? I made the code below. It does exactly what I want except that the pop up dialog does not go away after pressing "ok" button on the pop up. Basically I want a pop up dialog where the user enters a name for the scene save. I trimmed the code to make it concise here.

Everything seems to work except that after I put a name in the field and press "ok", the dialog still stays there, instead I want it to go away after pressing "ok"

class MYOP(bpy.types.Operator):
    bl_idname = "wm.myop"
    bl_label = "Scene Save"

    name = StringProperty(name="Name", default="")

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

    def execute(self,context):
        bpy.ops.wm.myop('INVOKE_DEFAULT')
        savescene(context, self.name)

        return {'FINISHED'}

Menu code:

class FILE_MT_SceneSave(bpy.types.Menu):
    bl_label = "SceneSave"
    bl_idname = "FILE_MT_scenesave"

    def draw(self, context):
        layout = self.layout

        scn=context.scene
        wm = context.window_manager
        layout.operator("wm.myop",text="Save")

I am targeting Blender 2.80.

When you press "Ok" you are calling the execute method of the operator, in which you are re-calling your operator. Get rid of bpy.ops.wm.myop('INVOKE_DEFAULT') in the execute method.

Blender 2.8 uses annotations for properties.

Blender 2.8 uses strict naming conventions for operator and panel class names. For the operator with id wm.myop the class needs to be named WM_OT_myop.  Please check the system console for errors.

Test script.  Added to text menu of text menu for example sake./

import bpy

class WM_OT_myop(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "wm.myop"
    bl_label = "Simple Object Operator"
    # annotations in 2.8
    name : bpy.props.StringProperty(name="Name", default="")

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

def menu_draw(self, context):
    self.layout.operator("wm.myop")

def register():
    bpy.utils.register_class(WM_OT_myop)
    bpy.types.TEXT_MT_text.append(menu_draw)

def unregister():
    bpy.utils.unregister_class(WM_OT_myop)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.myop('INVOKE_DEFAULT')

In order to make the operator work as part of a 'floating menu' you have to set the operator_context property of the layout beforehand, which basically allows to display the popup:

import bpy

class WM_OT_myop(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "wm.myop"
    bl_label = "Simple Object Operator"

    name: bpy.props.StringProperty(name="Name", default="")

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

class Custom_MT_Menu(bpy.types.Menu):
    bl_label = "Custom Menu"
    bl_idname = "OBJECT_MT_custom_menu"

    def draw(self, context):
        layout = self.layout
        layout.operator("wm.save_as_mainfile").copy = True

        layout.operator_context = 'INVOKE_DEFAULT'
        layout.operator("wm.myop")

def register():
    bpy.utils.register_class(Custom_MT_Menu)
    bpy.utils.register_class(WM_OT_myop)

def unregister():
    bpy.utils.unregister_class(Custom_MT_Menu)
    bpy.utils.unregister_class(WM_OT_myop)

if __name__ == "__main__":
    register()

    # The menu can also be called from scripts
    bpy.ops.wm.call_menu(name=Custom_MT_Menu.bl_idname)

Further reading: How to call a confirmation dialog box?


Is it possible to make physics respond to the effective mesh after a displacement material has been applied? So let's say I have a procedurally heightmapped plane (texture -> displacement -> material output) and use the Cycles-exclusive "Bump and displacement" option. Is it possible to have rigid body physics respond to this as if it were the mesh?

Unfortunately that isn't possible - the 'Bump and Displacement' option (by connecting the 'Displacement' socket on the Material Output node) operates on the rendered result only - simulations cannot access the displaced geometry.

In order for smulations such as Rigid Body physics to be able to take account of displacement you need to use a Displacement modifier and set the rigid body collision settings set to enable 'Deforming' (by setting the 'Mesh' shape Source to 'Final' (All modifiers)).


EEVEE rendering with a weird 'pixel effect' I have a problem wtih the new version (2.81): EEVEE renders wtih a weird 'pixel effect' on meshes. Even when i render the image i get this effect. I don't know where's the problem. I've already tried to reinstall it but it doesn't change. Does anybody know how to solve it?

Turn off shadow, go to light then click off shadow.


Unknown option removing background In render Background material just showing as blank (Plane background with image texture on it) If I put a working material onto it, it still shows as blank, Its all checked in the top right, cant see what I've done, was trying to get a toon shader on and changed something following a tutorial.

When I render the vehicle looks exactly as I want it but I cant for the life of me get a new plane to show an image (UVMAP used and tried Coordinates)

There are a couple of different problems with your scene that are causing black materials.

The ground for example is missing a shader. You have the image texture directly connected to the shader output, and there should be a shader in there, like a Diffuse, or Glossy or Toon.
The glass color is a bit dark, though that may be the look you are aiming for.
In the Light Path settings of the render panel you have all bounces set to zero, which will make most transparent or reflective materials return black

General tip, watch for the socket colors in the material node editor, under most circumstances connected socket colors should match (green with green, blue with blue, etc).


How can make the state of a boolean property relative to the 3d view area? I need to keep unique boolean properties attached to screen area (view 3d) which may have at the same time different states depending on the context view area, like propertie lock camera to view or use local camera can have different state in different 3d view areas.

For now I managed to declare a variable but which reacts globally, it changes state in all views.

import bpy
from bpy.props import StringProperty, BoolProperty
from bpy.types import PropertyGroup, Panel, Scene
from bpy.utils import register_class, unregister_class

class MyPropertyGroup(PropertyGroup):
    My_Bool : BoolProperty()

class PANEL_PT_panel(Panel):
    bl_label = "Boolean relative to 3d view area"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "View"

    def draw(self, context):
        scene = bpy.context.scene
        layout = self.layout

        row = layout.row(align=True)

        col = row.column()

        col.prop(scene.mybool, 'My_Bool', text="My Bool")

classes = (MyPropertyGroup, PANEL_PT_panel)

def register():
    for i in classes:
        register_class(i)

    bpy.types.Scene.mybool = bpy.props.PointerProperty(type=MyPropertyGroup)

def unregister():
    for i in classes:
        unregister_class(i)

    del bpy.types.Scene.mybool

if __name__ == "__main__":
    register()

how can I "contextualize" his state ?

there is a specific way to register it ?

Make it a screen collection property

The best fit would be bpy.types.Screen Then the issue is a screen can have many areas, and we cannot tack a rna property onto a bpy.types.Area

I have fudged around this by keeping a collection indexed the same as the area collection, and make a collection item property the boolean. Eg context.screen.my_collection[i].my_bool where i = context.screen.areas[:].index(context.area) Would need some way to keep consistent when areas are merged, created.

Here I've populated on register, adding an item for a potential 20 areas per screen.

import bpy
from bpy.props import StringProperty, BoolProperty
from bpy.types import PropertyGroup, Panel, Scene
from bpy.utils import register_class, unregister_class

class MyPropertyGroup(PropertyGroup):
    mybool : BoolProperty()

class PANEL_PT_panel(Panel):
    bl_label = "Boolean relative to 3d view area"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "View"

    def draw(self, context):
        screen = context.screen # notice no bpy needed
        layout = self.layout

        row = layout.row(align=True)

        col = row.column()
        i = screen.areas[:].index(context.area)
        ap = screen.my_area_props[i]
        col.prop(ap, 'mybool', text="My Bool")

classes = (MyPropertyGroup, PANEL_PT_panel)

def register():
    for i in classes:
        register_class(i)

    bpy.types.Screen.my_area_props = bpy.props.CollectionProperty(type=MyPropertyGroup)

def unregister():
    for i in classes:
        unregister_class(i)

    del bpy.types.Screen.my_area_props

if __name__ == "__main__":
    register()
    # over populate it
    for screen in bpy.data.screens:
        screen.my_area_props.clear()
        for i in range(20):
            screen.my_area_props.add()


Where is the default text object font (Bfont)? I've found bmonofont-i18n.ttf.gz and droidsans.ttf.gz in the datafiles/fonts directory, but neither seems to be the default font that's actually used for Text objects.

Here's how the default font looks:

Here's bmonofont-i18n.ttf:

droidsans.ttf:

Clearly, the fonts I've found are not the same as the actual default.

I want to find the actual default.

The font is bfont.pfb

This is a built-in font which means it  is compiled into blender. The font file is available from the blender source tree in release/datafiles

You can access and download the file, e.g., from the GIT repository at blender.org:

http://git.blender.org/gitweb/gitweb.cgi/blender.git/tree/HEAD:/release/datafiles

In the directory listing, search for the file bfont.pfb and click in the rightmost column on "raw" to download and save the file.

Or try this direct link:

http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/release/datafiles/bfont.pfb


Compute the normal of a 2D spline using animation nodes In this question I asked how to deform an object with an spline using animation nodes. The technique explained there the deformation considers all 3 dimensions tilting the output object, but what if I want to deform this object locking the tilt as if it was done with a 2D spline but still deform in a 3d space?, exactly as it is done here.

EDIT

Using @Omar Ahmad answer I managed to get the results I needed. but I'm still a little bit confused. The following image shows the resulting graph:

I'm not quite sure if the new computed normal is correctly linked as in order to get the desired results I was forced to increment its Z value up to 1000.

The normal to a point on a spline is equal to the tangent at this point rotated by 90 degrees around the z axis. Let the tangent be $\vec{t} = (x, y)$, then the normal is equal to $R\vec{t}$, where $R$ is a 2D rotation matrix with an angle of $\frac{\pi}{2}$. So the normal is equal to:

$$
\begin{bmatrix}
\cos \frac{\pi}{2} & -\sin \frac{\pi}{2} \\
\sin \frac{\pi}{2} & \cos \frac{\pi}{2}
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix} =
\begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix} =
\begin{bmatrix}
-y \\
x
\end{bmatrix}
$$

So, given the evaluated tangents, you can compute the normals as follows:

To deform an object as described in the answer you linked, you will need a third vector, the one we computed using the cross product. In this case, it will always be the vector $(0, 0, 1)$.


How to make a sphere which number of faces is divisible by 5? Hy all,
I am a beginner in Blender, I get all things I want done eventually, but this one is a total mystery to me, either it is too simple or simply to hard :):
Original or default UV sphere mesh has 32 faces which make circumference of the sphere (x,y direction), but I want to make a sphere which number of faces are divisible by 5, I+ve tried everything, subdividing, decimating...but can not get number divisible by 5. Merging or dissolving edges is not an option since I want even faces.
Does anyone have any suggestion? Or script perhaps?
Thank you,
Tasha

Hit T to bring out the Tool Shelf. In the lower part of it, there should be a section where you can set the properties of newly added objects. If there isn't, put the mouse pointer on the little + sign and pull up.


How to do PoseBone.children? I got an armature, with bones connected, so everything set up just fine. I want to get a bone's children through the .pose.

Like:

v = objects["armature"]
a = v.pose.bones[0] #got the root bone

Then I want to go through the children recursively. Only problem is that a is a PoseBone and has only .child property.

Only way I found to get all the children is like a.bone.children then get all of their .name and find them in v. That is "fine"...

My question to the more experienced bpy fans is that if there is a better way to get this set of bones?

The children attribute is a convenience property, That is to say - Blender doesn't store a list of children for each bone, This attribute has just been added to some types since its such a common task.

Objects have this, but as you have noticed, not pose bones.

This can be monkey-patched in with:

import bpy

def pose_bone_children(self):
    obj = self.id_data
    pbones = obj.pose.bones
    self_bone = self.bone
    return tuple(pbones[bone.name] for bone in obj.data.bones
                 if bone.parent == self_bone)

# Add the property to the class at runtime
bpy.types.PoseBone.children = property(pose_bone_children)

Note that this will be included in 2.69, Committed r60407


Black Water in Fluid Sim I am making a fluid sim with blender 2.77 (same result in 2.79) in cycles render. Water flows from a pipe into a pool and there are a few obstacles etc.

Now I have an issue if I set the quality factor high (100, 120, 150, 200) always the same result with different forms. Here the picture:
Quality 200, 1-2 Subdivisions, 1.0-1.5 smoothing :

The former picture looks good, though it still has the black shadow on the inflow water.
Quality 80, 1 Subdivision, 1.0 smoothing

I am trying to get rid of the black spots/shadows in the water.
The lighning is done mainly by the world and one lamp.

Thanks for any help.

I solved both issues:

1, Getting rid of the black "stripe": Setting the container (the concrete surrounding the water) in the fluid simulation under the "Volume Initialization" settings from "both" --> "shell".

2, Getting rid of the black surface of the water inflow:
Setting the amount of "max bounces" at least at 8.

It is still not perfect, but definately an improvement.


Pixelated paint strokes on transparent Blender-created texture Version: 2.76b, Renderer: Cycles

I have a material on an object. This material is made up of two textures: One created in Photoshop, which is semi-complete, and a second one that was created within Blender that has it's alpha channel decreased to zero.

I want to add painted details to the object on this transparent texture, so that I can export that texture into Photoshop and use it as a layer.

I also want to paint on this transparent texture while both textures are displayed in the 3D view. So, I have to change the shading mode to Material, which shows the 'finalized' material with both textures mixed together.

However, when I paint in the view the strokes have pixelated edges, despite them being completely normal in other rendering modes (these are useless as Renderered is laggy while painting and Solid/Texture modes do not show the finalized material, obviously). This is an obvious issue as I'm not able to see what the 'real' stroke looks like on the finalized material.

I may have tracked the problem down to the fact that I'm painting on a transparent texture. When the alpha is put back to 100%, the strokes are correctly smooth, but then it's an opaque image when exported to Photoshop, which is not what I want.

Is there any way to do this non-destructive way of painting textures or do I have to simply paint on the original semi-complete diffuse texture and export that one?

Richard Marklew, a mod at BlenderArtists.org answered my question:
Fix

It seems I was supposed to hook up the transparent texture's Alpha to "Fac" of the Mix Shader in the node editor. Fixed it easily.

Edit: I'll mark this as the Answer in a couple of days due to the account limit.


Tangent handles in Graph editor no longer can be moved I'm pretty new to blender- thing is ive been editing the ins and outs of tangent handles all day and obviously now something i've done means i can no longer edit the tangent handles- anything i do simply wants to move the key and the handles up or down or left or right- thats going to be no good when i want the curves to cycle well

I even opened a fresh blender- added a cube and transformed that- those handles were editable

ive tried the many tangent types too just to see if an auto tangent thing is being applied

any ideas?

Good point man

I hear the blender community is polite and helpful

I had accidentally switched on proportional editing

One of the tiny buttons along the top of the GE


How can I make metal look decayed and rotted I want to make a plane look like its been decaying with rust holes in the jungle for decades like this picture.

I think I remember seeing an add-on that could do this, I could be wrong, but any help is greatly appreciated.

Final:

Overview:

Basically you can use the same method as for creating any other rust material with one exception at the end - mix your rust material with Transparent shader trough "rust mask", created beforehand. This will create hard holes in your mesh. I've used Greater Than math node to harden texture.

  There is downside to this method. You can't add thickness to the mesh.
  If you add Solidify modifier, the edges will be empty. You can try to
  work around this with Volume texture but it could be an overkill.


weird color hue in everywhere I press somewhere in rendered image and color hue is changed. I close the project and reopen it but still same. how do I fix this?

huh that is weird. I just reset the curves in color management tab with "reset" button. it worked even I set the same veriables. I guess we can use color management in rendered image. idk


blender cycles render bake doesn't uses world emitted light In blender cycles the world emits light, so the preview shows the objects illuminated by the world light but when I bake the texture ends up black, how do I enable this world light to be in the bake?

Second edit, I finally found the cause of the problem, I have in blender 2 objects, one is engulfing the other this engulfer is a tube with a weird shape, the thing was that I had this tube as "restrict from viewport visivility", in the "preview" the tube was not affecting the rendered image but in the "bake" it was, can this be considered a bug?


How to add image on 2 materials? I have 2 material and i want to put a image above the 2 material.

I have created a bus model and to the below part i have 2 material white and blue. In between on the top of the 2 material i want to add transparent image of ice-cream (as show above.) I have attach the bottom part and icre cream image. How to set up the nodes for it. Thanks

Your question is not clear, you're talking about putting your ice-cream picture in-between the 2 parts but in your screenshot it is on the blue part only. However, what would work in both cases is giving each part its own material, as it is already the case, but reunite the two unwrapped parts, as I've done, and in both the 2 materials, use the same UV (which will be the case by default if you just plug the Texture Coordinate / UV output), then use the picture as an overlay like you've already done for one (with the alpha in the factor). With this nodes organization you will control the position of your ice-cream picture just by moving the UV position in the UV/Image Editor, whether you want it on one part only or in-between. As the UV is common to both materials, what you decide to do with the UV map will impact both the 2 materials.


Can you make a button have more than one purpose? So, I have a blender game file with multiple levels, each in a separate scene.  I want to have on "Next Level" scene with a button to go to the next level.  Can I make the button always go to the the next level or do I have to make separate "Next Level" scenes?

Typically keys and buttons have a purpose dependent on the context.

According to your question the context of "next level" is a current level.

Therefore you need to determine the current level to find out what operation the button is supposed to perform.

It does not need to be complicated. But there are quite a lot of different solutions.

Level Scene switching itself

Assumption: the level scene is still running (e.g. as background scene)

on activating your button send a message "switch to next scene"

on receiving "switch to next scene" let an object of the current level scene switch to the next scene.

Requirements:

you start with a level scene, as there is nothing that loads it otherwise
each level scene implements a switching object

Menu scene switching level

on activating your button send a message "switch to next scene" (see above)
an object knows what the current level is (not necessarily the scene)

on receiving "switch to next scene" this object changes to next level

on changing the level switch to the according scene

I suggest to keep the level in a property either as string or as number. A number is simple as it allows to be incremented.

The important idea is that you first set the level. In reaction of the level change you add, remove or switch scenes (or do other things).

I hope you see this method makes it easy to even add a "previous level" operation.

Remarks:

When you have a lot of scenes you will need to setup a lot of scene setting too. In that case it might be easier to use python to "calculate" the name of the scene that belongs to a level. But this is another topic.


Why can't I move object? I'm beginner and I don't know what I clicked to make it happens.
I can't neither move nor scale object, but the orange dot at the center of object.
Help please

Uncheck "origins" (which is to move the object's origin only, the orange dot is the origin):

When objects have this colored X/Y/Z arrows that means this option is activated.
This options corresponds to the Ctrl. shorcut.


Floating rigid bodies not affected by wind (2.92) I'm trying to make some floating rigid objects blow away in the wind. I have applied a rigid body to all of the objects separately, and have a wind force field pointed at them. When I hit play, the objects all fall unaffected by the wind. What's going on here? I've tried the workarounds in this post but they haven't helped either.

just change the strength of your force field from 14 to 5000 and you WILL see a difference ;)


How to set minimum and maximum fields of a custom ID property using Python I have created a custom property and want to set a minimum and a maximum for it through python; I tried to make it using bpy.ops.wm.properties_edit but it didn't work,so how can I edit a custom property with Python?

Here is how I defined my property:

bpy.data.objects[name of my object]['name of my property'] = 2

This is what you do to set min to 0 and max to 500, the soft_min and soft_max is optional and is only for dragging in gui:

ob = bpy.data.objects[name_of_my_object]

# this is a dictionary containing IDprops settings
# this creates it and erases it:
ob["_RNA_UI"] = {}

# add properties settings like this:
ob["_RNA_UI"]['name_of_my_property'] = {"min":0.0,
                                        "max": 500.0,
                                        "soft_min":0.0,
                                        "soft_max":500.0}


Is there an easy way to remove overlapping faces? Is there an easy way to remove overlapping faces? In the example remove doubles doesn't work

You might be able to do the following: A to select all faces. X > Only Faces. F to create faces, but after deleting the faces I'm left with something like this.

If I press A to select all and then press F to create faces then there are still overlapping.
Blend file

Depending on what kind of topology you are looking for you can use grid fill.

Select the outer edgges (Use Alt click and then Shift Alt click)

Invert the selection (CtrlI)

Delete edges and Faces

Then do Grid Fill and play with Span and Offset to adjust the grid.


How to remove sub surf on z axis? I am really new to Blender, so please bear with me here.  I was trying to make a Starbucks cup, so I needed to get a round-edged plane (for the middle part of the cup).  I got help from a friend, who told me to subdivide the plane, then use a subsurf modifier to create the rounded edges.  All is good and fine on 2D, but when I extrude to create the height of the cup, I get this weird thing:

I think this is because the subdivision surface is being applied to the z-axis too, but I don't really want that.
Can I apply the sub surf to the x and y without affecting the z?  Again, please excuse my ignorance.  Any help would be appreciated.

No you cannot, subsurf applies to the whole mesh evenly in all directions.
What you need is to learn how to use what are generally called "control loops".

Control loops are extra edges you add to your geometry to keep subdivision surface from rounding out parts of the mesh you don't want to be smooth or curved. You can add them using Ctrl + R

Also consider a simpler method using the screw modifier since you are creating a simple revolution geometry


second particle hair system made both disappear from render I got the beard working fine with the vertex group. I added a second vertex group for the eyebrows, added a second particle system and now both have disappeared from the render

You need to switch back into object mode before you render. If you stay in particle edit, it won't render. One of Blender's quirks.  Does that seem crazy? You tell me.


Switching ctrl and cmd on MacOs Is there a way to switch the control and cmd keys while working with blender? The short-cuts bacome kind of inconvenient, because I am used to work on windows

You can change it in the user preferences in the left corner by clicking on File then User Preferences. From the window that opens choose the Input tab and then change the keyboard shortcut for the desired key. Then you are done.

You can get the pdf for keyboard shortcuts. It's a simple keyboard shortcut PDF and may help you in future.


Blender 2.8 material not applied to separ I have created a separate object from vertexes in an object (pressing P ). The object gets created but I can't seem to apply materials onto it.

The selected object ("Facade") doesn't change when different materials are added to it:

It should have a light brown color (same as the base of the building).

I've managed to change the material by selecting faces (Ctrl + L does this more quickly). Click assign after selecting faces and changing material.

I sometimes manage to create a new object from vetexes and then assign a material to it. Sometimes, I can't. I really have no clue as to why.


VSE: Video is imported at incorrect framerate, and setting to correct framerate desyncs audio I have a long video that I'd like to insert in the Blender VSE. So I open the default blend file, enable AV-sync, and add the movie strip. Somehow, the video is already the same length as the audio strip.

The default framerate is ~29.97 fps, but when I open the source in VLC it says the source framerate is about 36.

I move the playhead to around halfway through the audio strip in Blender, and it's entirely out of sync with the video. But the strips are already the same length! I tried setting the framerate to what VLC said the source's should be. Now the ends of the strips are nearly ten thousand frames apart and the synchronization problem is even worse.

I haven't been able to find suitable answers from similar questions on Stack Exchange. They're either "add a speed effect strip" (the strips are already the same length, they're just not in sync) or "make the Blender framerate match the source video framerate" (which I did).
Edit: The question marked this is marked as a duplicate as reached the same solution, but it is really a different question.

36.000560 is not a standard frame rate by any means (is this some screen recording or is this done with a cheap phone?). When you find those frame rates it is possible that the recorded video is compressed using variable frame rate. Blender cannot deal with such files. You will need to transcode to a standard and constant frame rate for blender to work with your file.
Or you can try using another video editing app (blender's video editing capabilities are not as developed as other apps out there).


Get hard shading normals in BPY I'm writing an exporter and have some problems with my normals. Relevant Code:

def mesh_triangulate(me):
    import bmesh
    bm = bmesh.new()
    bm.from_mesh(me)
    bmesh.ops.triangulate(bm, faces=bm.faces)
    bm.to_mesh(me)
    bm.free()

meshes = [m for m in context.scene.objects if m.type=='MESH']
for obj in meshes:
    # create a new mesh with all modifiers applied
    mesh = obj.to_mesh(scene, True, 'RENDER', calc_tessface=False)

    mesh_triangulate(mesh)
    indices = list()
    for poly in mesh.polygons:
        for i in poly.loop_indices:
            indices.append(mesh.loops[i].vertex_index)

    positions = list()
    for v in mesh.vertices:
        positions.extend((v.co.x, v.co.y, v.co.z))

    normals = list()
    for n in mesh.vertices:
        normals.extend((n.normal.x, n.normal.y, n.normal.z))
    bpy.data.meshes.remove(mesh)

With this I always get flat shading. When I export the same object, once with smooth and once with flat shading, the indices, positions and normals are completely the same. I would expect to have each vertex multiple times for flat shading, to that I can have different normals at the same position, but this does not happen in my approach. I also need to have all modifiers applied and a triangulated mesh.

How can this be fixed?

Normals (except for normal maps, and some really strange formats) are always stored one-per-face or one-per-vertex. The renderer will calculate a normal for each pixel at display-time, but that normal is not stored in the mesh.

Smooth shading (interpolation) does not add data to the mesh, which is why it's so desirable. It is like a "post-processing" step. When rendering a given pixel (smooth shaded or not), the renderer has to use the normal to calculate incidence angle, to get a shading value. If smooth shading is off, then it just uses the normal that's stored for that face to calculate the incidence angle. If smooth shading is on, then it calculates an intermediate normal for that pixel that's a "blend" of the face's normal and the normals of the adjacent faces. That temporary "in between" normal is used to calculate shading for that pixel, and then discarded. Those "in between" values aren't stored anywhere. They're always calculated at display-time.

Some file types have a flag that indicates whether the receiving system should do this interpolation or not, but it's up to the receiving system to actually do the interpolation. That interpolation doesn't get stored in the mesh.

Some file formats (like OBJ) do store smoothing groups, but that only describes the borders where hard edges should NOT be smoothed.

More information on Smoothing Groups.


Attach edge without existing verts I'm new to blender, and I've created a bunch of disconnected geometry to practice building clean topology.  I'm just wondering, what's the best way of tackling this problem?

The highlighted edge has been extruded, and needs to be connected to the edge on the left, however there aren't any verts there, so it would just float.

What's the best way to connect these two pieces together?  I could go ahead and cut in the verts first, then extrude.  I was just hoping there is a method for automatically inserting the verts on the left hand edge?

Apologies if this has already been asked, it's sometimes difficult to articulate the problem!

As stated my lemon, there are numerous ways and you need to consider the flow of the topology. Nevertheless, here is the most basic method.

Hover over the edges to the left and press ⎈ CtrlR to loop cut. A purple line will appear during this operation, scrolling the mouse wheel controls the amount of added edge loops. I scrolled once. Confirm with  LMB.
 RMB Select the vertices respectively and make a face with F.


How do I bake a Bent Normal Map in Blender The bent normal is the direction where most ambient light comes from. The median ray that did not intersect the mesh.

It is not the same as object space normals. A bent normal map could be baked in object space or in tangent space.

Bent normal maps are used to for more realistic realtime shading (GI approximation, specular occlusion)

Some links of where I got the info:

https://blender.stackexchange.com/a/137061/83384
https://github.com/keijiro/BentNormalTest
https://docs.unrealengine.com/en-US/Engine/Rendering/LightingAndShadows/BentNormalMaps/index.html
https://polycount.com/discussion/102351/minitut-bent-normals

So how would I bake a bent normal map using Blender (with Cycles)?

I managed to write an Open Shading Language script that provides an ambient amount output (AO) and a direction vector from which the most ambient light came from. This can be used to create the bent normal map.

To use it, switch render engine to Cycles and enable the Open Shading Language checkbox.

For the object from which you want to bake the Bent Normals add a material if there isn't one yet. In the Material Node Editor add a Script Node and select this script:
AmbientOcclusionDirection.osl

Make sure the input Normal node is connected to the Normal from a Geometry input node. And the output NonOccludedDirection node to the Normal node of the shader.

Then bake as you would bake a normal normal map :-)

To check if the Distance and Samples settings are reasonable before baking, connect the AmbientOutput to the color and make sure the AO gradient is nice.


What is the reason these two UV maps interfere with each other? The selected face shouldn't be painted with the text "This" from the third texture of the material (see in Property region on the right):

There are two UV maps used for the cube mesh, one for the full cube (6 faces), one for the top face alone. The material includes three textures, the two first ones (background colors and white dots) are to be used with the full cube UV map visible in the middle panel, the last one is the text, also visible in the middle panel. Its map is the large square around it.

The selected face, and the other faces except the blue one, keep receiving the portion of the circular text they would receive with the full cube map. What's wrong?

Using Blender Internal (2.79).
File is available here.

The problem is that your UVMap Face 1 is actually mapping the Face 1.png

In your list of UV Maps, select the UVMap Face 1.
In the 3D view, select all the faces except the dice face 1.
In the UV/Image editor, press W twice (Weld) and move the dot to some where safe(transparent)

That'll resolve your problem.


Models for 3D printing are sliced wrong, can't figure out optimal thickness I have a 3D printer with 0.3mm and 0.8mm nozzles, and I am trying to figure out the optimal line widths for extruding some line art.

Workflow

I create the vector graphics in Illustrator, expand strokes and group everything as a Compound Path: Slice-test.svg
In Blender I import the SVG, go to Properties panel > Curves, extrude to approx. 2mm height, then convert to mesh: Slice-test.stl
I take the exported STL and slice it with Slic3r, 0.3mm nozzle diameter: Slice-test.gcode

Results

The first layer comes out wrong:

What's going on here. Is there something wrong with the model? I'm trying to figure out the best thickness and angle sharpness so that I can produce a bunch of extruded line art for making molds. I'm trying to avoid interrupted perimeters and fingernail-looking things at corners:

Also my workflow seems kinda slow for such a basic task. As a noob to Blender and total noob to Python scripting where can I learn about automating the part with the SVG import > Constant thickness extrude > Mesh > STL, so I can focus on the line art?

I opened your Slice-test.stl file in cura, and this is what I get:

The first layer appears correct to me.

Since you did not provide the line art for your flowers, I cannot verify that with cura.


Is the Game Engines Coodinate System different? I tried to rotate an object around its z-axis, by using a motion actuator with z-rotation (blue axis in screen) but it rotates around the y-axis (green).

Are y and z-axis for some reasons swaped in the BGE?

No - Suzanne (the monkey) has her Z axis pointing out from her face, and the Motion actuator defaults to use local coordinates. Either:

Apply rotation to the mesh (Object>Apply>Rotation), or
Switch the actuator to world coordinates (press the L toggle button on the right of the Rot row).


Syntax Question Python, a command with two variables I have a question to python programming. I'm writing PieMenus for my Spacemouse. It's a Syntax Question. I want to use a comand with a action and a true command at the same time.

So I want to build a menu like shown in the picture

But the code for the Extend comand dosen't works. I get the same effect like in select parent.

# Pie Selection Edit Mode
class PieSelections_PM(Menu):
    bl_idname = "pie.selectionspm"
    bl_label = "Pie Selections Pose Mode"

    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()
        # 4 - LEFT
        pie.operator("view3d.select_border", text="Border Select",
                    icon='BORDER_RECT')
        # 6 - RIGHT

        pie.operator("pose.select_constraint_target", text="Select Constraint Target", icon='FORCE_CURVE')
        # 2 - BOTTOM
        pie.operator("pose.select_all", text="Select None",
                    icon='RESTRICT_SELECT_ON').action = 'DESELECT'
        # 8 - TOP
        pie.operator("pose.select_all", text="Select All",
                    icon='RESTRICT_SELECT_OFF').action = 'SELECT'
        # 7 - TOP - LEFT

        pie.menu("pie.selection_Parent/Child_Extend_PM", text="Extend Parent Child", icon='LINKED')
        # 9 - TOP - RIGHT
        pie.operator("pose.select_all", text="Invert Selection",
                    icon='FULLSCREEN_EXIT').action = 'INVERT'
        # 1 - BOTTOM - LEFT
        pie.operator("view3d.select_circle", text="Circle Select",
                    icon='BORDER_LASSO')
        # 3 - BOTTOM - RIGHT
        #pie.menu("pie.selection_Parent/Child_PM", text="Parent Child", icon='GROUP_BONE')
        box = pie.split().column()
        box.operator("pose.select_hierarchy", text="Select Parent", icon='ZOOMIN').direction='PARENT'
        box.operator("pose.select_hierarchy", text="Select Child", icon='ZOOMOUT').direction='CHILD'
        box.operator("pose.select_hierarchy", text="Extend Parent", icon='DISCLOSURE_TRI_RIGHT').direction='PARENT'.extend=True
        box.operator("pose.select_hierarchy", text="Extend Child", icon='DISCLOSURE_TRI_DOWN').direction='CHILD'.extend=True

The code with I want to change is that one below. How I have to seperate  "direction='CHILD'" and "extend=True"?

So with the comment I made the following code, which works well:

    #The props= is to get two multiple arguments with one operator.
    props=box.operator("armature.select_hierarchy", text="Extend Parent", icon='DISCLOSURE_TRI_RIGHT')
    props.direction='PARENT'
    props.extend=True


How do I apply complex texture in Blender? I have basic skill for 3D.

So I have an .obj file and the texture assets extracted from the game called Mobile Legends.

I want to import the model but the original model texture or shading is too complex for me, but I want to know how to make texture or shading like this.

Here is the original model.

As you can see the model is very complex, so I want to ask your help.

How to make the animated texture or material (I don't know either texture or material that animates in it) like on her arms and her legs?

I wonder if it is uses a mask. I have the material but I have no idea how to make it happen. I search on google, I got no answer. So I ask here.

If you want to take a look the texture and material, here it is:

And I don't know which the mask material is on that asset list.

If you want to take a look the .obj use this link

i built you a setup how this works in blender. for better understanding you should inform yourself about UV-Coordinates, and Normals maps.

For animating the glow effect of the armour you could animate the marked green multiply.
For animating the glowing helmet you could animate it with the mapping node, for example with rotation. But this depends what kind of effect you want to achiev.

What i didnt took into account is the color id map/mask texture so you could controll the glowing areas individualy. To achiev that you could implement this solution: Using an RGB map to assign various shaders in a material

Body-Material:

Helmet-Material:

if you have any further questions, feel free to ask.


How do I duplicate an armature and rig? I have an armature/mesh in my scene. I want to duplicate this rig multiple times so I can have multiple instances of the same character. Problem is that all the armatures behave to their meshes, but only the original driver panel (floating above the character's head) controls all the other characters. This is very confusing for me and I would appreciate any help you could give.

This rig is appended to my scene (not linked) and I have not set any keyframes.

I know very little about rigs, so extra detail is appreciated.

The solution: You have to append the rig multiple times instead of duplicating it. Duplicating will basically make another instance, while appending again will make an entirely new armature/mesh in the .blend file.


"Broken" mesh and particles extremely big - Mantaflow fluid simulation I was searching for some new ideas and I found this beer pint, so I thought to use it for a mantaflow simulation of a beer. So I did the basic actions of creating domain, collision and inflow object, but then when I start the simulation I noticed that the mesh is like broken, it's like it has holes since the fluid leaks out from the sides. So I verified if the mesh was "okay" and I couldn't find any holes. Here is some footage:

I tried to increase the surface thickness but from 0.0 to 0.5 is pointless since some particles leak out and from 0.5 to 1 it's too thick, since you can see the fluid not even touching the surface of the glass.

Does someone of you experienced this and know how to fix this is?

EDIT-1:
I scaled everything to a real world scale, so now the model is exactly 0.3 meters tall, like the real one. The leak of particles is partially resolved, but now the particles are as big as the pint!

Particle Properties -> Click on Liquid -> Viewport Display -> Size 1mm or something smaller

As seen on: https://blenderartists.org/t/is-there-such-a-thing-as-too-small-of-a-scale-for-mantaflow-flip-fluids-particles-too-big/1208348


Animating a masked sphere with "star" particles I'm trying to create a "Stars" effect by adding ico sphere's to a UV sphere as an emission object particle, then rotating the sphere to simulate the passing of time in my animation.

Only problem is, I am not sure how I'm supposed to bake this object/group of objects for animation.

When I convert the particle system the "stars" separate into their own objects, lose their rotational pathing, and just remain stationary. Is there a way to convert this object into separate particles without losing the rotation data, or possibly animate the un-converted sphere object?

Appended Answer Here:

For understanding's sake, I am trying to recreate what you have done.

You basically had a sphere with random emitted "star-mesh objects".

That Sphere had key-framed rotation information within it.

Then you did something like the following:

Select your emission mesh (where the star particles are being emitted from).
Go to the Modifiers Tab within the Properties Panel.
Apply the Particle Modifier.

???

If this is correct, then what you would probably want to do is add an empty object at the center of the original sphere's rotation.

Select Your Empty.

Hold Shift and select your sphere.

Next: Ctrl + L >> Animation Data. This will copy the key-framed rotation.

Now you can apply the Particle Modifier, to make all of your stars individual objects.

Next Parent these to your Empty.


One render layer with background image and one with transparent background I made an animation with an environment texture in the background and I would like to have one render layer with only the background image and another render layer with all the objects on a transparent background.

I tried to uncheck the "Use Environment" on the objects render layer, but this rendered the objects on a black background (not transparent). On the other side if I set the film to transparent in the render settings, then the objects are on a transparent background (as I want), but the background layer is empty.

I use Cycles for rendering.

Enable Transparent on the Film section and enable environment on your render passes. The background environment will be avalible by connecting the environment socket.


Child object does not render - even after setting duplication to none I'm having the same problem as this user was (Object doesn't show in render), but I have Object Duplication set to none and I have cleared restricted render on my object. But it still does not appear.

It is the child to an armature and when I remove the parent/child relationship the object does render.

The location of the armature by design affects the child mesh.  For ease of experience .. have your mesh and armature at the grid center at the time of parenting.  Delete [ALL] previous armature modifiers.  They can collect like dust during experimentation.  Inspect carefully your modifiers panel.
Verify your object is visible in Camera View.  Press [Numpad 0] multiple times to alternate this view.  Objects can be viewed in (Non Camera View) .... yet be off camera in (Camera View) which can cause confusion the first few times.
Move your object to the center of grid and point the camera to center. Align Active Camera to View.  Control Alt Numpad Zero.
Place other simple objects near the failed object to make sure your camera has a good view of the entire scene, distance shot ... then refine later.