bpy ray_cast doesn't find intersection from camera position to object position I am currently trying to discover if any background object is in front of my foreground object (obj.name = 'Mhx2test') with blenderpython. To do this, I use the ray_cast method. So what I do is sending a ray from the camera directed to the foreground model what should return a position I can compare with the position of the foreground model to determine if the first intersection was with the foreground model or any other background model. I built a very basic scene with a Cube being between the camera and the foreground object:

So the camera view shows that blue cube in front ob the foreground model. Sending a ray towards the foreground model should thus return the nearest intersection point with the cube. However when I run the following code it doesn't discover any intersection, i.e. the result is 'False'.

def detect_nearest_intersection():
    scene = bpy.context.scene
    me_tmp = bpy.data.meshes.new(name="~temp~")
    obj_tmp = bpy.data.objects.new(name=me_tmp.name, object_data=me_tmp)
    scene.objects.link(obj_tmp)
    scene.update()
    ray_cast = obj_tmp.ray_cast
    camera = bpy.context.scene.camera
    mod = bpy.data.objects['Mhx2test']
    direction = mod.location - camera.location;
    direction.normalize()
    result, location, normal, index = ray_cast(camera.location,direction)
    print("Raycast from %s to %s" % (camera.location, mod.location))
    print("Result: %s, location: %s, normal: %s, index: %s" % (result,location,normal,index))

Here is the output of the result:

Result: False, location: <Vector (0.0000, 0.0000, 0.0000)>, normal: <Vector (0.0000, 0.0000, 0.0000)>, index: -1

The ray_cast documentation from here:

  ray_cast(origin, direction, distance=1.70141e+38) Cast a ray onto in
  object space Parameters:   distance (float in [0, inf], (optional)) –
  Maximum distance Return (result, location, normal, index): result,
  boolean location, The hit location of this ray cast, float array of 3
  items in [-inf, inf] normal, The face normal at the ray cast hit
  location, float array of 3 items in [-inf, inf] index, The face index,
  -1 when original data isn’t available, int in [-inf, inf]

I am using blender v2.78 (former versions implemented the ray_cast as ray_cast(start,end), v2.78 seems to use ray_cast(start,direction))

Transforming the world coordinates to local coordinates fixed it.


Cycles, animate the color on part of an object Hello I am using Cycles trying to change the color of part of an object. Specifically in this case I am trying to change the color of part of a sphere from blue to green, while the rest of the sphere remains blue.

As you can see I selected part of the sphere and when I hover my mouse over the assign button and hit the I button for keyframe I get the error in the top of "Button doesn't appear to have any property information attached"

I heard that almost any value or button can be animated in Blender. So am I doing something wrong? Is there a work around for this? Is it possible to animate multiple materials on an object in blender?

Create a new material for the part that you want to change and assign it to the section of the mesh you want to affect.

(see : Add different materials to different parts of a mesh?)

Then the color change can be done in different ways.

Then over over the color of the material, add a keyframe. Change to a different frame, change the color and add another keyframe.

A different way would be to use an RGB mix node to contol the color of your object and animate the factor value:

Or Create two different shaders with the qualities you are after, add a mix shader node and animate the way they mix.


What is an exponent texture? I'm trying to convert an SFM model to Blender and came across something called an exponent texture. Do I need this, and if so, how do I plug it into the Principled shader?

I'm not familiar with SFM, so I googled and found: https://developer.valvesoftware.com/wiki/Phong_materials , which suggests that the image you're looking at is a remapping of specular power (remapped from 0,1 to 1.0, 150.0).
Specular power is used in some engines for gloss/roughness.  A high specular power indicates high gloss/low roughness.  Blender does not use specular power to control gloss in any of its shaders, in either Eevee or Cycles, and specular power does not map linearly (or in any particular way, really) to Blender's various roughness models.
If you wanted to use this perfectly, it would require a separate render layer for every light, where you computed the specular highlight in compositing from raw values.  (Basically, specular = specColor * lightColor * clamp(dot(normal, (light+view)/2))^SP.  Which is then added to a no-specular version.)  This is tedious and doesn't lead to great looking output anyways.
If you wanted to use this in some fashion, you would use a remapped version of this and plug it into any roughness inputs your shaders use.  Like I said, there's not really any mathematically correct way to do this, so you'd be doing it by eye.  Main thing is to realize that a high SP corresponds to a low roughness and vice versa.
Note, that link suggests that different channels may or may not be used in SFM.  The above should be correct for a grayscale exponent texture, which should be the norm.  Technically, it is the red channel that is used as the exponent, while the green channel sounds like its used to tint the specular.  The link does not give any more info on how the green channel is used, other than suggesting it is rarely used and not compatible with all SFM branches.


Removing material from project Despite several answers to this same question, I have been unable to successfully remove a material from the materials list in my projects. Following answers in other questions, I have gone to the Properties section and opened the materials tab, then selected the material I want to remove, then clicked the X button next to the list to unlink. I've also tried this with a shift click to set the users to zero. After a save and reload, the material is still in the list.

Since I believe I've followed the instructions in multiple answers to the letter, I am forced to conclude that there is something different about my project. The material is a direct linked library datablock. Perhaps this is the cause? If so, I'm guessing I need to remove the link between the external file and this project.

Another answer suggested to click the make local button next to the list, but this seems to create a local copy of the material, while the original remains linked. The local copy can be removed following the standard methods, however.

To remove a material from your file, go to the materials tab and shift+Click the × next to the material.

The material will be set to 0 uses. Consequently, saving your project, closing and reopening it will remove it from the list of available materials.


Blender 2.8 Texture Painting weird brush behaivior I finished modelling my mesh and wanted to start texture painting it. However there is an issue i cant figure out. I want to draw solid lines, but the lines i draw are kinda noisy, like its from a spray can.

However, when i draw in the image editor instead of directly to the mesh, the lines are solid and it works.

I want to draw directly to the mesh and still want the line to be solid.

I opened a new fresh blender project and started texture painting and it worked there. Compared the painting settings, but couldnt find any differences. I do not use a texture as brush, already checked that.

Edit:
Found out, that when i turn off Symmetrie the lines are solid again.

I found a workaround for this issue. While playing around with some settings i figured out that this is only when i activate symmetrie. However if i turn of the symmetrie, the lines are solid again.

Now the workaround is to draw like that with symmetrie on, so you have your drawing applied and its mirrored even with the weird brush and then you turn off symmetrie, increase the radius of the brush a little bit and draw on top of the weird lines. Its a bit extra work, but the best solution i found so far.


Find angles between list of sorted vertices using vertex.co.angle() I am trying to use the technique described here Python: Calculate angle between vertices to determine the angles between a list of vertices that is sorted left to right on the x axis
        mylen2 = len(vertices)

        if(mylen2 > 1):
            a1 = vertices[mylen2-1].co.angle(vertices[mylen2-2].co)

            if a1 > pi * 0.5:
                a1 = pi - a1
            print("{:.2f} degrees".format(degrees(a1)))

My output looks like this:

but my vertices are like this:

I can't imagine these angles are all less than 10 degrees especially since many appear to be on a 45 degree angle.
How can I correctly find the angles for a list of vertices in degrees?

Vert co as a vector is from origin point.

Diagram where the red ico is the origin of a mesh and the other icos are the vertices.
Question code is calculating the angle designated as alpha above between the vectors defined by the  two vertex coordinates.
It appears you are after (beta) the angle between the vector made from two verts
vec = verts[i].co - verts[i - 1].co

and the x axis Vector((1, 0, 0)).angle(vec) or if the points do not all lie on same XZ plane, the projection of vec onto the XY plane containing point    verts[i - 1].co.
Example from python console, consider vec = Vector((1, 1, 1))  ie this is the result when subtracting i-1th vert from ith. Meaning if you travel (1, 1, 1) from vert[i-1] you will be at the location of vert[i]
>>> vec = Vector((1, 1, 1))
>>> x_axis = Vector((1, 0, 0))

Angle between 3d vectors
>>> degrees(x_axis.angle(vec))
54.735612876297274

To project as 2d vectors onto Y=constant plane, can get the signed angle between the 2d vectors ignoring y.
>>> degrees(x_axis.xz.angle_signed(vec.xz))
-45.00000125223908


Set 3D cursor button randomly set to LMB in Edit Mode Blender 2.8 randomly sets the LMB to set the 3D cursor in Edit Mode despite the keymap settings stating that is it LMB. The LMB is selecting in Object Mode but not in Edit Mode.

It does this in only one project. Other projects still use the LMB for selecting in Edit Mode.

I've tried to reset the factory setting via File -> Default -> Load Factory Settings. I've tried Preferences -> Load Factory Preferences. I've restarted Blender. Like it was suggested in this question.

But nothing works. It's like I accidentally pressed a button combination to set it like this. Does anybody know what I can do the make selecting in Edit Mode the LMB again?

Press the cursor icon in the left toolbar (you can call it by pressing T)
(as pointed out by @FFelller)


How to select different bones while in weight paint mode? I seem to remember being able to select different bones of a rig while in weight paint mode.

However, now when I try to do this I end up selecting a face (used for masking) instead of the bone:

How did I change this and how can I select bones while in weight paint mode?

Upon further investigation this face selection is used for masking, and bones can be selected with ⎈ Ctrl RMB.

However, I can't figure out where this behavior came from.. I've tested it in blender 2.69 through 2.73, and in every version blender defaults to selecting bones with plain  RMB and there seems to be no way to select or enable selection of faces while in weight paint mode. I couldn't find any settings regarding masking while in weight paint either.

So the real question is: What did I enable to allow this face selection masking feature?

Although the officially-suggested workflow is to select face mask by switching to Edit mode (since more powerful selection tools there), you can also quickly select faces or verts for masking In Weight Paint mode by toggling the two  buttons located on the headerbar, or simply press M or V to toggle them on/off.


Texture showing up in render preview, but not in final render Recenty, I was making a plasma-like forcefield, and I found this material, which is almost what I wanted. So I copied the node setup, and I tried a test render, but it looked nothing like the render preview.

Render preview with correct material:

Final render, but the material is wrong:

I am using Cycles BTW.

Strange things happen here, I suppose this is buried somewhere in Color Management or somehow the way Alpha is treated. If you turn off 'Transparent' in the 'Film' Section, the renders become identical.

left: Viewport Render, right: Final Render, with Transparent turned off

The thing is that the ViewPort Render seems to Comp the Alpha against a different Color Value than the Final Render. If you render the image with Transparent Background, and Comp it using an Alpha Over node, you get these results here:

The Split Viewer Node shows you (with a percentage slider) in this setup the raw render on the left, the comped image on the right. The darker you make the background, the more you see the texture. If the background becomes white, the texture disappears. So I have the suspicion the Render View node comps the Alpha values against white background, the Preview render against the checkerboard background.

See these tests of the very same render for comparison:


Creating sharp edge between smooth mesh surfaces I want to create a sharp edge between two smooth mesh surfaces. The upper surface has already been smoothed out nicely, merely using the Shading/UVs > Smooth Face function in the Tool Box (top left of picture), after selecting all its faces. However, when I do the same thing in the lower surface, the common edge between the two surfaces (= top edge of selected faces in picture) is also smoothed out (the picture is before that operation), which I don't want. I tried Shading/UVs => Smooth Edge=> Sharp, but that does not work. I don't want to use a modifier (because I want to control things intra object).

In Edit Mode, select the edges that you want to sharpen, and press V, then right click to exit transform, this will split the edges and create a crease edge. If you want to combine them later, you can simply select the vertices in Edit Mode with Ctrl+V and select (Remove Doubles).


Determine if fcurves cannot be evaluated from Python I'm trying to detect fcurves that are "errors" (the ones with the red underlines):

I've tried code like this:
import bpy

valid = 0
invalid = 0

for action in bpy.data.actions:
    for f in action.fcurves:
        if f.is_valid:
            valid += 1
        else:
            invalid += 1

print(valid)
print(invalid)

However, certain fcurves that are invalid are only registered as "invalid" in this code if I open an action from the GUI and it goes ahead and evaluates them to determine that they're errors.
How can I detect these from my code without needing to manipulate the GUI so I can process these fcurves?

ID.path_resolve
Probably not the loop to use (action in bpy.data.actions) Need to know for what object(s) the action is for. For example all pose bone fcurves will be invalid for the Cube. If the object is an armature it will require the named pose bone.
Similarly to
Evaluate FCurve without keyframes won't work
can use Object.path_resolve(FCurve.data_path) in a try / except clause to search for what will be seen as invalid fcurves.
Have left out the "obvious" test of looking to see which action is assigned to objects animation data
Is the object that is associated with an action selected?
action is ob.animation_data.action

or searching for it in the Strips of NLA Tracks. Something like
any(s.action is action for t in ob.animation_data.nla_tracks for s in t.strips)

Also look at the Action.id_root which is set when adding a new action to a particular data type using the UI.  No suitably rooted paths error when trying to set action on object
Test script, checks all actions against all objects, meshes, shape keys and materials and counts the fcurves  valid for each.
import bpy
from itertools import product
context = bpy.context
prev = None
for action, ob in product(
        bpy.data.actions,
        sum(
                (
                bpy.data.objects[:],
                bpy.data.meshes[:],
                bpy.data.materials[:],
                bpy.data.shape_keys[:],
                ),
                []
            )
        ):
    if action is not prev:
        print("-" * 44)
        print(f"Action : {action.name}")
        n = len(action.fcurves)
        print()
        print(f"\tID {action.id_root}")
        print(f"\tFcurves : {n}")
        prev = action
    def is_valid(fc):

        try:
            ob.path_resolve(fc.data_path)
            return 1
        except:
            return 0
    v = sum(is_valid(fc) for fc in action.fcurves)
    print(f"\t{ob.bl_rna.identifier} : {ob.name}  Valid : {v} ({100 * v / n}%)")
print()

Test run, quickly added some keyframes to some objects, a mesh, an armature object a material and a shape key.  The "CubeAction" on the cube action was LocRotScale, which will be valid on any object.
--------------------------------------------
Action : ArmatureAction

    ID OBJECT
    Fcurves : 10
    Object : Armature  Valid : 10 (100.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : CameraAction

    ID OBJECT
    Fcurves : 3
    Object : Armature  Valid : 3 (100.0%)
    Object : Camera  Valid : 3 (100.0%)
    Object : Cube  Valid : 3 (100.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : CubeAction

    ID OBJECT
    Fcurves : 6
    Object : Armature  Valid : 6 (100.0%)
    Object : Camera  Valid : 6 (100.0%)
    Object : Cube  Valid : 6 (100.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : CubeAction.001

    ID MESH
    Fcurves : 1
    Object : Armature  Valid : 0 (0.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 1 (100.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : KeyAction

    ID KEY
    Fcurves : 1
    Object : Armature  Valid : 0 (0.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 1 (100.0%)
--------------------------------------------
Action : MaterialAction

    ID MATERIAL
    Fcurves : 2
    Object : Armature  Valid : 0 (0.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 2 (100.0%)
    Key : Key  Valid : 0 (0.0%)


How to merge intersection of an object with itself? While trying to create this simple pattern,I encounter a problem and don't know how to solve it.

I want to use it to create a phone case and need to do Boolean operation on it. but because i created it with an array operator and because the cylinders are not correctly merged together, a Boolean either does unexpected result or refuse to execute.
Here is a picture of what I am pretty sure is the problem, but eventhough I spent hours on different forums, i couldn't find anyone that had exactly this problem...

How can I merge all the cylinders together ? i already removed doubles, recalculate normals, and a few other things.

thanks in advance for your help !

Per the comments, a watertight mesh can be generated using Boolean operations as long as each of the tori in the model are watertight.

Steps:

1) Start with the mesh with all of the tori. This example was formed by adding a single torus, then using array modifier and applying the modifiers. If you look closely, all of the tori are in a single mesh, but not connected.

2) Add a cube that encloses the tori mesh.

3) Apply a Boolean modifier to the tori mesh. Change the solver to 'carve'. Click apply.

The resulting mesh is watertight and has clean meshes.

Blend file prior to applying the Boolean operation -

To make the tori a pattern on a solid backing, a union Boolean operation can be used to join these tori to the solid backing.


How to pan around the shader editor on a mac? I just opened Blender and I opened the shader editor for the first time. I wanted to read the properties of the node which is there, but I can not since it falls outside the view. I hold my middle mouse button to pan, but that made it only zoom in/out.
How can I pan my view in the shader editor?

In Blender 2.92 go to Preferences Keymap View2D Pan View:


Sculpt brushes not functioning properly I'm a total newb to Blender, so I don't know if this is a simple problem, but I'm following a tutorial and am currently learning how to use the sculpt tools. However, while the tutorial is showing very smooth and predictable results, my brushes aren't reacting the same way. I've tried several brushes, and most of them are producing a similar result. The flatten brush is only flattening along the sides, but it's not making a stroke like it seems like it's supposed to. All the other brushes are malfunctioning as well. Sculpt/draw, crease, and Nudge make similar strokes, nothing at all like their example images, and nothing at all like I've seen they're supposed to.

I have smoothening on, dyntopo is on, all of my modifiers are applied, so there are no actives ones. I tried applying the scale of my object, and the scale, but none of those solutions have solved the problem. I've searched in all of the forums I could find and still haven't found anything. Any help would be greatly appreciated!

The tutorial I'm following:

My results trying the same:

Just figured it out. I had to apply the modifiers to my object.


About Blender logo in my Youtube video I am making videos on Youtube about products I made by Blender. I don't know that is it ok if I put the Blender logo on my video's cover image. Is it copyright?

This is not a question about using Blender, licensing and legal matters are considered off topic here, we are not lawyers and cannot be liable for answers given here.
Since there is an official document about it online in the Blender official website, where you can find the recommended Blender logo usage guidelines, I will just quote it verbatim.

Blender logo usage guidelines
Blender is a registered trademark (®) of the Blender Foundation in EU
and USA. The Blender logo itself is a property of the Blender
Foundation. The logo and the brand name “Blender” are not part of the
GNU GPL, and can only be used commercially by the Blender Foundation
on products, websites, and publications.
Under the following conditions, third parties may use the Blender logo
as well:

The logo can only be used to point to the product Blender. When used with a link on a web page, it should point to the URL
blender.org.

You will visualize and promote your own branding more prominent than you use the Blender logo. The Blender logo only can be used as a
secondary brand, which means it has to be clear for an average viewer
that this is not an official Blender or Blender Foundation website,
publication or product.

You can use the Blender logo on promotion products, such as T-shirts or caps or trade show booths, provided it is a secondary
brand as described in point 2.

The logo is used unaltered, without fancy enhancements, in original colors, original typography, and always complete (logo + text
blender).

In case you use the logo on products you sell commercially, you always have to contact us with a picture of how it will be used, and
ask for explicit permission.

If you have further questions or doubts, do not hesitate to contact
us.

In short you can use it as long as you don't make it look like your product is made by the Blender Foundation, nor that you are somehow endorsed by or officially associated with it.


Selecting a Material Texture by Name Is there a simple script I can use to select a Material texture by name? I have many textures, each ending with a new suffix Texture.001, Texture.002 etc..
I am using a Cloud Texture. I may want to select Texture.002
Below is a photo. Essentially I would like to select Texture.002 with python script. With the object being select, linking the Texture.002 to the object.

If you click that same spot - its easy to miss because its at the bottom but there is a search box there that you can type text into to get your texture.


How can avoid spheres interesecting? I have an animation of objects running along a spline and they vary their scale following a sine pattern. The thing is that the spheres sometimes overlap. I have made a loop which contains another loop in order to detect distance minus the estimated radius to scale down or up depending on the space between. However I have failed miserably.

I know this require to reassign loops but I think I haven´t done it in a proper way. Objects are always scaled down.

The easiest way to avoid intersection is by using Close packing Node. Which is available on Animation Nodes + Extra Nodes build.


blender 2.8 - array modifier doesn't follow curve I want to build a simple race track. I have created a closed bezier curve. Then I have added a plane object with curve modifier. When I try to apply array modifier planes don't follow a curve. What is wrong ?

You need to put the Curve modifier below the Array modifier


How to batch rename embedded (linked) textures in a scene? is there a way to batch rename all textures that are used by the all objects in a given scene? Background of this question is as follows:

I'm creating a set of models that all will be textured (diff, roughness, normal), and all textures will be of 4k size.
After creation, i want to have a copy of the 4K textures in 2k size. Therefore, i export all textures by using "File" --> "External data" --> "Unpack all into files". Then, i use irfan view to batch resize and rename all textures, giving them the suffix "_2k". But when i re-link the files, the file connection in the shader nodes is lost. They need to be re-linked manually. Doing this manually is ok for a small amount of textures, but this time i will have about 100 textures.

So, how can i achieve to rename all textures without loosing the connection to the shader nodes? Some advice will be very helpful.

Thank you in advance!

This question was answered at blenderartists. See the solution with a phyton script here:

https://blenderartists.org/forum/showthread.php?441069-How-to-batch-rename-embedded-(linked)-textures-in-a-scene

Thanks to the users Photox and MartinZ for help!


Eevee: First animation frame renders black & white until something in the scene updates Complex animation sequence, 1000 frames with linked libraries.
Eevee render engine.

Behaviour N°1:
I open the .blend file and hit Render Animation; first frame, and only the first frame, renders black & white; all remaining frames render correctly.

Behaviour N°2:
I set the viewport to render view. Render view turns out black & white as previous case. Now check this out:

If I hide/disable in viewport the sun (only light source in my scene) and then I unhide it/enable it in viewport, the scene renders correctly.
With viewport still in render mode, I move one frame forward and then one frame backward: previously b&w scene now renders correctly.

Behaviour N°3:
You hit render single frame (F12). Frame turns out B&W as previously mentioned. Hit render again (Don't update nothing): frame turns out B&W; same behaviour.

With "black & white" I mean all the opaque pixels render 255,255,255; all the alpha pixels render as 0,0,0 with alpha zero.

With "first frame" I mean first frame RENDERED, not the start frame of the animation. I.E: You save the file with the timeline set at the frame #666, reopen file, hit render, frame #666 renders B&W, frame #667 renders correctly

FYI, I uploaded my file to a render farm and I STILL GET THE SAME RESULT! This gives the tip that it is not hardware related.

It's like you have to manually update the scene so that Blender uses the sun lamp.
I'm on the dark here guys. I'm really thinking on submitting a bug report

Make sure you're looking at the good rendered channel or pass.

If it is not set to "Color and alpha" or "color", you'll see a B&W channel.
What you describe looks like the alpha channel.
It could also be something in the compositing.

Else it's probably a bug.


How can I turn a mesh inside out I have a mesh with bottle threads on the outside.  Now I would like to make / invert the threads so they appear on the inside to create the cap.   I tried using the boolean modifier and difference with another shape but it doesn't create the threads on the inside (it creates the difference of the threads, a gap).  How can I do this with Blender?  I'm also willing to do this mathematically if needed.
What I have.

I would like the threads to look like the image below.

If I scale it by -1 the threads aren't created on the inside. See image below.

Just to illustrate @batFINGER's comment.
You can flip the profile by scaling it by -1.

Select the profile
Set pivot point to one of the vertices through Pivot point > Active element
Scale it along X axis by -1


How to make 360° renders for Virtual Reality devices (ie Oculus, etc) using Blender? I'm trying to figure out how to make 360-degree panoramic renders for virtual reality content? I'm trying to make the content to the specs of HoneyVR to submit something to their VR program but they are asking for the content in "equirectangular project" at 2:1 aspect ratio and I'm a bit loss.

I'm using Blender / Cycles but I can use other renderers too.  Any help or tutorials much appreciated!

Here is the link to the HoneyVR file specifications which shows the needed aspect ratios, resolutions, etc.  Is it possible with Blender?

http://www.honeyvr.com/content-specs/

With Cycles you can set your Camera to Panoramic and Equirectangular

Make sure you have recent Blender builds. Also see the Blender manual docs for Camera


Background Video is shown in Rendered mode but not when szene is rendered i have a 3D Object and want to add a background image( if possible even a movie) to this 3D Object. I use Cycles to render and tried a plane with the
image as texture. When i go into render mode, it looks like this(picture with background) and when rendered, it has no background. The key also looks into
a different direction.

Should i even use Cycles for this or use motion tracking? i tried to use that but had several problems.

http://imgur.com/a/Wk1VN

Rendered mode

When scene is rendered

Try any of these node setups in the compositor:

Movie as background:

Image as background:

Source:
cycles not rendering movie clip used as background


Blender always selects the shortest path when selecting vertices how do I turn this off? When I select vertices blender selects the vertices connecting the desired vertices as well. I also notices it states: "Pick shortest path" in the bottem left. I'm quite new to blender and haven't found anything online about this. I hope you guys can help me out.

By default, Blender's behavior will pick the shortest path (eg. everything between point "A" THRU "Z") if you hold the Ctrl key on your next selection.

If you use Shift instead, then it will just append the selected item to the set of items selected (eg. Just point "A" & "Z").


IK on legs works only after you rotate a bone in the IK chain I've been having this problem for a while. So I have a rig for a robot I am doing and the arm IKs are working as expected.
But when I move the leg IKs the IK isn't working.

The first half of the image is the original position of the IK target.
But when I rotate slightly a bone in the IK chain it works properly.

Here is the blend file with the rig:
https://www.dropbox.com/s/6zrcv0caqeh8pmd/rigg.blend?dl=0

I've been trying to figure out the problem for a while but I can't solve it. I don't even know how to google it, couldn't find anything.

A pole target might solve it but I can't use it since as far as I can see I won't be able to limit the rotation of the IK bones.

First of all, if you don't want to add a pole bone (and I didn't understand why) in edit mode you can slightly move forward (Y axis) the knee bone: in this way the IK solver will try the front movement as first solution.

In a IK chain, limits should be set in the properties panel, bones, Inverse Kinematics tab, instead of bones constraints (this has to be done for every bone of the chain).

In your file all thoose values are wrong: I don't know which kind of constraint you need but I suggest you to remove all constraint and readd them one by one (the red line shows the allowed movement of every bone).


There is no bump in Cycles For some reason, the bump of bread only works in eevee, in cycles only displacment works. In other projects displacment works normally. I use procedural texture

I think it goes like this:
If you set the Cycles settings of a material to 'Displacement' only, then EEVEE, not supporting Displacement shading,  will substitute Bump mapping for any Displacement input to the Material Output node, to make the Cycles and EEVEE renders to look as similar as possible.
Cycles can't depend on that substitution - if you want a normal or bump-map in Cycles, you have to ask for one explicitly:

Not necessarily in Object space, but you get the idea..


Post-processing Lightsabers in Blender I've been studying JamesVillanueva's lightsabers for a while now, and have tried to recreate the effects in Blender.  The trouble I'm having is with the blade in the compositor.  Keep in mind that I'm also trying to animate it.

First off, this is the lightsaber I've created with help from Williamson's lightsaber tutorial.  Obviously the color of the glow needs a little more work to be accurate, but that's not what I'm worrying about at the moment.  This is also rendered in Blender Internal, but I'm going to switch to Cycles when I got everything prepared.  The blade model is totally transparent, but its index is fed into the ID mask node.

I'm using two versions of Blender's Gaussian glow.  The glow it creates is, unfortunately, omnidirectional.  This is different than the glows Villanueva puts on his, where the white core continues into the saber emitter.  Also, unlike his, my glow flows over and obscures part of the emitter.  This also means that if prongs were placed on the emitter and closer to the camera than the blade, the glow would engulf them.  What I'm looking for is something like this:

(source: James Villanua)

Where the parts of the model that are closer aren't affected by the glow, while those that are farther are.

Second, I'm trying to improve on Villanueva's method by having the glow applied to the reflection as well.  A method to have the glow applied to the blade if it's covered partly by glass would be nice, too.

Anyway, help is appreciated for any of these questions.  If there is a different way of going about this and getting the glow, like with Cycles materials, I'd be happy to know.

Here is what I came up with:

Adding a glow without affecting close parts of the handle:

The handle mesh is on scene layer 6
The  blade and other objects are on scene layer 1

Create a material for the blade:

Enable Transparent in Render settings > Film:

Create two renderlayers, one for the handle and one for the blade:

By setting the handle layer to be masked by the blade, we get the glow to be added behind the nearer parts of the handle.
Enable the Object index pass for the blade renderlayer, and set the Pass index of the blade to 1 in Properties > Object > Relations.
Composite nodes: (click for full size)

Result:

Reflections and refractions:

Technique one:

Without and with reflections and refractions blurred: (click for full size)

Limitations:

Reflections of reflections of the blade will not have glow applied. (likewise for refractions)
The glow on reflections and refractions will be applied on top of reflections/refractions of the handle.

Here is a Blendfile for you to inspect.

Technique two:

All objects except for the handle and the blade are visible on layer one
Refractive or reflective objects are visible on layer 7 as well as layer 1
Objects that are not refractive or reflective are visible on layer 3 as well as layer 1
The blade is on layer 2
The handle is on layer 6

Enable Transparent in Render settings > Film:

Create four renderlayers: (click for full size)

Composite nodes: (click for full size)

Here is a blend for technique two

Advantages:

Applies glow to inter reflections/refractions

Limitations:

Materials that are both reflective/refractive and something else (e.g. diffuse) will be blurred. The only way to really solve this with compositing is to put each partially diffuse/reflective object on its own renderlayer.

You could fix this particular example by adding separate materials for the glossy/diffuse aspects of the shader and separating with the Material index pass.
The glow on reflections and refractions will be applied on top of reflections/refractions of the handle.

You could fix this by adding another renderlayer, but this will use up more render time and it may not be worth it for such a small detail.


smooth vertex problems i am modeling a bottle, on the flip top cap i have to add this little straight space this is where you put your finger to open the cap,
well when i added these loop cuts, appears like if i moved it a little bit but i didn't move it,
please can you help me, thanks in advance.

The simplest solution is to slide your vertices along their edges with G G so that you unsharp all these edges:


How to get a plane to emit an object in a fluid simulation? I have a question about making a plane emit an object as a particle.
So I am making this scene where balloons are going to fly through a subway corridor and I am trying to make the particles come out of a plane but when I bake the simulation, nothing comes out of it.

Here is the .blend file so you can take a look at it.

you might want to use a particle simulation or something like that, because fluid simulations look good as mesh but as particles that have objects they usually don't look very good.
in order to get the collisions to work you might want to get the molecular script addon and learn how to use it.
https://www.youtube.com/watch?v=iLDCr9734r8
this is a video that explains how to make a bunch of balls but if in the particle settings you set gravity to negative and the corridor to a collider you can get it to look like balloons


View clip an object permanently I want to clip an object with view clipping as a solution to this svg export problem, but when I render the view clipped object as an svg, I still get the unclipped version of the svg. So I was wondering if there's a way to permanently view clip the object, and maybe create a new scene with just that clipped object that I can then render.

I think the best solution is to go in edit mode of the path. select the part that you only want to show, and separate it into its own object by pressing [P]

Alternatively you can try to use a Boolean modifier with intersect to non destructively cut down an object.

you might also try using culling with objects during render time: Culling Objects Using a Culling Object


Painting multiple objects I am pretty new to Blender. I am using 2.8. I have a simple design with two cubes, in a parent object relationship. I UV unwrapped them both, and painted the UV image in GIMP, reloaded to Blender, and try to see the results of both objects in blender. To my surprise, I can see (in Texture Paint) the result of each object, one at a time, but not both together, in despite of doing "select all" in the Object window. I don't know if I am missing something, or this can not just be achieved, or how can be achieved. Can anyone help, please?

The first thing to understand is that Texture Paint mode only paints on one mesh at a time.  Even if you select multiple objects, only the active (i.e., normally the last selected) object will be set up for painting.

The second thing to understand is that Texture Paint mode will only render the active object (the one you're painting on) with the texture that you currently have selected for painting, and other objects in the scene will be rendered according to the current Viewport Shading mode (set by Z).  If the Viewport Shading mode is "Solid", then the object being painted will show the texture, but other objects will have the usual boring gray shading.  For example, here I'm painting on the cube on the right, and the cube on the left is rendered using the "Solid" setting:

However, if you switch Viewport Shading to "Material Preview" or "Rendered" AND if the materials for the objects are properly set up to render the texture (e.g., you have a Principled BSDF whose Base Color is set to the texture), then non-active objects will show the texture, too.  Here, because the cube on the left has a proper material set up, it shows the texture, too, as soon as I switch the Viewport Shading to "Material Preview" even though I still only have the cube on the right set up for texture painting.

If you want to be able to paint on both cubes at once, you need to combine them into a single mesh.  You can do that by selecting both cubes and then hitting CtrlJ to join them together.  They'll now be one object/mesh, and you can select the combined object and paint on it in "Texture Paint" mode.  Later, you can separate them again by selecting the combined object, switching to edit mode, and using Mesh -> Separate -> By Loose Parts to break them into separate meshes.


To what degree does Blender support PTex? I remember hearing about PTex a while back, and it was really exciting. IIRC, it was briefly, or maybe experimentally added to Blender, but the latest I can see of it is an experimental build of 2.73

Are there any plans to fully implement PTex?
Were significant technical problems discovered that made it unworthy of Blender?
What else is about it?

It is still supposed to be integrated, but later than 2.78.
Nicholas Bishop is working on it.


How can I create vertical posts that follow a landscape? I'm trying to create railings that follow a landscape, something like this (side view.)

So far I've:

created a plane.
parented the "post" object to the plane.
added an array modifier to the plane.
added a curve that follows the landscape.
added a curve modifier to the plane, using that curve.
enabled duplication on faces to the plane.

That gets me a row of posts that follow the landscape, and the post meshes themselves aren't distorted by the curve, but it leaves a problem: the posts point along the normal of the curve/landscape, I need them to be vertical, so that I can add the railing passing through the top of each post.

any ideas to solve this?

When you just delete one side of your plane leaving two single Vertices behind and setting the Duplication to Verts, you'll get what you want!?


How do I get a constant Background Image? Not only in ortho: top, front, back.

Please don't link this answer How do I set a background image while I am editing?

I want a background image like this guy has ->
https://youtu.be/M-RJ6tYrPmE?t=3m31s

Go to the file --> user preferences --> add ons --> type images --> import images as planes --> check the checkbox

Then you can go to file --> import --> images as planes. Or in the 3D view SHIFT + A --> mesh --> images as plane


Light doesn't cast shadows! I have a problem. I wanted to cast shadow on a cube. So I created a new file and added plane like this. Why doesn't the point cast shadow on cube?!

You are currently in solid mode and not in the render preview. The former uses a simple shader and no path tracing is applied.

Solid Mode

Render Preview

If you press F12 or use Render > Render Image you will see that the lamp casts a shadow in the final render as well.


Texture doesn't fully cover my selected mesh I'm not sure what's going on here. The unwrapped mesh doesn't extend the full length of the face down the side of the can. Is there any way to remap this using nodes?

Thanks guys

All you need to do is add a couple of edge loops and drag them down as shown in the image below.


Smoothen, close and simply surface in very complex objects I am trying to create a model of wrist bones from a CT scan. The individual bones all have quite a number of holes and an interior structure (bone marrow) that is not relevant, but very hard to remove.
I am now trying to create a smooth surface model from it. Running the smooting modifier will create an acceptable image for most parts, but the many holes are really ugly. I would like to simply the surface (reduce the number of vertices, currently about 33,000) and close the holes.
I tried fixing the holes manually by adding faces, but this doesn't really work well. Since the surface is in continuity with the inside of the bone, finding the boundaries of the holes also does not really work.

Thanks so much for any suggestion.

Best,

Kai

The remesh modifier will simplify your mesh and remove the smaller holes and at least some of the internal mesh. You may need to apply the modifier and then manually clean up the bigger holes.

A more manual approach is to retopologize the mesh, which is a common method used to cleanup sculpts. You can use the built-in snapping tools, the bsurfaces addon that is included with blender or CGCookies retopoflow to make it easier.


Shade smooth render looks like Shade Flat View-port model has smooth shading:

Look-Dev mode looks smooth shaded:

But the Final Render has noticeable edges:

Is there a reason as to why it's like that?

Changing the color space of your normal map from sRGB to non-color in the texture node should fix your problem.


How do implement material without a texture image? I am trying to implement the material on the object, such as the picture below, without the texture image. I've looked for a function called "Bump Node" to implement the material, but I'm not yet proficient in this, so it's hard to solve the problem. Is there a way to implement a material without a texture image only in a geometry configuration? Or, there is other ways for solve this problem?

*I'm going to make translucent material. So I don't think it's right to use texture images.

+(no texture image appears on my object.)

Image texture is just a storage of information. In your case, a normal map will suit for 100% sure.

I use the polymer gun grip material for it, you can find it here

Basically you can do almost any materiel in Principled BSDF now.

You will need a normal map to fake the wavy surface. Connect that image texture to a normal map node to control strength. The connect it to Normal socket. The Transmission should be 1.0 in your case, and the main Roughness should be around 0 as well.


Renders that dont´look ok I tried several render tutorials, even using profesional textures taken from texture webs, and doing what they say, and my renders never look ok, never reflect the material I see in the properties window. Does anybody have an idea of why? I have "render cycles" on, have connected all the nodes between them, have enough light.... I´ve never managed to get a render that works yet. Thanks for the help

Try to recalculate the normals of the mesh you have applied the material onto. If that doesn't work, try inverting the normal map by making the strength of the normal map negative (-1.000)


It can't emit particles with animation node The emitter can emit particles when it's not connected to animation node. but when I connect it to the animation node with position transforming, the particles can't fly, they all are stick to the emitter object.

Anything I missed or any suggestion? thanks.

Blender's particle system integrator resets the simulation every time an unexpected change in the object's transformation happen. Try moving the object mid-simulation and you will find that the particles resets. As far as I know, to work around this, you need to bake the animation into key-frames so that Blender's know about the transformation in advance.


How can i make cloth details like this? I've been trying to create some cloth for weapons for a while now but they always end up looking really flat or weird, how can i make something like this?

Usually i try to add a plane or use the cloth simulator, but both look really bad, how can i make cloth details like this one where it's falling of the sword? Thanks in advance!

Problems like this typically occur when your cloth mass is too light.
Try to give it higher mass value, then do a simple animation that just lets the cloth fall down naturally then try to render some good middle frame that looks good.

Also, check you gave it enough subdivisions in edit mode.

And if you are doing an animation make sure you set the cloth collision and self collision and up their qualities.


Python: How to identify (by index) the edge closest to a given location? I want to find the edge index of an edge, for the purpose of performing some operation on that edge programmatically.
If I know where that edge is in a simple mesh (for example if I know its Z location will always be higher than that of the other edges), how can I use that coordinate data to get the edge index?

Following a discussion in comments, there may be a point to consider: what does distance to edge means.
My first though was: the shortest distance to any point along the edge.
But you would prefer the distance as: the distance to the center point of the edge.
So two solutions below:
shortest distance to any point along the edge
A possible way is to use a BVHTree.
This tree usually queries for faces using find_nearest.
But we are looking here for edges and in consequence we can't use it directly (nearest face does not imply nearest edge and some edges may have no linked face).
The trick is to make polygons from edges and give it to the tree using FromPolygons to build the tree.
This is done below looping over edges and make a triangle from its two vertices.
import bpy
from mathutils import Vector
from mathutils.bvhtree import BVHTree

# Get the object and its mesh
obj = bpy.context.object
mesh = obj.data
matrix = obj.matrix_world

# Get vertices locations
vertices = [matrix @ v.co for v in mesh.vertices]
# Construct polygons from edges
polygons = [(e.vertices[0], e.vertices[1], e.vertices[0]) for e in mesh.edges]

# Create a BVH Tree from it
tree = BVHTree.FromPolygons( vertices, polygons, all_triangles = True )

# Search for a location
location = Vector( (0, 1, 1) )

# Query the tree
found_location, normal, index, distance = tree.find_nearest( location )

print( index )

Building the tree has a cost and generally we use it if several searches on the same tree. But as I tested it BVH is faster than direct calculation.
So it seems to be better to use a BVH tree.
Here is the code for min distance/index from a point (just for information: don't use it):
# Min distance calculation
def search_min_dist( mesh, location ):
    min_dist = None
    min_index = None
    for index, edge in enumerate(mesh.edges):
        e1 = mesh.vertices[edge.vertices[0]].co
        e2 = mesh.vertices[edge.vertices[1]].co
        length_squared = (e1 - e2).length_squared
        if length_squared == 0.0:
            # if edge is in fact one point
            d = (location - e1).length_squared
        else:
            # parametric projection on e1 e2
            p = (location - e1).dot(e2 - e1) / length_squared
            if p > 1:
                # if above e2
                projected = e2
            elif p < 0:
                # if before e1
                projected = e1
            else:
                # in between
                projected = e1 + p * (e2-e1)
            d = (location - projected).length_squared
        if min_dist is None or d < min_dist:
            min_dist = d
            min_index = index
    return min_index, sqrt(min_dist)

the distance to the center point of the edge
We can also use two approaches: using a Blender utility or direct calculation.
I've tested both and as this is equivalent in runtime, I give here a solution using Blender mathutils class KDTree.
KDTree is to work on points/locations in order to give nearest elements.
For our problem these points are the center of the segments.
So we can:
import bpy
import time
from math import sqrt
from mathutils import Vector
from mathutils.kdtree import KDTree

def search_min_dist_kd( obj, location ):
    mesh = obj.data
    matrix = obj.matrix_world
    # Get vertices locations
    vertices = [matrix @ v.co for v in mesh.vertices]

    #Create the kd tree
    kd = KDTree(len(vertices))
    for e in mesh.edges:
        i1 = e.vertices[0]
        i2 = e.vertices[1]
        median = (vertices[i1] + vertices[i2]) / 2.0
        #populate it
        kd.insert(median, e.index)
    #initialize it
    kd.balance()

    #get closest median point
    found_location, index, distance = kd.find(location)
    return index, distance


Physics cross-simulation interactions? For example, rigid bodies and fluid. I know it's kind of possible by setting the rigid bodies as fluid obstacles, but it's not "true" interaction in that the fluid does not affect the rigid bodies...

By "true" interaction I mean where two (or more) physics systems affect each other simultaneously. For example, with rigid body and cloth, the rigid body affects the cloth but the cloth doesn't affect the rigid body (at least the way I'm doing it), so the rigid body just eventually stretches the cloth to an extreme and falls through...

Are there any ways to achieve this? (for any interaction, not just rigid bodies and fluid)

Or, if not, does anyone know whether there are any plans to implement this sort of feature?

Thanks

There is no way to do true cross-simulation between the different physics systems right now. And I do not know of any on-going project that will bring about that functionality as of this time.


Add point to path in python api Version: Blender 2.81

Using the Python API, I want to create a default path and then add individual points to it.

The code below does this. Except that it extends both the beginning and the end of the curve.

import bpy

# kill everything

bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False, confirm=False)

# create curve

bpy.ops.curve.primitive_nurbs_path_add(radius=1, enter_editmode=False, location=(0, 0, 0))

# switch to edit mode

bpy.ops.object.editmode_toggle()

# add new point for curve

bpy.ops.curve.extrude_move(CURVE_OT_extrude={"mode":'TRANSLATION'},
    TRANSFORM_OT_translate={"value":(0, 2, 0)}
    )

In the viewpoint, I can extend the END of the curve by toggling edit mode, and then doing this: double-clicking the last point, and pressing E.

I can't figure out how to use python to select this last point.

try this (I am on Blender 2.81a):

import bpy

# kill everything
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False, confirm=False)

# create curve
bpy.ops.curve.primitive_nurbs_path_add(radius=1, enter_editmode=False)
obj = bpy.context.object

# De-select all points
for pn in obj.data.splines[0].points:
    pn.select = False

# Select the last point
pn = obj.data.splines[0].points
end_point_idx = (len(obj.data.splines[0].points) - 1)
pn[end_point_idx].select = True

bpy.ops.object.mode_set(mode='EDIT') # Edit mode

bpy.ops.curve.extrude_move(CURVE_OT_extrude={"mode":'TRANSLATION'},
TRANSFORM_OT_translate={"value":(0, 2, 0)})

bpy.ops.object.mode_set(mode='OBJECT') # Object mode

(Make sure you are in object mode when you run it)


Getting bpy.ops.anim.copy_driver_button() working I am trying to copy the following driver in the Shape Keys section under Properties/Data: Look at the image below

When I right click it and go to copy driver it works, and it shows the command to be bpy.ops.anim.copy_driver_button() but if I run this command in the python shell it does not work. I know the problem has to be related to the context, so I tried to write an overrider dictionary and it is still not working:

window = bpy.context.window_manager.windows[0]
screen = window.screen
area = screen.areas[1]
region = area.regions[1]
space = area.spaces[0]
override = {'window': window, 'screen':screen, 'area':area, 'region':region, 'space_data':space}
bpy.ops.anim.copy_driver_button(override)

Now this does work if I bring up the command and I place my cursor over the purple button in the row where shape.L.000 (what I am trying to copy). If the cursor is not there it won't copy.I tried looking at the source code to see what is going on but that hasn't helped too much. Am I missing something in my override dictionary or is this doomed not to work? Any help would be greatly appreciated! Thanks

Okay this is a fairly simple solution then, I'm going to point you there instead of answer it yet, because I'm on my phone and not in front of blender (I will have to circle back around on this).

You need to get into the animation_data of your objects. This has driver, expression, and variable properties within. The big tip here is that you need to create a new variable before the expression will actually work. To get at these it's going to be something like:

bpy.data.objects["Cube"].animation_data

Here is a quick append to this answer for now to help you understand the data structure. However before you copy and apply this data to another object there is more to prepare on the "OTHER" object.

Still planning on circling back around on this to finalize this lacking part of the answer.

c1 = bpy.data.objects["C1"]
# This is the reference to my Original Cube with the Driver

dr1 = c1.animation_data.drivers
# This is the Driver collection of my Original Cube

dr1[0].data_path
# This returns 'scale'

dr1[0].expression
# This simply returns my expression 'var', because I am using a 1:1 mapping of another object's scale factor

dr1[0].driver.variables[0].name
# This returns the first (and only in this case) variable that I have named in this driver 'var'

dr1[0].driver.variables.items()[0][1].targets.items()[0][1].transform_type
# Returns 'SCALE_X'

dr1[0].driver.variables.items()[0][1].targets.items()[0][1].transform_space
# Returns 'WORLD_SPACE'

Without being able to confirm this yet, I'm going to recommend that you explore the following approach to get the copy:

For the sake of my code above, please follow my case (ultimately it should follow suit in yours).

I'm going to reference a second Cube whose name is "C2".

CONFIRMED

So for the prep on this object, before you can copy the data try:

c2 = bpy.data.object["C2"]

#If you were to create it manually -> c2.driver_add('scale', 0)
#Since you are copying do something like:

dr2_path = dr1[0].data_path
dr2_index = dr1[0].array_index
c2.driver_add(dr2_path, dr2_index)

#Now get reference to your new driver & Create a new Variable
dr2 = c2.animation_data.drivers
dr2[0].driver.variables.new()
#by default this should be 'var' if this is the 1st.
#You should now be able to copy the expression, target, etc... over from c1

dr2[0].driver.variables.items()[0][1].type = dr1[0].driver.variables.items()[0][1].type
dr2[0].driver.variables.items()[0][1].targets.items()[0][1].id = dr1[0].driver.variables.items()[0][1].targets.items()[0][1].id
dr2[0].driver.variables.items()[0][1].targets.items()[0][1].data_path = dr1[0].driver.variables.items()[0][1].targets.items()[0][1].data_path
dr2[0].driver.variables.items()[0][1].targets.items()[0][1].transform_type = dr1[0].driver.variables.items()[0][1].targets.items()[0][1].transform_type
dr2[0].driver.variables.items()[0][1].targets.items()[0][1].transform_space = dr1[0].driver.variables.items()[0][1].targets.items()[0][1].transform_space

Here's the proof of the rest of this code in play:


Rerending only freestyle on previous render I'm playing with Freestyle in Cycles. I'm tweaking setting and rerendering. I'm spending a lot of computing time rerendering stuff expensive stuff, then doing a quick freestyle pass with new settings.

Is there a way to keep the "main" Cycles render, and only rerender the freestyle pass?

You can create two separate render layers and use one for the actual render, and the second one exclusively for the Freestyle strokes.
Combine them in the compositor and then update only the freestyle layer when you tweak settings.

Procedure described in detail here Adjusting Freestyle in the Blender compositor


How do you stop smoke generation? I am trying to do a smoke/fire simulation.  I can get "ignition" by setting the Start frame for the Smoke Cache bake.  I want the fire to "go out" and the last generated smoke to still drift upwards.    Think of a candle going out.  The last of the smoke still rises for a moment.  Setting the End frame for the smoke cache bake simply freezes the last simulation step.  How can I get smoke/fire to cease being generated without freezing the simulation?

You can keyframe the Density parameter on the flow object to make it start and stop emitting smoke.


What is bpy_struct for? In Python I want to know what bpy_struct is for?
Can you give me an example of its use in programming?

Note that bpy.types.bpy_struct is not actually available from within Blender, it only exists for the purpose of documentation.

In Object Oriented Programming when you define a class you can specify a parent class, your new class then adds some functionality to what the parent class provides.

In blender the bpy_struct is essentially the base class for all classes in blender and provides the core functionality that is common to everything. You cannot use it directly in python but you will often use the functionality it provides in it's many subclasses that you do use.

Examples would be obj.keyframe_insert('location') or pythons standard keys() and values() methods which are implemented in bpy_struct.


Transparent objects passing through causes a shadow My scene contains transparent objects that pass through each other during the  animation but it seems to be casting a shadow when the overlap

I've attached a screenshot if anyone can help.

Use this node setup to disable cast shadows:


How can I put particle fur of Blender to Maya export animation (abc)? I have a problem in my production: I made a particle system in Blender to generate fur on a character, then I animated it in Maya. Now I want to forward these particles on my character animated. I don't know how I can make it...can you help me?

Particle systems are application specific, and you won't be able to get the hair particles from Blender into Maya without making them meshes which you can do by hitting convert for the particle system modifier.


Weight brush tool not working I was just following the blender guru tutorial on  level 2 part 1, and towards the end, he switches to the weight paint tool, my problem is that the paint draws toward the sides and the bottom only, but refuses to draw towards the top as seen in the picture

blender file:

Alright, so, in edit mode you've hidden some of the mesh, which causes the weight paint not to work:

Just unhide all the mesh in edit mode ALT+H and you can weight paint again :)


Shifting face vertex order I need to shift the order of referenced vertices in a face. I've been trying to do it in python after being unable to find a "normal" way of doing it, but I've hit a bit of a dead end and I hope someone can help me.
To be more concise: Let's say, for example, a triangle face uses the vertices [1, 2, 3]. What I need is to shift those indices to [2, 3, 1]. Obviously it's the same triangle, but I need those indices to be in a certain order.
The furthest I can get is the following python script that shows the vertex indices of the selected triangle. I'd love to rearrange the "verts" member, but it's read-only.
import bpy
import bmesh

me = bpy.context.object.data
bm = bmesh.new()
bm.from_mesh(me)

for face in bm.faces:
    if (face.select):
        print("face index %u" % face.index)

        v0 = face.verts[0]
        v1 = face.verts[1]
        v2 = face.verts[2]

        print("vertex 1: %u" % v0.index)
        print("vertex 2: %u" % v1.index)
        print("vertex 3: %u" % v2.index)

I understand that bmesh is some kind of "working copy" of a mesh which then needs to be saved back. Do I need to make a new bmesh and then copy the old one while applying my changes somehow?
EDIT: Since I can't write comments myself, I'll address thibsert's comment here: As far as I can tell that just rearranges the "global" list of vertices of the mest, which I need to be untouched. It's the face's own list of corner vertices that I need to shift. I know this is a very fringe use case :)

I don't know how to do it with a bmesh, but it's easy with a regular mesh since mesh.loops[i].vertex_index is writable.
import bpy

ob = bpy.context.object
assert ob.type == 'MESH'

# If in edit mode, switch to object mode and switch back at the end
was_in_edit_mode = False
if ob.mode == 'EDIT':
    bpy.ops.object.mode_set(mode='OBJECT')
    was_in_edit_mode = True

me = ob.data

for poly in me.polygons:
    if not poly.select:
        continue

    # Get loops for this poly
    # Loop = corner of a poly
    loop_start = poly.loop_start
    loop_end = loop_start + poly.loop_total
    loops = [me.loops[loopi] for loopi in range(loop_start, loop_end)]

    # Get vertex indices for each loop
    vidxs = [loop.vertex_index for loop in loops]

    # Shift
    vidxs = vidxs[1:] + vidxs[0:1]

    # Write back
    for i, loop in enumerate(loops):
        loop.vertex_index = vidxs[i]

# Not sure if you need this
me.update()

if was_in_edit_mode:
    bpy.ops.object.mode_set(mode='EDIT')


"bpy.ops.rigidbody.world_add.poll() failed, context is incorrect" occurs when python script is ran more than once I am seeing a context incorrect error if I run this script more than once in the same .blend file.  It  occurs in Blender 2.82 and 2.90.  My understanding of how contexts work is only mediocre but I cannot think of a reason why/how the context would change after running the script multiple times.  I also do not know of any context requirements for trying to add a rigid body world.  My end goal is to enable rigid body physics for specific objects and I'm pretty sure enabling rigid world is the first step. I've reduced the code to the following:
import bpy
bpy.ops.rigidbody.world_add()

Reproduction steps:

Open a new general blend file.
Insert code from above, run once.  There will be no error and the rigid body world will be enabled if you look in the "scene tab"
Run the script again, error will say context is incorrect.

Thanks.

When you first start Blender there is no rigid body world added to the context. You can check this by running print(C.scene.rigidbody_world) in the console. This should return None
When you run bpy.ops.rigidbody.world_add() you are adding a new rigid body world to bpy.context.scene If you now enter print(C.scene.rigidbody_world) you should get something like <bpy_struct, RigidBodyWorld at 0x00000225720128B8>
If you immediately run bpy.ops.rigidbody.world_add() again the error you get should be something like RuntimeError: Operator bpy.ops.rigidbody.world_add.poll() failed, context is incorrect This tells us that the operator's poll() method is checking "something" in the context and since we know that what has changed is that we now have a rigidbody_world in our context, we can assume that this is what the poll function is checking for. (actually checking this is a bit of a pain as it means tracking down the operator)
Wrapping up - you have two options.

remove the rigidbody world using bpy.ops.rigidbody.world_remove() before rerunning your script
Check if there is already a rigidbody world added before adding one and skipping if there is.


Symmetrize not duplicating properly When I try to symmetrize one bone structure for a model I'm working on it instead rotates it 90 degrees and keeps it on the same side of the model. I have the bones renamed to the .L But I bet there is some simple error I have causing issues for it.

By default Blender will symmetrize on the armature's X axis, your armature is currently oriented along the Y axis, so you can either rotate it in Edit mode on the Z axis so that it's correctly oriented along the X axis, or, once you've symmetrized, choose another axis on the Operator box.


Smoke render problem, transparent triangle artifact When I render my smoke there is a triangle shape that doesn't get rendered, I heard somewhere (I can't remember where no matter how hard I google it... ) that there is a workaround involving dual smoke domains that are linked somehow.

I am fairly new to blender and rendering overall so I wouldn't be surprised if this is some basic stuff that I missed.  But I can't find any help.

Camera Clipping End Distance
One thing to check is to see if your Camera's Clipping End distance is set deep enough to render all parts of your scene. If it is set too close (i.e. to too low of a number), then anything beyond that distance (in Distance units) will not be rendered -- instead, beyond that point, your render will show only the background color, which here is transparent.
To see if this is your problem, check these 2 things:
If this happens when rendering

Select the camera

In the Object Properties window, click on the Camera tab

Increase the Clipping End to a higher number (i.e. farther distance). Here the End distance is set to 100, but you might need to set it higher:

Now render again and see if all of your scene is included in the render.

If this happens when navigating in viewport (i.e. not in camera mode or render)
If this happens when navigating in viewport, then you have to change the clipping end in the Viewport Properties panel:

Press N to open the Viewport Properties

Under View, set the Clip End higher:


How to make liquid's color intensity less, where the geometry is thinner? I created this ICE TEA. Now I'm after even more realism. I figured that the intensity of the liquid should be less, where the ice cubes are close to the glass, where the liquid is 'thinner'. How to achieve this effect?

Currently The liquid is Glass BSDF with IOR 1.33. I tried to subtract (boolean) the ice cubes from the liquid, to actually create the liquid thinner or thicker in certain parts. Only it gives a terrible geometry on the top surface of the liquid where the ice cubes stick out. I will probably have to model this surface manually, to get good geometry. But I figured I must do it, since I need thinner and thicker parts of the liquid. But even then, will it work?

I will be pleased also if you can advise me on other ideas how to make this ice tea more realistic. I'm thinking for instance bubbles along the top edge where liquid meets the glass. Anything else?

Edit: Ok, I used the Volume Absorption node. It works to some degree - the liquid seems brighter where the ice is. But now I want to put a gradient on the liquid, so that it goes from bottom of the glass to the top. At the moment I have a gradient going left to right. See my node setup. I suspect I have to feed the coordinates into the Vector plug on the Gradient node, I tried Vector Mapping node with various settings, but no success. How to change the coordinates of the gradient, so that it goes bottom to top?

Surface Color and Volume Absorption

I see you still have a rather strong surface color. In reality, liquids are not really colored by light loss on the surface, but ligh loss within the material. You should leave the color of the surface shader white and use the color for the absorption. The gradient may or may not be needed based on your initial intent with it. Experiment with the density of the absorption.

Refraction and Transparent

I am not sure why you mixed these two shaders. You should get a better result with simply a glass shader.

For Full Realism

You should note that only one surface should be between the glass and the tea and that should be a third material, with an IOR of IOR-tea / IOR-glass. This applies also for the ice cubes. This also means that the meshes will not be manifold, but this is how the render will be most realistic.

These are useful to read:

fluid in a glass
Liquid / glass interface IOR and normals in Cycles
http://adaptivesamples.com/2013/10/19/fluid-in-a-glass/

Alternative Solution

You can use the ray length to calculate the correct absorption, but this was useful only before cycles volume shaders was implemented:

http://blenderdiplom.com/en/tutorials/419-tutorial-absorption-in-cycles.html


disable volume per light object Is there a way that I can control the volume properties per lamp?
I want to create beams of light that are visible (no problem with that). But to fill in some parts I'd like to use an second light, that lit's the object without being visible in a volume.
I formerly used Maya for stage design and within Maya you can assign the amount of interaction with the volume per light.
Attached a picture to clarify my problem. In this image there is a beam that I want to be visible. On the other hand, I don't want to see the volume of the area light.

In Cycles this is quite easy.
Let's say you have a scene that uses volume scatter . But want to have the red light not have any volumetric effect.

All you have to do is turn off the Ray Visibility for Volume Scatter for that light:


how can I move a vertex towards the origin? Good evening,
Can anyone explain me how to move the selected point towards zero through that axis?
(That point is not the object center point)
Thank you very much.

Snap your cursor to the desired location with Shift+S.

Set your Pivot Point to be the 3D Cursor

After that, select your first vertex and press S to scale it toward the 3D Cursor.

Scaling to zero will put the vertex directly on your 3d Cursor.


Black bounding box surrounding camera view has disappeared The camera view bounding box is not showing up when I go to camera view mode '0'.  No box guide-lines, no passepartout (although I checked to see if it was set to medium strength, which it is).  The bounding box enclosure does however appear if I click "Render" (not render mode in viewport, the 'official' render button).It's been a very long time since I worked on my blender project and I have no idea what happened.  Is there something obvious I'm forgetting?  Please help!

A 'Bounding box' in Blender is the 3d space defined by an imaginary box with sides parallel to the axis of the object's local space:

They can be used for simplifying complex scenes or simplifying various simulations or also may help visualizing the space an object occupies and so on.

Clearly you are using the term incorrectly.

What you are talking about is the camera's 'passepartout' or overlay around the camera's view. It can be switched on and off in the camera properties in the Properties Editor under Display section:

You may not be able to see the camera or the overlay if you are looking through it and are zoomed in too much, and also have locked the camera to view in the side panel of a 3d View (the n panel):

You would need to unlock it and zoom out in that case.


Error in hair texture I need some help.

I have hair in blender with a texture, when I export to an external game it gets with invisible faces as image, have any options that I can change it? Anyone know anything about?

Thank you...

It's likely the issue is causedby seeing the backside of your meshes Normals. This causes it to appear invisible if you aren't looking at the faces from the front. One way to prevent this is to take your mesh, duplicate it, then flip the normals so that you can see it from both sides. Here is some documentation explaining different ways of going about this.

http://www.katsbits.com/tutorials/blender/double-sided-faces-different-materials.php

It is possible however, enable Double sided in Properties > Object Data > Normals. But this uses considerably more resources to render than a mesh alone.


Autosmooth causing subsurf problems with holes As you can see when I use Autosmooth to get rid of the hole artefacts then my subsurf messes up. When its off my subsurf is fine but then the holes glitch out.
I am not sure what to do really :/

In the mesh's Data tab, create a new vertex group. Select only the vertices along the hole profiles and a couple of adjacent vertex loops. CTRL+PLUS ("grow selection") on the numpad is good for this. Click the button that says Assign.
Now go to the smoothing modifier and choose this vertex group. This prevents smoothing on any unintended vertices.


Help with limiting rotation of an armature I am totally new to animation and armatures in blender, and I have been following a tutorial to make an animated lamp. I have been trying to set a limit for the rotation of one of the bones of the armature, but it doesn't seem to be working. I set the limits on the local Y axis to -60 - 60, the piece rotates smoothly as expected:

But, if I change the rotation limits to -90 - 90 (which is how I want it to be) the rotation is strange. It seems to only rotate some of the way and then it snaps to the limit points. I have no idea what is causing this, as the set up is exactly the same as it was before, just with a different limit.

Does anyone know how to fix this?

I replicated exactly your setup and noticed that you have the "For Transform" box un-checked, That will help to maintain the values in transformations relative to the ones in the constrain modifier. 2 more things that will make it feel better is to set the "transform Orientation" to local, which I think you do, and use the 3D Gizmo.

Hope that helps.


How to animate after simple deform? I want to animate a folding sheet:

I locked the locrotscale without any bend that is at deform bend angle =0°.
But when I change this angle to 90° for the next key frame the object seems to capture the angle and apply to the intial key frame, which I have animated with 0°.

You can deform the object to it's final shape first, and then you select APPLY AS SHAPE KEY.
Then, go to the vertex group menu, and select SIMPLE DEFORM under SHAPE KEYS
Finally, you will see a slider named VALUE. turn automatic keyframe on, and then start deforming the object through time.
In that way you don't even need armatures


Why can't I see keyframes in the timeline? I was doing some animation, when I didn't know how to animate using edit mode. Someone showed me a tutorial on YouTube by using hooks. It managed to work, but then I began to realise that the keyframes were not showing AT ALL in the timeline , despite clicking on the selected object with the auto-keying. Have I done something wrong?

I just realized that I scrolled my timeline down.
Using Shift while using the MMW (Middle mouse wheel) the contents of the Timeline can be scrolled up (out of the visual area), and thus keys become hidden.


Converting OBJ to FBX with material I'm trying to convert OBJ to FBX for my project in Unity.
I downloaded this Link model which comes with an OBJ file and MTL file from: https://www.models-resource.com/gamecube/legendofzeldathewindwaker/model/7795/
I imported the OBJ file to Blender using the Import > Wavefront (.obj) option and it shows up like this:

When I look in the Texture Paint tab in Blender it shows the material file has been added successfully:

But when I export the model to FBX and import to Unity the material is not there? I am very new with Blender and 3d modelling so I am not sure what I am doing wrong :(

I figured it out, all I had to do was copy all the associated PNG files to where the exported FBX file was located in my Unity Project


How do you turn on constant interpolation for keyframes in blender? Following a tutorial with my own keyframes and the lecture was talking about how he is using constant interpolation for keyframes so blender doesn't interpolate the in-betweens like below. Where do I find the option? I am using blender alpha right now so sorry in advance if this is inconvenient.

What I want to do is above. I did try to go to graph editor I think and pressed N then went to active keyframe and turned interp to Constant. It did not work however I probably did something wrong.

The settings in the N region only apply to the active keyframe (usually the one selected last).

To change the interpolation for all selected keyframes, press Header > Key > Interpolation Mode in the graph editor header, or press T while hovering over the graph editor.


Why my rendering slows down and stops at an arbitrary frame? When I’ve tried to render an animation, the first frame seems to take way longer than it usually does. Then, I return a few hours later, and it seems to have stopped at frame 26 or 31, when usually the render would’ve been finished under normal circumstances.
I’m using the EEVEE engine with all of the render settings how I usually have them, outputting to ffmpeg mp4, perceptually lossless, with the default sampling settings. The animation is 400 frames long and all the physics have been baked.
One thing to note, before rendering in EEVEE, I tried to render the animation in cycles before realizing it was taking too long, so I canceled the render and tried to render it again in EEVEE, changing all the appropriate output settings accordingly. In the past I’ve rendered a few animations in EEVEE without ever having this issue.

I recommend always render to image files (preferably OpenEXR). Once the rendering is done, you can easily encode the resulting sequence into a movie clip like .mp4 or .mov using ffmpeg, Davinci Resolve or even Blender's VSE.


How can I edit a imported animation? I'm using Blender to create custom TF2 taunts. Basically it is just an animation. I imported the animation and I wanted to change something. I selected pose editing, then copied and pasted the pose, and after about 8 frames changed the animation. The thing is, that I got the change only on one frame. How can I fix that?

Press I to insert/update a keyframe, do this before moving to another position on the timeline. Once pressed, it will give you a choice of what to record. If you have no scaling, use LocRot.


Mirroring this object gives unwanted results Ive been trying to follow this tutorial but i got lost...
https://www.youtube.com/watch?v=JjW6r10Mlqs

The mirror is inverted... I want it to be a closed object, not open from both sides.

Make the origin of your object to be any of the edges of an open wall

Press SHIFT+S - Snap

To move the 3d cursor to the selected edge.

CTRL+SHIFT+ALT+C - Origin

To move the origin of the object to the location of the 3D cursor.


Trying to render with GPU but it is not working I'm not sure if there is a question already about this but when I try to render with the GPU and change the Compute Device setting to my GPU, I am missing the Feature Set and Device options under Render which don't allow me to change the device used.

Can anyone guide me on what I am doing wrong? Thanks.

Only the 'Cycles' rendering engine can make use of the GPU. The 'Blender Render' engine (which you are using) only has the option to use CPU.

You can change to the Cycles render engine on the top toolbar, but it is very different to the 'Blender Render' and objects will need different materials made for them:

Once 'Cycles' is chosen the 'Feature Set' and 'Device' settings will appear in the Render panel.


How can I find out how many triangles are in my model? When I want to make some item, e.g. for a game, there's big chance for some triangle limit.
Is there some way how to find out how many triangles are in my model?

Select your object, and go into edit mode (Tab). In the info bar it will say how many triangles are in your object.

In object mode it will tell you how many triangles you have in the current layer(s).


Scaling objects with data modification I am fairly new to blender and am wondering how does one scale the objects in blender via python script.

Currently I am simply changing the scale of the object via bpy.data.objects[NAME].scale
however, this is not what I want to do as it only visually shrink the object.

I also tried to change the length of each bone individually, however, even though the length of the bone changed, the head and tail of the bone did not change. Also something worth mentioning, I am working with a hand. This ended up giving me a hand with tiny bones but not connected due to the bone's head remaining the same.

I would like the bones in the armature object to actually shrink/grow as well, since I am exporting this object later as BVH and would like to preserve the scaling.

Thanks

this is simple script for scaling all bones in the active armature :

import bpy
ob = bpy.context.object
bpy.ops.object.mode_set(mode='POSE')

for bone in ob.pose.bones:
     if not bone.parent : # since children inherit scale no need to scale them
        bone.scale *=0.5

bpy.ops.object.mode_set(mode='OBJECT')

to remove scale inheritence  :

for bone in ob.data.bones:
        if bone.parent :
            bone.use_inherit_scale = False

#scale all bones
bpy.ops.object.mode_set(mode='POSE')
for bone in ob.pose.bones:
        bone.scale *=0.5
bpy.ops.object.mode_set(mode='OBJECT')

scaling in edit mode :

import mathutils
bpy.ops.object.mode_set(mode='EDIT')

mat = mathutils.Matrix.Scale(0.5, 3)

for bone in ob.data.edit_bones:
        bone.transform(mat,  scale = True, roll = False)

bpy.ops.object.mode_set(mode='OBJECT')


How come my skeleton no longer works after mirroring it's mesh? I rigged a mesh human I'd made and it worked fine. I deleted the parenting and the armature modifier between the skeleton and human so I could edit the mesh more. While editing the human, I decided I'd change one side and mirror it to the other. I deleted one half and mirrored the changed half to where the one I'd just erased was. I connected the skeleton to the skin again, using automatic weights as I had the first time, however the weights were asymetrical. The right arm of the mesh works fine, but moving either arm on the skeleton causes the left arm of the mesh to freak out. Same goes for the legs.

So, how come the automatic weights got messed up? Why isn't it grabbing the skin symmetrically?

Further to sambler's answer - the Mirror modifier has the option to mirror vertex groups, which helps significantly in avoiding this problem in the first place. For this to work, however, your groups need to be named with a suffix indicating what side of the figure they're on.

Vertex groups for left-side should end in the suffix .L, vertex groups for right-side should end in the suffix .R. This is not configurable, which irritates me :)

Both sets of groups need to exist, even if you don't have any vertexes in one half of them before adding the mirror modifier. The modifier won't create needed groups. This would also be a good feature.

I do plan on trying to tackle both those irritants once I wrap my head around more of how the internals work.


How to make smoke puff repeatedly in an animation I am animating a locomotive and I need it to have smoke puff several times throughout the animation but I can only make it happen once. The first smoke puff I made using CG Matter's tutorial here: https://youtu.be/sNHIdcjhJT4

Any help would be appreciated.

This is the current setup of my scene. Another thing I will need to know is how to make smoke appear in the middle of the timeline rather than at frame 1.

Smoke "Repeatedly"

If you mean bake one sequence of "puff" and use it several times - NO WAY. Even baked sim (saved as external) - voxel texture that can be reused as any other texture on any object (with the same dimension) ... there is not an option to specify appearence in time.

Even if you set Domain Object as Particle Object and use it (without physics) for repeatedly appeared smoke. The baked sim is played only once. Other particle instances are represented just by last baked frame.

How to offset multiple smoke instances by time?

Offset Start

NO WAY to offset start of baked smoke, you can only set start  of simulation in Physics Properties > Smoke > Cache > Simulation Start

Solution to just rename files (part of given name containes a frame number), did not work for me (for a reason described above).

Moving a Smoke Simulation in Time

There was some workaround but for negative start.


World view does not display face/vert count I started working on something in a new scene and for some reason the total face/tri/vertex count for everything in the layer i am on is not showing. This never happened before, is there a way to fix it?

The vertex count uses objects in visible render layers. If you are on a layer which is not visible in the scene renderlayers, then this is what happens.

This is because the info panel displays scene wide information, but the visible viewport layers can be different between multiple viewports.

Since the viewport layers are locked to the scene layers by default, this doesn't happen all the time.


How to Join two Armatures without losing constraints in Blender 2.8? I want to join two separate armature objects, But when I join two armatures using "Ctrl + J" then the bones with constraints not working properly.Also I renamed all the bones differently.
Is there any way to join to armatures without losing constraints?

All constraints look for an armature and a bone. If you merged the "B" armature into the "A" armature, probably some constraint are looking for an "X" bone which was in the "B" armature, but now it is into the "A" armature. If all bones names are different, it should be enough to change all constraints armature target from "B" to "A".


Alt+S moves vertex instead of scaling skin modifier in 2.79 I seem to be having an issue with Alt/S when using the skin modifier. It used to work fine in earlier version, but now it will only move the vertex up or down, it does not scale the skin. I have checked all my shortcuts and nothing has been changed and I have checked the XYZ checkboxes and no effect. Any pointers?

Correct shortcut to shrink/fatten when using the skin modifier is ctrl-A. I have always wondered why, but that is it.


Is there a way to animate a camera along a curve at specific speed? There are two ways to animate a camera along a path:
1) Follow path Constraint and 2) Parent (follow path) command

But they both have the same problem: The speed of the camera depends on the length of the curve. I want to have constant speed between different shots and scenes.

The way around is of course to calculate the length of the curve and determine the speed that way but it would be annoying and extra work since I have multiple separate shots.

Best regards, Eetu L

I'm not sure how you can do it with the standard tools, but I figured out a way using animation nodes that seems to work (someone might need to check my math). I basically created a subprogram that takes a Spline input and an object input(what will move along the spline). Then using some math, it takes the spline length, number of frames in the scene and a speed number and moves all the objects along their respective curves at that speed.

Maybe this will help you out, here's an example file.

edit: Thinking through this, you can probably replace the end frame value with just a float number set to some high number. That way this would keep the speed the same regardless of how long the scene is.


Problem Bake Normal Maps from hight poly mesh to low poly mesh I'm a student and this is my first experience with blender so I'm not an expert.
I'm facing a problem when I try to bake normals in tangent space.

hippo.blend DOWNLOAD

I have two meshes representing an Hippo, created following some tutorials on youtube. One is high poly, second is low poly.

I'm using blender render, as in the tutorials.
I'm able to create an uv map unwrapping the low poly mesh and to do the first bake (select low poly mesh and click bake in render menu).

It is one day that I'm trying the final step of the tutorial in which I open my uv map in the uv editor, select in bake options "selection to active", I select the high poly mesh, shif+select low poly mesh and I click bake again. I can see that blender do the bake but the result does not change in any way.

I found the tutorials on youtube typing "Hippo Blender". They are five and I followed everything. But between the video 4 and video 5, I put bones and two animation on my model (not done in the original tutorial). Then I started again with the last tutorial.

I'm using blender 2.79b in the tutorial it is used blender 2.6 I think.
I try to read all the related topics in this forum but I'm not able to find a solution.

If someone can help me I can share the blender project

Thank you in advance

I edit the question after the answers adding some images of the current settings and the normals that I can see.

as you can see my uv map never changes.

in 3D View: you may have made a mistake in the scale, always keep in mind to apply scale CTRL + A select SCALE and ROTATION
play a little configuring the maximum distance and the minimum distance, until you get an optimal result or that you like
in edit mode, remember to apply the normal orientation of the faces towards the exterior, to check this you can turn on the normal indicator in  mesh display , select all and press CTRL + N
with respect to the Subdivision surface modifier, you can also play with the levels to see a result that you like, my example is done with this configuration

Blender Tutorial : Part 17 - Normal Mapping (Blender)


How do I snap the cursor to selected bone?(python) How do I snap the cursor to selected bone?(python)

bpy.ops.view3d.snap_cursor_to_selected() doesn't work

arm = bpy.data.objects['Armature']
empty = bpy.data.objects['Empty']
context.scene.objects.active = arm
#do snapping here
bpy.ops.object.mode_set(mode='EDIT')
bone = arm.data.edit_bones['Bone']
bone.head.xyz = empty.location
bpy.ops.object.mode_set(mode='OBJECT')

Only adds to the armature :(

Set cursor

Given an example of snapping cursor to active edit bone.  ie armature object is ob = context.object and the active edit bone is bone = context.active_bone

The cursor is in scene, global or world coordinates. Bones are in local space.  Multiply local space coordinates by object world matrix to get global coordinates.

An operator that begins with bpy.ops.view3d is designed to run in the 3d view. Running from py console or text editor most likely will produce an invalid context error.

However it is simplest to set the values directly

In 2.7x

Set Scene.cursor_location  in edit mode to active bone

scene = context.scene
bone = context.active_bone
scene.cursor_location = context.object.matrix_world * bone.matrix.translation

Snap to Selected requires summing all selected bones locations and dividing by their number to get an average location.

I have used bone.matrix.translation which is the equivalent of bone.head.

from mathutils import Vector
local_loc = sum([b.matrix.translation for b in context.selected_bones, Vector()) / len(context.selected_bones)
# and then setting
scene.cursor_location = context.object.matrix_world * local_loc

Alternatively from using context could for example snap to edit bone "Bone" of the armature object "Armature"

ob = scene.objects.get("Armature") # by name
if ob and ob.type == 'ARMATURE': # check exists and is armature.
    bone = ob.data.edit_bones.get("Bone")

In 2.8x can set both the translation and rotation of the Scene.cursor object by setting the matrix property

scene = context.scene
bone = context.active_bone
scene.cursor.matrix = context.object.matrix_world @ bone.matrix.translation

scene.tag_update() # updates location and rotation of cursor to bone head as soon as view is  redrawn.


How to change appearance of an Empty I have a complex scene with lot of Empties. For a better survey I would like to change the appearance of an already created empty.

Just in case:
How to change the appearance of several Empties simultaneously?

Change a single Empty

Select the desired Empty
Go the Properties Panel
Click on the Data tab
Change the Display property

Change multiple Empties

Select the desired Empties
Change the Display property (this will only effect the active Empty)
Right-click RMB on the Display property and choose: Copy To Selected

You can also adjust the size of the Empties in exactly the same way

Note: You can also have other 'object types' than Empties in your selection while changing the Display Type. Copy To Selected will only effect objects of the same 'object type'.


Particle emmiters not even over mirrored mesh I have a simple mesh of a wall, I'm trying to add a particle system in order to cell fracture the mesh but the emitters are clumping together in certain sections.
The two areas either side of the main gate area are a mirror so the geometry is identical but it appears to favour the right over the left.
Any idea how I can get a random yet even distribution over the whole mesh regardless of faces/verts etc?
I've tried using random and jitter, also volumetric over faces but ideally I want them all on the surface of the mesh, any ideas would be awesome
Settings are default except for start and end frame which are both set to 1

Found the solution....
For some reason the "Even Distribution" check box was doing the exact opposite, once I unchecked it, it had the desired effect.
Thank you for your help Rich Sedman!


Exported STL looks distorted Blender 2.77a

Problem

When I export this blend, external software shows it as heavily deformed. Blender shows it fine and so does the Windows Object Viewer.

Shapeways and Tinkercad however shows the following:

I've tried to export stl, obj and other formats (ultimately I'll need stl) and they all come out the same. I have tried to convert quads to tris, but that did not produce a different result.

Object is manifold, has no loose geometry, no doubles and no pending modifiers.

Anyone know why and how to fix it?

I suspect this has something to do with the size of your object - perhaps the images we are looking at are at least 400% bigger than what you hope to print? If that is the case the image might look distorted but is correct for the resolution that it is actually printing.


Rendering high poly to low poly normals. UV are out of bounds I have a high poly mesh that I'm trying to render the normals to a low poly mesh material. I'm not sure what I'm doing wrong. When I bake the high poly normals to low poly the UVs are not right. I guess the easiest way to explain is with some screen shots.

For this simple test I duplicated the low poly, added the sub div modifier, added additional edge loops to sharpen edges etc. Here's the high res model.

Here's the low res model

Here's the high res model

What you're seeing is due to the Margin setting found in the Bake panel. Basically it causes the color to extend a set distance past the UV island boundaries. So your actual bake should have turned out fine. I think the purpose of the Margin setting is to ensure that the UV islands never extend past the baked texture.