Weird Black "Shadows" On Rendered Image I'm getting these weird black shadows on my rendered image of this mailbox I'm making. Here's a link to the file and a link to YouTube so you can see what's going on.

I was able to mess with the normals and removed all doubles and this is what I was able to come up with. That will still not go away unless I change the texture to diffuse, and it's not a shadow: I've moved my lights and camera trying to see but it wasn't.

EDIT:

So did all that stuff and still no luck, It did make it look better but on the angle that I want for the pic there is still an area. I have found that if I rotate the camera there are certain areas where this "shadow" does not occur. I also checked to see if maybe the letters or the top of the mailbox was casting a shadow in some way, but that was not. I also moved my light sources around, took away the floor, and added more objects around to see if it would work. Well it still has that unsightly shadow, although it does look better I'm just surprised there is no way to get rid of that black shadow that I know of.

Here is a pic of my current progress

It's kind of hard to see in that pic but at the bottom right corner there is still a weird shadow. Also I found if I take off the top there is an unsightly shadow on the top of the main mailbox mesh. And this is after I deleted duplicates and checked my normals, etc.

A lot of your normals are facing inwards.  You probably can't see this because backface culling is disabled by default.  I always keep it activated so I can see these problems right away.  Here's what it looks like with Backface Culling enabled.

You can view the normals using the following setting.

You can flip them with the following tool in Edit mode.

I also use remove doubles because there were many vertices that were overlapping which were not attached to each other.

The door is partially attached to the rest of the mail-box at the bottom which makes the polygon flow difficult to work with.

Also, there is a shelf inside the model which is attached to the outer polygons, this may be intentional but has the same effect as interior faces: it causes rendering artifacts and was the biggest problem here.

Cycles cannot handle super low-poly models very well.  Basically triangles become very dark and visible at areas where the lights hit them at glancing angles.  Adding more geometry, lights and an HDR texture can help with this.

I used inset on the top piece and some loop cuts along the rim.

The main box and the door have a Bevel Modifier attached and set to 'Angle'.

I applied the Solidify modifier on the door latch/hook thing and added inset and loop cuts to it as well as a sub-surface modifier to make the edges more crisp.

Here's the .blend http://www.pasteall.org/blend/34426


Execute Node Tree from a bpy script outside animation nodes I want to iterate the Animation Nodes Node Trees in my current scene, and for each Node Tree, I want to execute it as if by clicking the Execute Node Tree button. When I click the button manually, I don't see any output in the Python console for this button, so I'm not sure where to begin.

Find AN node tree and execute():
import bpy

anTreeNames = ["NodeTree", "NodeTree.001"]

for name in anTreeNames:
    tree = bpy.data.node_groups.get(name)
    if tree:
        tree.execute()


Is there any principle about using "edge loop" when building a model? I'm trying to build a laptop this time, and edge loops disturbed me somehow.

Edge loops will create "useless" verticies and edges at the position where I don't need them. Should I remove them with "dissolve verticies/edges"？
Sometimes when I want to keep the edge sharp with edge loop tools, the curve corner that should be maintained is also affected, turning into a slightly sharp curve that I'm not expecting.
An extra question. How can I build up the keyboard? By generating edge loops according to the key position and the gap between keys? (Some efforts in the 1st pic)

I'm still learning to build something and I'm not sure when I should use edge loops and when not, or how edge loops should be applied. I'm hearing!

There are so many ways to solve this depending on your end need. I think it's important to be pragmatic about how you spend your time modelling. If it looks good then it is good. Simpler topology can make it easier and faster to model and also quicker to render. Model much, do many misstakes and learn from them.


Select Meshes from Scene Collection without relying on name I need to select Meshes from a Scene Collection and I'm hoping that there's a better way than doing it by string matching. Here's my Scene Collection with my Meshes. The 'Vert' meshes are meshes with only 1 vert:

This code finds the 'Vert' meshes in a collection using startswith() for string recognition:
import bpy

print('printing objects in scene')
for obj in bpy.context.scene.objects:
    print('obj.name is:', obj.name, 'obj is:', obj, 'obj.type is', obj.type)
    if obj.name.startswith('Vert'):
        print('found vert:', obj.name)

I'm eventually planning to add meshes with an operator, so the names will be standardized, but this method feels sloppy. Is there a better way?

By vert count
If they are still single vert meshes could also look for a single vert count.
import bpy
context = bpy.context

single_vert_obs = [o for o
        in context.scene.objects
        if o.type == 'MESH'
        and len(o.data.vertices) == 1]


Export unfinished image render My render is "almost" complete...

It took almost 5 hours to render the center object, and from now on Blender will render nothing but white pixels of the Emission background all the way to the edges.

According to its estimations, Blender is going to spend 2 more hours rendering all the white background:

I don't need Blender to do this; I could easily bring the current data into an app like Photoshop and flatten to get the background to be white.

But I cannot save the image in its current state:

I cannot take screenshots and combine them either - it would take too long at 100% (Image is over 8000 pixels wide).

I'd like to restart my computer, or start another Blender project, etc... and would like not to have to wait 2 hours.

Can I save the current, unfinished state of my render as an image if the elements I need have already been rendered?

Yes, you can.  You will simply click the X beside the Render % or press Esc to cancel the render.  Then press F3 as usual and it will save the rendered portion to your desired format/location.  The unrendered part will be black if saved as a JPEG and transparent if saved as an Alpha PNG.

Just to prove it ;) here you go:

Here's the canceled render of the default scene saved as a JPEG:

EDIT: As was mentioned, Render Border can be useful in certain circumstances.  The problem is it's always rectangular (so it wouldn't have helped in this situation with a circular object) and it's usefulness is relegated to instances where you use multiple render layers.  Otherwise, you can simply crop the render dimensions as close to the edges of your scene as possible which does the same thing.


Trouble joining two meshes together So, I'm trying to make a model of the lamp from the Simpsons. This top part is giving me trouble

At first it was easy I just booleaned a sphere to a cylander cylinder and they fit together perfectly.

When I tried adding the other cylinder, it looked pretty okay but I know that it could be better. I see this dimples and pinches around where the cylinder and sphere meet.

The geometry is pretty messed up and I was wondering if I am stuck just editing the vertices one by one, or if I'm going about this the wrong was and there is an easier way?

The easiest way to do it is to:

Begin with a cube that you subdivide twice (smooth mode).
Cut off a hole on the bottom, select the hole, flatten it on the Z axis (SZ0.
Make it a circle ShiftAltS.
Extrude down to make the vertical cylinder.
Do the exact same operation for the horizontal extrusion.
Add some edge loops close to the edges you want to sharp.


Packing image and movie strips How can I pack image and movie strips that I have in the video sequence editor? I have tried selecting the pack option in menu File/external data but when I latter restart the blend file, I find no packed images.

Pack image strip to .blend not make sense.
If you need move project, send it to someone else or to render farm, folow this steps:

create folder for image sequense in folder where your .blend file is  and move/copy your image here. (for better manipulation only)
Link image sequence in your .blend to this images.
Make all paths relative - "Files" - "External Data" - "Make All Paths Relative"

Now you can send your .blend with image sequence folder or move it everywhere and Blender find your image sequence.

Why? because path to images now look like this:

//folder with images/

And not like this:

d:/data/blender/projectxy/folder with images/

In my opinion linking images this way is much more clever way than, make copy and save them direct to .blend file.

PS: work for most render farms - just zip all and send as zip


Minecraft animation, uploading a minecraft skin I don't know why but when i try to upload a minecraft skin onto a rig, the sides of the head are just lines and the back of the head is the same as the front of the head even though the skin isn't like that.

You need to go to Object material properties>UV maps. The images will show you what to do (make sure you have the body of the character selected):

Do the same for the head and you are done!


Turn drawing into a Mesh? I would like to ask if it is possible to make a drawing into a mesh. That would be very helpful. It can be a 2d plane formed like a cube or something.

Here is what I mean:

You can do this with a Grease Pencil sketch, it has a Convert to Geometry Routine.

However, the paths created with this take ALL the curve points of the Grease Pencil sketch into the new mesh, so this may not be a perfect solution.

Update:
Actually, using the Polygon Drawing Mode this is pretty much exactly what you want. Closing off the endpoints is a bit fiddly, but otherwise it works just fine.


How to change to spherical Axis I was wondering how you change the way the axis to become spherical?

Thank you!

You have changed the manipulator widget to rotate mode, to return to the default (translate) mode, select the pointer icon as selected below.

There are many options for using the widget, detailed documentation can be found about its usage on the Blender Wiki.

http://wiki.blender.org/index.php/Doc:2.6/Manual/3D_interaction/Transform_Control/Manipulators#Manipulators


How to maintain IK chain angle to target? I've got a robot assembly arm (http://sendvid.com/ze9l813s) set up with an inverse kinematics solver, but I don't know how to keep the end bone from rotating. I need that bone to remain perpendicular to the Z axis, and to the target, while it is moving. I don't want to use rotation constraints, I just want the IK chain to have the end bone remain totally perpendicular to the ground. How do I do this with inverse kinematics?

If you're having trouble visualizing it, here's a video of what an assembly arm is supposed to work like: https://www.youtube.com/watch?v=J23oqwyN9-A

The arm can move straight up and straight down, not in some kind of weird bendy arc like the Inverse Kinematics rig is doing.

If I am understanding your question correctly, I think this kind of setup would be the simplest solution:

The main point is to disable "Inherit Rotation" for the tip bone.

Extrude another bone from the root of the "Tip Bone" that will be the "IK Target", and clear its Parent (AltP in Armature Edit Mode). It must not have a Parent in order to function properly as an IK Target.


Why won't my sculpted details bake into a normal map in cycles? I have made a low-poly mesh in cycles, then duplicated it and sculpted more details onto it, and followed a tutorial that I had used before to try to bake the details, but all I got was a blank blue texture. i don't understand what I'm doing wrong. I added the normal map in the objects node editor, the two models are in the same place, and selected to active is checked. Please help!
Here is the blend file:

Your bake is failing because your low poly mesh is not unwrapped. You need to create a UV map for your low poly mesh so that Blender knows how to map a point on the surface of your 3D mesh onto the 2D texture.


Border rendering suddenly not supported by sequencer & odd problem with rendering Whenever I render a single frame of my animation, for all key frames except one it will just give me black real quick while that odd one out will show me an older render of mine from that same keyframe. I could switch cameras, change the position of anything in the scene, or alter rendering settings but it will just give me back the inital 720p render without even looking like it rendered anything at all.

When border is enabled in the rendering, I get an error message saying "Border rendering is not supported by sequencer."

I ran into the same issue, but then figured it out. By unchecking Render Region under Dimensions, it was solved.


I can't keep my armature in pose mode when selecting another object I have set my armature to pose mode, and now want to select the rigged mesh so that I can weight paint it. The only way I can select the mesh as the active object is to set the armature back to object mode, which I don't want.

Using blender 2.8

This has to do with how editors/modes have changed in 2.8 (presumably related to multi object editing?)

There is an option in the edit menu called Lock Object Modes which forces the mode to be consistent across all objects. If an object doesn't support the current mode then it cannot be selected. Disabling this mode allows leaving the armature in pose mode and then selecting the mesh:


Smoke Simulation Not Showing in Camera So I was trying to create a smoke simulation and it shows up fine in the rendered view but as soon as I go to the camera, It disappears.

In the picture, the two sides are the same view and angle but the right is in the camera and the left is not.

Here's the blend file:

https://drive.google.com/open?id=0Bx4pBUqoLAb-UnVLT0dTTEJlcU0

This is because left side is rendered mode and right is solid mode. Blender doesn't show smoke and/or fire at full quality in solid mode in the viewport instead it shows only a little bit. If you see closely, in the file you provided, you can see a small white cloud of smoke, but in rendered mode it turns into a dense black mass of smoke.


GPU render turning out grey when using certain materials i'm trying to render a scene, but when i am using my GPU te render something, the end result gets a grey layer on top of the image.
the problem appeared after amd's crimson drivers or after blender 2.76

Like when using a bump map.

however when i'm rendering the scene with my cpu, it turns out normal.

Can someone please explain me why this is happening and/or how to solve this?

thanks for the effort, iron

I'm using AMD R9 280 graphics card and I had the same problem.

Reverting to older AMD drivers seems to fix the problem. I reverted from the newest drivers to 16.4.2 version and Blender (2.77) rendering on GPU works again!

You can find older driver versions here: http://support.amd.com/en-us/download/desktop/previous?os=Windows%207%20-%2064

Maybe you can revert to a bit newer drivers and the Blender will still work, I don't know, haven't tested it. I'm just really glad the GPU rendering works again and hopefully AMD fixes this issue asap.

Cheers!


How to create collapsible panel Is it possible to make collapsible panel like it is for object modifiers? I need something similar for my plugin. After choose menu item I want to create new panel with collapsible box, where can I change parameters for objects.
screenshoot http://www.23hq.com/pkulas/photo/18279220/original
I tried before to make panel with bpy.types.UILayout.template_list but it was too hard to build from scratch for me. Documentation isn't very friendly, hard to know what can I use for these arguments (active_dataptr, active_propname)
Next months I'm working on my plugin, before that I need to make good UI for it.

It's basically a camouflaged checkbox (boolean property) with changing icon:

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

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

        box = layout.box()

        row = box.row()
        row.prop(obj, "expanded",
            icon="TRIA_DOWN" if obj.expanded else "TRIA_RIGHT",
            icon_only=True, emboss=False
        )
        row.label(text="Active object is: " + obj.name)

        if obj.expanded:
            row = box.row()
            row.prop(obj, "name")

            row = box.row()
            row.label(text="Hello world!", icon='WORLD_DATA')

            row = box.row()
            row.operator("mesh.primitive_cube_add")

def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.types.Object.expanded = bpy.props.BoolProperty(default=True)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)
    del bpy.types.Object.expanded

if __name__ == "__main__":
    register()


is it possible to render distant objects in lower quality? I was wondering if there is the possibility to render distant objects in lower quality than the ones that are closer to the camera.

Set Render Engine to Cycles and Feature Set to Experimental.
There will be a checkbox for Adaptive Subdivision in SubSurf modifier. This is what you want.
Blender Doc: https://docs.blender.org/manual/en/latest/render/cycles/object_settings/adaptive_subdiv.html


How to use quaternions coming from ros? I have a quaternion coming from a ros tf tree that is representing the orientation of my camera. I am trying to set these values for a blender script to render a scene, but the camera looks into the wrong direction, compared to when I visualize the quaternion within rviz(ros visualization tool). So I assume there is some fixed rotation that I need to apply between the tf exported quaternions and the beldner quaternions, but I'm not sure which one. Example pictures will make clear what I mean:

The box I'm trying to render is where box_corner_tracker is

The camera in rviz looks along the z(blue) axis. The perspective here is slightly changed, but imaging the box being there where the camera frame is looking with the z(blue) axis.

Now when I enter some example values into blender you can see that the camera look completely into the wrong direction:

The tooltip in blender for quaternions says wxyz am I right to assume that this is the order the values need to be entered(I did it this way)?

I'm not sure what the problem is but I assume that my question is what is the transformation between the looking direction of the blender camera and it's z-vector?

If you have a look at any camera in Blender with local transformation orientation selected, you will see that in Blender cameras look at negative z direction, up is positive y and right is positive x:

You will need to match whatever camera orientation is used in the software you are importing from. It might even be that some axis is inverted in another software.


Render Result doesn't match my background image in Camera View So I'm making a movie where I'm compositing my animated characters into a real life scene by compositing them into a picture like Augmented Reality!
So it's just an image but for some reason the scale and the placement of my characters in the background image in the viewport doesn't match up with the scale of my characters in the Render Result!  I have a mask in this scene and I've added scale nodes after the Alpha over nodes and I've also made sure there's no animation on my camera and the resolution is 100%!!! Anyway it would be awesome if someone could help me! Thank you!]1

Ok I feel dumb but hopefully this helps someone else!  I had to mess with it for a while because when I just had the render result it wasn't working but actually the scale node fixed it I just had to change the background image to my Render Result!


in the selection mode "by pressing button b", how to deselect previous vertices? I'm confused by the selection mode triggered by pressing the shortcut key "b".

In this mode, it by default keeps my previous selection, and when I select a new vertex, for example, for most of the time, this new selection will be added to my old selection. But for some other times, my new selection will deselect the previous selection, and becomes the only selected vertex.

I'm curious what alters this behavior. For most of the times, I want my new selection to deselect the old vertices. How do I do it?

When activating border select(b) middle mouse will deselect while left mouse will select.

-eh five


Unable to view fire simulation in rendered view I tried to create a smoke simulation in blender 2.8. I baked the data after I added the domain and flow object I can only see the fire in solid view and wireframe view but unable to see the fire animation (only smoke is visible) in material preview and rendered view. Can someone help me by explaining this

It seems "Quick Smoke" does not add any material to the Smoke Domain. Here is an example for Cycles.


Why my mesh doesn't look "solid"? Hey guys I'm new to blender and I'm working on something; I apologize in advance if things that don't make sense but here goes:

I'm trying to extrude they eyes of my model, I am currently watching a tutorial and when he extrudes his model looks like the following:

however when I do it,my extrude looks fairly different; I select the verticies I want, I push E and then use S to scale it to how I want it and unlike the above image my extrude looks more "meshy" than it does "solid".
This is Mine (ny Idea how to make it look like the one above?:

plz help this has been bugging me for the longest time. I can't find solutions this is my last hope lol

This is because you are in Wireframe view.

Press Z to toggle Wireframe view. Alternatively, select the small sphere down on the bottom, and then select Solid to go back to the default view.


Unable to select whole mesh in edit mode Hi All,

There is probably a very simple answer to this. However when I enter edit mode I am unable to select my who mesh, only the ring of faces as shown below.

What am I doing wrong.

Cheers Aaron.

It was a simple problem. Other faces of the mesh were hidden.

The answer was to unhide them with Alt + H in Edit mode


How would I go about in making a neck strap? I was wondering how I would start to make a neck strap, for example one on binoculars in blender. Maybe somehow apply physics too it to make it more realistic as well.

Like the straps on the images

Model a small section of the strap. Add a curve object. Give the strap an array modifier and a curve deform modifier, set the curve for the curve modifier and set the array to fit curve and select the curve. You can set the start and end caps of the array to get a 'loop' at each end.

Now when you adjust the curve the strap will deform with it. Use ⎈ CtrlT to 'twist' a curve point. For ease of animation you can add a hook to each curve point with ⎈ CtrlH -> Hook to new object.

For physics you could set a small 'cube' at each curve point as the hook object (or make it the parent to the empty) and set rigid body physics on them.


Extrude face with Python I want to extrude a face in the direction of the face normal, here is the code so far:

r = bmesh.ops.extrude_face_region(bm, geom=bm.faces[:])
verts = [e for e in r['geom'] if isinstance(e, bmesh.types.BMVert)]
bmesh.ops.translate(bm, vec=dir, verts=verts)

The problem is how to get the direction of the face that I translate? The bm.faces[0].normal is Vector(0,0,0)

Any ideas? Thx!

Update the normals

Either update normals on a whole bmesh

bm.normal_update()

or on a per face basis

for f in bm.faces:
    if sometest:
        f.normal_update()


AG normal map to RGB normal map I'm trying to convert ag normal maps (alpha is red channel, green is green channel, blue channel derived from a and g through some formula) to standard normal map (tangent space).
Nvidia's Windows Texture Viewer gives this formula "Normal map AG [dR = sA; dG = sG; dB = sqrt (1.0 - dRdR - dGdG); dA = 255]", but I'm more artistically declined than math or programming and failed to recreate this with shader nodes. thanks in advance.

This tree reproduces the function you describe:

It could be made smaller, but I hope this is more self-explanatory. Note that this is Non-Color data, set in the input image.


Mirroring to create a single polygon across the mirroring plane I'd like to create a single triangle by mirroring one vertex exactly on the mirror plane and another vertex across the mirroring plane to create a single face. I've shown an example image. In this example, I've already applied the mirror modifier but it won't create a face across the mirror boundary.

I'm really hoping something like this is possible? I guess I could just leave this one triangle until the very end, then apply the mirror modifier and fill it in, but it would be nice if I could leave the mirror modifier in place and have it correctly construct this face. Is there a trick to doing this?

The mirror modifier in your illustration is working exactly as it is designed to do. In this case, it is mirroring an edge. To complete a face, you need to add one more vertex, located at the intersection of a line perpendicular to the y axis, and the y axis, which passes through the vertex furthest from the y axis, and create the face. The easiest way to create this vertex in the illustrated figure is to extrude from the vertex at the far right to the y axis, constraining the extrusion to the x direction. If you do this, the mirror modifier will work the way you wish.


How to hide a portion of a mesh that is blocked by another mesh on a nonrendered layer I was messing around with render layers and passes in cycles and was trying to render a layer where object1 was intersected by object2 however object2 was on a separate layer that was not being rendered; so instead of object1 being cut in half and the portions of object1 would not not be visible had all the layers been rendered remaining invisible, ( was hoping they would be transparent) they are visible.

Here is the image with all the layers rendered at once:

Here is the layer with only object1 rendered (note: it is reflecting objects from other layers but the objects themselves are not rendered):

You'll notice that the portion where the cube is in front of the glossy pain (object1) and more visibly where the glossy pain intersects the ground (in this case both the ground and the cube are object2) are rendered, however I wish to have theses arias of the glossy pain to be hidden so that this layer can be used in compositing. Is there a way to do that? I'm thinking something to do with the Light Path node in object1's texture but I can't figure it out. If this question doesn't make sense or you need clarification let me know.

You need to use the Exclude boxes for this. Go to Properties > Render Layers and make sure all the layers including the objects you do not want to have render on that layer are selected in the Exclude portion. This will basically do the same thing as hiding it, but for that render layer only.


Principled BSDF via Python API The title is general: how can we use the API to edit Principled BSDF properties?

More specifically, I have a mesh that has vertex colors in it. The colors are fine, and I can use the mouse to have vertex colors as base color using the Shader Editor. Likewise, I can use the Material Properties and select "Vertex Colors | Color" for the base color of the material assigned to the mesh. This is all fine and both are equivalent ways.

However, how to accomplish that programmatically, via the API? I could do that in 2.7x but don't seem to be able to do the same in 2.81. Any idea?

EDIT: here a minimal example that works with 2.7x:

import bpy
mat = "MyMaterial"
bpy.ops.material.new()
setattr(bpy.data.materials["Material"],"name",mat)
setattr(bpy.data.materials[mat],"use_vertex_color_paint",True)

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'Material' object has no attribute 'use_vertex_color_paint'
```

Add and link the vertex colour node.

Adds a new material using mat = bpy.data.materials.new()

Recommend: almost never use bpy.ops.materials.new() The material bpy.data.materials[mat] in script in question is confusing and varies dependant on pre existing materials "Material" and "MyMaterial".

Notice I used the index of the io when making links. Could use vcol.outputs["Color"] for vcol.outputs[0], however if the user is using a different language, then "Color" will be in that language.

The principled bsdf base color is input 0. A simple test in python console to save counting by eye.

>>> for i, o in enumerate(bsdf.inputs):
...     i, o.name
...
(0, 'Base Color')
(1, 'Subsurface')
(2, 'Subsurface Radius')
(3, 'Subsurface Color')
(4, 'Metallic')
(5, 'Specular')
(6, 'Specular Tint')
(7, 'Roughness')
(8, 'Anisotropic')
(9, 'Anisotropic Rotation')
(10, 'Sheen')
(11, 'Sheen Tint')
(12, 'Clearcoat')
(13, 'Clearcoat Roughness')
(14, 'IOR')
(15, 'Transmission')
(16, 'Transmission Roughness')
(17, 'Emission')
(18, 'Alpha')
(19, 'Normal')
(20, 'Clearcoat Normal')
(21, 'Tangent')

Script to add material, add vertex colour node, link it to base color of bsdf.

import bpy

newmat = bpy.data.materials.new("VertCol")
newmat.use_nodes = True
node_tree = newmat.node_tree
nodes = node_tree.nodes

bsdf = nodes.get("Principled BSDF")
'''
# alternatively

output, bsdf = nodes
'''

assert(bsdf) # make sure it exists to continue

vcol = nodes.new(type="ShaderNodeVertexColor")
vcol.layer_name = "VColor" # the vertex color layer name

# make links

node_tree.links.new(vcol.outputs[0], bsdf.inputs[0])


How to get list of all images in a scene with python I am looking for a way to get a list of all the images loaded into Blender at that point. I want to use it as a check something like:

file = "name"
if file not in list.of.images:
   image = bpy.data.images.load(filepath)

know of any ways to do this, searched and searched and haven't been able to find anything.

If you just want to iterate over the images:

import bpy

for img in bpy.data.images:
    print("name=%s, filepath=%s" % (img.name, img.filepath))

Note this could contain 'render result' and materials which you might want to filter.
See the docs to see what attributes could be interesting like 'file_format', 'filepath', 'filepath_from_user', 'filepath_raw'...


How to keep texture mapping after applying modifiers I've created a street by adding a street texture on a plane. I created a curve and added an array modifier and curve modifier on the plane. I made it let the plane follow the curve.

It looks like this:

I need to export this now. For this (I guess) I need to apply the modifiers. Unfortunately the texture mapping is changing.

Is there a way to keep the texture mapping but after applying the modifiers?

Edit:
Here the versions with applied modifiers:

It seems that applying the array modifier removes the texture repeat and applying the curve modifier removes the texture... distortion.

And here my blend file.

One way to handle this is to use UV Mapping right from the start.  For this, you can press Numpad_7 for top view.   Now if you press Numpad_4 several times, the view will rotate along the z-axis.  Once the positioning matches the texture orientation press Numpad_5 to set the view to Orthographic.  Now press u and select "Project From View (Bounds)"
You could just use Unwrap or Reset but there is no guarantee that you will have the mapping aligned to the texture's direction.  If it's not then you'd have to rotate the UV's and/or scale by -1.0 along one of the axis(that can be confusing, it's best to avoid).

Now you should be able to apply the modifiers and have the following result.


Apply Scale issues on duplicated object At a loss on this one. I'm sure it's something simple.

I'm currently building a character…. (well nearly finished) the eyes are separate from the main model as I want to move them when animating.

To try and make it clear I'll explain my workings and then explain the problem. I created an eye using a sphere, and used a lattice modifier to make the eye look flat (as the character is stylised) Before doing the second eye, I textured the model, including the eye. I then duplicated the eye and mirrored it (so that eye is textured too) and did the same for the lattice. Looks great and does exactly what I want it to do.

This is the problem. When exporting it as an FBX it tells me I need to apply scale. Thats fine. So I apply scale on the main body of the model, and the two eye balls. All seems fine. But, when in object mode and I press "P" on the keyboard, the render tells a different story. The duplicated Eye has done a 180 turn. The first/original eye is fine, so is the body. Before applying scale and pressing "P" the duplicated eye is fine.

I don't understand, for a start, that this only shows up when rendered, and when I put the fbx into the game engine I'm using, it shows the eye rotated (this is how I discovered the problem in the first place.) But looks fine in my 3D window in blender. Also, its only that duplicated eye thats messing up. Is there a way I can apply the scale but keep it as it is.

Any ideas?

From the problem you described. I have a few suggestions.
To "apply the scale but keep it as it is":

On your duplicated eye. Press CtrlA then apply "Rotation & Scale". The reason for rotation is because scale would not make it flip, but rotation might.


Cycles Render Lighting Glitch While Using Transparent Normals Map i just have a question that i couldn't solve myself. The thing is i started to use substance designer and get my own custom textures from there, but the normal map it generates is transparent. I do know how to change it from transparent to non-transparent image but the transparent map looks better in my case. Anyway, in the cycles render whenever i render my object, there will be lighting issues. I am pretty sure the normal map is making this problem. Please i need this question to be answered asap. Here are some pictures of the issue and the transparent normal map. P.S The map is a png file and the light is smack right in the middle, so one half is lit up and the other isnt.

I also found out that the glossy shader is broken with this kind of normal map, there is a "void" in the reflection which moves with the camera:

From what I'm seeing in other discussions about this around the web (1, 2), Substance Designer embeds a height map in the alpha channel of the normal map PNG. In other words, the way Allegorithmic is using it in their normal maps "alpha" means height/bump, not transparency.

Theoretically this is convenient because only one PNG needs to be loaded into memory to provide both height and normal data. In practice some render engines, including Cycles will be confused by this, as Cycles quietly passes the alpha channel along with the RGB data. Cycles does not anticipate RGBA data being fed into a normal input socket - it expects RGB only.

The way to strip that out is by using a Separate RGB node, followed by a Combine RGB node. Then you can connect that RGB normal data as usual.

If you will be doing this often you might want to Group these nodes together and save that group in your startup .blend.

Now what about that alpha channel containing the height data? Let's not let it go to waste. Here's how to use both height and normal data together in Cycles.

Remember to specify that the image texture is of the type "Non-Color Data".


Export 3D model from Blender to .U3D for use in PDF file .pdf files supports Displaying 3D models, you can view the model from any angle by mouse movements - sort of like looking through the viewport, only the object is fully rendered, "real", etc. This requires a .ud3 file. Blender does not export a .ud3 file. Any alternatives to achieve this?

You can find the scene button in the property Area, scroll down to find the u3d export.
I managed to export to u3d, but after putting it to pdf with latex the pdf failed to open correctly in adobe reader XI. a "3D data parsing error has occurred"


One half of my object is darker than the other I just cut an object in half and then mirrored it.
Before i joined the objects, they looked perfectly similar, but after joining, one half is darker than the other.
I tried some stuff and i did delete doubles, and i checked the material
but it all doesn't help

That's the thing, after joining the 2 halves:

I have 2 possible solutions. One, try (in edit mode) pressing {control n} which will recalculate the normals. If the normals are incorrect then it will fix that. Otherwise, it's just a question of shading.


Multiple Animations in the Same Model I am having a model with two hands that I am trying to navigate. I created one of the moves that I want, then in the action editor I clicked the 'F' button. Created a new action and tried to do changes in the timeline but they affect the previous action as well.

Is there a way to modify the actions independently of one another?

Thanks in advance!

The F button is just for making a Fake user to avoid the non-user data being removed after closing.

To make a duplication based on current action data, you need to click the number button next to it.


How to create screw thread with a circular profile I am new to blender and this might be a duplicate thread, so please point me to a similar question because I don't know the right vocabulary to formulate my question.

I try to make a screw thread with a circular profile. So I create a cylinder and next to it a circle. I use the Screw modifier to create a spiral around my cylinder.

Now I have the problem that I can not unify my thread with my cylinder. Normally I use a Boolean modifier and operation Union to do so. This time it complains.

What I recognise is, my thread is not a solid object but actually more like a pipe. I can see an opening there and I wonder if this is the reason.

I tried the Solidify modifier but this didn't help ether.

In general the spiral and the cylinder are touching each other, so I don't really see the problem.
Hope somebody can point me to a solution. Thanks in advance...

By the way, I want to print this screw in a 3d printer. So in general these objects needs to be solid or so :-)

EDIT

So here is an image of my result so far. I guess the boolean is not working because of this "pipe". It is not a solid object but only vertices. How can I make it solid so I can unify it with my cylinder.

When I then try to boolean unify both I get the following error. This happens also when I select the cylinder first or the circle first.

The main problem is from known limitations for Boolean - non-manifold geometry.

If you select non-manifold geometry by Ctrl+Alt+Shift+M you'll see these boundaries selected :

So to apply Boolean without problems in this case fill the boundaries of the screwed circle.

You can do that by pressing F while they're still selected. Then add Boolean to the cylinder and choose Union.


Parenting an appended object I'm a Blender Newbie and I'm having trouble selecting & parenting an appended object. As an exercise I have a scene of a simple room, the cube, to which I've appended a mesh chair. I now want to scale, position and then parent this to room. However, I can't find a way to select chair and then the room.
What should I do?

Thanks

Right-click the chair, and then Shift+right-click the room. (Although I can't really think why you would want to do this.)


How can I adjust keyframes of multiple objects when some are invisible? I have set up a scene with many objects at 24fps. Now, I increased it to 60 fps (2.5 times more). To keep everything at the same speed, I increased my frame count by 2.5 times. However, I cannot do the same for my objects as some are invisible in both rendering and the viewport. (Easier for previews) I do not want to have to remove their keyframes one by one and re-add them. How should I get about doing this? Is there something in the graph editor I can use?

Yes, you can do that. At the bottom of the graph editor there is a ghost button:

Push it in, and now you need to make everything visible in the viewport. Since it is keyframed, this won't do anything. Then, without changing frame enter a. You can now return to the graph editor and edit everything. I just needed to reset the 3d cursor and resize everything


Use value as scalar field in Marching Cubes node (Sverchok addon) I am trying to use the marching cubes node (in the sverchok addon) with a set of points as follows:

So, I have a set of points with xyz coordinates, and “w” values at each of these coordinates. I would like to use the xyz coordinates of these points as the bounds, and the w values as the scalar field.
What I don’t understand so far is, how to convert the w values into a scalar field that is usable by the marching cubes node? Any ideas how to convert the w values to a scalar field?
Here is a zip with the set of points and blend file: https://drive.google.com/file/d/1h4F8KKpS4NqOUjcxeR3y-JS_zq5zGncU/view?usp=sharing

to make scalar field use XYZ and W.
Bounds can be as Box node generator or any other simple geometry creating square
Follow screenshot

or even this:


Particle emission begins from the frame I start rendering from, not the frame it should begin from? I'm trying to render a simple animation of the camera circling a lit candle, with particle emission beginning at frame -100 so it's lit before frame 1.

To speed things up I'm rendering to pngs across multiple computers. For example I've set things up to render from frame 1, frame 20, frame 40, and frame 60 on four PCs. However the first few frames on each computer seem to show emission starting again, i.e. frames 20, 40, and 60 show no particles.

How can I fix this so I can collate all my files at the end for one smooth flame animation? Is this a known issue?

Any advice or tips for a novice would be great!

So I've discovered what causes this. When you're animated from a frame that isn't frame 1, in the timeline you have to make sure you're current time point is on frame 1. If you have the frame you're rendering from as your time point then it begins particle emission from that frame hence a few frames of no emission.


Why copy rotation constraint does not register actual rotation? I have an example, where I need eyelids of the character to follow eye movement. Eyelids movement is based on blendshapes driven by X and Z axis of an eyebone. Whenever I set target bone for eyes to look at eyelids will not follow, because eye bone that is looking at (track to constraint) target does not "produce" any rotation information, despite it's obviously rotating. How do I workaround this?

of course not, because you just added a "track to" contraints to your cube, which tracks to your empty. So the cube rotates in that way, that it tracks to the empty.
And there is no copy rotation constraint at all...


Should I be concerned about non planar quads like these if I'm modeling for unity? I'm currently learning modeling for my game, below is a mesh I'm working on which will be part of my character model for unity.

I suspect the scaling in the front face will cause some distortion for the connecting faces, so I use the mesh clean up tools split non-planar faces

So the connecting two faces are indeed non-planar faces. I tried to fix it but there's no easy way at least for my current knowledge of modeling. Should I take care of it before I export it to Unity or this kind of non planar face is OK for game models?

I tried to google answers about non planar faces in modeling, the information is mixed as some articles saying non-planar faces are no but some post also says non-planar faces especially for biological objects are not something to be concerned as game engine will split them to triangles eventually, so I'm confused.

Edit: I have read the post Flat quads (or, why is my mesh so funky?), I think my problem here is: this mesh is gonna be a part of a mech, and I also want to keep the polygons low so I'm not sure if subdividing/smoothing it is the way to do it.

The first answer in Flat quads (or, why is my mesh so funky?) answers most of this question, and for my case since I want to build a mechanical object, subdivision surfaces modifier with "simple" option does pretty much what I want to achieve.


Duplicating grease pencil layers? when I try to duplicate grease pencil layers using the "copy/paste" buttons I get a: "keyframe pasting not available for grease pencil mode"
Any idea what I am doing wrong?

You can duplicate Grease Pencil layers by clicking the Copy button in Grease Pencil panel located in N sidebar.

Note: This is a coming feature in 2.74. More information see here. Currently you can try the daily version if you have to.


Need help making the nodules on buddhas head hey guys im working on a buddha statue for our server in conan exiles and i need help understanding how to make the details on buddhas head. I want to sculpt one of the spherical nodules you see on his head and then essentially be able to copy and paste them so im not sitting here doing one by one when he has 100+ of them on his head. Just as a forewarning i am using dynamic topology for sculpting with mirroring on incase that changes anything.

Model the detail and array it along the curve. Place many curves with the arrayed meshes around the head.

Add a curve and wrap it around the head. Select your mesh (detail), add an array modifier to it and increase its count. Adjust its offset also. Make sure that the curve and mesh have the origins point set in the same position. Next add a curve modifier to your mesh. Now when you translate the curve's segments the mesh follows it.


How to use bones to fold a model like cardboard? I am a Blender novice and wondering if someone could take a look at the model I've created and some bones I'm trying to use to pose it. I was hoping to just make these folds at 90º but the bones are having some unexpected influence.

I'm using 2.8 but just because this is more of a side project right now.

https://www.dropbox.com/s/2bxrjgxy2nx19lm/SM_Box9.1.blend?dl=0

If you select the armature, then the box, and switch to Weight Paint mode, you can see what is the influence of each bone. In your case you can see that it's not correct. For example the bone on the left has an influence on the whole box while I guess the top is supposed to be controlled by other bones. Same thing for the top bones, if I move one, it deforms much more that what is supposed to deform, even some parts that appear blue, but must have an influence superior to 0.

I think maybe you counted on the Automatic Weights mode when you parented, but for this kind of rigging (i.e. not organic object) you should have used the With Empty Groups method:

So first delete all existing groups (or in your case, unparent your box with altP, it will keep the vertex groups and you won't have to parent with empty groups).

Once you've parented With Empty Groups, your mesh has as many vertex groups than you have bones, but they have not been assigned to any vertex yet. You just need to select your object, go in Edit mode, go to the Properties panel > Object Data > Vertex Groups, select a group in the list, then in the 3D view select the vertices that are supposed to be part of this group, meaning which are supposed to be influenced by the bone with the same name, and press the Assign button under the vertex groups list.


How would I get this 3 tone lighting effect for edges? I want to get this effect that defines the edges and then colors them with 3 tone coloring, I've tried with freestyle but I want to get the same effect, I think this wad one is workbench

You can try this - I'm not sure it will give exactly the look you have, but it's the closest I can think of.
Start by giving your object a Wireframe Modifier (I made mine extra large in the screenshot so it stands out more). Make sure to un-check "replace original" and set the Material offset to 1 - this will allow you to assign a different material to the wireframe than what's on your base object.

Then make sure your object has 2 materials - a base material, and a wireframe material. Make the base material whatever you want, but make the wireframe material look something like this:

Obviously you can adjust the ColorRamp to play with the colors. I've also tried other combinations using a Vector Math node and adding inputs such as a "Facing" from a Layer Weight node, which gives some interesting results, but I'm not sure if it's what you are looking for. Maybe use this idea as a base, and play around until you get something you like. (As a head start, try using a Vector Math node to multiply the Normal Vector by the Pointiness factor.)


Exporting to Unity - How do you get a single FBX to support multiple materials? I was looking at some FBX's in Unity and noticed they support multiple materials, like this:

When modeling in Blender (I'm using Blender Render), how would I go about setting up a model to have multiple materials like that? My workflow currently is:

Select all the faces of the object
UV Unwrap
Open up a PNG in the UV/Image Editor window
Position the UVs
Export

This produces a FBX in Unity which handles only 1 material. What do I need to do differently in Blender to have a model support and offer up multiple material slots?

Each material you assign in Blender, will be a material in Unity.

It looks you already have that, if Unity has generated all those material slots. You will just need to re-assign the colour in Unity, or attach the texture you've used if I read your question correctly.

Each face has a different material on it, 3 materials in Blender, Unity will read that and create three materials for those faces.


What is the range of values produced by Cycles texture nodes? When I create a Cycles shader, I often take the 'Fac' output from a Texture node and feed it to the 'Fac' input on a Mix Shader. I'd like to know the exact range of values that this output produces so that I can transform it with Math nodes and not have clipped values.

Is there any documentation on the range of values that each of these texture nodes produce?

Rather than list the specific ranges of the texture nodes it is more useful to provide the tools you can use to analyse them yourself - partly so that you could apply the same technique to any other texture or shader function you made create in future, but also because stating specific upper and lower ranges is meaningless unless you also appreciate how the values are distributed over that range.

For example, consider a mathematical 'normal' distribution (https://en.wikipedia.org/wiki/Normal_distribution) :

In a normal distribution, the values are centred around a specific place - there is more chance than any particular sample will be near that centre and progressively less chance the further away from the centre you go. However, where does it end? Technically the range is actually -infinity to infinity as there is a chance of any value being returned by the normal function - just progressively less chance, the further from the centre you move. How could you measure such a boundary?

From a practical point of view, however, we may just that we've reached the limit whenever the chance of a result of a certain value is below a particular threshold. ie, it becomes very relevant to know the shape of the distribution to be able to determine where the practical limits are.

The built-in Blender UV/Image Editor window includes tools that can show the distribution of values and we can use that to analyse the output from any node. Open a UV/Image Editor window and press T to open the tools panel. You should see a Scopes panel with a number of graphs. The most useful for this situation is the Histogram panel :

The histogram shows an analysis of the pixels in the image over the range 0.0 to 1.0 for each channel R, G, B, A in addition to 'combined' channels Luma and RGB, with the shape of the graph showing how those values are distributed throughout the image. The peak shows what the most common value is, the lower the occurrance, the lower that point in the graph.

The histogram shows the analysis of the image after any color management has taken place on the image. Therefore, to avoid skewing the results we need to first disable color management. This can be achieved by opening the Scene properties and selecting 'None' in the Display Device setting of the Color Management properties.

Since the histogram only shows values in the range 0.0 to 1.0 and some of our textures (such as Musgrave) produce values outside that range, we'll need to apply some maths to shift and scale the values to something more useful. Since the Histogram window includes grid lines to split the graph into 4 we can use the centre line as 'zero' with a range of -2.0 to +2.0 using the following nodes :

Note that this shows the nodes for the Environment rather than a specific material. By removing all the objects from the scene and simply rendering the environment we can get a clean image that only contains the results of the texture being tested.

Now simply plugging different texture's Fac output into the Color input of the Background node and pressing F12 to render should produce an analysis of the texture as a histogram. For example, Noise produces the following :

Note : Varying the Scale of the texture node will affect the smoothness of the curve.

For the Noise example above the vertical grid line in the centre of the histogram represents 0.0. Values to the left of this are increasingly negative (with the 1/4 grid line representing -1.0) to the left-hand edge, representing values of -2.0. Similarly, the 3/4 vertical grid line represents 1.0 while the right-hand edge represents 2.0. As can be seen from the graph, the values of the Noise texture centre around 0.5 and vary down to about 0.25 and up to about 0.75. However, there is a 'tail' that theoretically extends indefinitely - presumably down to 0.0 and up to 1.0 but with ever decreasing frequency. So, for practical purposes the Noise texture varies from 0.25 to 0.75 with approximately a normal distribution.

Plugging other textures produces the following :

Voronoi - varies between 0.0 and 1.0, biassed towards the lower end and gradually dropping off :

Musgrave - centred around 0.0 and tailing off to -1.5 and +1.5 :

Magic (Fac) - between 0.0 and 1.0 with a high peak at about 0.3 :

Wave - Between 0.0 and 1.0 with more values at either end (the peak and trough of the wave) :

Similar methods can be used to analyse the Color output of the textures by splitting the color into individual channels and performing the same calculations before combining back into a single color. The histogram can then be used to split the channels to compare :


After parent bone with another bone, why my bones and mesh only visible in edit mode? No constrains I'm new to rigging, and there is my problem.
I followed the course called "The Art Of Effective Rigging In Blender", in the course, there is three bone system in one Armature, deform/target/control.

deform :  Directly bind with mesh.
target :  The target bones of "Copy Transforms" constrain added on deform bones.
control:  Control the target bones in world space, Where the problem appears.

Problem: I parent the root bone of target bones to one control bone in edit mode, switch pose mode, everything disappeared (include target bones) but the control bones.
I followed the course all the way down, and compare the blend file with the blend file in course-files, didn't find any key different till now, I'll keep looking for it...
So if there is any solution or advice for this problem, thanks a lot!!

This is two blend files I uploaded to Dropbox

It seems like a Beta version problem, I rigged it in Blender version 2.83.
And I tried to rig it from scratch in version 2.82, It's completely no problem!


How to change edit material assignments after joining meshes How can material assignments to a joined mesh be changed after the meshes are joined?

Example:
Create a scene with a cube and sphere.
Assign material #1 to the cube and material #2 to the sphere.
Select the cube and the sphere, using crtl-J join the meshes.
The result is shown below.

The material panel for this joined object shows both materials.

If edit mode is entered, the there is an assign, select, and deselect option, but its not clear how to use this to change the mesh material assignments.

What is the procedure to change the material mesh assignment? For example, how is the red material assigned to one face of the cube?

Example blender file:

When you are in edit mode, select the faces you want with the red material, then in the material tab select the red material and click the assign button, the faces which you had selected should have the material assigned now.


How to get rid of these 'pseudo-planes'? I often make small mistakes when extruding geometry for example when extruding walls for a house. Sometimes this creates double geometry. I know I can get rid of this using W > remove doubles.
In this case I can't seem to get rid of this faulty geomtry (see screenshot). Somehow, these 3 vertices seem connected with a plane that I didn't create. I tried Remove Doubles, Dissolve, Delete etc... but nothing works.

Can someone tell me how to clean these problems please? Thank you.

I can't see a lot from your image but this might be just a big n-gon, so maybe you can try selecting these two vertices marked in red and pressing J to create a line. (it will probably solve it by completing the box shape)


Link to How-To: Editing footage from multiple video cameras? Any links to a how-to on editing footage from multiple video cameras, to produce a single video switching between cams?  I've used NLE before but not with multiple cameras. And am brand new to Blender.
I have video from 3 cameras (1080 at 23.98fps with scratch track) and a separate audio track (96/24).
[I see many how-to tips on rendering from multiple cameras (view angles) in animation... a different beast.]
Ideally I'd like to put a marker at a clapboard sound spike on each of the 4 tracks, align the tracks, use the camera selector and... automagically have a single video.
https://docs.blender.org/manual/en/latest/video_editing/sequencer/strips/effects/multicam.html gives a great overview... but no links to actionable how-tos for someone new to the Blender GUI.

That description in the manual covers most points.
Align your clips so they all match the clapper board marking.
Add a Multi cam strip above them.
Split the preview into 4 previews by dragging from the corner of the editor area.
In the preview sidebar set the Channel number to match channels 0-3. 0 will show the final edit.
If your computer is fast enough to run everything in accurate fps, all is fine.
If not, select all video strips.
In the preview - view menu - go to proxies.
Select Set up.
Check 25%
Check Overwrite.
Select rebuild.
Select - Scene render size - Proxy 25% And repeat for all previews.
Now it should play at a constant frame rate.
Select the Multicam strip.
In the Sequencer sidebar, you can see the options.
The channel selector you can change the channel of the active/selected strip(white outline).
If you click on the number buttons underneath, you'll make a split in the multicam strip, and switch to the channel number you pressed.
If you set the playhead to the beginning, having the multicam strip selected, and you hit play, you can also do "live" switching by using the number keys ex. 1 is switch to channel 1.
I did a patch to improve the multicam user experience, but it has not been committed: https://developer.blender.org/D10521


Assign colour to vertices given face texture, and enable conversion to a point cloud I'm a-bit of a Blender newbie here so please forgive me if what I'm about to say sounds stupid, but I've been trying to solve this issue for far too long now and am becoming way too frustrated...so, on to my problem:

Main objective:
I have a .blend model containing several objects, each of which I want to convert to a point cloud (i.e. I want to convert the scene in my model to a point cloud which needs to be contained in one file, preferably .ply format).

Progress so far:
I have found a way to export the objects in my model into one .obj (+.mtl) file, convert it to a .ply file to use it in an algorithm which samples the object meshes to create a point cloud, and save this point cloud in another .ply file.

Great, you successfully converted your objects' meshes into a point cloud...so what's the problem?
After saving the objects in my model to the .obj format, I found out that it is the faces which are coloured, not the vertices; i.e., the RGB values of the vertices are grey. I want to assign RGB colour values to my vertices too, so that the points in my point cloud are also coloured.

Other details:
I am using the Cycles Render, and have noticed that when I select the 'Materials' viewport shading, all colours look fine, but when I switch to the 'Solid' viewport shading, most of my objects lose their colour; I understand this has something to do with only being able to view the Viewport Colour in Materials->Settings when viewing the 'Solid' viewport shading.

I have several models similar to this which I did not create myself, and all need to be converted to a point cloud in some way, so I'd appreciate if the solutions aren't too time-consuming.
My options at this point are to get the point clouds without any colour information (which I have been able to do), or to see if you guys can help me with getting colour onto my vertices ;)

Of course, I am also open to other suggestions as to how I can convert my objects to a coloured point cloud.

Lastly, thank you in advance for any assistance that you could provide :)

If you want to make each vertex store color from the appropriate place from the texture you want to bake texture to vertex colors. In case of baking in Blender this means you want your objects to be unwrapped and have a texture assigned to faces of the starting mesh.

First, unwrap the mesh if it hasn't been already. Then, if Cycles render engine is chosen, create a new scene / project and somehow transfer your mesh object there (Ctrl+C > Ctrl+V between different files can be handy, or append it from File > Append > Objects).

In the new project choose Blender Internal as render engine  (see how).

Then assign desired texture to faces of the mesh. To do so, open 2 editors in Blender window and choose one of them to be UV/Image editor (see more on this). In 3D viewport, enter Edit mode and select all. In the UV editor UV map should appear (see more info here if it doesn't). Choose your image texture you want to bake from in the UV editor via the dropdown list below the image.
Create a material for the object (default one works fine), then create new material texture for that material, its type by default should be Image or Movie. Choose image to bake to once more, this time in the dropdown list in the texture settings, Image rollout. Make sure Mapping is set to UV.

From this point you're left only to bake. In the Properties editor go to Render tab, scroll it to the Bake rollout and choose Textures. Below enable Bake To Vertex Colors option and press Bake button.

Note that quality of bake depends on density of geometry of the mesh.

Regarding the Bake UV textures to vertex colors addon. It makes it possible to bake in Cycles the same, but there's a small nuance - it expects texture to be assigned the same as in Blender Internal, i.e via UV editor to the face textures (however the addon doesn't require creating a material and assigning a texture to that).
Cycles doesn't do that since it doesn't use face textures to map images to mesh, so for baking with that addon in Cycles you'd need to switch to Internal, assign texture to faces with all selected in UV editor as explained above, then switch back to Cycles and bake.


Empty animation makes Transform Inspector yellow, model without animation has keyframes I have 2 models in my blender scene.
One model has animation, the other one doesn't.
When I click the one who doesn't have an animation, it shows keyframes in the Action Editor.
Also, when I scrub through the animation, the Transform Inspector flashes its color from Green to Yellow.

My 2 questions would be

Why does the model without an animation show keyframes?
What causes the Yellow flashes in the Transform Inspector?

I have uploaded a video here.
And this is the blend file:

Thank you!

Your still armature has been keyframed. It stays still because all the poses are the same all along the timeline, orange lines between the yellow dots mean that there are no change between all these poses.
In the Transform panel, green value means the armature is animated but is not keyframed at the selected frame, yellow means it is keyframed at the selected frame.
If you zoom in you'll see that the keyframes have been scaled and do not match with the timeline anymore, thus the sometimes green color on the Transform panel, when you're on a frame where there are no keyframe:

If you select and move the keyframes you can easily make them match to the timeline, and you'll see that your Transform panel will be yellow all along the scrub:


MakeHuman "MHX FK/IK switch" missing I'm working with Blender 2.69 and MakeHuman 1.0.2. I have a character in MakeHuman, using the MHX format. I have the required addons to import MHX files into Blender, but I have an issue.

I'm trying to make a walk and run cycle for my character, following a tutorial by Alimayo Arango. He says to switch both legs of the character to Inverse Kinematics using the "MHX FK/IK switch" section in the Properties panel.

My problem is that on my end, it doesn't show up. It's supposed to be under "Import/Export MHP", but it's not. Can anyone help me? Doing walk cycles with forward-kinematics is painful as hell.

I have Blender 2.79 and MHX2, for those figuring this out lately.
I did not access this through the properties menu.

I have found that option from the menu option below: View->Tool Shelf

OR

Pressing T.

After that, a panel will appear on the left.
Under the MHX2 Runtime you will see the submenu FK/IK Switch.


Wrong Colors in render I have stumbled into another problem. For some reason, the camera or the rendered image will come out like this 3D (blue and red) imitations which I never intended. What can I do to fix this issue?

https://www.dropbox.com/s/ib034p3w8qs3hqk/OutHausBackground.blend?dl=0

This is the option you accidentally activated, on the render layers tab, the Views section

just disable the Views checkbox


I can't find bake option under cache while doing smoke simulation in blender 2.82 I was following a tutorial a youtube and my cache options are different than all people out there I don't know why. I also don't have a bake option in it. Here is a screen shot of my screen.

In Blender 2.82 under the Cache dropdown panel, set the Type to Final.

The bake button should appear.


Emulated Numpad Mapping - Numpad Period? By trial and error I have found that in Blender v2.7 on a laptop with emulated numpad set, \ represents Numpad / (forward slash).

Which key represents Numpad . (period)?

In emulated numpad mode there isn't a non-numpad key that's mapped to the same functions as numpad period.  The way to get a key to do what numpad period does is to map your own choice of key to do the same things as numpad period does.  Numpad period is mapped to "View Selected" in eight or more windows (you can find them by searching for key-bindings for 'numpad' and scanning through the results but searching for 'numpad .' doesn't work).  The window in which I use numpad period most often is the 3D view.  Below is an explanation of how to remap the numpad period key in that window. A similar process would work for any other window type you want to remap.

I used this explanation to change the key binding in user preferences (Ctrl+Alt+U) for the View selected command under 3D View> 3D View (Global)> View Selected (see below, I have mapped it to semicolon ;).

Before you pick the key to map it to, you might like to make sure that your new binding isn't used for some other command. You can search by key by changing Name in the top search bar to Key-Binding and enter the key you'd like to check.  If nothing shows up (see screenshot) then you're safe; if some bindings show up you might still be ok if none are applicable to the 3D view.

Rather annoyingly, searching for 'period' . doesn't find the bindings to numpad period - not even if you type the period with a numpad - but you can get close by searching for the key-bindings for 'numpad' (type in the word as though it was a key).

If you feel adventurous, you might prefer to add an additional binding rather than removing the numpad binding (maybe you'll buy a numpad one day). To do that, take a look at the command you would have remapped by clicking the little white triangle:

That shows the command is view3d.view_selected.  Scroll way down to the end of the list of bindings and find the Add New button. Press it and you'll get a new binding called none just above the button you clicked:

Expand the key binding, enter the command and set the key you want bound to it:

.

Finally, don't forget to save your user preferences!


I get border artifacts when using Cryptomatte or ID Mask I tested masking in the Blender compositor.
Please see the GIF below.
The 1st to 3rd outputs are Crptomattes(obj, mat, asset) and the 4th to 5th outputs are ID Masks(obj, mat).
All mattes have border artifacts on the edges of those things.

The following shows border artifacts not only in black but also in normal color correction.

What did I miss?
How to use Cryptomatte or ID Mask correctly without border artifacts in Blender compositor?

I've attached a blend file to help you write your answer.

Good news! This has been solved. Our friends at CG Cookie actually made a video in 2013 (before Cryptomatte) that explains the problem and a solution we have when working with a flattened scene: Working with Alpha Edges for Compositing in Blender.  No matter how perfect the matte is, even Cryptomatte cannot solve the subject / background color mixing on the edges. However, the video shows how to use nodes in Blender to get around this! Essentially, you duplicate and invert the matte and apply it to the background, and use Inpaint node on both the foreground and the background to simulate and extend edges of unmixed color. Here is a basic node setup. Note that the ColorRamp nodes each have a black stop and a white stop, they're just VERY close together but they don’t necessarily have to be if your edges look clean:

The techniques work great with Cryptomatte, and solved my edge issues very well. In fact, I believe their Blender compositor approach is the same basic principle used in the Fusion solution linked in comments above. Knowing this approach, it's also useful for working with other types of flat footage that requires mattes and decontaminating the edges of color blend from subject to background.

Another solution would be to use separate render layers via linked scenes and collections, then composite those, but that is not always practical or possible. It would be amazing to have an automated way to render separate layers based upon the Cryptomatte (would probably only work at object level, not material level), or maybe get some kind of deep compositing method like this video shows: Skill Up With Nuke | An Introduction To Deep Compositing In 11.2. Eevee and Cycles do not have deep compositing at the moment, but perhaps another render engine compatible with Blender does have it.


Weird Artifacts When Rendering I am working on a 3d model in blender (obviously). I don't know why, but when I hop into rendered mode, the object has weird triangles on the object.

I don't know why those are there, but i think it might have something to do with the UVs, but im not sure. What is really weird, though, is that my object doesn't have those triangles as part of the actual mesh. Here is what the mesh looks like in solid rendering mode.

As you  can see, there is obviously no triangles part of the actual mesh. Any idea on whats going on? Thanks for any answers :)

It looks like you have overlapping geometry - where you have two or more faces overlaying each other. This can have the effect of such artifacts. Try editing your model in wireframe mode (press 'Z' to toggle between wireframe and solid 3d view) and check that you don't have overlapping faces.


Unable to get holes in centre of object Not sure if this is an issue of non-volume geometry, but I'm trying to get holes in the centre of my object (film reel)and when I use a second boolean modifier in the plane object to difference of circle.001 it makes the entire reel disappear.

The issue is that the object you are using to cut the boolean is a mess... it is made out of a lot of overlapping surfaces.

Bolleans don't like that kind of geometry...

If you use a regular cylinder to cut the boolean everything works fine


How to cut these two objects where they meet? How can I remove the material where these two object meet? I'd like to keep the objects separate, but I imagine a vertical line right down the middle of these two objects.

Create an Empty (plane axes). This will be the mirror line.
Delete one of those "bars".
Select the other one and add a mirror modifier, and set the mirror object to the Empty.
Position the empty so that the bars are where you want them to be.
Go into edit mode and reshape the end of the bar by selecting verts and moving them. Get it to the look you want.
To turn both back into separate objects again apply the mirror modifier, go back into edit mode. Select everything with A, and press P and choose "Seperate By Loose Parts".


In BGE, how to get mouse wheel delta? I am making mouse wheel interaction in BGE.
I found some mouse wheel events are skipped when I scroll wheel very fast.
I think this is because Mouse Sensor Logic Brick is activated only once a frame.
I need a value how many times mouse wheel is scrolled in a frame, it is maybe called "mouse wheel delta" in some of other environments.

Is it possible to get "mouse wheel delta"?
If yes, how can I get it in python?

Solution

Turn on [True Level Triggering] at the mouse wheel sensor.

How it works

The mouse wheel measures the "clicks" of the wheel (as estimation of the distance).

Frame f+0:

The sensor evaluates positive when the wheel clicked (at least once). The sensor will trigger the connected controllers, which activate the connected actuators. I guess your controller is counting. The property actuator will deactivate itself after adding +1

Frame f+1

Case: not clicked

When the wheel is not clicked within the next frame, the sensor will evaluate not positive, triggering the connected controller which deactivates the connected actuator. In case of a property actuator, it is deactivated already. So nothing happens (which is correct).

Case: clicked

When the wheel is clicked again, the sensor evaluates positive. As the sensor is already positive the sensor will not trigger the connected controllers which means the actuators remain as they are (deactivated). This is what happens right now.

When you enable [True Level Triggering] the sensor will trigger the connected controllers. Due to the positive evaluation result of the sensor the controller will activate the connected actuators. The property actuator will add +1 and deactivate itself. This is what you want.

Remarks:
I can't tell what happens if you are able to spin the mouse wheel that fast that you get two or more clicks with a frame. This should be a rare case.

I hope this helps


Passing arguments to Blender Script from PyQt I am new to Blender Programming,I am using PyQt for my GUI,
i want to pass my two arguments(which i am getting from the UI) to the Blender script, i am using Python2.7 with PyQt4 and Blender 2.79

self.sourceFile = self.sourceLineEdit.text()
self.destinationPath = self.desigLineEdit.text()
sourceFiles = str(self.sourceFile)
print sourceFiles
subprocess.Popen(['C:/Program Files/Blender Foundation/Blender/blender.exe', "--python-expr", "import blender_import_export; blender_import_export.importExport("+self.sourceFile,self.destinationPath+");" ], shell=True)

My blender_import_export.py file below...

import bpy

def importExport(path1,path2):
    print path
    full_path_to_file = path1
    bpy.ops.import_scene.dxf(filepath=full_path_to_file)
    bpy.ops.export_scene.obj(filepath=path2+"/my.obj", check_existing=True, axis_forward='-Z', axis_up='Y', filter_glob="*.obj;*.mtl", use_selection=False, use_animation=False, use_mesh_modifiers=True, use_edges=True, use_smooth_groups=False, use_smooth_groups_bitflags=False, use_normals=True, use_uvs=True, use_materials=True, use_triangles=False, use_nurbs=False, use_vertex_groups=False, use_blen_objects=True, group_by_object=False, group_by_material=False, keep_vertex_order=False, global_scale=1, path_mode='AUTO')

If i run this, its showing the below error.How to fix this.

  File "", line 1
      import blender_import_export blender_import_export.importExport(D:/Blender/test.dxf)
                                                       ^ SyntaxError: invalid syntax location: :-1 location: :-1

Your mistake is a simple python error.

blender_import_export.importExport("+self.sourceFile,self.destinationPath+");"

if you look closely, you will see that that will output blender_import_export.importExport(D:/Blender/test.dxf) as shown in the error output. The issue is there are no quotes surrounding the file path, which should be a string, to fix, simply change:

blender_import_export.importExport("+self.sourceFile,self.destinationPath+");"

to

blender_import_export.importExport(\""+self.sourceFile,self.destinationPath+"\");"


How to ensure the selection direction using Alt Select When you use alt select on say a sphere. The selection can go one of two ways. It can either select the latitude or longitude route around the sphere. How can I choose which way I want the selection to go, please?  Or is it totally random and you just keep clicking until it goes the way you want it to?
Cheers
Dave

It all depends on where you click it will try to follow the direction of the nearest component.


banding issue on wall I'm experiencing very ugly banding on a wall. The scene is lit with spot lamps and geometry lights (with hdr softbox textures). The wall itself is perfectly flat, but has a beveled 90° angle right above the floor. I tried to add subdivisions and support loops, that made the problem less visible, but didn't eliminate it completely. The displacement has no influence on the issue.
If I hide the geo lights (softboxes) and replace them with area lamps, no banding is visible. Unfortunately I really (really!) need those softboxes, because I have a highly reflective object in the scene, that has to catch nice and realistic reflections.
Any idea would be greatly appreciated!
Thanks for your time.
The softbox:

Edit
I couldn't reproduce the effect in a small test scene, so the problem might not even be related to the geo lights.

I panicked too early. When I stripped down the file to upload it here, I saw that I had two ground planes ontop of eachother. One of them was invisible for camera view, but was considered for glossy and diffuse bounces. This produced the banding artifacts.


How to create the curved effect on top of a sconce I'm learning Blender by recreating rooms in my house, but I'm stuck on this sconce. It seems fairly straightforward - a modified glass half-cylinder with an emission in the middle. However I can't figure out the bendy part on top.

I know that edges can't be 'bent', and I've tried various methods of modifying. Cut loops also get applied to the entire length, or circumference, which prevents me from subdividing just those sections for a smoothing effect.

My only other thought was to build it with more than one object, but I wanted to check first and see if there was a better way.

Sconce that I'm trying to create:

What I've got so far:

When you see an object like this one, repeating a pattern all around a circle, you can use tools like Array modifiers, then SimpleDeform or Curve modifiers. Also it seems like there is a metallic structure, so I've tried something like that:

Create your basic shape, use a Mirror modifier to make it simpler. Enable the Clipping option.
Give it an Array modifier so that it repeats 5 times or more (?). Enable the Merge option.
Give it a SimpleDeform modifier / Bend mode. Choose a Deform Angle of 180°. If it doesn't turn around the Z axis as expected, you need to apply the rotation of the object with a ctrlA.
Give it a Subsurf modifier if you want, in that case, add some edge loops close to the angles.
You can add a glass surface on the same object, etc...


Copy/Paste pose operator not working I am trying to copy the pose of an armature to another armature. I was, unfortunately, unable to find a solution that would work for me. Both of the armatures have the same amount of bones that are named identically. I tried using the Pose -> Copy pose operator, however when I try to paste the pose into the second armature, nothing happens. Before copying the pose, I first select all of the bones. Are there some specific naming conventions that I have to follow, or could the issue be entirely different? I am importing both of the armatures from an .fbx file. Below is a hiearchy of both the armatures.

On your second armature "Armature.001", the mode "Rest Position" is enabled. That prevents you from modifying the pose.
Select "Armature.001", go to "Object Data" properties, then select "Pose position" instead of "Rest position". The Copy/Paste operation should now work as intended.


High Poly modeling pinching in corner I'm working on a high poly Lancia Fulvia but struggling with some pinching in certain places of the model and I'm not sure how I'm able to get rid of this.
I'm guessing there's a better way for me to support the corner but I'm not sure how.
Any ideas?

Edit: Added part of the mesh + one of the better real life references I have of this part of the car.

Link to the blend file of the mesh:
https://drive.google.com/open?id=1R--psoI6_bRXm2XUXirzrJIQ-EjBV3dI

Actually this part seems rather flat if we judge from your picture, so I guess it would give something like this:


Problem executing string In 2.79 I was using exec() with a string to run operators, however in 2.8 copying from the info panel into exec() gives an error with the constraint_matrix:

exec("bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=(1, 0, 0, 0, 1, 0, 0, 0, 1))")

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender 2-8\2.80\scripts\modules\bpy\ops.py", line 200, in __call__
    ret = op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties:  expected a sequence of float, not int

Is there any way to be able to exec() from a string copied straight from the info panel?

Seems it's not a issue with the way you're doing it. It also throws a error if you run it like this.

import bpy

bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=(1, 0, 0, 0, 1, 0, 0, 0, 1))

or if you changed the numbers like this.

import bpy

bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0))

I reported as bug ,but it got closed. If you look at docs you can do something like this. https://docs.blender.org/api/blender2.8/bpy.ops.transform.html#bpy.ops.transform.translate

import bpy

exec("bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)))")

Looks like it doesn't get everything printed in Info window and causes the error.


Blender's progress reports are flooding the terminal, how to disable? Import OBJ uses the progress_report module, which prints out a lot of information into the console, how can this be silenced when called from a script?

Asking on behalf of a developer who emailed me :)

To quiet the output you can override progress_report's print function, after this is done, any use of the progress module won't print to the terminal.

The following examples show how you can disable printing on startup using the command line argument --python-expr, the same code can be run from your own scripts too.

2.7x stable:

blender --python-expr "import progress_report; setattr(progress_report, 'print', lambda *_, **__: None)"

Master and 2.8x

blender --python-expr "from bpy_extras.wm_utils import progress_report; setattr(progress_report, 'print', lambda *_, **__: None)"

Note, this is known as a monkey-patch and is generally considered bad practice in Python, longer term we should probably have a way to manage progress output for import/export scripts.


Why is my render is a completely different perspective than what I am seeing through the camera view? Unfortunately I cannot share the file but here is what's up. I am rendering a car model I made. I positioned the camera to render a front 3/4 shot and it worked just fine. Next, I rotated the model 180 degrees to get a rear 3/4 shot. Once I spin the model and hit render, it just starts rendering the front 3/4 view again. I tried moving the camera around and render again, but it just applied the same camera movements but in the front 3/4 view. It's like I am working in 2 different blender files in 1 or something and it is super super confusing! Ideas?? Thank you!

A number of things happend when you hit 'Render', prior to actually rendering the frame. One of these actions is to re-evaluate any keyframes. If you have keyframes set on your camera or mesh, these will be re-positioned based on the keyframes - effectively undoing your manual positioning prior to hitting 'Render'. This is a common problem when objects unexpectedly jump back to their positions when rendering or changing frames.


How to make this dress animatable with White on top and Green on the bottom? I'm at an impasse here, I'm making the dress part of Gardevoir where the inner(green) and outer(white) faces will be visible, But i am also trying to use Cloth physics to animate the dress as well. But so far none of my own methods have yielded any satisfying results. One where creating the faces for the bottom part so each can have its own color would cause horrible clipping when put to the physics.

I really need help with this. I could just keep the single color and call it a day, but no, I really need to know how to do this for any future projects.

In Cycles materials you can use the Backfacing output of the Geometry node to mix different shaders on the inside and outside of a surface. See https://blender.stackexchange.com/a/39601/29586


Cloth simulation presets are gone, how do I get them back? I'm trying to use one of the cloth presets in the Simulations tab, but I've accidentally deleted a couple of the presets and I don't know how to get them back. I've tried restarting blender with a new file, but the cloth sim. still didn't have the Presets. And I even Tried to Load Factory Settings as proposed in this answer as well and it still wouldn't work! If anyone can tell me whats going on, that would be great. Thanks!

It's probably easier to just tell you what the default presets are:

Cotton: Steps 5, Mass 0.3, Structural 15, Bend 0.5, Spring 5
Denim: Steps 12, Mass 1, Structural 40, Bend 10, Spring 25
Leather: Steps 15, Mass 0.4, Structural 80, Bend 150, Spring 25
Rubber: Steps 7, Mass 3, Structural 15, Bend 25, Spring 25
Silk: Steps 5, Mass 0.15, Structure 5, Bend 0.05, Spring 0

These are as of 2.77.


Setting background color I am trying to set my background to be only one color.
Below is my 'Compositing' edit screen and the color i set for the background.

This is how it turned out :

So clearly its toned down so much, from neon pink to some gloomy ass CMYK red.
How can I set the background to be exactly the color I set in the compositing screen?
Thank you all in advance!

Thanks to Christopher Bennet,

Go to Render Properties

Go to Color Management

Change View Transform tab from "Filmic" to "Standard".

Beware this alters the color scheme of the whole render; it's like changing a filter on a picture in instagram. So if you are a designer or someone who is super color sensitive, gl


Giving Multiple Armatures One Parent I'm starting to dabble in IK rigging and think I bit off more than I can chew. I have a 4 legged tank in which each leg is its own armature.
I want to be able to rig everything up so that when I move the center base of the tank upwards, the legs will move with it, as if if was lifting itself off the ground. My issue is how to take all four legs and parent their meeting point with one single bone, in which I can then parent the mesh of the body of the tank to.
I understand I more than likely have done all of this wrong, but hey, it's a learning experience. All four legs are rigged up correctly in that the have a range of motion that their meshes would allow. The four bones coming out of the middle are not connected to one another and do not themselves contribute to the movement of the legs. The movement begins where the leg mesh does, which hopefully can be understood better in the picture above.
I apologize if I haven't explained this well, I'm not well versed enough in rigging to know all the lingo and explain it better as of yet.

As Nathan said, it's better to have a single armature, which will be the main animation tool (avoid mixing bones animation with object animation).
Check if all bones of the four legs have unique names (rename them if necessary), then select all four armatures and press Ctrl J to join them into one.
Then create in edit mode a new "center" bone, select the first bone of every leg, shift select the center bone and press Ctrl P (keep offset).
In this way in pose mode moving the center bone will  result in moving all four legs.
Then you can parent the center mesh to the center bone selecting the mesh, shift select the armature, go to pose mode, select the center bone, press Ctrl P (bone option).


Number of render slots In this old video Blender has 10 render slots: https://www.youtube.com/watch?v=bfMJ9NDpXAI

However, in my new 2.78 version, I see only 8 render slots. Is there a way to set the total number of slots? Actually, I would like to have more than 10.

During this commit a constant named IMA_MAX_RENDER_SLOT was introduced and set to 8.

You'd have to change the line

#define IMA_MAX_RENDER_SLOT     8

in source/blender/makesdna/DNA_image_types.h to something else and re-compile to change the number of slots.


Radeon proRender add-on does not show up in Blender Preferences I downloaded and installed the Radeon ProRender software for MacOS and it said the installation was OK, but when I open Blender Preferences now Radeon add-on cannot be found. What is wrong ?

Add-ons sometimes do not show up unless it is a zipped/compressed file. If there is another file that came with it, then install that in the add-on preferences. Also make sure that the add-on is for your blender version.


How to run a Python script without locking Blender? By default a long running script will lock Blender, and using threads isn't currently well supported.

How can a Python script run, (that has access to the Scene data bpy.data.*) for long time, in a way that allows the user to cancel? (for example).

Note: sub-processes are fine, but require data to be passed between processes,see this similar question for the sub-process case.

For a process like baking a number of frequencies from an audio file, I use the modal timer operator.  Eg If I have a long audio file and it takes 5mins to bake one frequency out of a set of 16, I bake one then have a small wait time to allow the handler to catch an escape key which throws up a  menu to cancel (and clean up)  or continue, rather than have to wait 16x5 or kill blender.  It doesn't however let me cancel amid a bake.

For convenience I have used the BakeSoundPanel Panel class to store data on the status of the bake.

class SD_ContinueBakeOperator(Operator):
    """Continue Baking"""
    bl_idname = "sounddrivers.continue_baking"
    bl_label = "Continue"

    def execute(self, context):
        BakeSoundPanel.wait = 2
        BakeSoundPanel.cancel_baking = False
        return {'FINISHED'}

class SD_CancelBakeOperator(Operator):
    """Cancel Baking"""
    bl_idname = "sounddrivers.cancel_baking"
    bl_label = "Cancel"

    def execute(self, context):
        BakeSoundPanel.cancel_baking = True
        return {'FINISHED'}

class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs its self from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None

    def modal(self, context, event):

        def confirm_cancel(self, context):
            layout = self.layout
            layout.operator("sounddrivers.cancel_baking")
            layout.operator("sounddrivers.continue_baking")

        if BakeSoundPanel.cancel_baking:
            self.clean()
            return self.cancel(context)

        if event.type == 'ESC' or not BakeSoundPanel.baking:
            context.window_manager.popup_menu(confirm_cancel, title="Baking", icon='SOUND')
            BakeSoundPanel.wait = 1000000
            return {'PASS_THROUGH'}
            self.clean()
            return self.cancel(context)

        if BakeSoundPanel.wait > 0:
            BakeSoundPanel.wait -= 1
            return {'PASS_THROUGH'}

        if event.type == 'TIMER':
            BakeSoundPanel.baking = True
            # bake a sound, when finished set self.wait to some "wait time"
            # to enable a cancel

        return {'PASS_THROUGH'}


How can I prepare a point cloud for visualization in Blender using MeshLab? I have access to some laser scanned LAS files. I can convert the LAS files to X, Y, Z point clouds using LASTools. Once a point cloud is in an X, Y, Z ascii format it can be imported into MeshLab. I am looking to export the point clouds to a format that can be visualized in Blender using MeshLab. I have tried .PLY, .OBJ, and .WRL. All of these formats can be imported into Blender but they do not show up once they have been imported. I have tried importing files that just contain vertices and files that have been re-meshed and contain faces - both with the same result. Is there any special way point clouds must be imported into Blender? Once the file has been imported into Blender are there any issues that would prevent it from being seen such as wildly different scaling. Any help would be greatly appreciated.

Using your example I have found the reason for your troubles.

After importing your point cloud example pressing . on the numpad brings the point cloud into view. Entering edit mode Tab and deselecting all points A then selecting one point shows that it has co-ordinates of 10000,10000,132.189 - that is the one point is ten thousand units from the origin point which is located at the centre of the scene. A little trig tells us that rotating a couple of degrees while at a 10000 unit radius from the centre pivot point gives a large amount of movement, taking the object way off the visible screen from a tiny rotation.

Therefore the solution would be to first import the file, make sure the imported object is selected - selecting in the outliner may be the easiest way.

While in object mode set the objects Geometry to Origin -

This should place things close to where you want them and make things easy to work with.

If you have moved around before resetting the origin you can press ShiftC to set the cursor back to the centre if you have moved it, then ShiftS to snap the object back to the 3D Cursor at the centre of the scene, ShiftC again will bring everything back into view.


Removing white artifacts from composition I'm trying to compose two layers into a single one. The first layer contains the image itself and the second one the lines from freestyle. Here are my nodes:

I want the first layer to have some lower opacity while the second one to be completely opaque. However whenever I join both layers some white artifact appear around the lines. How I convert then to the color of the line itself? If I connect the freestyle layer to viewer it seems correct.

Set this transparent color to black (also transparent, but base on black):

Also try z-combine instead of Alpha Over:


Cast ray from the cursor and get the index of the hit face Trying to find the simplest way to fire a ray from the mouse cursor and get just the face index of the intersected face. I'm looking through operator_modal_view3d_raycast.py, but getting the feeling that there's more going on there than I need. Is there an easier way, or should I stick with this course?

regarding "but getting the feeling that there's more going on there than I need"

This is too vague, you didn't state what you need.

There is Scene.ray_cast - which you can use to ray-cast into the entire scene's visible objects, but this doesn't expose access to the face thats hit. (only the point of intersection & the normal)

In general, no, this can't be further simplified. you need to.

Get the mouse coordinates from an Event.
Get the RegionView3D from the context.
Calculate a point-of-origin from the viewport (not always obvious with orthographic projections)
Convert the mouse coordinates into a view-vector (using view3d_utils).
loop over all objects you want to ray cast.
convert the ray origin and direction into the object's local-space.
run the ray-cast function on a selection of objects.
find the closest result by shortening the ray each time.

Of course you can write your own function to handle all this, and just re-use. But there are many decisions involved in which objects are used, and how far to cast the ray, weather to use the views near-clip to offset the origin or not... etc.

If you don't need dupli-object support the script could be simplified to loop over scene-objects (but not duplicators).


Retopo Sculpt Selecting Unwanted Vertices I'm having issues with blender selecting vertices that I can't see and projecting them through the other side.  Is there a setting where I can make it not allow selecting through my sculpt during the retopo process?

Here is an example of what this is doing. Of course, I can't work in wireframe because its too hard to see my vertices.

open user preferences (file menu or Ctrl+Alt+U) go in theme tab, select 3D View and change the colors