text:
Inconsistent Python styling within pie menus
I have two scripts I've been making pie menus in the last few weeks and I came across a seeming inconsistency in how blender handles classes and their labeling. I have two examples. One is the Viewport_Pie_Menu.py script by Wazou, modified for my own uses (single file); the other is a mesh multiselect script (part of a package and imported with __init__.py as a module). I've cut down the code snippets to illustrate my point.
Viewport Pies
This is the first class, the called menu that pops up when you press Shift+Space:
class PieAreaViews(Menu):
bl_label = "Pie Views"

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

    pie.operator("wm.call_menu_pie", text="Images", icon='IMAGE_COL').name = "PieAreaViewsImage"
    pie.operator("wm.call_menu_pie", text="Split", icon='SPLITSCREEN').name = "pie.split_viewport"
    ...

This calls a number of subpies, the first of which changes editors:
class PieAreaViewsImage(Menu):
bl_label = "Image"

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

    pie = layout.menu_pie()
    pie.operator("object.view_menu", text="Node Editor", icon='NODETREE').variable = "NODE_EDITOR"
    ...

Another is a subpie with some operators in it:
class PieSplitViewport(Menu):
bl_idname = "pie.split_viewport"
bl_label = "Split Viewport"

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

    pie.operator("split.vertical", text="Vertical", icon='DOWNARROW_HLT')
    pie.operator("split.horizontal", text="Horizontal", icon='RIGHTARROW')

Multiselect
The main pie class:
class VIEW3D_MT_Multiselect_Menu_Pie(Menu):
bl_label = "Multiselect Pie"

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

    pie.operator("multi.vert", text="Vertex Select", icon='VERTEXSEL')
    ...
    pie.operator("wm.call_menu_pie", text="Multiselect", icon='FACESEL').name = "MultiPie"

Subpie:
class MultiPie(Menu):
bl_label = "Multiselect Options"

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

    pie.operator("multi.vertedge", text="Vertex/Edge", icon='EDITMODE_HLT')
    ...

The final operation:
class SelModeVert(bpy.types.Operator):
bl_idname = "multi.vert"
bl_label = "Vertex Select Mode"

def execute(self, context):
    bpy.ops.wm.context_set_value(data_path="tool_settings.mesh_select_mode", value="(True, False, False)")
    return {'FINISHED'}

Observations
Some classes include bl_idname while others do not. Operators have them, but Menus do not. If the class does not have bl_idname, I can call it with the class name, but if it does have bl_idname, it can only sometimes be called with its class and sometimes by its bl_idname string. If a Menu type includes bl_idname, you can't call it with either bl_idname string or class name.
It took me a long time to figure out I couldn't spawn my subpie simply because it contained bl_idname, which I was then calling (I couldn't call it with either bl_idname or class name), nor could I assign a hotkey through init.
Questions
Why do some types need bl_idname and others do not? Wouldn't it be better to be consistent? If I understand right, bl_idname is required if you want to search from the spacebar search menu, but you can give bl_options = {'INTERNAL', ...} to disallow searching.
Is this how blender really treats these class types or am I just being inconsistent myself? Is there a better way to handle this? What are some conventions you have found?
I will follow this convention for now, but I'm not entirely familiar with how blender handles classes and context and whatnot. I would still consider myself relatively fresh with Python, especially within blender, so any help would be appreciated.

authors: Евгений Торубаров


text:
Copy location constraint works wierd
I have a foot and IK constraints on toes, so that when I move the leg, fingers deform, because their IK bones stayed where they were. I made a copy location constraint for each of the IK bones to follow the IK bones for leg, but when I move the leg forward, fingers go down, when I move leg upwards, fingers go  back... How can I fix it?

Apply rotation maybe? (Ctrl+A)

as @NoviceInDisguise has noted it is a problem of orientation  ( local spaces are not in the same orientation ) use Pose space with Offset to avoid that

@aky Let us know if it helps please :D

Applying rotaiton isn't possible, because it is all one armature and I don't have idea, what pose space with offset is.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
What is the warp modifier for?
What is the warp modifier for, and how is it used?
Even when I fill in the From and To fields, so that the modifier is not red, I still can not figure out what it is so post to do.

When I set up the modifier just like is shown in the manual, it does nothing.

The warp modifier can also be used to wrap an object: the to object  controlles the direction to where the from object is wrapping the object (holding the modifier).

The warp modifier produces results similar to user gestures of
proportional editing.
The blue cube has a high vertex density.  The from and to are animated in rotation.

You can also think of this as the tuggy modifier because it tugs, but in a totally nice way.

That darkblue text on darkgrey background is very difficult to read.

You can also think of this as the wapr (pronounced whopper) ... modifier.  Whopper results.

The warp modifier deforms a mesh as if some force acted on it. The force starts at the "start" object and ends in the "to" object. The "start" object center and the radius determine which vertices are affected. The texture option has an effect similar to the texture of the displace modifier.
You need to increase the radius in order to see something, because there is no effect if the radius is smaller than the distance from the source. The scale and rotation of all three involved objects does matter (even if the "from" and "to" objects are empties), so it is best to apply the scale and rotation before playing.
Also note that the manual uses a grid, not a plane without subdivisions.
I found this tutorial useful: https://www.youtube.com/watch?v=AzMVZa5OVBY

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What is the NLA Editor used for?
I understand how you animate something (say bones location and rotation in an armature). Doing so creates an action; that action can be renamed in the Dope Sheet. In the NLA Editor I can create a NlaTrack from that action, but what is that for?
To quote the manual:

The NLA editor can manipulate and repurpose actions, without the tedium of keyframe handling. Its often used to make broad, significant changes to a scene’s animation, with relative ease. It can also repurpose, and “layer” actions, which make it easier to organize, and version-control your animation.

Ok all that sounds great, but what is it really used for and how does one reuse an action in the NLA Editor?
As may be quite obvious from my question, I have not done much animation, nor used the NLA Editor.
So what is the NLA Editor used for?

David, is it really you? Could a specific tutorial like "Blender Tutorial - Creating and Editing Actions for Re-use in Animations and Games " help? https://www.youtube.com/watch?v=Gb152Qncn2s

@m.ardito yes it is really me :). While that vid is good, I knew everything in it, and he does not touch the NLA Editor. So my question still stands what is the nla editor used for?

Congratulations on asking the 22,222nd question on B.SE :)

Short answer: High-quality character animation is hard work even when it is done by experts. A lot of work goes into every second. Nonlinear animation is an attempt to speed things up, but note that it could sacrifice some quality.
Longer answer: When you start animating, you can be successful using only keyframes, but after a while you find yourself animating similar motions again and again, and you want to reuse your work, just like you reuse node groups. You also want to be able to mix and blend overlapping motions in a nondestructive way. You might want to create an animation layer for the broad movements and one for the refinements. Or a layer of face motions and one for the body, and combine them according to the story. Nonlinear animation is used for achieving these goals.
Note that the quality of automatically reused and blended motions might not be as good as the quality of a hand-crafted keyframe animation, but they could be fine for background characters. It could be a tradeoff between quality and time.
The following video explains the "how" part with an example: https://www.youtube.com/watch?v=W4TkA5P5Qes

I use NLA editor in blending and smoothing animation after inserting a new keyframe. So for example, if I have a bone that already has an animation, then I paused the animation at frame 100 and rotated this bone 90 around x-axis and inserted a keyframe there for rotation, when I replay the animation, you will find that the bone at frame 100 will snap and rotate 90 around X-axis then snap back at frame 101. To make this inserted rotation looks smooth, I add the action in the NLA editor and then make a smooth interpolation using NLA's editor Blend In and Blend out as shown below. So it's actually very handy with armature's animation modification.

Also another main usage of it is to blend two actions together (like walking and waving a hand,...) so that two animations are blended together in a very nice and smooth way. I hope this helps :)

The NLA editor is used for editing the position and interaction between actions in an animation. It's main use is for managing, editing, and organizing groups of actions instead of having to deal with huge numbers of keyframes.
Using the Dopesheet, an animator can create an action for an object that consists of any number of keyframes. An action for a complex character with a rig can have thousands of keyframes for even a simple action. Thus, managing the entire action via the dopesheet isn't practical. When I say manage, I mean perform an action on the action that doesn't require editing of individual keyframes. You can think of it like edit mode versus object mode. A 3d object is a group of vertices, an action is a group of keyframes. Object mode is useful because you can easily reposition, scale, or duplicate objects, as well as apply certain effects to them. The same goes for the NLA editor. You can adjust the start and end times of an action very easily, as well as apply effects, like blending two action together.
The ability to deal with each action as a whole in the NLA editor makes it very powerful when combining several actions into a longer animation. Animations often also contain repeated actions. In the NLA editor, you can duplicate an action with ShiftD and reuse it as often as you want. It's the same as instancing an object. It allows the animator to reuse an action many times while still being able to edit it easily.
In an animation, the process would usually involve creating certain actions in the dopesheet, then combining them in the NLA editor. Since you can select and move entire actions very easily, it makes adjusting the general timing of your animation much easier than moving all of the individual keyframes.
Another key feature of the NLA editor is the ability to organize an animation. Since there can be multiple tracks (essentially layers) you can separate certain kinds of actions, or actions for certain parts of objects. You can also blend between layers, so the animator can blend between two actions smoothly.
If you've ever used the VSE in Blender you will notice a large number of similarities between the purposes of each editor. The point is to be able to manage the entire animation without having to deal with each keyframe, just like the point of the VSE is to manage the entire video without having to deal with each frame individually.

The shortest answer: NLA tool (in Blender or any other CG ware) is used for

REMIXING animation blocks in Photoshop style layers

REUSE complex animations - on characters with the same deform bone hierarchy.

Make animating characters way more creative and fun than linear pose to pose.

Save screen space - mixing animation strips in packed chunks/ blocks is more efficient than manipulating keyframes.

Save precious time.

authors: Захар Жукович

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Why do the two identical sides of this model reflect light differently?
I've modeled a alien coin, and I added some animation to it. The result has shown me that one side (The one it flips to) reflects light in a much nicer way way than the other side (The one it starts on). They both use an identical material. Why is this?
This is shown in the gif here:
https://giphy.com/gifs/gKTtS0kNoTOIwq7kxX
Thanks in advance.

there must be a difference, could you please share your file, at least the important parts? https://blend-exchange.giantcowfilms.com/

I believe it's your normals. Make sure all objects have their normals on the outside.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Model limbs condensed in one place in Unity3D after applying Scale to armature
I'm new to Blender and modelling in general and I'm trying to incorporate a humanoid model I rigged into my Unity project. It was seemingly working fine in Unity up until I was given a solution to another question I posted here that had to do with the armature, which was that I had to apply scale to it. The problem was still there before that but the mesh looked as it should when not in motion. After applying the effect though, i get a message that the file has import settings and the model looks like this:

The most definable features of this mess seem to be the thighs and head, which leads me to believe that the connections between the vertex groups are broken in some way. Maybe the armature has lost some property when I applied the scale effect? I'm really quite lost, any help would be appreicated.
Link to aforementioned question: How can I stop the mesh from stretching when posing?

Ok so I think I've figured it out myself. In Unity I changed the animation type from humanoid to generic and back while fiddling with the properties of the asset. This somehow seems to reset the model's import settings and it works fine now. Thought I'd leave this here for people with a similar problem in the future to see.


text:
How can I stop the mesh from stretching when posing?
I'm trying to rig a model starting from a rigify metarig and it's been going pretty well. It looks like, though, the mesh is morphed and stretched everytime i pose it, which is a problem mainly for the head and hands. Is there a way to make these parts rotate while keeping their shape and size? Am I doing something wrong? (probably but still)

Hi, welcome to Blender.SE. "Wrong" distorsion are probably caused by incorrect weights. Are you familiar with weight painting and have examind the weights?

@Leander Yes, I did weight paint in what I assume is the right way for this model. From what I can gather weight painting only signifies where the mesh should be affected and not how, am I wrong? How should I weight paint so that this won't happen?

Well, the weights determine how much the mesh is affected by certain bones. Try changing (painting) the weights in the deformed pose and check if you can improve the deformation.

@Leander It doesn't seem to help much. There's an effect only when I paint an area completely "blue" aka unaffected, then it shoots back up in the default position. I think there's gotta be a different way to go about fixing that.

upload your file to www.blend-exchange.giantcowfilms.com ?

The site you're suggesting won't upload the file for some reason. Here's a MediaFire link: http://www.mediafire.com/file/hdgosz9fyvf7q0g/yeeeee.blend/file

Apply the scale on your armature.

Select the armature and go to Object Mode.
Press ⎈ CtrlA > Apply Scale.

I tried it, but when I import it into the Unity project that it's for the model condenses into one big pile of limbs. It seems like the connections between the vertex groups are broken or something. What do I do from here?

@Scrillrock That sounds like another question. The deformation problem, described in this question, is solved by applying the scale, right?

It does seem to have done the job actually, so yes, sorry for that. I guess I'll mark your answer as accepted but any information on the deformation bit would be greatly appreciated. Great thank you for the help anyways, couldn't have figured it out myself!

When using matrix transformations from different object (like with an armature modifier), it is best to have the scale of all objects applied. If there are any specific subtopics, which are unclear or bothering, I think it would be best to include them in a detailed edit of the question. Also, feel free to open up a new question for a variation on the topic. You can link to this answer in a new question; and you open as many threads as you want.

Thanks, will do if needed!

https://blender.stackexchange.com/questions/146822/model-limbs-condensed-in-one-place-in-unity3d-after-applying-scale-to-armature

When in pose mode, go to the rig main properties tab, and turn ik stretch for the feet and hands to zero. This will keep the mesh from stretching when posing.


text:
sculpting - How to get rid of the bumpy surface?
When I normally sculpt in blender using subd (without dyntopo) the surface looks clean after applying some strokes, but when I enable dyntopo the surface gets bumpy quickly, I guess because of the many triangles added by dyntopo during sculpting.
The smoothing brush doesn't do much when I try to smooth the surface, and it leaves me with more bumps and uneven surface.
A picture showing what I mean on the model butt, (sorry can't use imgur):
https://pasteboard.co/Ixo5DOM.png
My topology is fine, I didn't use triangles or N-gons in my base mesh, and I don't have any doubles or flipped normals.
This bothers me because I want to bake the sculpt details later, and this will affect the results.

As far as I know the smooth or flatten brush is the only way to do this. You can change your brush size or strength, or you can set your dyntopo value to a number larger than the level of detail you currently have, use the simplify brush everywhere you need to, and see if smooth and flatten work any better for you with a simpler mesh.

Good suggestions, I will try them. but how do you set the "dyntopo value"? there's only a "detail size" value to change.

That's what I meant, sorry.


text:
How can I make a partially transparent texture?
I want to make leaves with a texture on a plane, so that the leaves are colored and background transparent?

Use an alpha channel or enable "Alpha" under Image setting and "RGB to Color" in BI.

In case of cycles: use a mix shader, with transparent and texture as input

if you're using cycles you can use a configuration like that..
image texture -> diffuse shader ->
                                     mix shader ->  output
             transparent shader ->

in the node material editor.


text:
How do I find out what tool a shortcut is triggering?
I used to have problem with connecting two objects, because when I smooth the final object, there was a darker line on the connected parts (for example when I was making head, I've had eyes darker this way). Then I found out that I can get rid of it by hitting Ctrl+N, but I don't realy know what it does. I can just see that the lines are gone. So, what does Ctrl+N do?

You might be interested in this comment.

In future, to find out what tool is being triggered by a shortcut, you can search in the 'Input' section of the 'User Preferences'.
Going to File> User Preferences (Ctrl+Alt+U)> Input, you can use the search field to search for tools assigned to shortcuts. The 'Filter Method' drop down box must also be set to 'Key-binding' for this to work:

This will yield a list of all tools in blender using that shortcut. For example, "ctrl n" would result in showing that that shortcut will 'Make Normals Consistent' for meshes in edit mode. 'Make Normals Consistent' will make sure all faces of the mesh are facing the right way and shaded correctly see: Render has strange artifacts. It also lists other commands that use the same shortcut such as 'Reload Start-up File':

You can also look in the bottom of the toolbar (T) in the 3D view immediately after using the shortcut to see what was triggered:

In Blender 2.8, the section where the search can be found is now named Keymap, instead. Otherwise, the answer still applies


text:
How do I get the deformed coordinate of a vertex with Python?
How might someone find the deformed coordinate via Python or otherwise when using a subdivision modifier with the 'show on cage' option?
For example, a subdivided cube with cage enabled and a vertex selected shows the location of the vertex at 1,1,1 but when manually placing the cursor near on the surface it is closer to .5,.5,.5
I know the vertex location needs to be at its non-deformed location for subdivision to even work but would like to get more accurate point locations at the surface without having to apply to mesh.

Vertex Parenting
Among other ways can be done with vertex parenting.
Test script, run with mesh in edit mode, adds a vertex parented empty for each selected vert and prints  vertex's global location to the console.
import bpy
import bmesh

context = bpy.context
scene = context.scene
obj = context.edit_object
mesh = obj.data
bm = bmesh.from_edit_mesh(mesh)
empties = []
# selected verts
for v in [v for v in bm.verts if v.select]:
    empty = bpy.data.objects.new("Empty", None)
    empty.parent = obj
    empty.parent_type = 'VERTEX'
    empty.parent_vertices = [v.index] * 3
    scene.objects.link(empty)
    empty.matrix_parent_inverse.identity()
    empties.append((v.index, empty))

# update the scene
scene.update()
for index, empty in empties:
    print("Vert %d location: " % index, empty.matrix_world.to_translation())
    scene.objects.unlink(empty)
    bpy.data.objects.remove(empty)

Test result on default cube with subsurf (cat-clark) 3 subdivisions.
Vert 0 location:  <Vector (0.5015, 0.5015, -0.5015)>
Vert 1 location:  <Vector (0.5015, -0.5015, -0.5015)>
Vert 2 location:  <Vector (-0.5015, -0.5015, -0.5015)>
Vert 3 location:  <Vector (-0.5015, 0.5015, -0.5015)>
Vert 4 location:  <Vector (0.5015, 0.5015, 0.5015)>
Vert 5 location:  <Vector (0.5015, -0.5015, 0.5015)>
Vert 6 location:  <Vector (-0.5015, -0.5015, 0.5015)>
Vert 7 location:  <Vector (-0.5015, 0.5015, 0.5015)>


text:
Manipulating .blend file text blocks with blendfile.py (CRUD)
To search or to open text blocks in blend files in text editors (as a couple of examples)  it would be handy to read texts from  a blend file without any need of blender or bpy.
There is a module for blend file io shipped with blender addons_contrib/io_blend_utils/blend/blendfile.py
I am using blender 2.8. The tools have been added to addons_contrib (come with blender) as of July 4
Scripts at Repository
Re blender 2.79. I imagine that script to read text lines from datablocks using either would be similar and put me on the right track.
The walker script gives insights on how to read the blocks.
Test script below lists the textblock name, and how many characters are on each line.  I'm sure there's a simple way to get the body string of the TextLine data block, but it escapes me.
from io_blend_utils.blend import blendfile

def get_id_name(block):
    name = block[b'id', b'name'].decode()
    return name[2:]

filepath = "/home/batfinger/Desktop/test.blend"

bf = blendfile.open_blend(filepath)
texts = bf.find_blocks_from_code(b'TX')
for t in texts:
    i = s = bf.blocks.index(t) + 1
    print(get_id_name(t))
    while bf.blocks[i].dna_type_name == 'TextLine':
        print(f"line {i - s} chars {bf.blocks[i][b'len']}")
        i += 1

How do I read the data to give me the text buffer of a text block?
CRUD EDIT.
Thankyou to @lemon re the Reading piece of the crud puzzle.
As an addendum, would very much appreciate any details on usage of the blendfile api for:
Creating, Updating and Deleting text blocks.

I've it in 2.79 but not in 2.8. On which version are you working?

2.80 .  https://developer.blender.org/rBA0754604e5788c813f35beabb4b8429941d0e7f45

About the edit, have you asked Campbell? https://github.com/scorpion81/blender-addons/blob/master/io_blend_utils/blend/blendfile.py

Do you know about these py files maintenance? Still no documentation (not found for me), so... is it something to rely on?

lemon, Given the info in profile Fishing for an answer from @J.Bakker aka Developer of blendfile.py

I did it in 2.79.
The bad is it seems there is no documentation for this module and we don't know where to go. And of course I don't know if it is the better way to do it.
But, once you have the TextLine block:
Get the length property.
Get the pointer to the block which corresponds to the line content, it is a block too.
Seek the file to the file offset of this last block.
Get the value using DNA_IO.
from io_blend_utils.blend import blendfile

def get_id_name(block):
    name = block[b'id', b'name'].decode()
    return name[2:]

filepath = "/home/batfinger/Desktop/test.blend"

bf = blendfile.open_blend(filepath)
texts = bf.find_blocks_from_code(b'TX')
for t in texts:
    i = s = bf.blocks.index(t) + 1
    print(get_id_name(t))
    while bf.blocks[i].dna_type_name == 'TextLine':

        # Get the block
        block = bf.blocks[i]
        # Get the length
        length = block[b'len']
        # Get the line data pointer (a block)
        line = block.get_pointer( b'line')

        # Search for the line block position
        bf.handle.seek( line.file_offset, 0 )

        # Get the value
        line_content = blendfile.DNA_IO.read_string( bf.handle, length )

        print( i - s )
        print( bf.blocks[i][b'len'] )
        print( line_content )

        #print( bf.blocks[i].user_data )
        #print(f"line {i - s} chars {bf.blocks[i][b'len']}")
        i += 1

bf.close()

@batFINGER, the worst was get_pointer( b'line' )... if not explicit error msg on get_pointer( b'xxx' ) never been able to find it (expected b'body').

It achieves exactly what I need.  ... a vital cog in an nvim addon / plugin.  Would it be OTT to edit question re creating and writing, rather than asking as separate question?

@batFINGER, you're welcome to do exactly what you want. It is your question!

any idea re write, delete update?

@batFINGER, honnestly, I've re read a bit the source code since your second bounty, but hadn't time to go further... want to talk a bit about that in chat?


text:
Add a panoramic background to scene in Cycles
I have a panoramic image which I would like to set as a spherical background for my scene, which is using Cycles Render.
As the camera changes orientation, the background should stay fixed (like a skymap) and not move with the camera.
Any ideas?

By "move appropriately," do you mean that the image should follow the camera, or do you just mean that the image should act like you expect a skymap to?

If your image is an equirectangular projection, you can use the Environment texture node within the World space node editor (see red markup), with Equirectangular projection type (second setting) :

The yellowed area in this image correspond to optional nodes you can add to control the position of the background if you have already set the objects and camera's position, and don't want to move them again.

Just want to add that this supports both Equirectangular and Mirror Ball projections. For examples of each (and a ton of great skymaps for free) see here.

Thanks @Polosson!  But perhaps you could clarify something in your post. Following your method with Equirectangular projection, the image is mapped to the entire sphere, unlike in Blender Internal, where it seems to be mapped to the upper hemisphere. The rectangular images in the site suggested by @WChargin are meant to be mapped to the upper hemisphere.  To get around this, I opened them in Gimp and doubled the height of the image by adding alpha below it. Is that the best way?

AFAIK, real equirectangular maps are supposed to be 360° x 180°, so they cover the entire sphere, from top to bottom. If your map is a half-sphere (360°x90°), you'll have to edit it, indeed, to add height. I can't found a best way for now, sorry!

That probably is the best way as long as you have a ground plane that extends into the horizon. Realistically, if I look down, I expect to see the ground, not more of the sky, unless there's a giant hole bored through the center of the earth and I happen to be standing above it. (In which case yes, you would need a full sphere sky texture.)

Cool, thanks.  I agree it seems to make sense for the equirectangular map to map the whole sphere.  I guess it's the behavior in Blender Internal that's a bit more strange.


text:
Can Collada export vertex colors?
In order to demonstrate my problem, I created a simple scene with a cube and I used Vertex Paint to color one corner.

When I export to COLLADA, I make sure that "Include Material Textures" is checked.

The vertex colors are not saved properly.  I've verified this by importing the COLLADA file back into a new Blender file and also by importing it into MeshLab, Sketchup, Photoshop and 3DS Max, none of which showed colors.
I know the Stanford PLY format also supports vertex colors (and it worked well for this same cube), but the actual scene I'm dealing with has thousands of little complex objects and PLY can only export one object at a time.  I could write a script to export each object, but I'd rather get into one file.
(using Blender 2.69, Linux 64-bit, any more info needed?)

I don't think the blender COLLADA exporter supports vertex colors. You could try *.fbx, where vertex colors are supported.

But, I can't even check if my .fbx export was successful since Blender exports as ASCII .fbx and apparently can't import ASCII .fbx.  Also, MeshLab doesn't import .fbx files.

Are they any alternative COLLADA export addons that you know of?  I was looking at this one, but I think that may actually be bundled with Blender already, but I wasn't sure.

I don't know of any.. :/ You could try joining all your objects into one object and then using ply.

NICE! That worked! Do you want to summarize your comments into a proper answer so it can be upvoted and will be easier to see?

Done :). If my answer has satisfactorily answered your question, consider accepting it.

As far as I know, blender does not support exporting vertex colors to COLLADA (yet).
The only other formats that blender can export to (with the official export scripts, it would be perfectly possible to write your own exporter in python)
which support vertex colors are ascii fbx and ply.
If fbx doesn't work for you, you could try joining all your objects into one object and then exporting to ply:
Select the objects which you want to join/export a press CtrlJ, then export as ply in Info panel > File > Export > Stanford (.ply).

Hi vertex colors are exported using the collada exporter. You can check it by opening the .dae file in a browser and search for something mesh-colors-array ..( i have it as Suzanne-mesh-colors you will probably have it as Cube-mesh-colors) blender is currently not capable of importing back the vertex color but expect it in the next release.

Interesting.  I also realized that MeshLab doesn't import vertex colors from Collada so that would explain my confusion.

I also was able to see the color information in my Collada file, but I'm still skeptical it's working well since I've also opened the exported .dae file into Sketchup and I didn't see any colors.

I tried two more programs and it didn't work also!  I'll add it to my original post.

The export is all good... If vertex colors are not shown in other 3D apps then it means that they do not  support importing vertex color into their software. As for blender i have submitted a patch for importing vertex color's http://developer.blender.org/D92 see the pasteall link, colors are imported as they are expected to..

It seems like something still wrong with Collada vertex colors, either importing or exporting, in Blender 2.70 (test build).  I export a cube with vertex colors, then import it back in and it no longer has the vertex colors...

It hasn't been in the master yet

Related to this issue: does it work for you to export material colors (not even vertexes but just a face of a cube which has a specific material with a specific color). If I create a cube with a certain material and I export it in collada I don't have any color anymore.


text:
How do I use Dynamic Paint with the Image Sequence setting?
Dyanmic Paint has two possibilities for the "Format": Vertex and Image Sequence.

I've been able to do it with Vertex, but when I do it with the Image Sequence setting, I'm able to output the .png files successfully, but when I render, I don't see any paint.  Could someone walk me through the steps involved?
My scene has just the default cube (set to Brush under Dynamic Paint settings) and a plane scaled up 5 times (set to Canvas).

(I'm using Blender Internal render if that makes a difference)
(Blender 2.69)

Sounds a lot like a tutorial request - please be specific about what you're having issues with and someone will easily help you. Dynamic paint is fairly intuitive, so unless you're stuck on something specific it should be fairly easy to figure out.

I wasn't sure if I should list out all the steps I went through since it would make for a long question. Unfortunately, I don't know where I went wrong.  My final result was that I ended up with a bunch of .png's that appeared to me to be correct, but when I render, my plane doesn't display any texture.  I gave the plane a texture and set Source to "Image Sequence".  I also enabled "Auto Refresh" in the Texture tab.

I thought posing the question in this format would make for  a more generally useful answer, but are these kinds of questions discouraged?  I wouldn't have asked if I had found a good resource online explaining how to do this.

@Garry For this site it's generally best to try and say exactly what your problem is. (If you want a walkthrough of some sort you are best of looking around for tutorials on youtube etc.) If I were to answer this now, I might not have even gone past the baking part and as a result I would not have answered your real question. Anyway, It sounds like your problem might not even have anything to do with dynamic paint, just with loading in image sequences. Could you edit your question with more detail about exactly what you did and what happens? (and possibly some images and/or a file?)

Right, I understand.  I'll keep that in mind going forward.  I actually just figured out what my problem was:  I selected the plane, went straight to the Texture tab and hit new texture.  It therefore created a texture that wasn't linked to the plane's material (since the plane didn't have one).  So should we just delete this question then?

Sorry, I meant to tag you in that comment, @gandalf3.

@Garry Go ahead and answer it yourself if you want :) If you do answer it you may want to edit the question so your actual problem is a little clearer.

@gandalf3, good call.  I will do that.

It turns out I was making a silly mistake, but I'll run through the steps in case it helps.
I'll assume we're starting with the default cube and the plane scaled up.

1) UV map the plane
Select the plane, hit TAB to get into Edit Mode, then press U.  This will bring up a menu.  Select Unwrap.  Hit TAB to get back to Object Mode.

2) Give the cube some motion
In order to actually see the paint, you have to make the cube move around.  So give the cube some motion in the XY-plane.
3) Enable Dynamic Paint
Select the cube, go the Physics tab of the Properties window.  Enable Dynamic Paint, click on Brush and then "Add Brush".
Now select the plane, click on Dynamic Paint.  Make sure that Canvas is selected.  Hit "Add Canvas".
Change Format to "Image Sequence".  Under the Dynamic Paint Output header, click the box next to "UV Map" and find your UV map you just created and select it.  (It'll probably be called "UVMap")
Just underneath UV Map, you can select where you want the texture images to be outputted to.  Hit "Bake Image Sequence".  I believe you have to bake it.  You can't just render.
4) Give texture to plane
With the plane still selected, go to the Materials tab of Properties window, and hit New to give a material.
Now go to the Texture tab.  Make sure the Material Textures button is selected (this is where I messed up).

Hit New to give the plane a texture.  For Type, choose "Image or Movie".  Scroll down to the header Image, and click on Open.  Navigate to the folder where you outputted your images to and select the first image (probably called paintmap0001.png) and click on Open Image.  Then look for Source, which you should set to Image Sequence.

5) Render
That's all.  Just render it and you should see the paint.


text:
Create NURBS surface with Python
How can I write a script to create a NURBS surface with given control points?
I did find a helpful piece of source code that got me here:
import bpy

surfacedata = bpy.data.curves.new(name='test', type='SURFACE')
surfacedata.dimensions = '3D'
surfacedata.resolution_u = 4
surfacedata.resolution_v = 4

objectdata = bpy.data.objects.new('obj_test', surfacedata)
objectdata.location = (0,0,0)
bpy.context.scene.objects.link(objectdata)

nurbs_surface = surfacedata.splines.new('NURBS')
nurbs_surface.points.add(4)
nurbs_surface.points[0].co = (-1, -1,  0.25, 1)
nurbs_surface.points[1].co = (-1,  1, -0.25, 1)
nurbs_surface.points[2].co = ( 1, -1, -0.25, 1)
nurbs_surface.points[3].co = ( 1,  1,  0.25, 1)
nurbs_surface.order_u = 2
nurbs_surface.order_v = 2
nurbs_surface.use_endpoint_u = True
nurbs_surface.use_endpoint_v = True

However, the object that this produces is just a 1D curve in space,

I can check some of its properties from the python console,
>>> print(len(bpy.data.objects[2].data.splines[0].points))
5

>>> print(bpy.data.objects[2].data.splines[0].point_count_u)
5

>>> print(bpy.data.objects[2].data.splines[0].point_count_v)
1

So, I'm not sure why points has 5 elements (instead of 4), and why
point_count_u and point_count_v are 5 and 1 instead of 2 and 2, respectively.

NURBS surfaces are controlled by a mesh of squares.  If you add a new NURBS surface and go into Edit Mode, you'll see a 4x4 mesh of control points.  In your case, you've created a 5x1 "control point mesh" (it had 1 control point by default and you added 4).  Creating a mesh for an object is easy, but it might be the case that bpy doesn't (yet) give you access to this control point mesh, in which case, I can't see how you'd do this.

We seem to lack the ability to set the variables  point_count_v and point_count_u too

@ideasman42, maybe could chime in?

While it's not very pretty, it is possible. This example recreates the default  NURBS Surface. Inspired by https://blender.stackexchange.com/a/8587/47
import bpy
from mathutils import Vector

surface_data = bpy.data.curves.new('wook', 'SURFACE')
surface_data.dimensions = '3D'

# 16 coordinates
points = [
    Vector((-1.5, -1.5, 0.0, 1.0)), Vector((-1.5, -0.5, 0.0, 1.0)),
    Vector((-1.5, 0.5, 0.0, 1.0)), Vector((-1.5, 1.5, 0.0, 1.0)),
    Vector((-0.5, -1.5, 0.0, 1.0)), Vector((-0.5, -0.5, 1.0, 1.0)),
    Vector((-0.5, 0.5, 1.0, 1.0)), Vector((-0.5, 1.5, 0.0, 1.0)),
    Vector((0.5, -1.5, 0.0, 1.0)), Vector((0.5, -0.5, 1.0, 1.0)),
    Vector((0.5, 0.5, 1.0, 1.0)), Vector((0.5, 1.5, 0.0, 1.0)),
    Vector((1.5, -1.5, 0.0, 1.0)), Vector((1.5, -0.5, 0.0, 1.0)),
    Vector((1.5, 0.5, 0.0, 1.0)), Vector((1.5, 1.5, 0.0, 1.0))
]

# set points per segments (U * V)
for i in range(0, 16, 4):
    spline = surface_data.splines.new(type='NURBS')
    spline.points.add(3)  # already has a default vector

    for p, new_co in zip(spline.points, points[i:i+4]):
        p.co = new_co

surface_object = bpy.data.objects.new('NURBS_OBJ', surface_data)
bpy.context.collection.objects.link(surface_object)

splines = surface_object.data.splines
for s in splines:
    for p in s.points:
        p.select = True

bpy.context.view_layer.objects.active = surface_object
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.curve.make_segment()

The ideal situation would be where the spline.points would take a nested list and automatically combine them under the hood, rather than requiring calls to bpy.ops.
Edit: For Blender 2.8+, linking objects uses 'bpy.context.collection'

Thanks, I should be able to get what I want out of your reply.
There might also be a method using https://docs.blender.org/api/244PythonDoc/Curve.SurfNurb-class.html
But yours looks simpler to follow for an amateur

that's Blender 244 documentation - none of that will work directly in 2.7+


text:
How to show the names of each bone on an armature?
For example I have imported a dota 2 3d hero model and I need to attach my item to a particular bone but I cannot see the names of each of the bones.
Is there an option to enable display of the bone name?

With your armature selected you can go to the 'Armature' tab of the properties area and you can enable the 'Names' property in the 'Display' section:

Thanks sorry for asking what seem like very simple questions.

No problem :) . If this answer has helped you please check the tick icon next to my answer. See: http://stackoverflow.com/help/someone-answers

There is no Display section in newer Blender. Where do I find it?

@AnsisMāliņš you can find it in Object Data Properties > Viewport Display

While having the name shown can be helpful, it can still be hard to find a bone and impossible if the bone is hidden. Same applies to other objects for that matter.
By using the outliner you can easily search for an item by name. Items matching the search terms are highlighted in green, with only the parents of matching items remaining visible in the outliner.

Here we find thigh.L and thigh.R - We can see that thigh.R is hidden as the eye icon is not visible. By clicking on the name we have selected thigh.L, the bone layers show a yellow dot that the selected bone is on and that bone layer is not currently visible.


text:
Volume scatter without rendering the volume object
Below is an uncomposited version of my Earth render. You can see the light haze around the edges. That's the atmospheric scatter sphere that's a little bigger than the Earth itself. Once the light passes through it, it affects the surface of the Earth resulting in this nice orange color around the edges of the day/night transition. The problem, however, is the white haze around the edges of the planet itself are sharp and in order to affect the surface color, the atmosphere scatter sphere must be on the same layer, therefore, I'm unable to blur it slightly.

This is the atmospheric scatter layer on it's own. I've tried duplicating it, moving the dupe onto a new layer behind the Earth and then blurring that to help hide the sharp edges but it's still not ideal, especially when up close.

Here's the finished composite. You may say "It looks fine". True, but this is at a distance and my project requires a gradual descend close to the planet.

My question is, can I still have the atmosphere scatter mesh affect the surface whilst not being a part of the render itself? Can it affect the light off camera, so to speak?
Render Layers:
1) Atmosphere Mask (Uses the 2nd layer(Earth) to mask the atmosphere mesh which removes noise)
2) Earth (Includes a Surface mesh, Cloud mesh and Atmosphere Scatter mesh)
3) Atmosphere (A different atmosphere volume that creates a blue outer glow) <-- Irrelevant to problem
VOLUME SCATTER NODE SETUP:

SOLUTION:
This is the best I could do with risingfall's answer. In order to get the light to change the surface I can't fade it as much as I'd like so from a far you can't really see the fade as much but it's miles better than before, I believe.

Sorry if I'm not picking up on your situation exactly, but is your atmosphere scatter mesh using a volumetric shaded material?  Is it only shaded by volume, or is there also a surface component?
If it is helpful, and if your volume scatter mesh is volume only, I can tell you how to add a gradient to the volume density.  That means you can make the edges of the volume scatter effect fade out, rather than be abrupt.
Here is a two-sphere setup where the volume scatter sphere does not have the gradient:

Here is the same with the gradient enabled:

Hope this helps!

This certainly helps with the edge sharp issue, the problem now however is that, because the color ramp in plugged into the Density input, the Earth surface and clouds no longer have an orange hue as the density is no longer as high as necessary.

One way to handle that, perhaps: stick a "Multiply" node in between the color ramp and the density input.  See if multiplying by, I dunno, 5, 10, 20, 100 give you the results you want.  By the way, as you probably noticed @R.M's response is very similar to mine, he just used a mathier (and more precise) approach to specifying the density gradient.

Yep, trying it out now. Will update once I've got a good result.

Sweet, I managed to get a good look using your method. I added a multiply between the color ramp and the volume scatter to deal with density. I did have to size up the atmosphere mesh slightly to get the orange to appear but It seems to nicely blend in now.

If I understand correctly, you're mostly worried about the sharp edges. You could probably get rid of them by separating the layers and blurring, but that is just a workaround that would give you photographically unrealistic results. I suggest doing it all in one layer, but changing the atmosphere's texture slightly.
In reality, the atmosphere looks smooth because the air gradually decreasses in pressure as you go further away from the ground. There is actually less and less air higher up.
You can simulate this by decreasing the density of the volume shader as you go farther from the center:

(I'm not friends with the gradient texture, so I prefer to manually calculate the distance :)
My result is not as nice as yours, but it demonstrates how you can get that smooth atmosphere:

I had to play around a bit to get the falloff somewhat right. Good luck!

This is the first thing I tried but unfortunately doing that removes the affect the volume has on the Earth surface. Because the volume is on the same layer, it allows the light to change the colour of the Earth and clouds as well, instead of just the volume itself so blurring in composite isn't an option.

@Stewie sorry, you probably misread my answer. I am not suggesting to blur anything in composite. I am saying you should create a falloff for the density of the material. My solution preserves the orange colour of the Earth (though maybe it diminishes it a little bit).

Ahh, that's my mistake. I'll give it a go and see how it goes, thanks for the suggestion!

Okay, I've tried adjusting the curves value and the closer they are to the right side the closer they get to each other, allowing for the orange hue to pop through the surface without the atmosphere looking too large. Now doing a render to see how it looks. Will update with results.

I've dealt with this problem in a still image and I solved it in the compositor. Give an object ID to each of the spheres. Then, in compositing, subtract one from the other so that you are left with their difference( outline). Use a blur node to blur that part.


text:
No operator presets: FBX 6.1 ASCII, FBX 7.4 Binary
I have no operator preset options (FBX 6.1 ASCII, FBX 7.4 Binary). I had blender 2,79 now 2.80 but no presets appear. That makes it impossible for me to export FBX with textures. I read somewhere that some file needs to be modify somewhere on the computer but it wasn't clear. Any ideas??

The .fbx ASCII format has been removed in Blender 2.8, the remaining export format is the binary format. You should be able to export to the other application just as you did in Blender 2.79, except that in the older version you had to explicitly select the binary format which is now the default in 2.8. The materials need to be setup separately because .fbx can't store Cycles or Eevee materials.
In order to embed texture into the file you have to set the following two options:

Path Mode is Copy
Embed Textures is enabled

Although I haven't personally tested it, you may want to try glTF as export format because it should be able to translate textures and materials to the other software, if you use the principled shader for a PBR setup.

I don't have format options (not ASCII or any other) is that normal? The other thing I'm not intending to use this in unreal engine but in 3ds max to do Animation. Vertex Paint in 3ds max is a pain in the A**. Blender method is perfect... but not for me because a can't export anything...

@Ivan Yes as I said the export is in the binary format, because the ASCII option has been removed in Blender 2.8

Ok, then why I can't have textures exported ever?

@Ivan I've added the relevant export options.

Yes I've done that a thousand times, I select copy then select the icon to embed the textures that is on the right side the little box with papers, and then... nothing.... just the fbx without textures. This happened in 2.79 and now in 2.8.. still no solution.

@Ivan the texture is embedded in the fbx file, you won't get extra files besides that. If you want your texture as separate files, you will have to save them in the directory and then decide how you want to reference them in the fbx (relative path, absolute path, etc.)

Every time I export it, I then re-import it into 3ds max or blender, and there's nothing. I can also see that for the weight of the FBX, It weights the same as when imported. The same 1.2mb...

I've tested this before I added the information and it works. Perhaps you do something unusual in your node setup? Are the textures actual images or procedural? Have you created the texture internally, e.g. by texture painting?

These are all jpg files. Maybe the resolution is too high: 2048 by 2048?

@Ivan I don't think the resolution is limited. I'm out of ideas. I doubt I'll find out what the problem is without taking a look at the project file.

How can I send it to you?

Google Drive perhaps?

Great in a few minutes

I've found some kind of solution at last... export it as collada and then the textures do stick.... but, I really want to know what's wrong with the fbx. Here's a link to download the orginial fbx and the paint textures: https://my.pcloud.com/publink/show?code=XZMsmi7ZVg55MCi4w88RezaLzN6h2J9qwWCy

Your original fbx is broken. There are no texture coordinates  and textures linked. So whatever software you used to create that file messed up.

I did it in 3ds max..... maybe I have a virus then... Dam!

@Ivan that wouldn't be likeliest explanation, could simply be a bad configuration in 3ds max or a bug.

I´ll try re-installing and re-test when I have a time window then...


text:
How to make a nanotech effect?
I'm working on a short Iron man fan film, and I need to do a nanotech effect, I tried using the unfold add-on but it kept crashing, probably because the model is a full iron man suit, is there another way I can do a nanotech-type effect
Thanks in advance.

Related https://blender.stackexchange.com/questions/74987/how-to-animate-a-superhero-zap-into-his-super-suit-in-blender

By coincidence I've just seen this video recommended on YouTube, might be what you're looking for: https://www.youtube.com/watch?v=bdE0zuLR1gY

thank you so much, I have been looking for a video like this!


text:
Why is part of my model acting wierd?
I am working on a spiderman fan film and noticed that my model had weirdly shaped arms, what tools can I use to fix this?

The bone weights are wrong, you can repaint them in weight paint mode.

ive tried that. but it seems to not want to paint in that area


text:
How to delete collections from the RigidBodyWorld list?
I can't find the possibility to empty the collection list, how do you do it?

I found out how to do it, just go inside
Outliner -> OrphanData -> Collections

And click on the power button on the right
Save, close and restart blender.
I thought it was a bug, and thanks to everyone for trying to answer!


text:
blender 2.8 shader editor normal map missing
When I go to the shader editor and search for "normal map" there are no results. Where would I add a normal map to the editor?

Where were you searching from? Were you using the regular F3 search function or were you using the Shift+A function inside the Shader Editor? The add node function (which is Shift+A) comes with its own searching feature which searches through all of the different nodes, which will include Normal Map.

I don't know why the search doesn't work but I found the Normal Map under Add - Vector - Normal Map.


text:
transform dialog boxes
I am trying to access transform tools dialog boxes without having to move the mouse around. Eg. Bevel tool.
Desired behavior. Select edge - click bevel - view dialog box for measurement input.
Current behavior: Select edge - click bevel - move mouse around to have dialog box appear.
It appears the software is set up to do transformations through mouse movement which takes some time to get exact dimensions and I am looking to input exact dimensions for most transformations.
Thank you in advance.

Did you try pressing F6 after invoking the command then entering the values you need?

Thank you for the reply. F6 dosn't appear to do anything.

F6 works in 2.79. In 2.80 use F9 after activating bevel and clicking

It's not a dialog box, but anytime you are modifying something through mouse movement while using a tool, you can directly type in the measurement you want. Eg if you want to bevel an edge by an offset of 1 unit, click bevel, then type 1, then press enter (or left click) to complete the action.

You can view your input value in the box at the bottom of the viewport (in the red box), along with some other information/options/values for whatever tool you are using.
Once you have completed the action, you can also fine tune with the menu that pops up at the bottom of the toolbar. This will appear after you complete any action.

I assume this menu is the dialog box you are referring to when you wrote "Select edge - click bevel - move mouse around to have dialog box appear", but I figured I should mention it just in case, because it seems to be what you are looking for. If the problem is that you don't want to move the mouse around before having the menu appear, you can select the tool (eg bevel), then, without moving the mouse, press enter or right click to have the menu pop up.
You might also want to look at some of the options in the properties panel (you can turn it on or off by pressing 'n' on the keyboard):

The options change depending on the mode you are in/what type of object you have selected, but for example when you are in object mode, you can modify the selected objects transform. (in the picture it's right at the top of the properties panel). It's not as relevant as the first two solutions I mentioned, but I'm not sure how famiar you are with Blender so again, I figured I should include it. (sorry if this is all stuff you already know).
Hope some of this helps.

This is exactly what I needed. Thank you.


text:
Blender 2.8 How do I find out which version and build I am using?
How do I find out which version and build I am using? Normally this is in "About" under the Help, but not in Blender.

This question has been asked before: https://blender.stackexchange.com/questions/148129/what-version-have-i-installed/148133#148133

Either go to the Blender menu on the top left and open the Splash Screen entry,

or go to Help > Save System Info, browse your file system and save the file. Upon opening it with any text editor it will reveal your complete system info, including build version.


text:
Unwanted patterns in texture from repeated, seamless image
I added an Image Texture to a plane using a seamless image.  In the Texture context of Properties window, I set Scale to be X:10, Y:10.
Unsurprisingly, a pattern forms when you zoom out from plane:

How can I get rid of this pattern?  (this is supposed to be grass, so it should look very random)
EDIT: For example, is there any way to add distortion to how the image is tiled onto the plane?  So if I were to represent the surface of the plane with a grid, the pattern on it would become distorted, like this

You could try something like this:

With undistorted coordinates:

With distorted coordinates:

And with a checkered texture:

One solution i found was to add a copy of the same image, make it about 2.5 times larger, and rotate it my about 30 degrees. then use a mixRGB node to mix the 2, and set the factor to a noise texture, which is running through a brightness contrast node...

i actually keep this saved in my startup file as a nodegroup xD

Cool, that definitely helped although there were still some patterns left when you zoom out far enough because it's still only made of two repeating patterns (combined in a noisy way).   I suppose you could also add a third or fourth of the same texture with slightly different rotations and scalings.

@Garrett indeed... either way with textures you will eventually see pattern-ing. I advise that everyone learn how to create procedural textures. Although i will say that the idea you had (gandalf's answer) really intrigues me ...

You could use your brush as a texture in texture painting mode: http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Painting#Texture


text:
System crashed but no autosave file found
I had been working on a Blender file for about an hour when my whole system just crashed and powered itself off (using Ubuntu 13.10, and I had many applications open).
The /tmp directory where the autosave file is typically found had no blender files in it.
I just opened Blender again and confirmed that the autosave feature is working properly according to my settings (saving 2734.blend every 3 minutes).
So why is there no autosave file?  The /tmp directory had other files in it, so I don't think that Ubuntu crashing caused the file to be deleted.

I have had the same problem when blender crashes running ubuntu 13.4

Did you have to reboot the system? The /tmp directory is usually stored in RAM, which means that everything in it will be lost when the machine restarts.

Yes, the system powered itself off during the crash.  I edited my answer to reflect that.

@Garry In that case the reason why the file is missing is because it was lost when the computer turned off. :/

It seems /tmp is cleared on startup in ubuntu by default, so
unfortunately if you had to reboot your machine everything in /tmp was erased.
The other files you saw in /tmp were probably created on startup.
Blender has some other backup systems (see this post), but if you did not make any manual saves I'm afraid there is nothing to be done.
Autosaving to the hard drive:
You could change the directory blender uses to store temporary backups to a location on your hard drive by changing the Temp location in CtrlAltU> User preferences > File:

Note that this setting controls the location of everything blender puts in /tmp by default, not just the autosave files.

Great, thanks @gandalf3!  Changing the Temp directory worked, which I confirmed forcing my computer to power off.  But I don't believe that /tmp is held in RAM judging by this page.

Also, building off the answer @gandalf3 gave above, an alternative (but not necessarily better) solution is to change the frequency with which /tmp is cleared by following Max's answer here.

@Garry It can be, but it does seem that you are right that it is not in RAM by default on ubuntu.


text:
Refresh an F-curve with Python after changing Extrapolation Mode
After creating an F-curve for the default cube and then setting the Extrapolation Mode to 'LINEAR', the graph editor displays a very strange curve:

The script I ran in the Text Editor of a  new .blend file was:
import bpy

obj = bpy.context.object
obj.animation_data_create()
obj.animation_data.action = bpy.data.actions.new(name="MyAction")
fcu_z = obj.animation_data.action.fcurves.new(data_path="location", index=2)
fcu_z.keyframe_points.add(2)
fcu_z.keyframe_points[0].co = 10.0, 0.0
fcu_z.keyframe_points[1].co = 20.0, 1.0

fcu_z.extrapolation='LINEAR'

The F-curve can be manually "refreshed" by selecting a control point and hitting GRMB.

So my questions are:

Can I "refresh" the F-curve in the script?
Should I submit a bug report?

Modern blender have FCurve.update(). Docs: Ensure keyframes are sorted in chronological order and handles are set correctly

If you're changing the area.type anyway, I suggest to use a meaningful operator and replace the fcu_z.extrapolation = 'LINEAR' by graph.extrapolation_type() operator:
import bpy
context = bpy.context

obj = context.object
obj.animation_data_create()
obj.animation_data.action = bpy.data.actions.new(name="MyAction")
fcu_z = obj.animation_data.action.fcurves.new(data_path="location", index=2)
fcu_z.keyframe_points.add(2)
fcu_z.keyframe_points[0].co = 10.0, 0.0
fcu_z.keyframe_points[1].co = 20.0, 1.0

old_area_type = context.area.type
context.area.type = 'GRAPH_EDITOR'
bpy.ops.graph.extrapolation_type(type='LINEAR')
context.area.type = old_area_type

Submitted bug report: https://developer.blender.org/T38774 (fixed in 2.70, see report)

You don't set the coordinates for the handles.
Blender won't check if these are valid. In this case the right handle is initialized with the default value
(0.0, 0.0) which is invalid since the  x-coordinate of the left endpoint is 10.0. So handle_x > endpoint_x is violated here.
Moving the point blender will automatically recalculate the handles for the points.
BTW: keyframe_points.insert will recalculate the curve unless the option FAST is chosen.
This example works:
import bpy

obj = bpy.context.object
obj.animation_data_create()
obj.animation_data.action = bpy.data.actions.new(name="MyAction")
fcu_z = obj.animation_data.action.fcurves.new(data_path="location", index=2)
fcu_z.extrapolation='LINEAR'
fcu_z.keyframe_points.insert(10.0, 0.0)
fcu_z.keyframe_points.insert(20.0, 1.0)

I've found a workaround.  This function seems to refresh the F-Curve Editor:
def refresh_fcurve_editor():
    '''execute a meaningless command on F-Curve Editor which has the effect of
    refreshing the graph.'''
    C=bpy.context
    old_area_type = C.area.type
    C.area.type='GRAPH_EDITOR'
    bpy.ops.graph.clean( threshold = 0)
    C.area.type=old_area_type


text:
Cycles render stops halfway through render
I'm trying to render an object using Cycles render. My object is simple but it won't finish rendering this object. I downloaded a couple of shared models, much more complex, and they render fine. I've left my object rendering for 15 minutes and it won't finish. Blender render will work, as does the OpenGL option.
I'm using a Macbook pro, 2.2ghz i7, 4gb ram. I'm also using Blender 2.7. The attached image is how far it will get. What am I doing wrong?
render example http://www.guitarsean.info/Blender_render.jpg

Just as a test, I created a brand new file, new object. Same problem with render, downloaded models still render fine. (and thanks for the title edit Garrett)

I think you should file a bug report including your system specs at https://developer.blender.org/ and also be sure to send them a .blend file using the upload system at PasteAll http://www.pasteall.org/blend/

Before ever reporting a bug, download the latest build from builder.blender.org and test it in there. I have a feeling this was one of the bugs in 2.70 and thus warranted the 2.70a release, but try it in a buildbot build anyway.

Also check that you haven't got the samples up too high, it may just be calculating without visible change. Do you see any cpu usage while it's rendering?

The sampling seems to be the culprit. I had it set to 100. CPU usage spiked to 760% (which seems impossible) and the cooling fans go crazy. I dropped sampling to 10 and it's running smoothly. At this point I don't really understand sampling in Blender. The video tutorial I watched recommended setting it to 100, but he was also using GPU processing on an Nvidia card. My laptop probably just can't handle that. Thanks for the tip sampler!


text:
Get modifier keys to show in Screencast when they are pressed by themselves
Is there a way to get keys like SHIFT and CTRL to show in Screencast when they are pressed by themselves? This would be very beneficial for the viewer in cases like where one first selects one object, then holds down SHIFT and then selects another object. In this case, the SHIFT held by itself doesn't get displayed, so the viewer is left not knowing exactly what was done.

There is no setting which would allow displaying modifier keys alone. I looked into the source and the modifier keys are disabled in line 550 of the screencast addon:
ignore_keys = ['LEFT_SHIFT', 'RIGHT_SHIFT', 'LEFT_ALT',
         'RIGHT_ALT', 'LEFT_CTRL', 'RIGHT_CTRL', 'TIMER',
         'MOUSEMOVE', 'INBETWEEN_MOUSEMOVE']

You could right click on the screencast control to open the python source in the text editor and remove the keys want. Click register in the text editor's header and run the script. (Of course you could also save the modified version in into the blender installation folder).

Note that two events will be raised - the modifier keydown event and the second key you press with that modifier set (e.g. event.shift).


text:
Convert CSV Latitude longtitude to Blender coordinates
I have a table of Earthquake data in CSV, that includes Lat Long coordinates.
CSV file download I want to convert them to Blender coordinates (on sphere or flat it doesn't matter as I can fit them to a map later).
I hope to place an object at each location that references the magnitude value. Then I will make them appear in order over time, which is the other column of data.
I can import the CSV and convert to text objects for the magnitude with
import bpy # THIS IS A MUST TO IMPORT ALL BLENDER PYTHON MODULE
import csv # IMPORT CSV MODULE

# READ INPUT FILE

file = csv.reader(open('\\Users\mcsweend2c\Desktop\Bearthquakes 6-9.csv', newline=''), delimiter=',')

curRow = [] #empty placeholder for current row

for idx, row in enumerate(file):
    if idx<40: # this is hard coded at the moment

        curRow = row

        # display first data index as string
        bpy.ops.object.text_add(location=(0,idx,0), rotation=(0,0,0))
        bpy.ops.object.editmode_toggle()
        bpy.ops.font.delete()
        bpy.ops.font.text_insert(text=curRow[0])
        bpy.ops.object.editmode_toggle()

But I'm not sure how to separate and use the rest?

see: http://stackoverflow.com/questions/1185408/converting-from-longitude-latitude-to-cartesian-coordinates (for lat/lon to xyz)

that csv has mixed date information, .. 10/08/1997 and  1873/12/15, and it goes backwards in time (which makes sense)

Yes the data was cleaned in excel which doesn't recognize dates before 1900. And yes it goes backward in time. Although I'm happy to reverse that. I wasn't going to set the time accurately anyway, just straight progression.

Here's how you read the CSV, reformat the dates, sort the quakes by date, convert lat/long to x/y/z then output each row as a text object on the outside of a hypothetical sphere (with the object name set to the date of the quake in YYYY-MM-DD format) with the text oriented so that it sits flat on the surface. Fonts and materials and other tweaks to be supplied by you. :)
Based this off https://stackoverflow.com/questions/10473852/convert-latitude-and-longitude-to-point-in-3d-space
# imports to make all the things work
from math import sin, cos, radians, pi, atan, tan
import csv
import bpy

# define some helpful functions for later

# a function to make, scale and rotate text objects into place
def makeathing(coords, scale, lat, long, date):
    rotation = (radians(lat - 270), pi, radians(long - 90))
    bpy.ops.object.text_add(location=(coords), rotation=(rotation))
    ob = bpy.context.object
    # set object properties here
    ob.data.body = "{:.1f}".format(float(scale))
    ob.data.align = 'CENTER'
    ob.rotation_mode = 'YXZ'
    ob.data.size = 0.03
    ob.data.extrude = 0.002
    ob.data.name = date
    ob.name = date

# a function to turn 3D polar coordinates into 3D cartesian coordinates
def latlonger(lat_deg, lon_deg):
    lat = radians(lat_deg)
    lon = radians(lon_deg)
    # see: http://www.mathworks.de/help/toolbox/aeroblks/llatoecefposition.html
    alt = 0.01
    rad = 2                                     # radius of sphere in BUs
    f  = 0.0                                    # flattening
    ls = atan((1 - f)**2 * tan(lat))  # lambda
    x = rad * cos(lat) * cos(lon) + alt * cos(lat) * cos(lon)
    y = rad * cos(lat) * sin(lon) + alt * cos(lat) * sin(lon)
    z = rad * sin(lat) + alt * sin(lat)
    return (x, y, z)

# NB: no code has executed yet, we're just setting up functions we use further down

# read in the CSV file containing quake data
file = csv.reader(open('\\Users\mcsweend2c\Desktop\Bearthquakes 6-9.csv', newline=''), delimiter=',')

# make a blank dict variable to put quake data into
quakes = {}

# iterate through the CSV row by row and pull the data into variables
# then put the variables into a tuple and use a corrected date as the dict key
# see the last line of the for block for data order
# NB: could have used a dict instead of a tuple
# would have meant looking up e.g. quakes[x]['scale'] instead of quakes[x][0]
for idx, (scale, date, lat, lon) in enumerate(file):
    (yd, m, dy) = date.split("/")
    if int(yd) > int(dy):
        year = yd
        day = dy
    else:
        year = dy
        day = yd
    key = "{}-{:02g}-{:02g}".format( year, int(m), int(day) )
    quakes[key] = (scale, lat, lon)

# go through the sorted dates in the quakes dict
# get latitude and longitude and turn into x/y/z coords with latlonger function
# then send x/y/z coordinates to makeathing function to create them in 3D space
for k in sorted(quakes.keys()):
    latitude = float(quakes[k][1])
    longitude = float(quakes[k][2])
    coords = latlonger(latitude, longitude)
    makeathing(coords, quakes[k][0], latitude, longitude, k)

You may need to offset the X of the world map texture to align the letters to their correct positions on the globe, e.g. using this texture map I had to offset X by 0.25.

Hmm getting error, "A float is required". Should I convert the result somehow or is the result string a mismatch of type?

fixed it - wasn't converting the strings from the CSV to floats

Getting a sphere from the data, when it should return a partial sphere...

Yep because sin and cos expect radians not degrees, have fixed that now along with a bunch of other things. :)


text:
TV titles: Split a list into text from a CSV document using Animation Nodes
I have a Spreadsheet list that is sorted into columns of attributes (Story name, Journalist Name, Talent name, Talent Occupation etc.). This is then sorted into order of appearance by its row, so that upon a frame change I will generate a new graphic item from the columns.

So far I can reduce the list down to seperate items per row, but I can't figure how to split the items on to their own lines? So that they appear like this:

Also I want to control the font size per line, can this be done to the single text object?
Finally I want to allocate position information based on the column the item comes from. For example the column 1 and 2 appear in the bottom left but item 6 appeared on the top left. I considered using Empty objects as adjustable hooks but I don't know how to integrate them based on column info?

Can you clarify your last point?

Each group or set of words is allocated to a unique column. e.g. Column 01 (title) should be placed in the lower left corner where I place an empty. Column 06 (Top of Frame Info) should be placed in the upper left corner where I place a different empty.  The problem is, how can I use the column number to decide the location of each set?

I edited the answer, is this what you want?

Thank you, I have a lot more understanding now. Your answer was very close to what I hope to achieve. I will add an answer for completeness but accept yours as the solution. I always have trouble understanding loops and how they achieve iteration of output, so this will help lots ;-)

Double Line

To make the text be formatted on two lines, you can replace the , with a line break special character as follows:

Different Sized lines

Blender doesn't allow various sizes for the same text object, what you need to do is separate each of the lines as follows:

Column Location
First, I would make a classifier loop that classify each column, For instance, I classified this text into names and titles.

Then we join names and titles using a line break (Or possibly make them different object if you want them to have different sizes), and then output the text to a text object as follows:

Thank you, I really appreciate the help, it seems so simple compared to all the complex Motion Graphics AN gets applied to, but it would really help my workflow.

How are you assigning the empty to the Text Instance Transform? I see that you define "Objects From Group" but how does the Text Output know which empty to use?

@3pointedit I add the empties to a blender group and get them from the Objects From Group node. They are associated in order, so the first empty controls the Names and the second controls the Title.


text:
How to do AddonPreferences using extensions_framework?
I have seen scripts taking user preference values using classes built over AddonPreferences. Is it possible to do the same using extensions_framework by Doug Hammond. Why I am asking this is I need to get a path to an executable from the user, like a path to a renderer. The script which I made does all its class registration / unregister happens through EF. So is it possible to get the path from pref?

I think I should provide some starting point for you to experiment with this link contains the code but it is not woking... https://github.com/afilash/BlenderExperiments/tree/master/BlenderExperiments/src/customeRender

No (as of 2.68), the Python extensions_framework directory has no references to AddonPreferences.
You could contact Doug Hammond about this or check on adding support yourself.


text:
How can I reduce the friction of Mantaflow colliding with effectors?
Just experimenting with liquids in Blender (I’ve only just got into doing fluid sims). Finished this tutorial and did some experiments of my own with collision effectors, such as some whiskey dropping into a glass.

collateralDamage02Fluid001RS.blend (946.6 KB)
However, one thing I’ve noticed is that there seems to be some weird interaction with the effector’s friction which lends the liquid a ‘soupy’ quality, where it seems to adhere to the side of the glass somewhat (see left of glass above). This also happens a little in the tutorial mentioned above.
I’ve played around with viscosity and other values, but I don’t seem to be able to get a satisfactory result (eg. the ‘liquid’ SHOULD quickly slide down the side of the glass surface). This behavior can be observed on the edges of the domain walls, but obviously that’s not ideal.
I’ve done a little reading around and pre-Mantaflow docs seem to mention a ‘slide’ value for colliders… but it doesn’t seem to turn up in the current settings.
If this is just an in-development feature or a current bug, that’s all good - happy to wait, everybody’s doing great work. But if I’m missing something and somebody can put me right, I’d really appreciate it.
Many thanks!
BONUS DUMB QUESTION:
Why can’t I resize my domain in edit mode? Resizing in object mode seems inconvenient, but edit resizing or applying scale really seems to screw up the fluid sims.


text:
Shader artifacts rendering in some spots of the mesh
When I render my model in Cycles (I applied a dummy material just to check), there are some bad/glitched shadows in some spots.
Like this:

But, in shaded view (smooth shading applied to the whole mesh), it seems fine:

I checked the face normals, and they're fine, vertex normals look fine too:

This is a retopo of a sculpt I've made, it might not be perfect but there are no triangles or n-gons. It's also strange because those darker spots are triangular.
I also checked if there were two faces one over the other, but there are none. Everything looks fine.
I don't know what may be causing this, any help?
I think I should point out that this happens on more than one spot and only when the spot is in some degree of shadow. If it's lit it looks fine.

Coupld you upload the .blend file to a site like pasteall.org?  Looking at the picture I would agree with stacker's answer.  It looks like you've got some really wacky normals: normals coming out of edges, multiple normals on a face, normals pointing peculiar directions, normals that are not centered in a face, etc.  The last of these is usually caused by an n-gon that looks like a quad (a “quad” with a subdivided edge.

Those artifacts are showing up for a number of reasons.  The first is that you have polygons that are very non-planar and this will usually cause artifacts for lighting.
Here is an example that shows a quad but it's folded sharply and two distinct triangles can be seen when viewed along the plane of the quad.  Try and make sure to keep quads as flat as possible.  Non-planer quads will also give you problems with texture mapping so it's something to always look for and repair.

Another problem you are having is that you are rendering with a very low polygon model.  Cycles has difficulty dealing with models which are not subdivided at least a couple times.  It's best to use a subdivision surface (subsurf) modifier to handle this since it can be removed without affecting the base model or it can be applied so the model will be permanently sub-divided.
Here is a sequence of images that show the effect that various levels of subdivision can have on rendering artifacts.

Another way to deal with these rendering issues is to use more lights.  Global Illumination will also help since these areas will receive indirect light that will also help smooth things out.
The following image shows the effect of changing the angle of a single light source in order to show how the area is affected by direct illumination.

For the final image here, I did not alter the mesh at all but instead only relied on the Sub-Division Modifier at 1 iteration and also there are 3 lights as well as an environment map.  The ground also adds a bit of indirect light that helps to fill in the lighting for areas that the other lighting is not reaching.
This all adds up to a mesh that looks pretty decent even though the bash mesh is low poly and it has some fairly substantial non-planer errors.  If the Sub-D modifier is increased to use 2 iterations; the few problem areas that are still showing should no longer be perceptible.

I was keeping it low poly on purpose. I will try to fix the non-planar faces, I really didn't notice that. I didn't even know it was possible to have something like that, really. Is there a fast way to find such faces?

I'm not aware of any tool that can find non-planer poly's directly. However, if you Triangulate the model then use the Tris To Quads tool, you will see that very non-planer polys will tend to remain as triangles instead of being converted back to quads.  Unfortunately this will also change the poly flow if the edge-loops are not really well defined.  This would make a good feature request I think.

Judging from the normals, they don't fit the visible mesh. See the ones in the red circle they should point more upward (+z). Besides that there should only be one face normal in the center of the face. The area in the orange circle shows two normals but only one face.
You should check for duplicated vertices and faces.
Ctrl-V Remove doubles (note the merge distance in the last operator panel)
Ctrl-N Recalculate Normals

Edit after .blend was provided for detailed analysis:
Coloring one of the suspicious faces:

In the wireframe mode you can clearly see that all of the vertices are not on a plane (non-coplanar) this causes the artifacts.

You could try to fix this by selecting these faces and switch to Transformation Orientation to Normal:

And scale them with S-Z-Z-0 better you could find out what had caused this.

@Paul in this case select the faces and use 'Flip Normals'

I removed 12 double vertices. If I recalculate the normals, I end up with some pointing inside the mesh, some outside. My mesh has one triangle (two if I apply the mirror modifier), if I remove it and recalculate the normals, they all point the same direction, inwards. The artifacts are still there, even if I flip them. I'll upload the blend file as soon as I get home.

Here's the blend file: http://www.pasteall.org/blend/32986 Still unfinished, obviously.
The triangle is on the outermost tentacle. I added it because I ended up with a single spiraling loop on the tentacle, instead of rings. I don't know if that would have been ok.
Other than that, I was very careful about triangles and n-gons, I always double checked for them, I didn't fin any.


text:
How can I display only one camera view option in a custom pie menu?
pie.operator_enum("VIEW3D_OT_viewnumpad", "type") - this gives list of views.
 I want only one "camera" button , not all from the enum (front, left, right etc.). How can I do it?
bpy.ops.view3d.viewnumpad(type='CAMERA') - this isn't right.

pie.operator("VIEW3D_OT_viewnumpad").type='CAMERA' - this is right

Please add more detail to your answer, otherwise it might get deleted.


text:
How to add a material output node?

Yesterday I was following a couch making tutorial and when I clicked on "Use Nodes" in the Node Editor there was a node called "Material Output". Today I am trying to achieve the same thing with a sphere, but no "Material Output" node pops up just some "Output" node.  Thanks in advance!

Oh my god thank you for pointing that out. +1000 rep :)

You need to switch the render engine you are using:

The nodes are very different between Cycles and Blender Intrenal materials, so you will notice a lot of incompatibilities if you are in the wrong one.

Also, you will need to add the "Materials Output" node manually after changing the render (to Cycles Renderer). Add it with Shift-A. Under the menu "Output", "Material Output" should be present. Remove the old "Output" node by mark and DEL.


text:
Blender 2.8 - Panning in the viewport
Does anyone know the shortcuts to pan a scene horizontally or vertically in the viewport?
In 2.7, holding Shift or Ctrl and scrolling the middle mouse button would let me pan horizontally or vertically, I can't seem to do that anymore in 2.8.

The same shortcuts (eg, Shift) seems to work fine for me (using 2.80 alpha) - although I do have 'emulate 3-button mouse' enabled so I don't know if that's a factor.

Enabled 'emulate 3-button mouse' option, still nothing. I am using 2.8 Alpha 2.

I don't know why it's not set up by default but you can change the "pan view direction" in: Preferences > Input > Keymap > 3d view > 3d view global and it will work

It works differently. You need to hold Shift and then just drag with the middle mouse button for panning


text:
Blender 2.8 - AWS EC2 command line EEVEE render
I have been trying to get this to work for a couple days now. I have an EC2 P2 instance with NVIDIA CUDA configured by default, its a Deep learning Ubuntu AMI. This OS does not have a GUI so everything is via terminal.
I downloaded Blender's 2.8 TAR file for Linux and set it up on the EC2 instance. And ran the following command from the directory where the TAR file is extracted:
 ./blender -b -noaudio /home/ubuntu/file.blend --render-output . --engine BLENDER_EEVEE --render-format PNG --verbose 4

All I see in the output is this:
Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04)
found bundled python: /mnt/blender/blender-2.80-linux-glibc217-
x86_64/2.80/python
Read blend: /home/ubuntu/file.blend

Blender quit

Don't know why its quitting but I am unable to debug this any further. Any help would be appreciated.
UPDATE:
As per @rjg's recommendation, ran the following command:
./blender -b -noaudio /home/ubuntu/file.blend --render-output . --engine BLENDER_EEVEE --render-format PNG -f 1 --verbose 4

Got the following error:
Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04)
found bundled python: /home/ubuntu/blender/blender-2.80-linux-glibc217-
x86_64/2.80/python
Read blend: /home/ubuntu/file.blend
Unable to open a display
Aborted (core dumped)

The actual problem is that Eevee does not support headless rendering.
Besides that the command misses a flag that tells Blender to render. Right now it will just open the userpref.blend with your settings and then close.
If you want to render the first frame, your command needs to contain -f 1.
blender -b -noaudio -E BLENDER_EEVEE -o . -F PNG -f 1

-f, --render-frame <frame>
Render frame  and save it.

+ start frame relative, - end frame relative.
A comma separated list of frames can also be used (no spaces).
A range of frames can be expressed using .. separator between the first and last frames (inclusive).

All flags can be found in Blender's manual.

this did not work. Updated OP with details.

@sotn Right, I forgot that headless rendering is not support with Eevee. Cycles should work though.

you are right cycles worked. I will give VirtualGL a shot.

Developers are aware of the issue and this may get fixed in the future. See: https://developer.blender.org/T54638

According to this post by Paul Melis you can get it working by having a properly setup X server and OpenGL drivers: https://devtalk.blender.org/t/blender-2-8-unable-to-open-a-display-by-the-rendering-on-the-background-eevee/1436/24?u=robert


text:
Insert keyframe on an object's custom property with Python
How can I add keyframes to custom properties with python?  Usually, I can use the function
object.keyframe_insert(data_path="location")

but I couldn't find the right data_path of a custom property.

Thanks ideasman42, it works perfectly. Never used StackExchenge and it is difficult for me to not at least thank you for your efficient help. But I didn't found where is the best place to put this thanks...

You can thank ideasman42 by accepting the answer. Just click the 'v' and it turns green :)

you are right, it's done.

Keyframes on custom properties use Python's getitem/setitem syntax rather then getattr/setattr.
This matches python api, where you would access object.location as an attribute and object["prop"] for a custom property.
So you would need to write it like this:
object.keyframe_insert(data_path='["prop"]')

Note that you have to use " quotes, not ','["prop"]' can be written as "[\"prop\"]" too of course.
I think we have this documented, I'll have to double check though.


text:
Growing strands with particles
Is something like this possible in Blender ?

I need random movement of particles, which leaves static strands behind.

This is possible using hair particles (the trail effect could be done in post processing by fading frames out  over time).

I need real strands, no any echos or duplicate in postproduction, this is exactly what I need: [https://www.youtube.com/watch?v=cVqUaaozE5Y]

Do you think this can be yet another acceptable solution? And I wonder whether you mean to have static strands for dynamic and random particles to follow?

Use hair particle with Hair Dyamics On. Add up force field, like wind and turbulance ( you may need to add up 2 or 3 for the effect) , Keep the hair particle length more then 10.
Setup the material with strand options on. Add up a blend texture, which will effect the alpha and a color ramp to give multi colors.

@Cenda Oh. I mis-understood what you wanted..

And here is a blend file with the advice given above.http://www.pasteall.org/blend/27364

You could try using trails and lines in BI.

it looks like best solution for me :) thanks .. btw, is there any option for controling grow by curve / path ?

I thought you needed particles. For growth along curves Ivy gen addon is probably a good fit for you. http://bioblog3d.wordpress.com/2013/02/06/iga-is-ready/

You can use a Halo material and Trail Particles to do this.

Use a turbulence force field to create the random motion. (You can also use the Brownian value in Particles > Physics, but I liked the motion created by the turbulence force-field better)

Set the Trail count up. 700 may be a bit much if you have a lot of particles, and unnecessary if your particles don't move very fast.

Use a Halo material for the particles:


text:
Rendering stack of 2D images as a 3D object?
I have a stack of 2D images that I would like to render as a 3D object.  Essentially, each image is a slice of a 3D object such that, if stacked along the z-axis, would make a 3D object.
EDIT
I want to maintain the color of the image while making black transparent, like in the model below.  I have a stack of images that (when stacked) look like that model.

EDIT 2
I would like an actual 3D model.  I couldn't get the voxel texturing to work.  Blender didn't seem to like the fact that there was color.  Below is an example of one of the slices:

Things I've tried/ruled out:

Voxel texturing of an object (I'd like it to be a 3D model, I also couldn't figure out how to color this)
Surface modeling (this doesn't preserve internal structure (duh) but also doesn't preserve color)
Import images as planes (this was suggested to me and I couldn't get it to work, although it seemed like this was not the result I'm looking for either)

The help is appreciated.  I'm open to doing any and all scripting; I'm comfortable with Python and image processing but not so much with Blender.

The answer depends if you want a surface model or just render out the volume (you tagged your question with modeling). You could use volume rendering with the voxel data set to Image Sequence. If you want a surface model and you got an outline of a model (maybe Black/White line drawing) you could trace the images as curves in Inkscape and use bsurfaces to build the mesh. Can clarify this in your question? How does the image data look like?

Does the additional detail I added to the question help?

I guess without a bit of scripting the outcome is not what you want. If you are going for a surface model the texturing will be the tricky part. As for voxel visualisation this might be helpful (just mute the audio).

Do you mind adding a sentence to your question to clarify if you want an actual 3D object generated or if you want to use volume texturing as in the video posted by user2859.

I added clarification and an example slice.  Thank you all for your help so far.  The voxel visualization worked somewhat, but I don't think that I'd be able to work with the data like that as a 3D model.

Perhaps one way to script this might be to: (1) read in the whole stack of images (if you have Pillow and SciPy installed, you can use scipy.misc.imread()), then put into a 3D NumPy array. (2) Loop through the array, and at each voxel, if it's zero, skip it; if it's non-zero, create a 1x1x1 cube with Vertex Colors matching the value of the array. (3) Use the union modifier to connect all these cubes into one mesh. (4)[optional] Loop through each vertex enforcing that it have only 1 color.

That sounds fairly easy to implement programmatically. I think the difficult part for me will be getting the script to work with blender. I'll also look this up on my own, but do you know of any good place to look to learn to script in blender?

You can definitely render a 3D voxel dataset using the built-in tools of Blender. As seen in the example below:
The basic workflow using the Blender Internal engine:

Create a Cube that's the same dimension as your voxel data ( image resolution x Voxal size , the important thing is to preserve the dimension ratios )
Create a volume material and texture for the cube.
Load in the density data as image sequence or 8bit raw data ( tested .img and .rawb formats ).
Adjust all resolution parameters ( set it to the resolution of the image you should have this information , incorrect resolution will result in distorted/cropped or even no visible result )
setup the texture to affect Density and Emissions.
Tweak color map and material properties until the data is shown nicely.

The material and texture setup :

the render result :

Using the color ramp, you can even remap the density to different colors.

The first tool most physicists and medical imaging experts would reach for is VTK.  It's made just for this sort of thing.    Some example code:
ITK wiki page archive on the Wayback Machine as it appeared 2014-11-17
But what about doing stuff like that in Blender?  The rule seems to be: just think of it, and someone out there has made a .py script already.  In this case, it's VTKBlender.py which converts between VTK's idea of a mesh and Blender's idea of a mesh. University of Alberta page archive of the Wayback Machine as it appeared 2015-02-03
Note that this is a few years old, but that's normal in the science world.   VTK can be used easily in Python, so you can write your own scripts to perform any other VTK actions such as melding 2D slices into a 3D VTK mesh.
Another approach is to make a mesh from a point cloud. A point cloud could be defined from the 2D slices.  Read this discussion on the OpenCV Q&A forum
OpenCV forum archive on the Wayback Machine as it appeared 2014-10-17

The links and the content behind them were broken. Please note that the content is severly outdated by now and you should check for more recent information on VTK and OpenCV if you want to use them.

some simple solution:
make a 3d object that consists of many layers,and texture each layer with the image at that z coordinate.
I would therefore suggest to read how .obj format works and generate an obj with that properties using your python skills.
(obj is non-binary and therefore easy to generate)
if there are enough layers, one would not see the difference, but it may be tough to render.
(actually, some minecraft like game uses this technique to allow items with any shape given by a 2d texture having a thikness)

I am happy for your effort to supply additional information to an old post, but unfortunately this not an answer, but the premise of the question. This exact method is given just above the first image in the question. Sprite maybe helpful in many game Situations, but the question clearly rules them out: "Import images as planes [is not what I was looking for]", "I would like an actual 3D model".

I would like an actual 3D model - what is, why are many 2d planes no actual 3d model? (comparing to other solution using point ammount : both can be rendered by any 3d engine, both has the difficulty that the surface has no proper normals.)

I would classify a number of planes as a 3D model as well. But stacking images sounded like not an option to the asker: "Import images as planes ([...]it seemed like this was not the result I'm looking for either)".


text:
Install latest Blender to Debian
I don't know how/where to put the files for Blender. From the repositories the only version available is 2.63, but I want 2.69 of Blender. Downloading the files straight from blender.org gives me an executable program, but how do I place it on the machine as if it were installed through the repositories via apt-get?
Such as shortcuts and everything.
Thanks

you can open it with the gdebi package manager and that will install it for you. This is how I did it on ubuntu

@Vader, doesn't GDebi require a .deb file?  If so, where did you get one for an updated version of Blender?

@Garrett I am not sure, which is why I left it as a comment. I just realized it comes as an executable not as .deb.

This question appears to be off-topic because it is about Ubuntu rather than Blender. It could be any application that you would like to manually install.

@Gunslinger it is actually about Debian ~

@Mateo close enough. The install instructions are the same for both.

@Vader Sure, but we had people wanting to migrate this to Ask Ubuntu, and would be off topic there.

@Mateo if you change all debians to ubuntu this could work on ask ubuntu

With that logic this question could be about OSX since they compile apps as a single executable like this.. Anyway I have found a similar question on U&L http://unix.stackexchange.com/questions/22891/where-is-a-good-place-to-put-applications-that-come-pre-compiled

It's about the OS, not blender. Whether or not it's ubuntu or debian might be important in the overall problem, but either way it's off-topic here.

On Ubuntu, there's a PPA, so you can run the commands in the terminal
sudo add-apt-repository ppa:irie/blender
sudo apt-get update
sudo apt-get install blender

and you'll have one of the latest builds of Blender (read more here or visit the PPA's website here).  WARNING: This won't be the official stable release, but the most recent version of Blender as of a few days ago.
As for Debian, I believe that Ubuntu PPAs can be used on Debian too.  It seems like a bit of work, so hopefully someone else has a better solution.

are there the build from graphicall? are these nightly builds or stable?

This doesn't give you the official 2.69 release.  I just tested it and I got build f1a0278 which is from 2 days ago.  I edited my answer.

Backporting 2.69 from Debian unstable to Debian wheezy should be straightforward. See
How can I install more recent versions of software than what Debian provides?. This would also have the highest probability of working well on your system.
Installing binaries from other distributions does not work well in general, and exhibits a closed-source mentality.
Current versions in Debian include:
# apt-cache policy blender
blender:
  Installed: (none)
  Candidate: 2.63a-1
  Version table:
     2.69-4+b1 0
         50 http://debian.lcs.mit.edu/debian/ unstable/main amd64 Packages
     2.69-3 0
         50 http://debian.lcs.mit.edu/debian/ testing/main amd64 Packages
     2.63a-1 0
        500 http://debian.lcs.mit.edu/debian/ wheezy/main amd64 Packages
     2.49.2~dfsg-2+b2 0
        500 http://debian.lcs.mit.edu/debian/ squeeze/main amd64 Packages

If you want more details, please ask.