How can I know the data paths of certain point of bezier curve? I´m trying to do some nodes animation and I don´t know how find the data paths of the points that define a bezier curve.

You can try to figure it out yourself in the Python Console, or use the API docs as described here: Blender/Python API Reference Usage: examples of how to use the API reference docs

If you search for bezier in the docs, you will find bpy.types.BezierSplinePoint.co among others. At the bottom of the page, you can find

  References

  Spline.bezier_points

So bezier_points is an attribute of a Spline object, which is in turn an attribute of a Curve object:

  References

  Curve.splines

The access path is therefore Curve.splines[#].bezier_points[#].co.

A Curve is an ID type:

  Curve(ID)
  base classes — bpy_struct, ID

which could be, for instance, bpy.data.curves['BezierCurve']. Or if you want the data block of the current object, you would use bpy.context.object.data:

import bpy

ob = bpy.context.object
assert ob.type == 'CURVE' # throw error if it's not a curve

curve = ob.data
spline = curve.splines.active # let's assume there's only one
assert spline.type == 'BEZIER' # throw error if it's not a bezier

print(len(spline.bezier_points)) # print number of points
print(spline.bezier_points[0].co) # print coordinate of first point
print(spline.bezier_points[0].handle_left) # ... and its left handle's coordinate
print(spline.bezier_points[0].handle_right) # ... as well as the right one


Why these big checker boxes are seeing in texture and rendered mode? In the render (1st Pic) and texture (2nd Pic) modes, why these big checker boxes are showing? Is there any solution to remove these?
Its a transparent sphere with some noise textures and soft body/collision simulation
Thanks
Arun

change alpha blending mode to something more accurate like alpha hashed


map 2d coordinates to 1d index using blender drivers is there a clean way to convert a 2d vector ( from relative position between two objects ) to 1d index using blender drivers? it should be extendable to add more items later . it is useful to control a grease pencil frame with 'Time Offset' fixed modifier.

I don't know if there is a solution to grease pencil related but in a shader node you could use a formular like
Index = Row * GridWith + Column
to get an index from a 2d Point.


v2.8 cycles - weird color change in Fire Simulation when over background When I render a frame where the fire goes beyond the plane and over the background the color goes brighter and unsaturated. This happens only in the final render, not in the viewport render. (pic) Tell me if you need any other information about the material and object settings.

This color problem is what I am talking about: https://imgur.com/a/hY1Y5oC

It is not a problem or a bug as you may think - the smoke is translucent/transparent so the light passes through it and you see what is on the other side. In this case - a plane that appears to be gray. Hence the change in color.
I guess you could increase the smoke density so the light wouldn't pass through it.


Freestyle without anti aliasing for pixel art (2.8) I've got a simple question that likely has a very complicated answer.

Simple enough, I need to know how to make these freestyle lines completely sharp. I'm trying to make pixel art. By default, freestyle has some hefty anti aliasing. I don't know which settings to change in order to make the lines totally solid, and I haven't been able to figure it out.

I figured it out!

Set the sampling to 1, and it will get the effect extremely close, I might have to touch these up a little bit in a 2D art tool, but the effort will be minimal.


How to make easily editable text that acts as texture or normal map for another object? I'm frequently making objects with text on them. To make those texts easily editable, I'm using "Text" objects that I glue to the surface of my target object using Shrinkwrap Modifier (as shown on the picture below).

However, problem arises, when I want some of the texts to be eg. concave. I don't want to use Boolean modifier, because it's too slow. The ideal solution would be some kind of modifier that would magically "project" my text objects onto the target surface as simple black-and-white (no shades of grey are necessary) texture, where it can be used as normal map using bump node.

Of course I could just make a black on white text in Gimp and use it as simple image texture, but that would not be easily editable from within Blender. The preferred solution would be something easily editable "on the fly" by pressing tab on the Text object and just typing new text.

I think I finally found a reasonable solution that keeps text editable on the fly without intermediate to-mesh-converting, thanks to Kamil1064 from http://polskikursblendera.pl/forum/
The secret is in shadow baking.

Steps:

switch to Blender Render
add plane
unwrap it, add new empty texture to it
position your text object slightly above plane
add sun lamp, adjust it's angle to cast light straight down (rotation x0,y0,z0)
adjust sun lamp settings to the following: Ray Shadow, Samples: 10, Soft Size: 0.010 (if you won't, you'll have jagged sharp shadow edges instead of nice antialiasing)

select your plane and bake with settings: Bake Mode: Shadow

If everything is set properly, you will have a nice, antialiased texture that you can save for later use. The best part is, it will be easily editable from within Blender, just select text object, press TAB and edit it, then press Bake again, and voila.


Displace modifier does not match the texture I'm having troubles since few hours to texture a mesh (a character's face) : it has a texture made from different maps (color, AO, normal..) made from Nodes.

I finally want to use a displacement map to physically slice or displace the mesh through a given image, so I use a Multires + a Displace modifier.

The displace modifier is set to follow the UV Map on which my mesh is unwrapped.

But in the end, the displacement does not fit with the other components of the texture (especially the color & normal map). It is not scaled the same, neither mapped the same.

I saw some posts giving the crop settings of the displace modifier as a solution, but it is not practical at all.

Do you have any solution ? :(
Thanks

Ok everything you saw in my first post was properly set, except that my unwrapping was wrong : some parts of the mesh (a complex one btw) were crossing each other on the UV map, causing the wrong displacement mapping.

That was pretty obvious in the end.

I deliberately chose to cross some parts of it because I wanted a specific texture mapping. So, for any person interested in this post, I guess that it would be possible to correctly map the displacement with some crossing unwrapped parts of the mesh by using multiple UV map.


Dynamic EnumProperty values changing unexpectedly I'm trying to create a collection of items, that have dynamic EnumProperty (scene objects of given type):

import bpy

def enum_items(self, context):
    items = []
    for obj in context.scene.objects:
        if obj.type == 'MESH':
            items.append( (obj.name, obj.name, "") )
    return items

class SomePropertyGroupEntry(bpy.types.PropertyGroup):
    mesh_obj = bpy.props.EnumProperty(items=enum_items)
    val = bpy.props.IntProperty()

class SomePropertyGroup(bpy.types.PropertyGroup):
    collection = bpy.props.CollectionProperty(type=SomePropertyGroupEntry)
    index = bpy.props.IntProperty()

class SCENE_UL_list(bpy.types.UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.prop(item, "name", text="")
            layout.prop(item, "mesh_obj", text="")
        elif self.layout_type in {'GRID'}:
            layout.alignment = 'CENTER'
            layout.label(text="", icon_value=icon)

class SCENE_OT_list_populate(bpy.types.Operator):
    bl_idname = "scene.list_populate"
    bl_label = "Populate list"

    def execute(self, context):
        context.scene.prop_group.collection.clear()
        for i in range(3):
            item = context.scene.prop_group.collection.add()
            item.name = "item"+str(i)
        return {'FINISHED'}

class SCENE_PT_list(bpy.types.Panel):
    bl_label = "UIList Panel"
    bl_idname = "SCENE_PT_list"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        self.layout.operator("scene.list_populate")
        self.layout.template_list("SCENE_UL_list", "", context.scene.prop_group, "collection", context.scene.prop_group, "index")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.prop_group = bpy.props.PointerProperty(type=SomePropertyGroup)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.prop_group

if __name__ == "__main__":
    register()

It works as expected (properties are set and saved properly)...

...unless I add or delete a mesh object - EnumProperty values in collection items are shifted:

I'm guessing there is a problem with mesh object's enumeration... byt why? All objects have unique names, so items properties should be consistent despite the enumeration and mesh objects count in the scene... what am I missing here?

The EnumProperty properties represent underlying integer values - 1, 2, 3, etc. - and the 'enum_items' function provides the conversion between the numbers and the textual description (in this case the names of the objects in the scene).

The problem is that the list returned by the 'enum_items' function is changing when meshes are added or removed from the scene so that the values held in the EnumProperty properties no longer corresponds with the same object. This means that as the sequence of objects changes, the corresponding enumeration value also changes, resulting in the values being reassigned.

The 'enum_items' list is currently being built directly from the context.scene.objects list and each item is appended to the list. When objects are added to the scene they are added to the start of the list of objects - hence they are appearing at the start of the list and this is shuffling the objects along the list - so what was in position 1 is now in position 2, what was in position 2 is now in position 3, and so on. A simple dirty fix to this would be to change the order of the list - by inserting each one at the beginning rather than appending them at the end. ie,

Change :

items.append( (obj.name, obj.name, "") )

to :

items.insert(0, (obj.name, obj.name, "") )

You should now find that adding new objects to the scene no longer upset the existing EnumProperties. However, deleting objects still presents a problem - unless it's always the 'newest' object that is deleted, although even then you have the problem that the EnumProperty still points to the same (empty) slot of the list (so if a new object is added again then it will be immediately populated into the same slot - rather than the slot being initially blank!).

To address this you can assign a unique identifier when adding items to the list (in which case it no longer matters on the order in the list since the uniqueid is used to maintain consistency regardless of the sequence) :

items.append( (obj.name, obj.name, "", <uniqueid>) )

This can be achieved as follows :

import bpy

# NEW CODE - Create a list to assign unique identifier to each mesh name
enum_items_store = []

def enum_items(self, context):

    items = []
    for obj in context.scene.objects:
        if obj.type == 'MESH':

            # NEW CODE
            # Scan the list of IDs to see if we already have one for this mesh
            maxid = -1
            id = -1
            found = False
            for idrec in enum_items_store:
                id = idrec[0]
                if id > maxid:
                    maxid = id
                if idrec[1] == obj.name:
                    found = True
                    break

            if not found:
                enum_items_store.append((maxid+1, obj.name))

            # AMENDED CODE - include the ID
            items.append( (obj.name, obj.name, "", id) )

    return items

class SomePropertyGroupEntry(bpy.types.PropertyGroup):
    mesh_obj = bpy.props.EnumProperty(items=enum_items)
    val = bpy.props.IntProperty()

class SomePropertyGroup(bpy.types.PropertyGroup):
    collection = bpy.props.CollectionProperty(type=SomePropertyGroupEntry)
    index = bpy.props.IntProperty()

class SCENE_UL_list(bpy.types.UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.prop(item, "name", text="")
            layout.prop(item, "mesh_obj", text="")
        elif self.layout_type in {'GRID'}:
            layout.alignment = 'CENTER'
            layout.label(text="", icon_value=icon)

class SCENE_OT_list_populate(bpy.types.Operator):
    bl_idname = "scene.list_populate"
    bl_label = "Populate list"

    def execute(self, context):
        context.scene.prop_group.collection.clear()
        for i in range(3):
            item = context.scene.prop_group.collection.add()
            item.name = "item"+str(i)
        return {'FINISHED'}

class SCENE_PT_list(bpy.types.Panel):
    bl_label = "UIList Panel"
    bl_idname = "SCENE_PT_list"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        self.layout.operator("scene.list_populate")
        self.layout.template_list("SCENE_UL_list", "", context.scene.prop_group, "collection", context.scene.prop_group, "index")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.prop_group = bpy.props.PointerProperty(type=SomePropertyGroup)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.prop_group

if __name__ == "__main__":
    register()

Note that mesh names are never removed from the list of IDs. This means that the unique identifier will only be re-used if a mesh is re-created or renamed to the same name as a previous mesh.


Playing Animation before Rendering neccessary? Do I have to play my animation from beginning to end (starting at frame 0)before rendering it?
Because if I do not the simulation I use (cloth) doesn't work.

Yes, you must. Simulation and animation is not the same. You must bake simulations before rendering. I highly recommnend using bake button in simulation properties instead play animation button in timeline.


How to disconnect selected mesh geometry? I don't know how to disconnect a face from the rest of the mesh in edit mode.

This isn't like pressing P to separate the selection into a completely different object. I just want to select a face and disconnect/rip it away from the rest of the mesh but keep it as a part of the original object.

One way to do it would be to duplicate the face with ShiftD and then delete the original face. But I suspect there is a "native" command for disconnecting selected faces and I would like to learn it.

The command I am looking for is "split" and you can select it with Mesh > Vertices > Split, menu or by pressing the keyboard shortcut Y.


Python: Edit panel to edit custom bmesh face layers? With the bmesh module, I added a custom data layer to a mesh, holding information for each face.

bm = bmesh.new()
collision_flag_layer = bm.faces.layers.int.new("collision_flags")
for triangle in model.triangles:
    vertices = model.get_triangle_vertices(triangle)
    vert1 = bm.verts.new(vertices[0])
    vert2 = bm.verts.new(vertices[1])
    vert3 = bm.verts.new(vertices[2])
    face = bm.faces.new((vert1, vert2, vert3))
    face[collision_flag_layer] = triangle.collision_flags

Now, in Edit Mode, I created a panel to display this property in labels:

class MarioKart8EditPanel(bpy.types.Panel):
    bl_label = "Mario Kart 8"
    bl_region_type = "UI"
    bl_space_type = "VIEW_3D"

    @classmethod
    def poll(cls, context):
        # Only allow in edit mode for a selected mesh.
        return context.mode == "EDIT_MESH" and context.object is not None and context.object.type == "MESH"

    def draw(self, context):
        obj = context.object
        bm = bmesh.from_edit_mesh(obj.data)
        face = bm.faces.active
        collision_flag_layer = bm.faces.layers.int.get("collision_flags")
        if collision_flag_layer is None or face is None:
            self.layout.row().label("No collision face selected.")
        else:
            #self.layout.prop(face, '["collision_flags"]')
            row = self.layout.row()
            row.label("Collision Flags")
            row.label(str(face[collision_flag_layer]))

That's pretty awesome already, displaying the custom data like this:

However, since this is edit mode, I want the user to be able to edit this value of course. As you might have noticed from my code already, I commented out a line where I failed to create a number picker for this with the layout.prop method.

How can I implement an edit control for this custom data?

Set up an approach similar to https://blender.stackexchange.com/a/40264/15543.  One instance of an edit bmesh is added to a global dictionary on editmode toggle via a scene update handler.

A dummy int property is added to the window manager and is used to set the face layer int via an update method.

The dic bmesh instance can also be used in your panel.

import bpy
import bmesh
from bpy.app.handlers import persistent
from bpy.props import IntProperty

# global to hold the bmesh.
dic = {}
# update method
def setlayerint(self, context):
    eo = context.edit_object
    bm = dic.setdefault(eo.name, bmesh.from_edit_mesh(eo.data))
    face = bm.faces.active
    cfl = bm.faces.layers.int.get("collision_flags")
    if face and cfl:
        face[cfl] = self.layer_int_value
    return None
#layer_int_value is used to set the value
bpy.types.WindowManager.layer_int_value = IntProperty(name="Collision Flag",
                                                      update=setlayerint)
#keep wm.layer_int_value updated to active face
def set_collision_flag(bm):
    face = bm.faces.active
    if face is not None:
        #print("BFace", face, face.index)
        cfl = bm.faces.layers.int.get("collision_flags")
        if cfl:
            bpy.context.window_manager.layer_int_value = face[cfl]
    return None
#scene update handler
@persistent
def edit_object_change_handler(scene):
    obj = scene.objects.active
    if obj is None:
        return None
    # add one instance of edit bmesh to global dic
    if obj.mode == 'EDIT' and obj.type == 'MESH':
        bm = dic.setdefault(obj.name, bmesh.from_edit_mesh(obj.data))
        set_collision_flag(bm)
        return None

    dic.clear()
    return None

class MarioKart8EditPanel(bpy.types.Panel):
    bl_label = "Mario Kart 8"
    bl_region_type = "UI"
    bl_space_type = "VIEW_3D"

    @classmethod
    def poll(cls, context):
        # Only allow in edit mode for a selected mesh.
        return context.mode == "EDIT_MESH" and context.object is not None and context.object.type == "MESH"

    def draw(self, context):
        obj = context.object
        bm = dic.setdefault(obj.name, bmesh.from_edit_mesh(obj.data))
        face = bm.faces.active
        collision_flag_layer = bm.faces.layers.int.get("collision_flags")
        if collision_flag_layer is None:
            self.layout.row().label("No collision layer.")
        elif face is None:
            self.layout.row().label("No collision face selected.")
        else:
            wm = context.window_manager
            self.layout.prop(wm, "layer_int_value")
            #self.layout.prop(face, '["collision_flags"]')
            row = self.layout.row()
            row.label("Collision Flags")
            row.label(str(face[collision_flag_layer]))

def register():
    bpy.utils.register_class(MarioKart8EditPanel)
    # clear the handler for testing purposes.
    bpy.app.handlers.scene_update_post.clear()
    bpy.app.handlers.scene_update_post.append(edit_object_change_handler)
register()

Note could add something like the active_face_index to the dic and check on change, instead of constantly setting the face layer value.


Disable the collection of linked object I created a 3d house using 2.83.7. The main component are : wall , ceiling , floor , door , window etc. So i created some collection to manage it : WALL, DOOR,FLOOR ,WINDOW etc
WALL collection contains all wall object, DOOR collection store all doors and so on. This way i can easily isolate them when i want for example disabling just the floor and ceiling.
Now the challenge is , i want to make a master bedroom with 3 alternative. Each of this alternative will have its own wall/door/window etc. Practically there will be 3 sets of wall/door/window etc on the same spot but with different design. So later, only 1 of them can be enabled, otherwise they will overlap each other.
Then i created 3 collections :
ROOM_ALT1, ROOM_ALT2, ROOM_ALT3. They will be used to store associate room alternative. Only one of them will be enabled at a time.
I link the objects this collection. So for example for the room alt1 : the wall.01 , while it's  still in WALL collection , it will be linked to ROOM_ALT1 .
I choose to 'link' , not to 'move' because my plan was that i want for example the wall.01 to be under both WALL and ROOM_ALT1 collection. I thought i can disable any wall objects (including walls from any room alternatives) by disabling the WALL collection while i can also disable alt1 by disabling ROOM_ALT1. But it's not working as i expected.
Note: i want to disable/enable , not just hide/unhide them.
Any solution ? Does anyone can help ?


How to select only the inner face of a mesh object? I'm brand new to blender and I'm trying to make a glass bowl filled with a static "liquid" (just another mesh object). So I have a solidified mesh bowl made, but when I try to select the inner face of the bowl so that I can duplicate it to make my "liquid" object, it selects both the inner and outer faces of the object, instead of just the inner face.

I've been trying things and just don't know how to select ONLY the inner face. Any help would be appreciated. I apologize if it's obvious.

You've got the solidify modifier on, that's just a virtual face relative to the original mesh. Apply the solidify modifier and then you should be able to select only the inner faces.


BGE no shadows with GLSL I made a game but the problem was that I couldn't see any shadows. I researched online and found out that GLSL must be selected. I did this but then everything appeared completely white.

I did some more research and found out that I have to bake (even though I have no idea what baking is). I did so but my tank and my sky box still appeared white.

When I tried to bake them, Blender said "no object or image to bake to". Even the walls that are baked don't show any shadows and yes, I do have a sun.

GLSL mode

Multitexture mode

Baking

Baking is a process to generate textures. The texture is build from different camera views. To be more specific a camera gets placed above a face, renders the image and applies the result to a new texture.

This way you get render effects into your texture. E.g. you do not need dynamic shadows, so you can "bake" them into the final texture. It looks like there are shadows, but they are not. This saves a lot of processing power.

Situation

While you can use baked textures it does not apply to your situation. You have textures already.

The problem you have is that your materials are not completely set up. GLSL uses the material and texture settings (see the according tabs in the property view). Multi-texture uses whatever texture you assigned in UV-Editor.

This means when you want to see your scene in GLSL, you need to apply the textures via texture tab. The Multitexture mode likes it as well.


Blender Internals to EEVEE? I have this model of starship enterprise all textured and set up. I wish to move over to EEVEE but heard that there is 0 compatibility between internal and eevee. Is that true? How can the model be changed into EEVEE engine?

Before 2.8 there was addons to convert Blender Internal materials into Cycles materials.
But in 2.8 none of those addons have been upgraded to the new addon API changes yet. You could wait until one is upgraded.

In the meantime, you can simply make yourself a separate installation of Blender 2.79 and use its integrated Material Utils addon to convert your Internal materials into Cycles.
Then append the Cycles material into your 2.8 scene. Cycles materials are mostly compatible with Eevee, so there shouldn't be much issues switching from Cycles to Eevee.


Texture painting on an object also adds paint on the back of another As you can see from the gif below, while trying to paint the shoulders object some paint also reaches the back of the character model, which is a separate object. Both objects have separate materials and textures.

https://imgur.com/a/hrwxnLG

Blend file:

http://www.mediafire.com/file/la5qv22pnbmb28h/male_character_2.blend/file

(sorry, I couldn't get blend-exchange to work)

You have your texture paint slots set to Single Image mode, so the only image that corresponds to paint is the base body image. The palderons image texture is solid brown, and if you change to Material mode then you can paint to the separate texture images.


How to remove a keyboard shortcut for sculp mode? How to remove it. Please help!

Go to File→User Preferences→Input→3D View→Object Non-Modal and delete the key for sculpting by pressing the 'x' beside it.


Why the curve getting twisted With the plane i have converted to curve. And made the profile i bevel the curve is getting twisted.

As we have XYZ axis. Where this W axis came from

With the Tilt option i can rotate but why its twisted.

1) If you first apply the rotation to mesh-plane and converts into a curve then generally this problem happens.
So, if you only need a rectangular curve object, then the best way to ADD a curve-circle > EDIT mode > Press V > set handle type to 'Vector', you have rectangular curve object.

Now the twist problem:-

2) For circular curve or curve having smooth bends: Go to Curve properties panel, then change the 'twisting' option from 'minimum' (which is default) to 'tangent' and for a curve having smooth bends, also adjust the 'smooth' option accordingly. (Note- Spline Type should be 'bezier')

When the 'twisting' is set to 'minimum' :

When the 'twisting' is set to 'tangent' :

3) For rectangular curve :

(a) Rectangular curve from curve-circle: ADD a curve-circle > EDIT mode > Press V, set handle type to 'Vector' > then again Press V set handle type to 'Free', then go to Curve properties panel, then set 'twisting' option to 'minimum' and 'smooth' to 50 (adjust accordingly). In this way you have a twist free curve even if you move curve-points in the edit-mode and movement of curve-points only shift the overall tilt of the curve. (Note- Spline Type should be 'bezier')

(b) Rectangular curve from mesh-plane: If you convert mesh-plane to curve object and it has Spline-Type 'poly', therefore twisting option does not work properly. So, go to Edit Mode > Tools > Curve Tools > Set Spline Type to 'Bezier' > Press V, set handle type to 'Vector' > then again Press V set handle type to 'Free'. Then go to Curve properties panel, then set 'twisting' option to 'minimum' and 'smooth' to 50 (adjust accordingly). (Note- Spline Type should be 'bezier')


Achieve outline effect in texture I want a texture to have the outlines of the mesh (not using the "Export Layout" feature in the UV editor). The outlines must be in the texture only (maintaining the the Original mesh).

In the picture above I duplicated the model and applied the "Wireframe" modifier to the duplicate. Now I'm trying to bake the "Shadows" of the Wireframe mesh into the original's texture, but I couldn't make it work (I'm very new to blender).

How can I achieve this (using this or any other method)?

P.S. I'm aware of the "Freestyle" feature, but it can't be baked into the texture (to my knowledge).

The basic idea for generating outline effect comes from Cycles Wireframe Shader from agus at BlendSwap.

General Step:

Create a UV layer (which is used for generating "procedural" wires), then unwrap the mesh by the "Reset" method in U menu.
Create another UV layer (used for baking), which should contain the expected UV.
Create an Image Texture node and keep it disconnected to any socket. then bake Diffuse color onto the target image.

NOTE: Before baking, make sure the target UV layer is activated.

More guidelines about baking.

EDIT:

There should be more than one way to do so. Another way is to use Texture Paint mode to paint it manually: Select all Faces then hit I twice to Inset individual faces, then invert selection for masking in paint mode. It does work, but you can hardly get smooth result in this way.

A third way is using Export UV Layout. Though you've mentioned that "Export UV Layout" should not be an option here, I still recommend you to try Paul Gonet's solution again. Just plus one more tip —— use Dilate/Erode node to get proper outline width. Then you can use File Output node to output the outlined texture while rendering again. Finally you can reuse it back to the model.


Why are my surface materials distorted? I've created a container with another container inside it.

When I render the object the surface materials shows a lot of distortion. Is there an issue with how I created the object? (Booleans, Joining, etc) Or is it an issue with the lighting (lamps).

Here's the file
https://www.dropbox.com/s/fc7mk8hs88arkhw/steri-soaker.blend1?dl=0

It's an issue with the model of the containers. That strange artifact is in fact 2 faces ocuppying the same space. You have made several different objects and some have overlapping faces between different objects and even with it self. You should do retopology on your model, by just 2 objects: the outer container and the inner container. After you create just this retopologized objects, do the modifiers. You have to check that all edges are well connected, no double vertices, no existance of non-manifold elements.


Mesh is almost entirely black in rendered mode I am currently trying to set up a character that I ripped from a game, which until now has been relatively painfree.

However after placing the textures and uv mapping it has become apparent that the character is basically just black in rendered, and I just can't find a way to fix it.

Here is the file: https://www.dropbox.com/s/rxh4i6zhr05x691/9S.blend?dl=0

Your model is quite a mess.

Your sunlight doesn't seems to be emitting any light - Create a native Cycles Sun or give the current one a proper shader node tree.

Your model is full of custom normals which are known to cause shading trouble - Clear your custom normals

Some textures seem to not be picking up proper UV channel - Add an explicit Texture Coordinate node with UV coordinates to your textures.

Most of your geometry seems to have Inverted Normals - Recalculate normals and make sure they are pointing outwards


drill holes at specified offsets How can I add holes at specific offsets from the edges of my object (as per picture below)? Using edge loops, I believe I can measure from the middle of the object, but it would be much easier to measure from the edges. Is that possible? Tks!

All sorts of ways, making your own measuring sticks, temporary edges or loose vertices to snap to, etc, etc, but here's an example for putting holes in a tube at measured Z positions using the cursor...

Make a section with a hole, and in edit mode with all selected,
ShiftS > 'Cursor to Selected':

ShiftD duplicate the section.
In the Properties Region, 3D Cursor panel, set the Cursor to the desired Z
The duplicate section should be selected...  ShiftS again > 'Selection to Cursor (Offset)

Rinse, repeat ...
CtrlE > 'Bridge Edge Loops' to fill the gaps

If you mean from other edges, you can place the cursor at the median of any selection of elements in Edit Mode, and you can enter arithmetic expressions in its location fields.. so if the cursor was at, say, 1.414, you can just add a "-0.5" to the end of the existing value to get your offset.


Align View to Current Transform Orientation Is there a keystroke or command to view along an axis of the current transform orientation (similar to Shift+Numpad to view along an object's axis)? Assume there aren't any objects already aligned with the transform orientation.

The best way I've found is to create a dummy object (like an empty), use "Align to Transform Orientation", and then use the old Shift+Numpad keys. It's workable, but it's kind of tedious.

Test script to put all 3d view areas in context screen into same orientation as first custom scene orientation
import bpy
from mathutils import Matrix
context = bpy.context
# put all view_3d areas in screen into screen.orientation[0]
scene = context.scene
screen = context.screen
for o in scene.transform_orientation_slots:
    if o.custom_orientation:
        orientation = o.custom_orientation

print("Using ", orientation.name)
view_rot = orientation.matrix.to_quaternion()

view3dareas = [a for a in screen.areas if a.type == 'VIEW_3D']
for a in view3dareas:
    r3d = a.spaces.active.region_3d
    r3d.view_rotation = view_rot

To make it change from camera perspective would need something like
    if r3d.view_perspective == 'CAMERA':
        r3d.view_perspective = 'PERSP'

To look "from above" from this orientation
rot = Matrix.Rotation(radians(-90), 3, 'X')
#view_rot = (rot * orientation.matrix).to_quaternion()
view_rot.rotate(rot)


My Textured object isn't showing up in the rendered view :S I am new to blender but I've looked all over for a solution and haven't found one, sorry to waste your time but it there a reason my model isn't showing up I've tried and untextured cube and that shows up in the rendered view. I've also tried "In object mode press W -> clear all restricted render." from someone else's similar problem which didn't work.

Select your object,click Shift+Ctrl+A or ctrl+A and then select make duplicates real.

And then it will show up in renders:


Best way to animate 2d missiles in Blender I'm planning to make a fake 16-bit shoot 'em up gameplay video using models made in Blender and I was wondering what would be the best way to animate a flurry of missiles similar to the 'Itano Circus':

(Mind you, I'm a beginner at Blender, so I don't intend on creating something as grandiose as this. Just about 5-6 missles in a single firing will do)

Would I have to go about this by animating with the Grease Pencil and then apply AA or can I do something else?

you can create a particle system to emmit particles toward a negative force field.

Then assign a missile object to those particles.

Or you can make the particles follow boids physics and this is what I get.


The imported object does not become the active object in the scene I import an object into the scene via bpy.ops.import_scene.obj. Before adding this object I have added some other objects in some other layers. However, after importing the new object bpy.context.scene.objects.active does not change. I tried bpy.ops.object.select_all(action='DESELECT') before importing the new object but it didn't work and the active object is still another object in the scene. I also tried the following before importing the new object:

for obj in self.scene.objects:
    obj.select = False
bpy.context.scene.update() # Which seems unnecessary, but I do it just in case

But it still doesn't work.

To get around the issue temporarily, I did bpy.context.scene.objects.active = bpy.context.scene.objects[0] after importing the new object. This way I manually change the active object which is not ideal, and I should not be the case.

I am a bit confused why deselecting the objects does not work. I wonder, am I doing something wrong?

Active object is the one on which the actions in 3d view are performed. For instance, if you press tab the mode of only the active object changes. There can, however, be multiple selected objects. Left click an object in outliner to make it active, deselect everything and you will still be able to tab the object into edit mode (as it is active but not selected).

Excuse me if this all is known piece of info but since you said "I tried bpy.ops.object.select_all(action='DESELECT') before importing the new object but it didn't work and the active object is still another object in the scene.", I guess you are thinking that by deselecting an object you would also negate its active state.

So the answer to your question is:
The imported object is selected but not active by default. To make it active,

deselect all the objects before you do the ops.import_scene.obj and do bpy.ops.object.select_all(action='DESELECT')
make the selected object active explicitly. Since the imported object will be the only one selected, you can simply do bpy.context.scene.objects.active = [ob for ob in bpy.data.objects if ob.select == True][0]
or better as suggested in the comments do:

bpy.context.scene.objects.active = bpy.context.selected_objects[0]


Is there a way to shrink-wrap only a section of a mesh? Is there a way to shrink-wrap only a selection of mesh to another without effecting the whole mesh?

When I shrink wrap a mesh to another mesh, sometimes I lose a lot of data on the other side of my object.

You can add to Vertex Group part of the mesh that should be affected by Shrinkwrap modifier, then choose this group in the modifier itself.


How can I make this specific area have the black material? I can't make an edge loop here, but I want the black strips from both of those sides to carry onto the top on both sides of the model. I don't know how to make that happen and I'm not extremely advanced when it comes to blender. This explanation was probably terrible but hopefully the annotation in the picture can explain better

You could fix it but maybe the best is to start correctly, which means create a circle:

Inset with i:

Join the 2 opposition vertices with J:

Delete the bottom half:

Extrude down:


Excluding an image plane from interacting with light I want to do a pretty simple animation. A fixed camera, an object, a sun which revolves around the object with a circular path and an image plane behind the object acting as a background/environment. But the sun makes shadows on the plane as well. Is there an option to exclude the image plane from the physics of the light source? I'm very new to blender and I'm sure this is a very straightforward thing to do.
Thank you!

If I understand you correctly, you want the background plane to be unshaded. You could use a material that does not use a shader node, by creating a new material, removing the Principled BSDF node, then connecting a node like RGB or a texture node to the Surface output. Note, this would make it so that it would not interact with any light source. If you want it to interact with a light source, you would have to use Layers (Top Right) and then merge them together using the compositor and nodes. You can choose which things interact in layers using collections, by disabling what you don't want to affect the objects in your scene. Good luck!


Objects clipping when I switch to orthographic mode Blender 2.8 So, every time I switch to orthographic mode in Blender 2.8 (Didn't use to happen in 2.79) my model starts clipping (as shown in the video). I've tried changing the "clip start" value, but that just ruins it when I switch back over to the dynamic view.

Any ideas?

Video: https://youtu.be/EuOuOvNPw78

I've been having the same problem and fortunately we are not alone and somebody has already reported this bug. You can find the current state of it at the link below. It looks like it's been resolved and we're just waiting on an update now.

Bug report
https://developer.blender.org/T61632

Specific commit with the fix
https://developer.blender.org/rB4bbd1b9610f6d85079ea5bc31fc1949f8409a1a4


Extend Blender Python Class Note: both Blender SE and google are currently useless for this somewhat simple subject, so bump this question up for others like me.

I would like to extend a blender class (BMesh.types.BMEdge) into a custom class, "PEdge", so that I can add some extra parameters. I want to replace all the BMEdges in my BMesh with my new PEdges as well. How can this be achieved in blender python?

You cannot use a bmesh element as a base type

Unfortunately as possible with many blender types, it is not possible to  use bmesh elements as base types to extend the class in a "traditional way".

>>> class Foo(bmesh.types.BMEdge):
...     pass
...
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: type 'BMEdge' is not an acceptable base type


How do I get my offset models to be at 0, 0, 0? Apologies, I'm relatively new to blender and have inherited this model. I have tried Alt+G and setting the origin points, but the model itself is still off-point.  This means when attempting to rotate, it's axis is about 0, 0, 0 rather than being about the centre of the image.

How do I get the base of the model to sit at 0, 0, 0?

Switch to 'Edit mode' (Tab key).
Press A key. This will select all the verts in the model.
In Orthographic view (Numbad 5) move the selected group of verts over the orange dot (the origin).
Repeat this step in orthographic view for X, Y and Z.
Back to Object mode, select the model, choose Object> Apply> All Transforms. This just resets any scale or transform issues.


Dark artifacts when rendering CAD-type model I'm new to Blender (but I've known Maya for years), and any help y'all can offer would be greatly appreciated!

I'm having a problem similar to the ones in these posts, but the solutions offered there haven't solved my problem:

[SOLVED] Weird shading bug and rough render (CYCLES)
Shader artifacts rendering in some spots of the mesh

I'm working with this model that my company bought for a project:

Full Kitchen Scene 3

The mesh seems to be generated with a CAD program. It's not pretty; lots of long skinny triangles and whatnot.

I'll focus on one example of the artifacts I'm getting.

Here's what I mean about ugly geometry:

When I render it with Cycles, it has dark areas:

The mesh is ugly, but the normals are all pointing out and I've removed duplicate vertices.

Has anyone run into this before? I could really use a hand!

Thanks Denis! (I can't comment cause I'm new.)

I think I've got a good solution going:

With the object selected, I went to the the Object Data tab of the Properties Panel, and unchecked Auto Smooth.

Then, like Denis suggested, I added an Edge Split modifier. I checked Edge Angle and set it to 180 degrees.

This will work for me. Does anybody have any other suggestions for future reference?


Editor and ways recommendation for Python addon development I am a Vim user and generally happy with it but I see some drags with Blender addon development when I use it. What editors and ways do you use to do your Blender development? Vim oriented solutions is prefered, but I am not against other ideas. The main thing I care is support for dark themes.

I also want proper Blender Api completion when using the editor. I will be mnostly on Windows.

thanks

There are two general approaches:

Use an auto-generate script to make stubs. The best one is probably fake_bpy, but that has shortcomings like missing bpy.context.
Compile as a python module. This gives accurate completion, but the compilation process is not well documented and I haven’t managed to get it to work consistently. Some instructions can be found here.

The general state of tooling support for Python scripting right now is rather poor, so your best bet is to keep the API docs close at hand.


Is it possible to use height maps from substance designer in Blender and how? I've been learning Substance Designer for a short while. The thing which I noticed is that all those impressive materials we see on ArtStation are based on SD's height system, which uses tessellation and translates it into grayscale height maps. So, the question is how can I use height maps exported from SD in order to achieve the same "depth" effect in Blender? I understand that Blender refers to this effect as displacement. However, displacement modifier produces new geometry, attaching height maps to displacement node does not work, blending height and normals in one map in SD does not help either. Is this even possible?

UPD. Below is a render from SD which shows the material on a plane. The plane is clearly displaced in accordance with the height map. Now in Blender, I managed to produce the same result only by using the Displace modifier and by Displacement node together with experimental Cycles options and adaptive subsurf modifier. Blend file is attached. May be these are the only viable options. Grateful if someone could confirm.

After further research it appears that the only reasonable way to make height maps work in Blender is as set out below. The displacement support is still experimental in the latest 2.8 builds. Hope the development team will procure full support in the stable release of 2.8. I'm not sure how all this affects vertex count and render time. Hope this will be helpful to someone.

choose Cycles as render engine;
choose "Experimental" feature set in render settings;
add Subsurf modifier to your mesh, switch it to "simple" and tick "adaptive" on;
create a new material for the mesh;
in Material tab scroll down to "Settings", find "Displacement method" and choose "Displacement and bump";
plug in your height map into Displacement Node.

This video illustrates the above (it is in French though): Video


Specials Menu/Deleting Doubles in Edit Mode I just downloaded Blender 2.82 and when I hit the W key I get the select options and not the specials menu.  Can someone tell me where to access the delete doubles function as I can seem  to find it in any of the menus.  Thanks

It's now called merge by distance under the mesh, cleanup. If you right click it once you see it in the menu, you can add it to a favorites list that comes up when you type Q and select from that pop up each time quickly.


How to move a soft body object in the scene towards a "goal position" while physics is active? I have a couple of soft body objects in a scene sitting on a plane. My goal is to smoothly move one of these soft body objects towards a goal position smoothly while still having its 'base' anchored to the same spot (a kind of controllable soft body tentacle). Note that I want the soft body physics still do its job while the object is moving towards the goal position. This means that the object might collide with other objects. I wonder how can this be done?

The Soft Body Goal can be used to manipulate the soft body by also manipulating the original mesh to apply forces to shape the soft body. Different weights applied to different vertices allow some control over how those forces are applied.

Create your mesh to use as a soft body - in my case I'll use a simple string of vertices and add a Skin modifier later.

In Edit mode (Tab), add a new Vertex Group and name it something appropriate (eg, 'Pin'). Select the two vertices at the 'base' (the point where it is to be anchored) and click Assign to the Vectex Group with a weight of 1.0. These will be effectively unmoveable and 'pinned' to the mesh vertices.

In order to have the soft body retain its generate shape we need to also assign the rest of the vertices to the vertex group - but with a lower weight. This will give them a force towards the goal while still allowing them to be pulled out of position. While the 'base' vertices are still selected, invert the selection (Ctrl+I). Change the weight to 0.5 and click Assign (different weights will affect how tightly the body tries to return to its 'at-rest' position).

In order to control the location of the 'tip' of the arm we need to assign a higher weight - almost but not quite 1.0 (1.0 would fix it directly to the control point - we only want to draw it strongly towards the control point). Therefore, select the vertex at the tip, set the weight to 0.999, click Assign.

To control the tip we can use a Hook modifier - while the 'tip' vertex is still selected (and still in Edit mode) press Ctrl+H and 'Hook to New Object'. This will create an Empty linked to the selected vertex. Moving the empty will drag the vertex. You can now return to 'Object' mode (Tab).

Add Soft Body physics and set the Goal to the newly created Vertex Group ('Pin'). Assign the Goal to strength 1.0 and you should find that the Base is now pinned to the base and the tip drawn to the location of the 'hooked' vertex. Ensure the Hook modifier is above the Soft Body modifier in the modifier stack.

Increase the Edge spring strengths to the desired soft body settings. Switch off Gravity in the field weights and perhaps set some Friction in the main Soft Body settings so as to dampen the simulation. Also, adjusting the Soft Body Goal Stiffness can affect how strongly the arm is tied to the goal. Now, moving the hook should drag the arm.

You can set up different shape keys for different 'at rest' positions of the arm - but ensure each shape retains the position of the 'tip' - otherwise the hook will be offset from the target empty. The Strength setting on the hook modifier allows the influence to be switched on (1.0) or off (0.0) and this can also be used to have multiple 'hooks' (switching each on/off in turn to affect which empty has the influence - this can be used where multiple shape keys result in different starting hook positions). It's a good idea to start the simulation with the hook strength initially set off, and switch on over a number frames to let the soft body adjust to the new shape (otherwise it can jump to the new location and take a while to settle down).

Once enabled, simply move the Empty to where you want the arm to reach. Any collision objects in the way will deflect the arm.

Note that I used a Skin modifier for the skin of the arm. The rotation of the generated geometry is dependent on which vertex in the chain is designated as 'root'. To avoid twisting ensure the 'base' of the arm is the root.

An alternative is to model the whole arm as soft body (rather than a string of vertices with a Skin modifier). Use self-collision to give the soft body volume to prevent it folding together when it encounters obstacles.

Blend file included


Blender Orient an object (displaying Vector Arrows) I need to orient a various number of arrows on the screen, each need to point to a direction calculated by Python.

Python have calculated the end points of each arrow (say tail at (0,0,0), tip at (1,1,1)). How do I place an arrow between those two points, with the tail and tip at the correct spot with scripts?

My current plan is place the tail, then calculate the degree of rotation needed to get to the right direction, then rotate it. Is there potentially an easier/more direct way?

Optional: If the code does not scale the arrow, that's fine, as long as the arrow point in the right direction.

Consider a [Track To] constraint  which will rotate the arrow toward the location of a given target.  The green arrow points to the red ball below, wherever the ball happens to be.

In the animation below we see a few alternatives with constraints and modifiers

The blue arrow is a curve in case you find the straight lines excessively boring.  Circular cross section bevel. The curves has hook modifiers for the end points.  A third point is added into the blender curve to introduce more [visual curve] into the blender curve. The visual curve is optional. The green cap is position with a [follow path] constraint.  Of course this flexibility requires more work.
The yellow arrow is an array modifier fit to curve straight line
The large green arrow is the [track to] constraint as before
The hook constraints


How to interchange 2 vertex position ? I want vertex A to be at vertex B position and vertex B to be at vertex A position I need that because I face this situation :

I want the small area between these two overlapping faces to be a hole.

If you need vertices to be swithced places you can scale them by -1. Select them and hit  s followed by -, 1 and Enter.


Area light rectangle can be seen in window reflection - cycles I have little problem. My light source (area light) can be seen in window reflection
Is there any fix for it. I want to keep light, reflections and everything but without that ugly thing in window

This is inherent. Try using some other form of light source instead, such as emissive material or an array of point lights.


How to merge seperated Edge into Mesh? I have a seperated Edge Loop that intersects with another mesh.

Here a simple example:

I tried Boolean, Knife Project and Intersect Tool (this post) without succes.
My last idea is to subdived the edges of the cube, position the vertices and merge them one by one. Is there any better solution?

How can i make it one mesh so that the Cube contains the Edge Loop?

Thanks for your attention.

Cut away all the connecting edges between the top and the bottom of the cube. (check the edge select -> remove only edges)
Join both meshes.
Select remaining edgeloop on top (top side of the former cube).
Select the edgeloop to introduce.
"Bridge Edgeloops".
Select the edgeloop you introduced.
Select remaining edgeloop on the bottom.
"Bridge Edgeloops".


Why Blender 2.82 overwrite my picture? I downloaded new Blender 2.82 today and while working on one computer, I started rendering on another. All the time the same settings, no overwriting!!! and I usually have from frame 1 to frame 1 and hit render animation. I was so happy with the result few minutes before render was done. I came back to see final render image and I saw new rendering is running, overwriting… OMG!!! What is going on? never happened before, maybe one or two times, but I had overwriting on. NOT THIS TIME! Is it possible to find te render done? I tried, but I cannot see it.

Blender has a setting called Overwrite in the Output Properties which allows to disable the overwriting of existing files, when unchecked. Unfortunately files that have already been overwritten cannot be recovered.


How to scale an object via a slider in Python? First: I'm new to Python programming in Blender.

I already know how add a row to scale one single axis of an object by using a slider in the tools panel e.g. I'm using this code snippet to do this:

import bpy # Python API for Blender
from bpy.types import Panel, Operator

# Class for the panel, derived by Panel
class SimpleToolPanel(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_label = 'CW Tools'
    bl_context = 'objectmode'
    bl_category = 'CW Tools' # Where the Panel have to appear. In this case in the Tools cetegory.

    # Add UI elements here
    def draw(self, context):
        layout = self.layout

        # New row
        row = layout.row()

        # get the selected object
        obj = context.object

        #Let's display the scale of the object
        str_scale = 'Object: ' + obj.name + ' scale: ' + str(obj.scale)

        row.label(text=str_scale)

        #Add scale slider property
        row = layout.row()
        row.prop(obj, 'scale', index=0, text='Scale x:')

        row = layout.row()
        row.prop(obj, 'scale', index=1, text='Scale y:')

        row = layout.row()
        row.prop(obj, 'scale', index=2, text='Scale z:')

# Register
def register():
    bpy.utils.register_class(SimpleToolPanel)

# Unregister
def unregister():
    bpy.utils.unregister_class(SimpleToolPanel)

# Run in text editor
if __name__ == "__main__":
    register()

My question:

How is the code to resize a complete active object via one single slider, please?

Here's the script to do this (open to corrections):

[Edit: Added getVal to reflect current X scale]

import bpy # Python API for Blender
from bpy.types import Panel, Operator

# Class for the panel, derived by Panel
class SimpleToolPanel(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_label = 'CW Tools'
    bl_context = 'objectmode'
    bl_category = 'CW Tools' # Where the Panel have to appear. In this case in the Tools cetegory.

    def setVal(self, val):
        self.objects.active.scale[0] = val
        self.objects.active.scale[1] = val
        self.objects.active.scale[2] = val

    #Edit: Pick the value from the X scale, assuming all scale values are the same
    def getVal(self):
        return self.objects.active.scale[0]

    bpy.types.Scene.scaleVal = bpy.props.FloatProperty(set = setVal, get = getVal)

    # Add UI elements here
    def draw(self, context):
        layout = self.layout

        # New row
        row = layout.row()

        # get the selected object
        obj = context.object

        #Let's display the scale of the object
        str_scale = 'Object: ' + obj.name + ' scale: ' + str(obj.scale)

        row.label(text=str_scale)

        #Add scale slider property

        row = layout.row()
        row.prop(bpy.context.scene, 'scaleVal', text='Scale:')

# Register
def register():
    bpy.utils.register_class(SimpleToolPanel)

# Unregister
def unregister():
    bpy.utils.unregister_class(SimpleToolPanel)

# Run in text editor
if __name__ == "__main__":
    register()


Get active camera from VSE Scene strip (Animation Nodes) I have same scene overlayed many times in VSE with different cameras. Is it possible to intercept Camera used for override during rendering from VSE Scene strip?

Get Active Camera node can only show default cameras used in actual scene, Sequence Info also doesn't have this option

You can just use an expression to get the scene_camera attribute of the sequence strip.


Onion skinning stopped working I'm working on a 2d animation using the grease pencil, I keep running into  a problem with the onion skinning function.
It has worked at points, So it definitely has to do with my actions. I just don't know what it is specifically. There was a point where it corrected itself but now it has resurfaced as a problem.
I have checked similar forums but with no success. I have onion skinning enabled in both summary and overlay. I do have multiple grease strokes, I don't know if that is the factor. Any help would be really appreciated. Thank you!
Please let me know what other info you might need...

I think I found my answer, I need to enable view in render, under display, in the onion skinning tab in object data properties


Random maps in cycles I want to assign a "random" factor to my materials. I want to load 5 different diffuse maps in my material and assign the same material to 300 objects. The "random node" should take any one of the loades maps and assign it to a object.

Is this or any similar operation possible? Or is it possible to "shift" the uv coordinates randomly to another place in one texture, or to mix the original map with a color (randomly choosen?).

If you want to shift the UV maps around you could use the random output from the Object Info node to give each texture a random location.

My simple node layout:


Access blender interactive python shell from terminal Is it possible to get access to the blender interactive python shell from a terminal? I know I can start a python script with the the following command

blender --background --python script.py

But what i want is to get the actual shell that i can type in the terminal something like

>>> bpy.ops.active_object.mode
'OBJECT'

and get the result immediatly like in the normal python interactive shell

The solution is to start blender with --python-console, see the user manual for Python command line args.


Mesh gets deformed after parenting with automatic weights I've been trying to attach this character mesh to an armature using Armature Deform with Automatic Weights, but after setting the weights, the character gets its limbs shifted strangely (wrists turn up, feet come together) even though I haven't touched the pose. I'm new to character modeling and rigging, so I'm not sure if I'm missing something.
Mesh After Parenting

Original Mesh

I think you should apply armature pose as a rest pose, what i believe happens in your case is that you have corrected the armature pose in the pose mode instead of edit mode, that way you have a non neutral pose on your armature which means as soon as you apply that armature to the mesh all bones that are not in the rest pose will apply its transformations to assigned vertices.
Hope this helps.


How to rotate an object? I want to rotate object in blender, for which I am using following operations.

ob = bpy.context.active_object
ob.rotation_euler = (x,y,z)

It is working well. Now if reaped the this definition for same object, it doesn't consider the last updated orientation. It considers the original orientation.

What can I do?

You are setting the rotation.

The code in question you are setting the Euler rotation.  The resulting value will always be (x, y, z)

Instead recommend make a transform (rotation) matrix. Python console example. x, y, and z are 30, 45 and 60 degrees respectively.

>>> x, y, z = (radians(30), radians(45), radians(60))
>>> Euler((x, y, z))
Euler((0.5235987901687622, 0.7853981852531433, 1.0471975803375244), 'XYZ')

The context object, has Euler rotation set to zero.

>>> ob = C.object
>>> ob.rotation_euler
Euler((0.0, -0.0, 0.0), 'XYZ')

Create a transform matrix from our Euler. Make it 4x4 so we can multiply it by the 4x4 object matrix.  Notice after the first multiplication we get the result as above.

>>> R = Euler((x, y, z)).to_matrix().to_4x4()
>>> ob.matrix_world = R @ ob.matrix_world
>>> ob.rotation_euler
Euler((0.5235987901687622, 0.7853982448577881, 1.0471975803375244), 'XYZ')

and again

>>> ob.matrix_world = R @ ob.matrix_world
>>> ob.rotation_euler
Euler((1.6257474422454834, 0.4853370189666748, 2.580118417739868), 'XYZ')

Please note this is global rotation.  For local use ob.matrix_local instead.

Note: As pointed out by @lemon for Eulers could also use

ob.rotation_euler.rotate(Euler((x, y, z)))

to transform  the local euler rotation from another.

For a lot of cases, the axis and angle is defined.  Eg make a 4x4 rotation matrix of 30 degrees around the axis (1, 1, 1)

R = Matrix.Rotation(radians(30), 4, (1, 1, 1))

Our R from above as an axis / angle rotation

>>> R.to_quaternion().to_axis_angle()
(Vector((0.03912381827831268, 0.7727739214897156, 0.6334742903709412)), 1.2104885578155518)

is the equivalent of rotating 69.356 degrees around axis (0.03912381827831268, 0.7727739214897156, 0.6334742903709412)


Mesh rigged to skeleton deformed in pose I have a human body mesh and a skeleton which I got from modding kit for a computer game. I am trying to mod a backpack into the game.

I followed a tutorial and parented a plain cube (my backpack prototype) to the skeleton. When I go into pose mode and move any bone from the skeleton, the cube gets distorted.

To check what I'm doing wrong, I imported an existing backpack from the game and did the same steps. When I change pose here, the backpack keeps its normal form.

So what could be the difference between my cube and the imported backpack?

What I did so far:

Parent my cube to the skeleton, selecting "with empty groups".
Go to weight paint, transfer weights from the human body mesh to my
backpack. There I selected "create Data -> nearest vertex" and
changed "Source Layers selection" to  "By name". I left the rest to
defaults. After this step, my cube had a vertex selected, as shown by
the bright circle in the picture below. Before that, no vertex had
such a circle.

The vertex selected is exactly the same that gets selected when I do the same steps with the existing backpack. It's a skeleton bone in the human's foot, because that's where the origins of both the skeleton and the backpack meshes are. So I assume "nearest neighbor" will always select this bone.

Why do poses distort my cube?

Edit: By default, the cube is blue in weightpaint:

So I choose the toe bone and paint the cube red:

The result: the cube is no longer distorted, but its position is off.

It matters which bone is weight painted. When I selected the bone closest to the backpack (a spine bone in the person's upper back) and then painted the backpack red, it stayed in position and did not deform anymore.


A moving object responds very slowly to gravity I'm making a game and I'm using logic bricks to make my character (currently a default cube) move.

It moves (using the arrow keys) relatively fine up until I try to go down a slope or fall off an edge of some kind. When I try to fall instead of falling down as soon as goes off an edge, it keeps going in the same direction until I release the arrow key making it move.

And something even weirder is that if the object is still in the air after it starts falling when the arrow key is released, if you press the arrow key again it causes the object to completely ignore gravity again and go off in that one direction.

If you need anything to help you solve this problem I'll provide what I can.
I'm using blender's game engine if that helps.

EDIT: Turns out its falling really slowly instead of staying the same height. It's still annoying though.

Hope you can help.
Jako

Gravity forces

You need to be aware that gravity is a force. This force will be applied to the current linear velocity.

The linear velocity gets increased over time as you add the force again and again, resulting in a larger linear velocity.

Therefore you get:

linear velocity = previous linear velocity + velocity from gravity

which is:

linear velocity = initial velocity + velocity from gravity + velocity from gravity + ...

Situation

I assume you explicitly set the linear velocity on key press.

In this case the final linear velocity will not add up as you already reset it as reaction on the key press.

The result is:

linear velocity = motion velocity + velocity from gravity

The gravity can't simply add up.

Possible Solutions

Motion as force

When you apply the motion as force your motion force will not override the previous linear velocity. It will be added the same way as the gravity force will be added.

This allows smooth but unlimited acceleration.

Servo Control

The motion mode "Servo Control" allows to setup a linear velocity without overriding certain axis. I suggest to enable the [Z] button and leave the limits at 0.0 as they initially are.

This allows the object to fall down without accelerating into the direction you want it to move.


Text in speech bubble Blender v.2.81a I'm doing a school project and I'm drawing a 2D animation in the latest blender version. I drew a speech bubble. Is there a way to create text inside the speech bubble with blender. I don't want to draw it because it's too messy. Is there a way to type text in the 2D animation? I'm new to this program.

Thank you for your help.

If you want to add a text-object, switch to object mode.

Then press Shift+a and select the "Text"-option, to add a new text-object.

Because the new text-object is rotated by default, you may not see it from your perspective, so rotate it on the x-Axis by 90°. (r+x+90)

The text can be altered if you have it selected and press Tab, to enter edit mode, then change your text as in any text editor. Press tab again, to exit edit mode. Other text settings like the font can be found in the right side panel.


Why does one object cut through and show in another object? I am new to blender and I am trying to extrude and bring down the dribbling parts of frosting on a donut, but when I bring the vertices down, they cut into the donut as shown (picture is taken from inside the donut).

I have proportional editing on, the snap to face tool (with project individual elements), and I even tried using ctrl button when dragging down vertices (I saw someone say that can help it to not show through - I'm not sure the reasoning of why it can work - it worked well with grabbing vertices but not extruding them for me) However, the frosting still pierces the donut - Is this normal and I shouldn't worry about it, or am I doing something incorrectly?

I appreciate any answers - Thank you!]1

I don't see a huge problem, but I can understand that you want to get rid of it. When you have proportional editing enabled,, snapping only has an effect on the selected vertices, not on the ones being dragged along. Also snapping only works if you use g or the widget to move your vertices. If you want your freshly extruded faces to snap to your topology, release them from extrude move mode and use the tools to move them.


Shadow Incorrect at Bottom of Edge In the images below, I have a cube that is sticking up about two thirds through a plane. But, despite the fact that the cube is not hovering over the plane, the shadow seems to indicate otherwise. How can I fix this shadow?

Use 'contact shadows' (Eevee) in the lamp settings:


Selecting 1 side of an edge loop in a mesh Hi, I created an edge loop by knife tool on this model (with K , then Z shortcuts in edit mode).

Now, how can I select all the vertices only right or left side of it (selected vertices will be included as well) ? Thanks in advance.

I also added my blender file here :

As long as you don't have any other vertices hidden you can hide (H) the edge loop to have to separate parts of the object in edit mode.

Then you can select one of the separate parts by using select linked (L).

After that you can reveal (⎇ AltH) the hidden vertices which are then selected automatically.

Now you have everything to the right or left from the edge loop selected!

In this example the right side of the edge loop plus the edge loop itself are selected.

Note that if the part left and right of the edge loop are connected somewhere else this method won't work unless you hide the other connection as well (e.g. a torus).


Why are the UV coordinates from dupli parent returning black? I have a sphere UV mapped like so:

I parented a Suzanne to it and enable dupli verts, then setup a material on the Suzanne which I expected to color all the dupli Suzannes in a replica of the texture mapped to the sphere. Instead I just get all black:

However, generated coordinates work as expected:

Why do UV coordinates return all black?

Because you are duplicating from verts.

Seems that Blender currently (2.75a) can't inherit coordinates of duplicated objects from the parent only if they are not duplicated from faces.

It would not be tehorically impossible to obtain the behavoiour you need as object mapping should not be strictly related to the way is generated, but for the moment it is.

The same issue is present with particles:

Note: is not clear why it doesnt work with with grid option enabled...


Undo not working on 2.74 my undo does not work on 2.74, but it does work perfectly on 2.73 and older.
If I change keymapping from ctrl + z to something else, it still doesn't work.

Operating system is Win 7

Thank you for you help!

Tapio

You probably have set the undo steps to Zero in the User Preferences :

go to : User Preferences➜Editing➜ Undo➜ Steps  and set it to some number ( default 32 ) then save the settings


How do I make a luminescent gas cloud? How can I make a luminescent gas cloud, similar to the one shown in the picture below (labeled "Trapped Atoms")? Thank you.

Simple Sphere with Emission as a Volume would be sufficient. We will use for both methods mostly the same setup. Gradient Texture > Color Ramp > Emission shader.

Color Ramp will control color and smoothness.
Emission > Strength... Strength.

Without Emission.

They will look like gas spheres and emission will not affect other meshes.

With Emission.

This ones will affect meshes with light.


Edit Rigify Rig after Generation This is my first time using blender and rigify for animation.
I thought it was a good idea to use the wolf rig as base for a dragon. im almost happy with it but i have some troubles with the neck.

My first problem is: I cant move the position of the first neck bone. When i try to move it a bit on the y-axis in edit mode the Def Spine and some other bones get terriby sterched in object and pose mode even without a skinned mesh.
(reset everything with alt-r /alt-g doesnt work but the rest position looks fine and allying this as the rest position also messes up everything.)

Second problem: i think rigify uses the neck bones for some sort of ik but i would like to use normal fk with simple child and parent relationships (because the model has a bended long neck and i need to be able to rotate the bones against eachother) .  but i couldnt figure out how to get rid of this.
even if i try to adjust the metarig before generating the ik gets created even though i created the bones myself and set them to the bone type basic copy and changed their names or the script gets destroyed and i cant generate a rig.

like i said im new so every useful information is appreaciated :)

well i just created a new rig for the head and connected it to the alredy generated rigify rig.


How can I map two dissimilar objects to the same UV border? I am trying to minimize texture seams and distortion in order to use a tiling detail normal map on top of a diffuse map on a humanoid mesh for use with Miku Miku Dance.  I believe that if I use two different UV maps sharing the same silhouette, I can avoid visible seams and that the distortion will be acceptable.  I have separated my model into a front and back half (two different objects) rather than seaming it in Blender while trying different solutions.

Because the front and back half have dissimilar surfaces (but share a border), Blender UV maps them to different silhouettes, which will create visible seams on any map tiling over their surface.

Is there some easy way that I can get Blender to use the same silhouette for both halves?  I would prefer not to join and reseam my mesh, but if that's necessary, I'm willing.

Nathan, in fact it's more often the other way, meaning if you have two UV islands of the same model that share the same texture space it's much harder to avoid visible seams, even if those UV islands are exact copies of each other. It's quite impossible to have no visible seams at all if the two UV islands are only somewhat similar.

The next big disadvantage of sharing texture space is that it's nearly impossible to paint away the seams, since you'd paint both parts instead of one.


Multiples animations in a single blend file For a University project I need to make a fish (guppy), create bones, add them to the mesh, create some "realistic" animations on the timeline, and finally redo the last point to be able to set multiples different animations on the fish to call them when needed from Unity Engine.

The fish and bones are almost okay. I linked them to the mesh and made animation on the timeline too.

However, I am not sure about how to manage the part when E need to make multiple animations. I have read that can be done with the NLA-Editor, but I do not understand how to do this. Can anybody explain me (an example is okay too) how the NLA-Editor works?

And for the bonus question, if some of you are Unity users, is it easy to call one of the different animations at will ?

You can save multiple animations (called Actions in Blender) for a rig by using the Dope Sheet and changing its context to Action Editor (switched with a dropdown menu in the Dope Sheet's header). From the Action Editor, each animation can be stored as an Action datablock (the same way you can have multiple mesh or material datablocks).

Important: If you store multiple actions make sure you give each action a fake user by clicking the F button to the right of the Actions datablock in the Action Editor's header. Failure to do so will result in you losing animations after saving and closing Blender. This is because all datablocks without users (including Actions) are purged when a file is saved and reloaded. Giving the action a fake user prevents that from happening.


Why is one of my objects is not visible in the final rendering? I've been building a low-poly planet but for some reason when I hit render one of my objects is not visible. I have tried everything I can think of but nothing seems to make the object appear in my render.

Tried adding a new camera, tried the 'clear restricted render' but I'm using mac and I can't get the prompt to show - unsure what shortcut/key it is on mac?

If it is somehow relevant after I've clicked render and go to the compositing view I cannot see ANY nodes, completely blank.

you can check if relevant objects are enabled/disabled in render.
I usually prefer to show it in outliner like this:

click on filter icon and activate the button with camera icon

then you can see it in outliner and check if object is enabled/disabled for rendering

and since you are using modifiers you should check if render is enabled for modifier too (it is always the camera icon)


The correct render sampling amount in the render properties tab. Is there a right or wrong amount? A real Blender newbie here, I'm following a blender tutorial with the final product as an animation. I tried to experiment with the render time during the process by changing the render sampling amount in the render properties tab as shown in the image below (for if I was unclear).

I have done tests with 3 different sampling amounts: 64, 32 and 16. The render time of a frame of the 64 sampling-amount is around the 15.5 minutes, while the 16 sampling-amount only takes 4 minutes. I expected that the resolution of the 3 frames would have a big difference, but there was no difference in the resolution at all. So my question is why do we keep this amount so high while we can keep it lower with significantly lower render times? Did I miss the difference in the resolution between the frames, should there be any? Or isn't there any?

There is no right or wrong.

A higher number of samples will result on a cleaner picture, but takes longer to render. Clean image in cycles is usually between 200 and 500 samples, sometimes even higher numbers are needed.

A lower number will show some noise, but will render faster.

The correct number is the one that works for you: Is the level of noise tolerable? Can you live with it vs the time needed to render in higher quality?


how to make 2 cloths collide with each other? I'm having a problem with a cloth simulation. I've set 2 planes up and applied a cloth modifier to each, what I want to happen is for the two cloths to fall together and interact with each other. The problem I'm having is that both objects are passing through each other. I have cloth collision turned on, and self collision too. Any ideas what might be wrong here?

Picture here, as always, any help is greatly appreciated

You can either merge the two objects into one object with self-collision cloth physiscs, or you can have two separate objects, each with its own cloth physics, but then both need to also have collision physics enabled.

For more explanation see the answer to this question: How can I make sure that simulated cloth doesn't go through other objects?


Meshes went crazy (shaky) Hey all!

Little trouble here.

Meshes went crazy (shaky) when moving around in both viewport and rendered views.

i have a really huge scene. Some objects are very large and some very small.

This happens only to small objects.

Tried playing with clip distances, tried scaling everything up or down with no luck.

Video of the problem: https://www.youtube.com/watch?v=86Th-HOGY9Y&feature=youtu.be

Thank You

Problem is gone after scaling up shaky objects and then scaling up all the stuff in the world to match the proportions accordingly.

And the problem was not just clipping flickering since it caused real distortion, which was also visible in rendered view.

Thanks Everyone for the attention.

UPDATE: The real problem was the huge distance from the center of the project (grid).
So if you are having similar problems - try moving problematic stuff near the center.

Peace


Is there a way to change scrollbar width? I work on a 15' laptop and the scrollbar width takes a lot of space when working on multiple windows. Being able to hide the scrollbar or changing the width to a minimal value would help me a lot.

I've gone through every setting in User Preferences to search for a solution but couldn't find a way.
Thank you!

One way to scale scrollbars is... to scale everything: since 2.79, you can scale the UI through a global factor (default to 1). This is useful on hidpi displays, but it could help you too:

by default, the UI as 1.0 scaling factor:

but you can scale it down enough to get all the UI (and also scrollbars) slimmer:

of course now everything is too small, but in Blender you can also scale each area/panel (CTRLMMB drag): of course par of the UI (menu and icons) cannot be resized in this way, but you can at least find a compromise...


How to cut at vertex position of another object? I want to cut the top face of the cube exactly along the bottom edge of the plane. What would be the best way to do that? When I use the knife tool on the cube, it doesn't snap to the vertices of the plane, so it never ends up being precise.
In this example I have both meshes in one object, but it would be even more useful to just cut one object based on another objects vertices/edges without having to combine them.
Is there something like 'cut edge at cursor'? That way I could set the cursor to the vertex first.
Thanks!

If the plane and cube belong to the same mesh, in Edit mode, you can use CtrlF Face Menu > Intersect (Knife). It has 3 modes:

(Illustrations exploded to show separate parts)

All: all the results of intersection are split to separate islands
Cut: Edges are created, but not split, at intersections in all parts
Merge: Edges are created at intersections, all vertices merged, resulting here in an internal face.


Layered recording. How does it work? What is Layered Recording and how does it work? I didn't notice any changes between the checkbox turned on and off.
From the manual:

Layered recording
Adds a new NLA Track and strip for every loop / pass made over the animation to allow non-destructive tweaking.

https://youtu.be/UMGRXU2k40Y
I got it to work for producing new NLA track/strip by playing through the animation, setting the auto keying, and then moving the cube. It tends to create them when keyframing around the end and start frame.


Attaching one object to each hand of a Mixamo action I have downloaded the Mixamo action Digging. I have modelled a shovel mesh (with no armature in it) and can parent one end to one hand. How do I parent the other end to the other hand to get the guy to dig the hole? Will I have to create bones for the shovel?

I may be wrong but in my opinion it will be much easier to do the opposite, aka make the hands the children of the shovel, because you can't make the shovel the child of 2 different bones.
You could make the shovel child of one hand (the hand that holds the back of the shovel) and make it track to the other hand (the one in front of the shovel), but you'll constantly have to rotate the hands so that they fit with the shovel angle, while if you do the opposite, aka the shovel controlling the hands, they will always twist correctly.
In that case, and more precisely, make the hand contollers (aka the targets of your arms IK constraints) the children of the shovel. You just need to give a Child Of constraint to both the 2 hand controllers with the shovel as Target:


Shade Smooth and holes I'm quite new to Blender and I have a problem when I'm using Shade Smooth. As soon as I am shade smoothing The object with the hole in it, there are some weird color changes around the hole. It doesn't change in the rendered image.
The holes where made with the boolean modifier. Am I doing it the wrong way or is there a way to fix this?

Avoid boolean to create holes in a mesh. It will always create really bad topology and then when you apply subdivision and smooth shade, everything is going to fail.


how to convert a shape key animation to a fluid? So I just finished this tutorial by Tutor4u using shape keys to convert a rolling ball into a wine glass. after that animation I would like to convert the wine glass into a fluid. The problem is I cant seem to get the wine glass to interact with the fluid physics. I can easily get it to work with regular objects in separate files no problem.

here is the tutorial https://www.youtube.com/watch?v=qx5L8K99j10&t=1476s

This is my third day with blender, so I am probably missing something very simple.
I suspect that I am not setting some time parameter to account for the animation in the beginning, or that the fluid portion doesn't recognize the wine glass because it switched materials.

Id appreciate any feedback. this is driving me nuts!!

Ok now it's clearer. If I got what you mean, I tried a (much simplified and rough) example.

I started from a simple sphere, set basis shape key,

added another, shaped it like a glass extruding vertices,

had the morphing effect.

Then set the morphed glass object as fluid,

added a surrounding big cube, set it to fluid domain,

and baked the domain.

When it finished, I hid the original glass shape, keeping only the domain visible. Now it seems to splash as you expect... does it?

Is this not working for you? Did you forget to bake? Of course I used rough fluid settings, you'll need at least much finer domain resolution.


How can I have a property represent how far away an object is from another? I have an object in a scene which, for this example, is called "centerobject." Lets say we have 20 object scattered all over our scene. To get the objects, I could use a near sensor, which will trigger when the object is near a property/material. I am looking for something similar to this. Here's what I'm looking for: all objects with a property ("detectable") that are in x range (near sensor) have a property ("distance") which reads the distance between the object itself and the centerobject. How can I do this? I am looking to have an answer in python. Thanks!

Measure to faces

The near sensor detects when any face of an object's (physics) hull is within a certain distance. This is especially good when you work with in-homogeneous formed shapes such as planes, poles, streets, fences. But this can be a pretty slow detection even in native code.

While a near sensor provides you with all the information you need a Python controller to evaluate that results. Be aware the distance will be the distance to the center - not to the nearest face.

detector.py:

PROPERTY_DISTANCE = "distance"

def distanceToProperty(controller):
    nearSensor = controller.sensors[0]
    if not nearSensor.positive:
        return

    center = controller.owner
    for hitObject in nearSensor.hitObjectList:
        hitObject[PROPERTY_DISTANCE] = center.getDistanceTo(hitObject)

You can control the filter via the GUI:

Near/Radar/Collision sensor [True Level Triggering] --> Python controller Module: detector.distanceToProperty

Measure to distance

In difference to the near sensor this method measures to the center of the object only. This is good on homogeneous formed shapes such as spheres, cubes, house.

The evaluating code is the same as before. The difference is that you need to perform the sensing via Python. That means your Python controller acts as a sensor (but is no sensor). To do that you have to constantly trigger the Python controller.

detector.py:

PROPERTY_DISTANCE = "distance"
PROPERTY_DETECTABLE = "detectable"

def distanceToProperty(controller):
    center = controller.owner
    for object in center.scene.objects:
        if PROPERTY_DETECTABLE in object:
            object[PROPERTY_DISTANCE] = center.getDistanceTo(object)

Always sensor [True Level Triggering] --> Python controller Module: detector.distanceToProperty


I can't insert a new edge loop I can't select all the faces even if they are on the same plane. I don't understand. There are no double edges, vertices or faces. I want to insert a new edge loop (Ctrl+R) but can't create one all around.

I realized there was a double edge on one of vertical edges. So there was a disconnection between the edges. I used W > Remove Doubles operator however it didn't solve the problem so I should have deleted those vertices manually.


Attaching Glasses to Model Rig I've attempted to parent the glasses specifically to the head bone by going into object mode, selecting first the glasses, then the armature, and then switching into pose mode and only selecting the head bone. I got a box that came up and the only option was "connected". Thought I was on the right track, but the glasses still wouldn't move when I posed the character.

I am on mac and could possibly be hitting the wrong buttons on my keyboard? I'm not really sure. I used to be able to attach a hat to a character earlier this year, but nothing I remember seems to work and I can't find anything online that works either.

First select the glasses, then select the armature.
Instead of pose mode, press Tab to go into the edit mode and select (only) the head bone.
Press Tab again to go back to the object mode.
Ctrl+P to bring up the Set Parent menu, and select Bone.
Done!


Why are there borders around faces when I extrude? I'm a beginner at blender and I'm following a tutorial on extrusion but I can't seem to figure out why there are borders when I extrude. I'm trying to make it so that the middle 3 cubes come down together without the borders.

If you create a new file, create a cube, or use default one, subdivide it, select some faces and hit E only once for every time you want to extrude, there should be no borders around the extrusion:

It would be a common beginner mistake to press E a few times this way creating more extrusions so this might be it. You could just start over from scratch since this is not very complex and the objective here is probably more to learn then to save a few minutes.


Why does the Remesh Modifier change object outer dimensions? I am trying to use the Remesh Modifier to reduce the number of polygons in a hemisphere shape (and simultaneously convert the tris to quads), as shown in the Blender page on the topic here. Note how the outer dimensions of the cone stay roughly constant as the Octree Depth increases (Original on left, then increasing Octree Depth from left to right).

However, when I try to use it, it drastically changes the outer dimensions of the hemisphere, such that it only keeps the top section of the hemisphere, as shown in the series of images below. Note how the hemisphere height decreases as the Octree Depth decreases.

Why is this?
Note: I am using Blender v2.66 (released 2013), which may be the cause.

The problem is resolved by using a closed hemisphere mesh (below left), rather than an open hemisphere mesh (below right).

Using a fully enclosed mesh, the remesh tool retains the outer dimensions of the geometry (without shrinking the input shape) as the Octree Depth is decreased.

Perhaps in future I will close the geometry, apply the Remesh Modifier, and then remove the plane that closes the geometry after the modifier is applied.


Objects Disappear on Camera View - Pressing "0" Key I'm puzzled why my ojects disappear whenever I press "0" key to preview camera angle. I've set my camera to 50mm and LOCK CAMERA TO VIEW. Cannot figure it out. They all disappear when I zoom out.

By the way, I have set my unit of measurement to IMPERIAL. Is this a problem?

Try to decrease the "Start" value and/or increase the "End" value in Clipping section of your camera settings.


What do the Smoke Flow Advanced settings do? In the Smoke Flow panel there is a section called Smoke Flow Advanced. In this section you can find mapping fields (Size, Offset). Could you explain the nature of these fields and how they impact the fire?

These are mapping adjustments for the emission texture (specified just above them in the panel). Size adjust the scale of the texture coordinates, offset translates the coordinates. Depending on your texture, you may find it useful to animate these to give your flame a more realistic patchy/"licking" appearance.


Live unwrap does not work with some objects I'm trying to use Live Unwrap with subdivided cube's UV, no matter what vertices I pin it just does not work (I made sure that 'Live Unwrap' checkbox is checked), what am I doing wrong?

Here is the .Blend file:

Thanks in advance.

In order for live unwrap to work on the above island it should be divided into two islands or more, live unwrap can not work on the whole island of the object at once.

You can choose part of the island and hide the rest (Shift + H ) with the 'UV and edit mode selection sync' on


Python as module video editing I am trying to do some video editing using blender in headless mode as a python module.  My first problem was that when I tried to import a video using movie_strip_add it always failed even when I tried multiple formats.  I tried importing an image and that works but when I go to check the length of the strip or even find the added strip I get array out of bounds errors.  Does anyone have an example of how to do this.

Second question is there anything special I have to do to add movie strips

def __init__(self):
    self.numRunning += 1
    self.scene = bpy.context.scene
    self.ops = bpy.ops
    self.data = bpy.data.scenes

def compress(self,filename):
    newname = os.path.splitext(filename)[0] + 'Compressed'
    (filepath,vidname)=os.path.split(filename)

    self.scene.camera = None
    for obj in self.scene.objects:
        self.scene.objects.unlink(obj)

    self.scene.sequence_editor_create()
    self.ops.scene.new(type='NEW')
    bpy.data.scenes['Scene'].render.resolution_x=1280

    file=[]
    #for i in vidname:
    frame={"name":vidname}
    file.append(frame)
    scene_name=self.data[0].name

    self.ops.sequencer.image_strip_add(directory = filepath, files = file, channel =1, frame_start = 0, filemode = 1)
    #self.ops.sequencer.movie_strip_add(filepath = filepath,files = file,frame_start=0, channel=1)

    stripname=file[0].get("name")
    print(self.scene.frame_end)
    print(self.data[scene_name].sequence_editor.sequences[stripname].frame_end)

Blender uses ffmpeg to handle video formats, you can check that it was built with ffmpeg enabled by entering getattr(bpy.app.build_options,'codec_ffmpeg') into blender's Python console.

For your script --

self.scene.camera = None
for obj in self.scene.objects:
    self.scene.objects.unlink(obj)

This will remove all objects from the current scene yet you follow it with creating a new scene -

self.scene.sequence_editor_create()
self.ops.scene.new(type='NEW')
bpy.data.scenes['Scene'].render.resolution_x=1280

You create a new scene and set the resolution on the scene called 'Scene' - as that is the name of the first scene in blender this won't be the name of the scene you just created. By creating a new scene you will have a scene without objects - sounds better than the previous step of unlinking everything.

Try

myScene = bpy.data.scenes.new('myscene')
myScene.render.resolution_x = 1280

Operators depend on the context to perform tasks, normally this includes the current window, which you aren't going to have if you are running the script headless.

Instead of using operators -

myScene.sequence_editor_create()

myImageStrip = myScene.sequence_editor.sequences.new_image(name = 'imgStrip', filepath = '/tmp/image001.png', channel = 1, frame_start = 1)
myImageStrip.frame_final_duration = 5

myMovieStrip = myScene.sequence_editor.sequences.new_movie(name = 'firstClip', filepath = '/tmp/test.mp4', channel = 2, frame_start = 1)


Extrude along individual normals without changing the normal direction I have an insetted cube like this:

Their normals are quite, normal:

But after I "Extrude along Individual Normals", the faces change in direction:

How do I extrude them like this:

?

Just check Offset Even in the pop-up menu.


How do I use the alpha channel of a texture for arbitrary data in Cycles? I'm trying to use the alpha channel of an image as my emission map in cycles, but for some reason, the render just renders the alpha and not the colour of the texture, even when I plug only the colour directly into the diffuse BSDF and the diffuse directly into the output node. I'm actually trying to mix the diffuse with an emission shader to make certain parts of the texture always illuminated. However, with this setup, the alpha channel renders on top of itself and looks pretty much the same as when just plugging the alpha channel directly into the output via a diffuse shader.

Note that my image is in TGA format, after I originally had issues with using alpha on a PSD (which would always render white).

Here is my node setup:

In order to do what you are you describing, you need to make a couple changes to your node setup.

Change the Mix Shader to an Add Shader.
Unplug the texture color from the multiply node and plug the multiply node into the Strength instead of the Color of the Emission shader.  You can now use the multiply node to adjust the strength of the emissive parts of the material.


Material for character silhouette I wanna make a animation made out of silhouettes (as a solid shape of a single color) like

this,

or

this

or even like

this.

Some people say to not put any material at all, but then that would be a problem if I want to have colored character.

What am I supposed to do?

If you are using Blender render then check the Shadeless option in the Material tab:-

And if you are in Cycles then use this node setup to create a Shadeless material:-