How to bake uv map texture to vertex color (selected to active)? I have two mesh ! One mesh textured and one mesh no textured. How to bake uv map texture to vertex color (selected to active) ?

I don't know if this is exactly what you want, but maybe these steps can help you (do a backup before doing anything!):

Do UV mapping and apply texture to your object.
Apply Dynamic Paint to your object.
We will transfer that Texture color information into Vertex Colors. And this is how you do it. Under Dynamic Paint attribute:

Once you done that, you hit Apply under Modifier to complete the bake of Vertex Color into the Vertex.
Now you will have an object with Vertex Color that originated from UV Texture.

I got it from this link: link

Go ahead to the section "Bake texture as vertex color". It's the same as i posted plus some other maybe useful information.


How can I copy and paste dimensions to make objects the same size? How can I copy dimensions of the first object and paste them onto the second bigger cushion so that they become identical, whithout having to copy and paste single dimensions on the n-bar?

If you enable Align Tools Add-on in the Preferences(F4->P, or Edit -> Preferences):

You will have Advanced button in the sidebar, Item tab:

You can then select the objects you want to scale, then select the one you wish to scale to so it's the last selected and active and hit Advanced under Advanced Align Operations:

In the Last Operation panel you will have Fit Dimensions:


volume scatter in blender giving me a dark screen with some crazy amounts of fireflies I have attached volume scatter node to the world volume.
So What I have right here is a super simple scene where the light is coming from a spot lamp and falling on the ground.

Ok so in this picture the left tab is my viewport and the right one is my render tab.
You might have noticed how different two images really are. I wanted the same effect as in the viewport but even after increasing the number of samples does nothing for the actual render.
What I have tried:

Increasing the number of samples(did not work)
decreasing the volume density(it's 0.001 btw)(worked but only for the viewport)
Increased Indirect light clamping(Did nothing for the render)
tried different angles(same result from each angle)

Please help me if you can by telling me what the issue is and how I can fix it

There's a circle called circle.001 that you've parented to your lamp object (called Sphere). This circle obstructs your spot light. It won't cause any problem in the Viewport because you've disabled its visibility, but you've enabled it for Renders. So delete this object or disable its visibility for renders.

Also:

Reset the Compositor.
Don't use the Volume Scatter for the whole world, as you explain it looks like you can't use any other light than Spots if it's assigned to the whole world. Instead, create a cube that encompass your scene and give it the Volume Scatter node.


What is the correct way to remesh? I'd like to remesh multiple merged objects into one mesh for sculpting. I've tried to do this with Blender's built-in remesh function, but it didn't work as I wanted. After the remesh, the shape had changed a lot, this visible the best around the short parts of the mesh. On the image, the left one is the original (converted from a curve) and the right one is the remeshed version.
Is there any way to preserve the mesh boundary and keep the shape after remesh? Or if it isn't possible what else can I do?

In this case Decimate modifier will be the best option for you considering that the remesh modifier changes the overall shape of your mesh , to reduce the amount of your geometry decimation can be best
Or if you want to stick with the Remesh modifier  you can increase the amount of voxel data to preserve the mesh shape


How to create an orthosis for a .stl hand? I'm trying to design an orthosis for a thumb for a university project. I have a .stl model of a hand (which can be found here: https://grabcad.com/library/hand--5)
and I'm wondering how to create an orthosis right onto that so that I can 3D print it?
The idea is to 3D scan a random hand, then create the orthosis and 3D print it perfectly fitting. Now I want to try and create an Orthosis right onto that.

Is there a way to select the thumb from that hand model and add kind of an offset to it? My idea would be to create an offset of 5mm or so in order to have a perfectly fitting tube for the thumb and then sculpting that tube into my desired shape.
Is there a way?
I'll upload a picture of a rough solution I made with Geomagic Freeform. I selected the thumb and created an offset which I then shaped to my liking.
However my Macbook is struggling with Geomagic Freeform (and its only a few more days of trial) and I'm wondering if there is a way to create something like that with blender?
I really appreciate your help!
Best regards,
Chris

The workflow in this case would go like this:

In edit mode, select appropriate faces.
Shift+D to duplicate faces.
P>Selected to separate selected faces, then Tab to enter object mode.
Select new object, created from the thumb faces and add Shirnkwrap modifier.Use eyedropper to set hand as a Target for the modifier.
From there you can give the new object shape of orthosis and add Solidify modifier to give some thickness to the model.Somewhat like this:


What does the stamp drop down menu in the render panel do? I am working on a project right now, and during the render process I noticed a little check box that says stamp.
When I selected the drop down menu it had a bunch of selections the refer to text and font, and things like that.

My scene has text in it, and I was wondering what this section does, and how it is applicable to text scenes.

The Stamp section in the Render panel goal is used to draw some information on the render output. This can be useful for a work in progress production.

See the blender wiki.

For example you can select Frame to print the current frame number on the final output.

The Font size, Text color and Background settings allow you to control how this information is displayed.

You can additionally print a custom note by checking the Note setting and writing whatever you want.


Counting the number of Alive particles Im working on a predator-prey model, and to get some useful information I want to extract the number of Alive particles at any given frame. However, I got the blender file sent from another person working on this. And the number of Alive boids is stuck on whatever value he had when sending the file. So for a 1000 boids 933 is Alive and whatever I do this does not change.

import bpy

obj  = bpy.context.object     # Active object
p_s = obj.particle_systems.active # Active particle system
print(p_s.settings.count)

AliveP = len([
    p for p in p_s.particles if p.alive_state == 'ALIVE'
])

print(AliveP)
```

Use the dependency graph.
import bpy

# get the object
obj = bpy.context.object

# get current dependency graph
dg = bpy.context.evaluated_depsgraph_get()

# get the object as currently evaluated
e_obj = obj.evaluated_get(dg)

# get the particle system
ps = e_obj.particle_systems.active

# and count
print(len([p for p in ps.particles if p.alive_state == 'ALIVE']))

As said in the documentation:

This example demonstrates access to the evaluated ID (such as object,
material, etc.) state from an original ID. This is needed every time
one needs to access state with animation, constraints, and modifiers
taken into account.


Is there a way to stop objects visually "clipping" through others at a distance? Up close, they don't clip through each other, but the farther out you zoom the more they do.

Increase the viewport Clip Start value, found at the top right of the viewport in the screenshot.
If the start is really low or the end is really high it can cause issues like you see. Try 100mm (the default) and that should help.
I don't know the technical reasons for this issue, but a really small start value or a really large end value can cause the issue you're seeing.


Filling holes easy/quick method I have the mesh shown in the image and want to fill the holes. If I select each edge and use F then not all of the edges are joined all the way around.

Is there an easier or better method to complete this task?

thank you

Fill Holes result as per first suggestion (not sure how to add image to a comment0

Should also say I am using 2.8

Go to edit mode, select your mesh and Press space and type fill holes and select the option and then go to the left panel and change the sides option to 5 or 10 (change it if it doesnt do anyting)


Near bezier curve nodes affected when moving a node I have a simple bezier curve. When I move one of the nodes the other nodes near it move too (like I had proportional editing but I don't!). How can I turn this behaviour off so only the node that is selected is moved when I move it? The nodes are not even tracking to each other.

No proportional editing, no modifiers, no constraints. Just a simple bezier curve. Here are the settings of it:
https://i.imgur.com/3surjuX.png or http://i.imgur.com/3surjuX.png

First image below proves that the nodes are not lined up to other node:
https://i.imgur.com/exoNC4p.png or http://i.imgur.com/exoNC4p.png

Second image shows what happens when I move a node, the other node in the pic sort of rotates towards it:
https://i.imgur.com/2Ay6FVD.png or http://i.imgur.com/2Ay6FVD.png

The issue was that I needed to change my bezier curve type through the v menu. However to successfully change that I needed first to select all bezier handles in edit before pressing v and changing the type for all nodes. This is so because the nodes of a bezier curve object can be set to be different handle types and the v menu only changes the type for the selected nodes, not the curve itself.


Can I save custom meshes to efficiently be used again and again? I'm a novice using blender to plan a home renovation and I'm wondering if there's a way to create and save presets for the objects I'll be using frequently (eg. various timbers, plywood panels, miscellaneous building materials etc.)

I use array modifiers to quickly put in a lot of studs or joists but it would also be cool if I could make myself a selection of standard prefabbed timbers that I could quickly slap into the scene and scale down to length (instead of what I'm currently doing, which is modeling a new 2x4 whenever I need one or duplicating one that's already been scaled and/or rotated)

Any advice would be appreciated.

Yes! There are several ways to re-use assets.

Linked Duplicates

One way is to use Linked Duplicates. To create a Linked Duplicate, just press AltD and you will get a new Object that uses the same Mesh data as the original it was duplicated from. With Linked Duplicates you can add a Modifier to one of the objects without it affecting the others. This may be the best-suited solution for your projects, based on what you described.

In the following screen shot we can see in the Mesh Context that the object selected is named "Icosphere.001". There is another object named "Icosphere" that this was created from as a Linked Duplicate. Both objects share the Mesh named "Icosphere", and this Mesh has two users, as is indicated by the "2" displayed to the right of it.

Linking from another .blend file

Another way is to create your assets in another .blend and Link them into your main project using File > Link. This would be done from within your main project.

Group Instances

Yet another way, keeping everything within a single .blend, is to use Group Instances. To do this, simply Group the object(s) you wish to re-use (CtrlG), and you can then Add a Group Instance (ShiftA), which is a linked copy of the original object(s). Group Instances are not directly editable, but you can transform/scale/rotate them. To make changes to their meshes you would edit the original Grouped object(s).

I'd like to give a shout-out to the archiviz tutorial DVD I originally learned this from. It used to be sold on the Blender Store, but it doesn't seem to be offered anymore and I can't remember the title. Anyway, it's a useful technique, so I pass it along to you.


Removing color and leaving the texture So basically was making a tree For Game (Using Blender game engine) then I got to some point where I have no clue how to work around with (Probably something simple).

Here's an image of the problem I think it'll be quite obvious lol.

So basically, I want the white off and the leaves texture to stay. I tried so many things but nothing has come out of it.

Thank you for the help!

If your image has an alpha channel then go to the Transparency section, bring down the Alpha value level to 0


How to create a flat vortex force field? I'm trying to make a sort of accretion disk around a black hole, except I can't figure out how to create a vortex that forms a flat ring shape rather than a tornado shape. I've tried scaling along the z axis, but if you scale it to 0, it just stops working altogether.

How do I flatten this vortex force field (for use with smoke effects) so that it will form a flat disk rather than a tornado shape?

I added a vortex force field. If I scale it to 0 along the z axis, the radial force it exerts on the particle system disappears. If I add a falloff to the force field, the radial force disappears also. This is my scene: imgur.com/GbIm3sE The dark gray circle in the center is the gravity lensing object, the sphere in the very center is the black hole object, and the spiraling lines mark where the vortex force field is. The rendered image is posted in an earlier comment of mine.I need particles to be sucked off of the star object on the right and spun around the black hole in a disk shape

Ok I hope this is what you are looking for?

DOWNLOAD THE BLEND FILE HERE.


Skin modifier don´t show vertices When I have the skin modifier active on edit mode I cannot see my vertices. This is happening since I switched to 2.83. However, if I zoom far away I'm able to see the vertices. If anyone has a fix to this issue it would be very very helpful.

The vertices are obscured by the mesh itself. In order to see them you need to either switch to Wireframe mode or enable 'X-Ray' (icon to the right of the overlays drop-down).


What is making my file so heavy? Even if I hide almost everything in the scene, my computer cannot begin to render. I left it to render over night and it was still stuck on 0% in the morning. If anyone could check out my file I would really appreciate it!
(I tried reducing the render passes to 32 and reducing light bounces to 4, no dice).
https://drive.google.com/file/d/1pr1FdO461RaFQDsTo5klWofKiG31IbMe/view?usp=sharing

Your file is 380 MB heavy.  One part is that you have high poly objects with 2 UV maps for each object. That's about 150 MB. You can delete the UV maps to save space. There are also Custom Split Normals Data, about 20 MB. Then, it's still 215 MB big, but I'm not sure why Blender still needs that many bytes...?
Why it doesn't render
As already mentioned you have a few high poly objects in your scene. Each of these objects has something like 257,000 vertices, 607,000 edges, 350,000 faces - and they have a Subdivision Surface modifier, Viewport level: 0, Render level: 1. That's the problem.
If you render this, the modifier kicks in and adds some geometry... 1.2 million vertices, 2.4 million edges, 1.2 million faces for one object. This is multiplied by the number of objects and ... good night ;-)
Solution: Remove the modifiers and it will render fine.
To decrease the render time you can use the default 128 samples, tick [X] Adaptive Sampling, and use the denoiser in the compositor.
Also, these objects in the background can be rather low-poly. 5k or 10k vertices with a bump/normal map should do the trick. No need for 257k vertices.

128 samples, AA, denoiser node, 20 minutes render time (CPU), 1.5GB mem peak


How to blend/mask materials? I've been working on the Blender Guru donut tutorial and want to add some variation to the condensation on the coffee cup. Currently the condensation stops very abruptly on the the inner rim of the glass, creating a harsh transition between the glass and the droplets.

Is there a way to mask or hide certain pieces of the condensation material in order to create a more irregular transition with the glass material? In other words, I want the droplets to be visible only on specific portions of each face, not the whole thing. I've seen that color ramp nodes can be used to create a fade/gradient effect between materials, but am unsure how to accomplish this using my water normal map.
My current node setup:

Thanks in advance for your help!

Sure, that's the whole point of shading, you create noise patterns and then use them to guide blend or strength input parameters. Here a example:

Separating Uv coordinates makes a gradient in the chosen direction, add centeri it in the plane and then mix it with a noise on linear light mode. Then use that to guide any blend or parameter. 1 of the millions of ways you can mix values to generate masks, the core technique of shading.


Puprlish Material with Blue Voronoi Cracks Is there a way to make a shader (puprlish Material with blue, reflective Voronoi Cracks) from the following picture?

You could use a Voronoi to mix between two shaders.

One seems to have a slight translucency effect while the other is opaque and glossy.

Use the same Voronoi to bump the shaders.


How to link an existing node group via Python script I created a "voxel" data visualization system via DICOM files in Blender. However, as the DICOM changes from patient to patient, it is necessary to allow the user to change the transparency of the slices, for this it is necessary to link the parameters to a node group.

The problem is that I am unable to link an existing group in the scene during the lasso -for-, when creating the slices from DICOM.

I tried this command:

bpy.ops.node.add_node (type = "ShaderNodeGroup", use_transform = True, settings = [{"name": "node_tree", "value": "bpy.data.node_groups ['GroupVoxelShader']"}])

But it gives error of poll() failed.

So I tried to create the node group inside the material first and then make a link, so it creates a block, but with the following name: Missing Data-Block.

I tried to find a way to link with the group bpy.data.node_groups['GroupVoxelShader'] as shown in the image below:

But I can only do this manually, it was not possible to link automatically already in lasso, with Python.

Does anyone know how to do this? Thanks for reading!

import bpy

#you need to somehow specify the material(maybe loop through a few?..):
node_tree = bpy.data.materials['Material'].node_tree
# And a node group that you have in the file:
node_group_name = "NodeGroup"

nodes = node_tree.nodes
links = node_tree.links

# Let's at least check if some image node and output node exists
# you might need a way to determine which ones to use if there are multiple
image_node = output_node = None
node_group_exists = False
for node in nodes:
    if node.type == 'TEX_IMAGE':
        image_node = node
    elif node.type == 'OUTPUT_MATERIAL':
        output_node = node
    elif node.type == 'GROUP': # in case the script was used already
        if node.node_tree.name == node_group_name:
            node_group_exists = True
            print('exists')
            group_node = node

if output_node and image_node:
    if node_group_name in bpy.data.node_groups and not node_group_exists:
        group_node=nodes.new("ShaderNodeGroup")
        # Creating the group is not enough, we need to specify data(node tree) for it
        group_node.node_tree = bpy.data.node_groups[node_group_name]
        group_node.location = (0,0) #This is default anyway,  but in case you wish to move it

    links.new(image_node.outputs[0], group_node.inputs[0])
    links.new(group_node.outputs[0], output_node.inputs[0])


Background picture does not appear in the render? I'm using Blender 2.74 and have added a picture as a background in the view , it is visible in the view but it doesn't appear in the render ,why is that ?
here is the picture

Many thanks,
Meri

the easy way is to enable the Addon that does exactly that :

go to File➝ User_Preferences
click on the Addon tab search for Import Image,  check it and click Save

go to File ➝Import ➝ Import_Image_as_Plane
select your image  and click Import
position your camera and render ( you may need to tweak light )

to setup easily the render after adding the image as plane :

switch to Cycles Render Engine

in 3d_view hit Num 7 (this the top view)
hit Ctrl+Alt+0 to set the camera in this view (you can move the camera up and down to fit the image )
enable Ambient Occlusion  in the world tab

press F12 to render


Diffuse Colour not showing in compositing render layers I'm new to blender from cinema 4d and am trying to get my head around the render layers and file output nodes so I can combine my passes in Nuke. I have all my render layers setup inside Blender and am able to view them just fine, with exception to the direct diffuse pass. For some reason when I connect it to the viewer node all I can see is black, and when I import into nuke there is zero data whatsoever, just a black image.

this is pretty annoying as a diffuse pass is the base layer that all other passes stack on top of, so I cannot do any compositing. I've got no clue what I'm doing wrong, but this is a screenshot of my node layout as well as my monkey head material underneath. The third screenshot shows a glossy render layer correctly showing in the viewer. Thanks!

Your material simply has no diffuse component, which is why diffuse direct, indirect and color passes are completely black. This happens because the material is partly metallic and uses subsurface scattering.

The way the light passes are combined to produce the final image is documented in the manual.

The Blender 2.80 Manual by the Blender Documentation Team is licensed under CC-BY-SA v4.0.


Subdivision Surface modifier above level 1 subdivide causes boolean modifier to break I am trying to cut out ridges on an object using another object. When I apply subdivision on it, level 1 is alright, but level 2 onwards weird stuff is happening. Images below illustrate my issues better.

Boolean cutter, applied with level 1 subdivision work fine.

Another view, with the cutters hidden.

Modifier stack.

Now with level 2 subdivision.

Now with level 3 subdivision. I did not unhide the cutter object, it just appeared.

You basically want to make sure that the vertices, edges and faces of the cutting object never sit directly on top of those of the object cutted into. Try scaling or moving the cutting object by only a few micro- or millimeters. Finding a good position obviously becomes harder with each subdivision, since there are more possibilities of nearly identical vertices appearing.


Is Backface culling possible on another object? I've tried backface culling on something like toon shading, and it works with flying colors, however, I wanted to try and make an object contain another using backface culling, but despite the fact that I have seen the node trick to get it to work, and pressed the mark in viewport shading, I still have no use at getting it to work
For example Images, I have this sphere

And here is the cube on top of this image, with backface culling as the material. As you can see, despite having the sphere underneath, it's not visible. i have tried adding a geometry node with mix shader, but it still did not get the desired results.

Back-face culling means render engine will ignore faces which normal is not facing toward camera. Since a newly created cube's normal is normal facing outside, you need to filp the normal AltN in mesh edit mode:

If you want the mesh to be a mask and cut of some part of other object, it's not possible with backface culling since the mesh is ignore instead of recalculate.


Render semi-transparent self-intersecting surface in cycles I am looking at mesh surfaces that intersect themselves and show both sides (inside/outside). It's easier to put one here than to explain. So far, I can not cycles render it with transparency. It renders completely opaque for me. I'm toggling alt-z and it changes from semi-transparent to opaque in normal view (object mode) but always opaque in render. It is interesting to watch when toggling backface culling.

I give the shape here, because there may be some strange thing due to the variety of surface normal directions.

I don't want glass or refraction, I just want to see the surfaces themselves in some way that I can see inside.

NOTE: it DOES render semi-transparent in blender render. Using 2.74. I think I will have to play with multiple lights and diffuseness before it looks excellent.

import bpy
import numpy as np

nth, nph = 101, 200
th  = np.linspace(-0.5*np.pi, 0.5*np.pi, nth)
phi = np.linspace(-np.pi, np.pi, nph)
y3 = np.sin(th) - 1.8*np.sin(th)**3
X = np.cos(phi)[None,:] * np.cos(th)[:,None]
Y = np.sin(phi)[None,:] * np.cos(th)[:,None]
Z = np.zeros_like(X)            + y3[:,None]

verts = [tuple(thing) for thing in zip(X.flatten(), Y.flatten(), Z.flatten())]
faces = []
for ith in range(nth-1):
    for iph in range(nph-1):
        v1 = nph*ith + iph
        v2 = v1 + 1
        v3 = v2 + nph
        v4 = v3 - 1
        faces.append((v1, v2, v3, v4))

purple = bpy.data.materials.new("transPurple")
purple.diffuse_color = (1.0, 0.0, 0.67)
purple.alpha = 0.2
purple.use_transparency = True

me = bpy.data.meshes.new('wow')
ob = bpy.data.objects.new('wow', me)

ob.location = (0.0, 0.0, 2.0)
bpy.context.scene.objects.link(ob)
me.from_pydata(verts,[],faces)
ob.active_material = purple
ob.show_transparent = True
bpy.data.objects['wow'].select = False
bpy.data.objects['wow'].select = True
bpy.ops.object.shade_smooth()

two useful functions

import bmesh
import bpy

def set_smooth(ob):
    mesh = ob.data
    smooth_states = [True] * len(mesh.polygons)
    mesh.polygons.foreach_set('use_smooth', smooth_states)
    mesh.update()

def remove_doubles(ob, d=0.00001):
    bm = bmesh.new()
    bm.from_mesh(ob.data)
    bmesh.ops.remove_doubles(bm, verts=bm.verts[:], dist=d)
    bm.to_mesh(ob.data)
    bm.free()

Those two functions aren't really meant for real-time stuff, but neither is bpy.ops stuff. They can however be integrated in a key-framed and rendered animation, no problem.

import bmesh
import bpy
import numpy as np

# set_smooth() and remove_doubles() are declared elsewhere

nth, nph = 101, 200
th  = np.linspace(-0.5*np.pi, 0.5*np.pi, nth)
phi = np.linspace(-np.pi, np.pi, nph)
y3 = np.sin(th) - 1.8*np.sin(th)**3
X = np.cos(phi)[None,:] * np.cos(th)[:,None]
Y = np.sin(phi)[None,:] * np.cos(th)[:,None]
Z = np.zeros_like(X)            + y3[:,None]

verts = [tuple(thing) for thing in zip(X.flatten(), Y.flatten(), Z.flatten())]
faces = []
for ith in range(nth-1):
    for iph in range(nph-1):
        v1 = nph*ith + iph
        v2 = v1 + 1
        v3 = v2 + nph
        v4 = v3 - 1
        faces.append((v1, v2, v3, v4))

me = bpy.data.meshes.new('wow')
me.from_pydata(verts,[],faces)
ob = bpy.data.objects.new('wow', me)
ob.location = (0.0, 0.0, 2.0)
bpy.context.scene.objects.link(ob)
set_smooth(ob)
remove_doubles(ob)

setting up a cycles material via script is a little bit involved, and you might ask yourself, how much of this should I be doing via script or manually setting up the material and only adjust certain parameters via script at render time..

import bpy

scene = bpy.context.scene
scene.render.engine = 'CYCLES'

my_mat = bpy.data.materials.new('cool_mat')
my_mat.use_nodes = True
nodes = my_mat.node_tree.nodes

# material output and diffuse nodes are present already, get them by name
mat_output = nodes.get("Material Output")
diffuse = nodes.get("Diffuse BSDF") # new(type='ShaderNodeBsdfDiffuse')
# mix and transparent are added by the script
mix = nodes.new(type='ShaderNodeMixShader')
transp = nodes.new(type='ShaderNodeBsdfTransparent')

mat_output.location = 300, 0
mix.location = 0, 0
diffuse.location = -200, 50
transp.location = -200, -100

''' hook up shaders '''

# link mix_shader to material output
a = mix.outputs['Shader']
b = mat_output.inputs['Surface']
my_mat.node_tree.links.new(a, b)

# link diffuse to mix
a = diffuse.outputs['BSDF']
b = mix.inputs[1]  # 'Shader' is used twice, so you access via index.
my_mat.node_tree.links.new(a, b)

# link transparent to mix
a = transp.outputs['BSDF']
b = mix.inputs[2]
my_mat.node_tree.links.new(a, b)

''' small shader adjustments and mixing '''

mix.inputs[0].default_value = 0.8  # factor
diffuse.inputs['Color'].default_value = [0.8, 0.0, 0.191713, 1.0]
transp.inputs['Color'].default_value = [1.0, 0.152801, 0.582658, 1.0]

which combined, gives something like this:

I suspect a node setup like this might be a little more interesting: (note: I have ambient occlusion on!)

The idea is to make the color or factor a function of the cross product between surface normal and the up vector (0,0,z). Using the nodes allows you to embrace vector mathematics for the adjustment of the shader at local points.

or taking the viewing angle into account too:

And notice there is a backfacing output on the Geometry node, worth exploring


Blender 2.8: mirror leg and arm bones? I have named my leg and arm bones with *.R. How to mirror them to the left side (with naming *.L)?

Just select all your bones in Edit Mode then Right Click > Symetrize.


camera tracking an object vs animation Is it possible to switch the same camera between "tracking an object animation" and "not object tracking animation"? Or do I have to use two cameras?

Constraints include an ‘Influence’ property that varies between 1.0 (fully ‘on’) to 0.0 (fully ‘off’). The incluence can be keyframed so that you can vary it as desired. When you want the tracking to affect the camera you would set the influence to 1.0 and when you want to animate the camera you adjust it down to 0.0.


How can I scale something with actual measurements in meter,cm,etc? What a want to do is a big cylinder which is going to have a diameter of .285 m and do several cut loops but when I want to do an scale and type the units of that cut loop (for example 0.335 m) in meters it gives me an smaller circle instead of a bigger one and that's incorrect due to the units of the original cylinder.

As mentioned, Scale is unitless, it's just a multiplier for the actual Dimensions.

The only solution is to divide the Final Dimension by the Current Dimension (FD/CD). You can type that directly into the scale value, Blender calculates it for you. So in your case type .335 / .285 which will result in a Scale of 1,17544 and your loop will have the correct dimension.


Bevel modifier auto segments Recently I created a video about a way to increment automatically the number of segments.

My question is is there a way to script and integrate the formulas directly bpy.context.object.modifiers["Bevel"].segments = "Formula here" .

I spend the last week trying to figure out but I think my python knowledge is not enough. If you have any suggestions it will be cool.

Watch the video to see how it works, I think it will be great to have that feature. ;)

Short answer: No

If all what you want is smooth edges, then you are probably better off using a higher number of segments that's high enough for the critical parts, according to your artist's opinion.

First one should discern an adaptive number of segments for all edges together or for each edge.

For all edges together:
Calculating the number of segments for a given segment length has no closed mathematical solution and requires numerical approximation. Also some bevels don't have a constant offset but are smaller on one end than the other. You have to find the biggest segment width and increase the number of segments iteratively until your maximum width/offset is not exceeded.

For each edge individually:
 1. Using different number of segments for each edge does not allow a clean topology in the intersections (the vertices where bevelled edges meet). Unless you use Ngons for all intersections, there is no known good solution.
 2. In the video, multiple bevels are subsequently used. You can clearly see that the intersection is much different from a usual bevel (top face of the cube is a Ngon). If you have 20 edges and each should have a variable number of segments, one can think of 20 subsequent bevel modifiers. The result will depend on the order which edge is bevelled first and so on. 3. The same problem as in "for all edges" applies here as well.

The used formulae in the video is not accurate, it is just a bit correlated. The segment width or offset is far from constant.

Edit:
Approximate answer for 90° bevels with profile 0.5:

import bpy
C = bpy.context
from math import pi, ceil

# The approximate size of the segments
segment_size = 0.05

# The modifier you want to alter
modifier = C.object.modifiers["Bevel"]

# This is the arc length of a 90° corner, which is close to the
# summed length of the segments
arc = pi*modifier.width/8
seg = ceil(arc/segment_size)
if seg < 1:
   seg = 1

bpy.context.object.modifiers["Bevel"].segments = seg

Anything more general will require:

Face angles at every bevelled edge
3 nested numeric search algorithms


Trying to loop through points and create splines in Animation Nodes I'm trying to use Animation Nodes to loop through random points on a sphere and draw splines coming out from them, for some reason it only renders one spline, what am I missing here?

Thank you

The solution was to add a new Generator Output Spline List to the loop and use it to drive a Curve Object Output:


How do I simulate an image texture being spray painted onto a model Basically I have a facebuilder model of a head with an image texture. I want to have the shot start with the model being blank and simulate the texture being sprayed onto the model. I've looked around and can't find any tutorials on this, or even any clue as to whether or not its even possible.
I'm totally open to a cheat, like some way of masking the image texture and having it reveal or something, I just don't know how to achieve it.

Blender Guru has a great tutorial on using dynamic paint.
https://www.blenderguru.com/tutorials/how-to-create-realistic-rain
Using this technique you could make a particle system that looks like spray paint using it as a brush you can reveal a graphic wherever your particle system touches.


How do I stop HDRI light going through my object? I don't have any lights in my scene only an HDRI. The light of it goes through my object who has a whole in it and I can see everything inside as I would have a light in there. Obviously it's weird because there is not light inside. There are some tutorials explaining how to play with the shadows of lights, but how do I play with the shadow of an HDRI? Thank you for your time.

I'm sorry I was wrong about it. Only in Eevee is happening not in Cycles. I attached a link with a simple cube to show you what I'm talking about. Just an HDRI in the scene, no other lights. enter link description hereAny suggestions how I can make it in Eevee not to show the light inside... besides changing the material color :-). Thank you.

Short answer: using Irradiance Volumes might help...

Long answer:

Cycles is using ray tracing so shadows of HDRI are a given, i.e. when the ray calculation is bouncing inside the box, there is little chance of it getting to any of the light source of the HDRI through the hole inside your box, or no chance at all if the box is completely sealed (rays are calculated backward from the camera).

Eevee is not a ray tracer and the global illumination (GI) and shadows from an HRDI background texture can only be approximated using irradiance volumes and baking the results on top of existing materials. Eevee cannot do realtime calculation of shadows and indirect lighting of the lightsource emitted by every pixel of your HDRI texture. For realtime, Eevee only calculates the direct illumination of the HDRI on all faces of the scene and adds the indirect lighting stuff only if it has been baked (or until Eevee supports AMD ProRender or NVidia RTX for GI :) ).

In the basic example below, you can see that after setting an Irradiance Volume and Baking Indirect Lighting (under Render Properties), low res shadows start to appear inside the cube. Playing around with multipls Irrandiance Volumes and their resolution and other aspects might help but in general, stick to Cycles for true GI.

Credit: Beautiful sunset HDRI from Greg Zaal (https://hdrihaven.com/hdri/?c=outdoor&h=cape_hill)


How can i connect many faces across many vertices? i have these vertices across from each and i wanna connect many faces instead of just one big face (cause that makes it look weird).

If you select both the edge loops, press W to bring up the specials menu and then select Bridge Edge Loops or press E.  This will draw faces between the edge loops.  If they are of the same number of verts, the faces will be quads.


When I bake a specular map out from Blender they always contain the glossy colors? So a specular map should be black and white correct? I don't understand how to bake specular maps using cycles that are in the proper black and white form.

Bake the Specularity data, not the light interaction

According to the Wikipedia, specular maps contains the valuest that:

  represents the amount of reflectivity a surface has.

These maps are used in order to give to the rendering engine the information about how the light should interact when hitting that particular pixel of the surface.

What you should bake is the data about where a surface is capable of reflecting light and where is not, and not how the light interact with the surface (Glossy color, Glossy Direct, Glossy indirect, Combined....) because these are the result of the render engine.

Let's consider a simple material made of a Diffuse and Glossy shader mixed with a musgrave texture:

In this case it's easy to understand that the amount of Specularity is equal to the values that go into te mix shader factor. Where is black is Diffuse (no Specularity), where is white is Glossy (Specularity).

To bake that data just use an emission shader picking the color from the cable that is going into the mix shader's input socket

Here's the counter-prove. The baked map is now controlling the specularity of the surface as the musgrave was doing before.

For complex shaders things becomes harder, you'll have to build a custom nodetree capable of exctracting the Specularity data on each passage (e.g. if you are using multiple mix shaders).


Is there a simple tool for fixing invalid geometry in edit mode? I find myself often in a situation where I build an object out of simpler forms, well always ;) However when putting these together I sometimes have invalid geometry I must fix.

I wonder whether there is a tool for fixing this in edit mode?

The "Boolean" modifier operates on objects. I however want to operate on a small part of a complex object.
The knife tool is a step in the right direction. With this there is the problem I must hit the intersections precisely myself, which is not possible.

An example:
Before – 5 sticks intersecting the long main stick

After – Geometry corrected. No more intersecting faces

Is there a way Blender can do this of its own (selecting multiple faces and Blender splits the edges and faces as needed)?

There is an addon called BoolTools that can help with this.

It's a two step process.  First select the entire mesh and separate by loose parts, then union the component parts.


How do you get hair to take on the color of the mesh it's attached to? I'm still pretty new to Blender (currently using v2.9), so I'm probably just overlooking something basic, but I've been trying to add fur to this fox model's tail and no matter what I do, the fur remains black.
I've looked up tutorials, and in all of them, the hair/fur seems to automatically take on the color of the mesh. Am I doing something wrong? The texture has been assigned to the mesh, so that's not the problem. Also, I can't seem to pull up the hair in the node editor, or even select it. Could this be part of the problem? I've tried making the hair into an object, but this changes nothing. I can provide the blend file if that would help. Right now I'm just really confused.

You have a Noise Texture node plugged into the Displacement socket of the Material Output, it messes up the render.
I don't know what you were trying to do with it but anyway you can't directly plug a Noise Texture into the Output, you need at least to put a Vector > Displacement node between the 2.


Can compositing be displayed in the viewport render? I have made an object glow using nodes and cycles render. when I hit the render button in the properties panel it glows fine but when I go into the rendered view it won't glow. Is this even possible?

Rendered when render button is clicked:

Rendered in viewport:

No that can not be done. The compositer does not render in viewport. The viewport render is just a quick preview of the scene.


What is a best way to organize my own kitbash library? I do have assets that I made over the years, and when I need them, I link or append them 'norma' Blender way. However while the list of assets grows it is becoming more and more cumbersome.

There is this awesome kitbash addon, but as my models are more organic, I do not think it is the right tool for the job.

How would you organize your collection of assets to be more productive in your designs?

There is an ongoing project for future Blender 2.8X called Asset Engine to improve the asset and library management features of Blender.

It will feature local file system based storage of assets with tagging and organization features, and previewing capabilities as stated in the Wiki.

It is unknown at this point when it will be ready and integrated into official releases, however it is unlikely to make it into the first official 2.80 release.

At the moment you can currently organize your assets as group instances or even individual  objects and generate datablock preview images for them. You can then browse the assets using Blender's built in file browser with thumbnail previewing capabilities-


smoke Rendering out is blurred I am not convenient to express my settings，So have attached my file

I want to make the smoke more clear，Like an example of a photo

My file:https://drive.google.com/open?id=0B9AIC7MxieHpdXN1QTdkbTZPZUU

On the ones with all the mushroom clouds, it looks like you need more resolution in your smoke domain. This will allow it to use a lot more detail.

(Also, this won't change the look, but to make it calculate faster, you can enable Smoke Adaptive Domain in the domain settings.)


Convert from Blender rotations to Right Handed Y-Up rotations (Maya, Houdini, ...) Question:

My question is, how can I convert a Blender Z-Up RH rotation to Y-Up RH (Maya, Houdini, etc.) rotation?

(I believe Blender uses a Right-Handed Z-Up orientation... correct me if wrong)

Details:

Position seems pretty basic. I am simply getting the position column of the world matrix like so:

posX = lightObj.matrix_world[0][3]
posY = lightObj.matrix_world[2][3]
posZ = lightObj.matrix_world[1][3]

(swizzling Z and Y)

Rotations on the other hand seem to need more than a simple swizzle. I have figured out how to get the Blender world space rotation in XYZ by doing this:

lightObj.matrix_world.to_euler('XYZ')

Now if only I knew what to do with it... I have searched for conversion formulas online and come up with several incomplete/incorrect implementations.

Finally got it! There were a few problems with my earlier attempts. The one that was throwing me off the most was incorrect position (because the rotations never looked consistently right with a wrong position)

It turns out I had the position wrong because the +Y in Blender is actually -Z in a Y-Up RH coordinate system. Or in other words when converting the code is:

posX = lightObj.matrix_world[0][3]
posY = lightObj.matrix_world[2][3]
posZ = -lightObj.matrix_world[1][3] # note the negative

(swizzle YZ and negate Z)

Another problem I encountered... It turns out there is a special case when exporting lights, which I didn't realize earlier. In Blender, the cone of a spotlight with zero rotations aims straight down, where in Maya, Houdini, and my game engine, spotlights face down the -Z. (If blender were to match this it would aim down the +Y)

So with these in mind, I came to this for rotations:

# for objects
obj = bpy.data.objects['objName']
mm = bpy_extras.io_utils.axis_conversion(from_forward='Y', from_up='Z', to_forward='-Z', to_up='Y')
om = obj.matrix_world.to_3x3()
t = mm * om
v = t.to_euler('XYZ')
print('pos:(%s, %s, %s)' % (obj.matrix_world.translation.x, obj.matrix_world.translation.z, -obj.matrix_world.translation.y))
print('rot:(%s, %s, %s)' % (degrees(v.x) + 90.0, degrees(v.y), degrees(v.z)))
# not totally sure why we need the +90 in X, but assume it has something to do with compensating for the axis_conversion

# for spot lights (they face straight down in Blender)
obj = bpy.data.objects['spotLightName']
mm = bpy_extras.io_utils.axis_conversion(from_forward='Y', from_up='Z', to_forward='-Z', to_up='Y')
om = obj.matrix_world.to_3x3()
t = mm * om
v = t.to_euler('XZY') # not sure why this needs to be XZY for spot lights and XYZ for objects
print('pos:(%s, %s, %s)' % (obj.matrix_world.translation.x, obj.matrix_world.translation.z, -obj.matrix_world.translation.y))
print('rot:(%s, %s, %s)' % (degrees(v.x), degrees(v.y), degrees(v.z)))
# note: there is no need for the axis_conversion rotation compensation due to the spotlight facing down already

As you can see in the comments, there are still things I am not clear on and not sure I am doing right, so please feel free to comment/correct me where wrong.

I have a feeling something might be off with my rotation order stuff, but I don't know what it should be. All I know intuitively is that it makes sense to use XZY since that is what I am swizzling to, that should match the post-swizzled rotation order so it is XYZ in both systems right?


Animation nodes not working in rendered view I made a node setup for a project and when I tried to do keyframing in rendered view there is no effect when I change the values., but in Material Preview mode its working. Please help.
Thank you

In the animation Node options "Node Tree" I ticked auto execution options and it worked !


Character rigging: Blender keep offset is not working I am new to Blender. I have done rigging for the body part of my character and now I am trying to do facial rigging. When I try to keep offset the facial bone to head and I have click on it, it does not work. The child bone does not follow the parent. I do this in edit mode.

I still cant figure out what's going on.Any help would be appreciated.

Here are some things you may have done wrong:

1- try selecting the bone that you want to be the child FIRST.

2- ofset effect will ONLY work in POSE mode

3- make sure ALL the bones are in the SAME metarig otherwise it won't work as you are trying to do

Wrong way:
If they are like the ones above, try joining them and repeat the process of parenting

Right way:

I Hope this helps.


How to close my model in a proper way As on the image, I want to close his back and front but I don't want to look like a cube or plane.
I want how to it's details like belly,nose,mouth,eye and so on.
However I try, I can't add the vertices/lines so I can create details.
I just want to make a low poly orc, if you can help me out I would appreciate it a lot.
Thanks in advance and hope you respond. :)

(Sorry if I posted wrongly or something else since this is my first question)

You can use the Grid Fill option to create many faces.

Select the edge loop (Alt + RMB), key Space, type Grid Fill, and select the option.

Example on a cylinder:


Is it possibile to retain a glossy material when the object is made shadeless in cycles? I've used glossy material shaders for a spaceship but, as you can see in the picture, the hand in the foreground is projecting a horrible shadow. I made the object shadeless but I lost the glossy effect as a result (this is because of the emission shader). Is there a way to keep the object glossy but shadeless at the same time? Thank you in advance!

The solution is to make the hand cast no shadow. The other object cannot be shaded (glossy) and shadeless at the same time:

If you want to tone down the shadows you can make it partially transparent for lights and shaded for camera:

What is a shadow ray?

Instead of blue transparency input grey transparent shader (so it's not tinted), and instead of green diffuse input your hand material.


Why i cant see the poster through transparent material I have 2 transparent sheet top and bottom and between both there is a poster (image) and emission from bottom. Why i cant see the poster through the transparent sheet and also the emission i have given is white color but its showing red color. May i know why the poster is not display and the emission is red.

Transparent Material

Looking for this type of effect

You need to move the poster&LED plane between the two light emission planes.
As in the file you posted:

After moving the poster&LED plane into the middle

After moving the poster&LED plane down the image starts to appear


Can I use something similar to "Slide Vertices" to create new vertices and edges? I use Slide Vertices (hotkey Shift-V) to slide multiple vertices along a face. I also use the tool in edge mode to slide edges along a face. Does Blender have a tool that does the same function but leaves the original vertices/edges and also creates new vertices/edges that slide along existing faces?
Here is an example workflow to clarify what I mean:

I select multiple vertices that make up an edge or edges (call these original_verts)
Use some tool/shortcut that I hope exists in Blender
Use mouse to slide the selected edges along adjacent faces
Release mouse, where new vertices/edges will be created on where I released, but original_verts remain in their original positions.

Here is a related question: Duplicate and slide edge (rip from boundary)
I don't think there is a way to do exactly what you want in vanilla blender. But there are a few things you can try depending on what you want to achieve exactly, and what kind of mesh you're working on.

Just for a quick reference, instead of sliding verts with Shift-V, you can do the same more quickly by just pressing GG while your vertices or edges are selected.

The first thing that comes to mind is the Offset Edge Slide tool. Not to be confused with normal Edge Slide. All you have to do is select the vertices you want, and then press CTRL + SHIFT + R. This will slide your new vertices where you want, but as a downside it will do so symmetrically. So you will have to clean up the side that you don't want by just dissolving.

Here's an example video:

Another option that could work how you describe is just a simple extrude. The key is to change the snapping options to edge, and when you are extruding hold CTRL and hover over the desired edge. Once you've completed the extrusion, you will need to merge duplicate vertices by pressing M and selecting "By Distance" since this method will create duplicate geometry.

Example video:

Hope this helps.


How do I add keyframes to a newly created action with no associated objects? So I'm writing an animation import script...
since animation bone names can differ from the armature's bones in question,
I want to create the actions and edit their group names manually, and then manually assign them to the armature.

The problem I'm having is I can create an unrelated action with unrelated groups, but the channels of those groups seem to require linked pose bones...

Since it's safe to say these pose bones don't exist, how can I assign keyframes to raw data?

The key concepts are as follows

animations are composed of fcurves
each fcurve has a data_path and maybe an index
each fcurve has multiple keyframe_points
each keyframe_point has a .co (coordinate), a .handle_left, a .handle_right, and an .interpolation.

You can see an example of an animation built using core python APIs at http://web.purplefrog.com/~thoth/blender/python-cookbook/animate-random-spin.html

I include an excerpt of the most relevant code:

def rig_quaternion_channel(action, channel, period, a, b):
    """
    This is heavy-duty voodoo to figure out what keyframes to use with sinusoidal easing
    to reconstruct a curve of the form
     a*cos(theta) + b*sin(theta)
     by converting it to the form
     c*sin(theta+phi)
    """
    c = sqrt(a * a + b * b)
    phi = -atan2(a, b)
    fc = action.fcurves.new(data_path="rotation_quaternion", index=channel)
    fc.keyframe_points.add(5)
    vals = [0, 1, 0, -1, 0]
    for j in range(5):
        kp = fc.keyframe_points[j]
        frame = 1 + ( phi / (2 * pi) + j / 4.0) * 2 * period
        kp.co = ( frame, c * vals[j])
        kp.interpolation = 'SINE'
        if 0 == j % 2:
            kp.easing = 'EASE_OUT'
        else:
            kp.easing = 'EASE_IN'
    fc.modifiers.new('CYCLES')

Mostly you care about stuff like action.fcurves.new , fc.keyframe_points.add, and kp.co= (frame,value)


Bizarre grey object within mesh area? I have created a building mesh and I decided I wanted to stick another window in the outside.  I placed some loop cuts but when I went to delete the faces I noticed there is some grey object within the mesh which is not visible in wireframe mode - any ideas?

Unselectable geometry in Edit mode means there's another object in the scene located in the same place. You have several options to continue working on current object without anything messing around:

enter Local View for selected object. Nothing except it will be visible. Note that you can activate Local View for several selected objects, not only one;
exit Edit mode and enter Object mode. From there you'll be able to select another object (you could use Outliner for navigating the objects in the scene in order to find what's needed) and either move it somewhere else or delete it altogether.
join objects, which is done from Object mode too. Thus both objects will be editable at the same time, see Cannot select vertices from different object while in edit mode. Note that you could edit 2 different objects without joining them with MultiEdit addon;


Object fade out while going from point A to B in animation I'm making an animation in Cycles and need an object to fade out from point A to B. I've already key framed the movement for it but I need to know how I can make it fade out?

The node setup for the my material is below.

I have seen this asked on here before but I'm not having success with their answers.

Add a Mix shader connected to

your material
a 100% white Transparent BSDF shader

Then keyframe the Mix factor ("Fac:"):

set it to 0.00 when you want the fading effect to start. Then, having your pointer over the value input, hit I (the box becomes yellow)
then move to the frame where you want the fading out effect to be completed. Set the value to 1.00 and hit I again.

If you want to make the "Fac:" dependent on the distance from another object (an Empty representing point "B"), you can use drivers as in the answer to this question: Cycles Node to tell Distance from an Empty


Is there a Way to Align Camera to View and Fit the View? Pressing Ctrl Alt NumPad 0 causes the camera to teleport over and align itself to the current view in the 3D viewport.
However, it usually takes up only a small portion of the view, meaning that you have to move the camera back to fit the same view you had before. Is there a way to set the camera view to fill more of the 3D viewport when using this feature?

First hit NumPad 0 to enter camera view, then press Home so the camera fills the window.
Now when you press Ctrl Alt NumPad 0 (or go to the camera view any other way) the camera will fill the screen.

If the camera is still not positing where you want it; then that means you are in Orthographic view. Hit NumPad 5 to switch to perspective view, and the camera will match your view.


Using Python to create a sphere and map a texture onto it Is it possible to map a texture onto a sphere using python script? I am sure it is, but so far I was not able to figure out how to do it.

You should follow some beginner tutorials first, like Blender manual, to have an idea how to find yourself around Blender's API.

To get some feedback on comman tasks just pull down Info Panel or change the layout to Scripting like:

Now you will have feedback for all actions you perform like you usually would:


Error while exporting to unity I am relatively new in blender, I learned how to use it last week so I am pretty much a noob. After finishing a character (incluiding the animations)that I was making for unity, when I exported it, it just got completely messed up and all the parts were ditributed everywhere. looking at my blender character I notice this orange points everywhere and I think this had something to do with the problem. Is this fixable? shall I start from 0? Help please

Object > Origin > Origin to geometry. The orange dots are the center of your mesh, but need to actually be where the center of the mesh is. Credit to the people in the comments.


How best to make glue/resin I wanted to model the inside of this lightbulb screw, specifically the red glue (or resin) and uneven edges/mottled look it has... any ideas on how to do that? I've modeled a rough shape for the area where it dips from the rim but not sure whats the best way to get an 'organic' look...

Any help?

I approached this by creating a custom texture. First I Marked three seams in the base mesh CTRL + E > Mark Seam.

Then unwrapped it. By selecting all of the vertices and pressing U > Unwrap. I scaled the UV Map larger because I was only interested in the area I applied the custom resin texture to.

Then exported the UV layout and in an image editor created a custom texture. Of course turned off the UV Layout before saving the finished texture.


How to export .anm files? I've been trying to mod a game that uses .anm files for animations, and I can't seem to find any way to export .anm files in blender or convert COLLADA files to .anm

Does anyone know how to do this?

PS there was a similar question on this site regarding importing .anm files, but it was not answered and did not answer my question*

I believe if you use Blender 2.55b you can export as .anm

https://download.blender.org/release/Blender2.55beta/
Any version after that had a complete API overhaul and export as .anm likely got lost for some reason or another.


Using Python to add an HDRI to world node How do I add in a blender python script a hdri to the world node.
scnworld = bpy.data.worlds.get("World")
scnImage = scnworld.node_tree.nodes.new('ShaderNodeTexEnvironment')
scnImage.location = (-350, 250)
scnImage.image = bpy.data.images.load('H:\\blender__word_hdri\\green_sanctuary_2k.hdr')
scnImage.image.colorspace_settings.name = 'Non-Color'
link = scnworld.node_tree.links.new –

Similar to How to load an image from disc and assign it to a newly created image texture node? use BlendDataImages.load() to load and assign the image to the Environment Texture node:

import bpy

C = bpy.context
scn = C.scene

# Get the environment node tree of the current scene
node_tree = scn.world.node_tree
tree_nodes = node_tree.nodes

# Clear all nodes
tree_nodes.clear()

# Add Background node
node_background = tree_nodes.new(type='ShaderNodeBackground')

# Add Environment Texture node
node_environment = tree_nodes.new('ShaderNodeTexEnvironment')
# Load and assign the image to the node property
node_environment.image = bpy.data.images.load("//hdri.exr") # Relative path
node_environment.location = -300,0

# Add Output node
node_output = tree_nodes.new(type='ShaderNodeOutputWorld')
node_output.location = 200,0

# Link all nodes
links = node_tree.links
link = links.new(node_environment.outputs["Color"], node_background.inputs["Color"])
link = links.new(node_background.outputs["Background"], node_output.inputs["Surface"])

Related: Control Cycles material nodes and material properties


How can i make a low poly flame animation in Blender my computer is not exactly advanced and i really need some low memory usage SFX that can be exported quite easily for the game engine without many memory leak.
(and yes if you want to ask what game engine i use to make games it is Godot Game Engine)
i would really appreciate it if there's anyone that can give me some clue or maybe made some tutorial for me (wishful thinking intensifies) or maybe pitch in some idea if you don't know any method for this problem.

Thank you :D

I took a quick stab at this with a Sculpted mesh using Dynotopo symmetry off with a pixel setting of 12.

The rest was done with just animating an empty, and using that empty as the referenced object in a displacement modifier with a magic texture.

This was about 10 minutes worth of work if you happen to be efficient in Blender.

Hence I'm sure you could spend a little more time if you want it to look as good as it does in your reference.

I would imagine that an animated loop of upward flying diamond shapes at the same speed and the same material would sell the flying ember effect.

Here's the fruit of my 10 minutes (the difference between the two are texture selection & empty animation differences only):

Attempt #1:

Attempt #2:

Per request here is the Blend File:
I've also included an action within it for you associated to a "Fake" user.
As of Right now, the animation wont start until you hit frame 15.
In the NLA editor just drag the action back to the beginning frame (highlight it and hit G >> Drag to the left) to watch the full animation from the start.

As for a sprite sheet, I really recommend watching the video I linked to in the comments.

Here is a Sprite sheet that I rendered out from this file:


Camera tracking : solving floor plane when the floor is not flat How would you go about adding a floor plane of a camera tracked shot with multiple tracks on the floor but the floor is not flat (like the unevened surface of a mountaine top or something)   therefore the tracks are all one different height from each other

If modelling a simple approximation isn't good enough and the scene and ground remains relatively static in the footage in terms of moving objects and lighting changes, I'd try photogrammetry. This allows you to create a 3D model of the scene which can edit however you like. For instance you can extract the ground and use it as shadow catcher.

For open source photogrammetry software I'd suggest MeshRoom. Another good software is COLMAP, it misses some features that MeshRoom has, e.g. texture extraction for the mesh.


Objects Not Really Deleted? When an object is deleted from the scene, is it still present somewhere in the Blender file? For example, I've been playing with physics constraints, so I created and deleted a bunch of cubes. So now even though there are only 2 cubes and one constraint in the 3D Viewport and the Outliner, there are dozens in the object drop-down (only a few fit in the window).

That wouldn't be a problem by itself, but I noticed that the Rigid Bodies behave strangely after creating and deleting objects and constraints. It seems that those "phantom" objects are interfering with the physics engine.

Is this the expected behavior?

You can delete an object's physics and physic related strips still remain in the Dopesheet.
Delete these and often quirky behavior returns to normal.

Try purging orphaned data in the Outliner's menu.
Select 'Orphaned Data' (think that's what it's called). That will list several items as a rule. Scroll the Outliner's header strip to the right until you see 'Purge'. Keep selecting this until all that's left is 'Brushes'


Why doesn't the key to switch on all scene layers work on linux Since I use Blender (2.12), the key on a german keyboard on windows to switch on all layers is Ö (right to the L).

In Ubuntu it doesn't work and never has for me and I'm using Linux for at least 6 years now.

Is there any reason behind that? After some research it seems as if Blender didn't recognize a lot of special keys (mostly keys between the letter keys and return) for keyboard shortcuts while it easily manages to do so for typing text. They don't work in the game engine's keyboard sensors as well. I can't imagine this to be a bug since it's been like that forever. Is there a setting I miss?

Here's a list of keys that Blender does recognize when typing text and completely ignores for shortcuts:
Everything horizontally between

L and Return,

P and Return,

0 and Back Space,

the key to the left of Y

as well as the key to the left of 1

Is your keymapping set correctly in your Ubuntu conifg? On a QWERTY keyboard, the default for enabling all layers is backtick (`... it's the top-left key, to the left of 1). Does that work for you?


Cycles weird baking behavior: changes to another image texture mid-bake Blender enthusiasts!

I'm nearly done with Aidy Burrows' Game Asset Creation course and ran into weird baking behavior from Cycles while making my final textures for the game model.

Details of the mesh: all separate parts recently joined into one mesh; has one main UV map and two additional UV maps for two more detailed parts of the mesh; has a simple Cycles material that only uses a handful of image textures: baked and hand-painted textures combined with a normal map.

I have prepared an image for the final diffuse texture and another for final normal map to be used with the model in the game engine. Problems arise when I'm trying to do these final bakes. During baking normals Cycles decides to switch to the already existing AO image (named AmbientOcclusion in the screenshot below) and then bake the AO (not normals as I have requested) again on the final normal map that I have specified as the bake target image. Still following? This image might clarify things:

And yes I do have two image nodes in my Node Editor ready for the corresponding final texture (diffuse map) and normal map.

Can anyone help clarify if I am doing something awfully wrong or if Cycles is making me go crazy? I see no logic in it's behavior when I select 'Normal' in Bake Type, click Bake and end up with AO on top of my normal image canvas. I have restarted Blender and my computer to see if it was just a reference issue or something but alas, no luck.

EDIT: In fact, when I try to do the diffuse bake (with only color selected in bake settings) Cycles manages to bake on the right image even though the information displayed in the info bar is still wrong:

...because I'm baking diffuse on to a image named ConeHat_d.

What's going on?

Alright, after some hours of needless research I figured it out on my own.

My model was using 3 separate materials: one for main mesh, one for camera details (painted and baked textures) and one for cable ribbon details (also painted and baked textures). I had placed two image nodes - one for final diffuse texture and one for final normal map - only in the main material. I had to copy the two nodes also to the remaining two materials I used for detailing. Now baking worked as it should.

I imagine previously when I hadn't specified the bake targets for the remaining two materials Cycles was just picking a random texture node already present in the node tree and baking on top of that - and in this case it was my ambient occlusion map which was shared among all the three materials.

Hope this helps others struggling with trying to bake multiple materials into one final texture.


Why (actually) does it take me so long to make 1000 cubes? Creating 1000's of objects is slower than I thought it should be. Based on a suggestion here it could be related to name collision checking so I thought I would look into it. Here is some data, and the script I used. As a reference, I also did a simple name comparison between all pairs of objects using an extremely sloowwwww loop in python. That is almost 100 times faster than the creation (which is happening in C, right?) So something else is going on.

Both of these times are clearly proportional to n^2, so it does seem to be checking the new shape against all the others. The times don't change much when I use icospheres (80 faces) instead of cubes(6 faces), so it's based on objects, not faces. That rules out some kinds of checking.

My question is, first, why (actually) is it so slow, and second, how can I create thousands of objects (e.g. cubes) in a script, without waiting minutes each time I tweak some parameter, while still seeing all of them once it's done. I'm using 2.74.

NOTE: I did some spot checking by running the loop only once, or over and over with the same nxy, and there does not appear to be contamination of the measurements due to memory issues (see my comments about garbage collection in the script).

import bpy
import numpy as np
import time

wxy = 15.0
sx, sy, sz = 0.9, 0.9, 0.2
t_create_list, t_check_list = [], []
n_create_list, n_check_list, n_same_list = [], [], []
nxy_list = [10, 15, 20, 25, 30, 35, 40]
listlen = len(nxy_list)

for ii, nxy in enumerate(nxy_list):
    rcube = 0.5 * wxy / float(nxy)
    q = 0.5 * wxy * (1. - 1. / float(nxy))
    xyc = np.linspace(-q, q, nxy)
    XC, YC = np.meshgrid(xyc, xyc)
    ZC = np.zeros_like(XC)
    centers = zip(XC.flatten(), YC.flatten(), ZC.flatten())

    start = time.clock()
    for ic, center in enumerate(centers):
        ok = bpy.ops.mesh.primitive_cube_add(radius=rcube, location=center)
        ao = bpy.context.active_object
        ao.scale = (sx, sy, sz)
    stop = time.clock()
    time_to_create = stop - start

    so = bpy.context.selectable_objects
    number = len(so)

    same, count = 0, 0
    start = time.clock()
    for i in range(number):  #very sloowwwww way to compare names
        for j in range(i, number):
            count += 1
            if so[i].name == so[j].name:
                same += 1
    stop = time.clock()
    time_to_check = stop - start
    t_create_list.append(time_to_create)
    t_check_list.append(time_to_check)
    n_create_list.append(number)
    n_check_list.append(count)
    n_same_list.append(same)

    for thing in so:
        thing.select = True
        bpy.ops.object.delete(use_global=True)
    # but can I invoke garbage collection inside this loop?
    # for example, can I somehow do a save .blend which should cause garbage collection?

    print("number ", ii+1, " of ", listlen)

t_create_list = [round(thing,4) for thing in t_create_list]
t_check_list =  [round(thing,4) for thing in t_check_list]

lists = [n_create_list, t_create_list, n_check_list,
         t_check_list, n_same_list]

save = np.array(lists[0],dtype='float')
for thing in lists[1:]:
    save = np.vstack((save, thing))
np.save("check_it_out", save)

I followed the code from bpy.data.objects.new and will put this here.

Call Hierarchy

rna_Main_objects_new               /* called by python - bpy.data.objects.new */
    BKE_object_add_only_object     /* set default values for the object */
        BKE_libblock_alloc         /* allocate memory for the object */
            new_id                 /* name validation - fallback, not \0, utf8 */
                check_for_dupid    /* check for collisions and find new name*/
                    is_dupid       /* linear search for duplicate name */
                id_sort_by_name    /* sort list */

Links

rna_Main_objects_new
BKE_object_add_only_object
BKE_libblock_alloc
new_id
check_for_dupid
id_sort_by_name

Condensed body of new_id

bool new_id(ListBase *lb, ID *id, const char *tname)
{
    bool result;
    char name[MAX_ID_NAME - 2];

    BLI_strncpy(name, tname, sizeof(name));

    result = check_for_dupid(lb, id, name);
    strcpy(id->name + 2, name);

    /* however all data in blender should be sorted, not just duplicate names
     * sorting should not hurt, but noting just incase it alters the way other
     * functions work, so sort every time */

    id_sort_by_name(lb, id);

    return result;
}

Body of is_dupid called in check_for_dupid

static ID *is_dupid(ListBase *lb, ID *id, const char *name)
{
    ID *idtest = NULL;

    for (idtest = lb->first; idtest; idtest = idtest->next) {
        /* if idtest is not a lib */
        if (id != idtest && idtest->lib == NULL) {
            /* do not test alphabetic! */
            /* optimized */
            if (idtest->name[2] == name[0]) {
                /* STREQ - macro for strcmp */
                if (STREQ(name, idtest->name + 2)) break;
            }
        }
    }

    return idtest;
}

Body of id_sort_by_name

void id_sort_by_name(ListBase *lb, ID *id)
{
    ID *idtest;

    /* insert alphabetically */
    if (lb->first != lb->last) {
        BLI_remlink(lb, id);

        idtest = lb->first;
        while (idtest) {
            if (BLI_strcasecmp(idtest->name, id->name) > 0 ||
               (idtest->lib && !id->lib)) {
                BLI_insertlinkbefore(lb, idtest, id);
                break;
            }
            idtest = idtest->next;
        }
        /* as last */
        if (idtest == NULL) {
            BLI_addtail(lb, id);
        }
    }
}

So indeed blender checks for duplicates and furthermore removes the id from the list again and inserts it alphabetically.

You can't even trick it by choosing names in the right order C, B, A because is_dupid will search the full list regardless.

Though if you specify a non colliding name it exits check_for_dupid early and does not have to find a name on its own.

Additionally as others have mentioned you should not use operators unless you have to and only need to create the mesh once.


2.80 install wiped out 2.79 I just installed Blender 2.80. Went well, new version looks good. BUT... it wiped out my existing 2.79 exe and won't let me reinstall 2.79.  I need 2.79 to do scenery development for Xplane 11.  What must I do to get back to Blender 2.79?  Would be nice to have both 2.79 and 2.80 installed, but MUST have 2.79!
Please help.

Download the archive version of 2.79b for your platform, which doesn't require installation.

Windows 64-bit
Windows 32-bit
Linux 64-bit
Linux 32-bit
macOS

Once extracted you should be able to run Blender 2.79b normally. Unlike the installer the archive doesn't give you a start menu entry or shortcut. You will need to create that shortcut yourself or start it directly from the directory the binary is in.


Vertex Group affected by noise generated in shader? Is it possible to have a Noise input in a shader than could modify a vertex group attribute for generating particles in that place??

The short answer is: no.
There are workarounds, but they are tedious and depending on what you are trying to achieve it might not work. The most direct approach would be to use the texture, or a grayscale copy of it in the particle settings. This won't work for procedural textures atm, though.
So even more tedious: You could bake them, but that's a story for another thread.


Downloaded a character model that has a skeleton but need help so i can pose it I recently downloaded a character model and was hoping to play around with it. I am new to Blender so I've watched some tutorials on how to pose characters with armatures. But the character model I downloaded has a premade skeleton and there are no grey bone things. So I am not sure how to pose this character using the premade skeleton.

Here is the download link for the character. http://tf3dm.com/3d-model/bastet-50797.html

Screenshot of the premade skeleton

It seems that the rig and the model were created by another 3D software and have been imported to Blender. I doubt that this rig works well in Blender, but to answer you question first.

In Object Mode Select the model RMB
Select the rig Shift-RMB
Ctrl-P With automatic weights

The bones shape can be changed in the properties panel:

For your first steps I would recommend to find another model that meets the blender conventions. Or use the rigify addon to create your own rig.


Saving startup file does not effect startup When I save my startup file using either Ctrl+U or File -> Defaults -> Save Startup File, the next time I open Blender, the original startup file opens.

I'm using Blender 2.82 on Ubuntu 20.04, and I downloaded Blender as a snap.

I'm assuming the issue is that the actual blender startup file isn't located at ~/.config/blender/2.82/config/startup.blend.  When I look at this file manually, it is changing, and when I open it with blender, it is the file I'd like to open at startup, but this isn't what opens at startup.

Assuming that I'm correct, and it's actually using a different default location for the startup.blend, I searched for the file it's actually opening.  There are startup.blend files that exist in the following locations, but they don't appear to be what it's opening:

/snap/blender/37/2.82/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend
/snap/blender/37/2.82/scripts/startup/bl_app_templates_system/Sculpting/startup.blend
/snap/blender/37/2.82/scripts/startup/bl_app_templates_system/VFX/startup.blend
/snap/blender/37/2.82/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend

At this point, I'm either wrong about what the problem is, or I need to tell blender where to get its startup.blend from.

Blender is located at:

$ which blender
/snap/bin/blender

So the question is:
How do I edit my startup file, so that it holds the configuration, since the default doesn't seem to work?

I believe it's a bug of blender I reported here, which already fixed in the current development branch and will be backported to 2.83 LTS version (fix included in version >= 2.83.4). For a workaround, after you do save your startup file, then navigate to preferences dialog and do any setting to get userpref.blend file generated in the blender user config folder, then it should works.


python opencv (cv2) in blender I am using stock Ubuntu 16.04, blender 2.76 install. I am trying to use the python opencv (cv2) module from within blender to do some image processing on a texture.

I have installed opencv with the python 3 cv2 library. The following executes without error

python3 -c "import cv2; cv2.imread('img.png')"

But if I enter the same thing into the blender python console, or call it from within a script and run that script using

blender --python <script.py>

Then blender immediately segfaults and dumps a crash report file with the following backtrace

# backtrace
blender(BLI_system_backtrace+0x30) [0x1361b10]
blender() [0x97a98e]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7fc443cb94b0]
/usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4(_ZNK2cv3Mat6copyToERKNS_12_OutputArrayE+0x35) [0x7fc435ab8865]
/usr/local/lib/python3.5/site-packages/cv2.cpython-35m-x86_64-linux-gnu.so(+0x813b6) [0x7fc4085373b6]
/usr/local/lib/python3.5/site-packages/cv2.cpython-35m-x86_64-linux-gnu.so(+0x81e84) [0x7fc408537e84]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyCFunction_Call+0xe9) [0x7fc44aca51b9]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x7555) [0x7fc44adbf085]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x79d9) [0x7fc44adbf509]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x24ac0c) [0x7fc44ae4fc0c]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCodeEx+0x23) [0x7fc44ae4fce3]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0xd2a98) [0x7fc44acd7a98]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyObject_Call+0x6e) [0x7fc44ad7e8ee]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x225a4c) [0x7fc44ae2aa4c]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyObject_Call+0x6e) [0x7fc44ad7e8ee]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x7e279) [0x7fc44ac83279]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x83276) [0x7fc44ac88276]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyObject_Call+0x6e) [0x7fc44ad7e8ee]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalFrameEx+0x1ccf) [0x7fc44adb97ff]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(+0x24ac0c) [0x7fc44ae4fc0c]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCodeEx+0x23) [0x7fc44ae4fce3]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyEval_EvalCode+0x1b) [0x7fc44adb789b]
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0(PyRun_FileExFlags+0xb2) [0x7fc44add4bc2]
blender() [0xd786b5]
blender() [0x97b1d5]
blender(BLI_argsParse+0xe5) [0x1315e85]
blender(main+0xd77) [0x95cc87]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fc443ca4830]
blender(_start+0x29) [0x97a2b9]

This is the log file if run using LD_DEBUG=files blender --python script.py > blender.log 2>&1 as I saw on another link about segfaults in blender that I have now lost

32577:  opening file=/lib/x86_64-linux-gnu/libgcc_s.so.1 [0]; direct_opencount=2
32577:

After reading https://developer.blender.org/T43869 and https://developer.blender.org/T43491#288351 I wrote a little python script to diff the output of ldd for both the cv2.so and the blender binary to see if I could see any miss matched shared libraries ... but both cv2.so and the blender binary seem to use the same .so files where there are commonalities

So I am a bit out of ideas at this point. Also I wondering why both blender and opencv rely on libgcc_s.so, is it something to do with pthreads? ... Anyway if anyone has got this working or has made more progress than me it would be great to hear from you .. any help would be much appreciated :)

Today I found an easy way to start using OpenCV in Blender without any (manual) compilation steps. My OS is Ubuntu 18.04 (64bit) and I run Blender 2.79b.

It may be also important to say, that I did not installed Blender from repository (e.g. apt), but simply downloaded the archive and extracted in a sub-folder of my home directory.

I performed following steps to start using OpenCV:

Open Terminal
Change directory (cd) to [blender]/2.79/python/bin
Executed ./python3.5m -m ensurepip (to become pip available)
Executed ./python3.5m -m pip install --upgrade pip (upgrade pip)
Executed ./python3.5m -m pip install opencv-python (Though an unofficial build the version I got was 3.4.2.17)
Executed ./python3.5m -m pip install opencv-contrib-python (I needed SIFT features and they are only available in the contrib package)

After these commands were executed I started Blender and performed a test where I extracted SIFT features from one Image and wrote an augmented result image to filesystem. Worked without issues.

It is that easy, that I would expect it somewhere to be written down in the internet, but unfortunately I have found only instructions which are far more complicated.

Hope this help someone!


Suppress output of Python operators (bpy.ops.*) Every time the bpy.ops.remove_doubles() operator is used, it outputs to my terminal (where I called Blender from).  How can I suppress this output?

The code is:

bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.remove_doubles()

and the undesired output is:

  Info: Removed 48 vertices

Python can temporarily redirect the stdout, this is ideal since you may not want to suppress output for _all_ scripts, just selectively silence some operations.

eg:

import bpy

import io
from contextlib import redirect_stdout

stdout = io.StringIO()
with redirect_stdout(stdout):
    bpy.ops.mesh.remove_doubles()

If you want you can read the output back out or use it however you like.

stdout.seek(0)
output = stdout.read()
print("Report was %r" % output)

If you want to redirect both stdout and stderr.

import bpy

import io
from contextlib import redirect_stdout, redirect_stderr

output = io.StringIO()
with redirect_stdout(output), redirect_stderr(output):
    bpy.ops.some.operator_that_may_print_text()


How to fix strange dimensions to real dimensions I have an wall object with z = 2915m ! I can display this strange dimensions with scale cage.
When I reduce the scale cage, my wall is going to be very thin. How can I reduce the 2915m dimensions and keep my wall width.
Here is my file My file.

I don't know how you managed to do that, but here's how to fix it:
Go into edit mode. Set the view mode to wireframe. Use box select to select the visible vertices, the ones that belong to the arc and you want to keep.
Press CTRL I to invert your selection
Press X and delete vertices.


How can you create still image fire in Blender 2.8 Cycles? I'm working on an interior scene of an old witch's house that will have a fire in a hearth.  It is just a still image and will not have any animation.  What are some ways of modeling a fire for a scene like this with no animation?  I'm working in Blender 2.82 Cycles.  Thanks to any replies.

I'm still learning to create fire in Blender as well but what helped me was (if you're down with that?) is using premade FireFX mov. files and import them as planes. They are ofc animated but you can use it as stills also and it's a great way to use fire in your art even though you did not make them yourself atm. You should be able to shape it in a heart in some way. When you import them make sure to select EMIT or the fire won't be bright. Also it will shine on objects in Cycles but you have to add a light in Evee to create the illusion. Grts
PS; I've used these; https://www.youtube.com/watch?v=-pljzKVwkzU
Link is in the description below the video. Hope this helped a bit. I for one can't get Mantaflow to work for the life of me no matter how much tutorials I copy to the letter so this helped me out seriously. Happy creating!


Blender UV Problem: Unwraped UV Size different in UV Editor and 3D View I am facing this problem :

My UV doesn't look the same in the 3D Viewport and in the UV editor.

If you don't tell the material to use your UV map, it will use "generated" coordinates by default.


Blender python : where is bpy module located in windows 10 i'm trying to import bpy module from outside blender. Either using python terminal (command prompt) or IDE like pycharm/atom etc. The bpy is not available outside blender app. So i'm looking a way to access it. I'm thinking maybe to add the location of bpy to $PYTHONPATH. But the problem is in windows 10, can't find this module in installation directory. it seems to be stored in somewhere else.

Does anyone know where is the bpy module located in windows 10 ?

The bpy module is Blender itself. It's automatically available inside Blender because when it starts the Python interpreter it also registers itself as a Python module.

If you want to load bpy as a module outside of Blender, you'll have to recompile Blender yourself. The old Wiki has instructions on this. Basically, it's like a normal build of Blender, except you set those CMake config variables:

WITH_PYTHON_INSTALL=OFF
WITH_PLAYER=OFF
WITH_PYTHON_MODULE=ON


How to make a true linear quaternion rotation? It turns out to be impossible to make a 360° rotation by using quaternion only with 2 keyframes. So I used three. However, the result appears unlinear, even though the curve interpolation type are all set to Linear. demo file

I wonder if this is something unavoidable. If not, is there any way to achieve a true linear quaternion rotation?

You would need to make a sinus/cosinus graph for that animation to have linear motion with quaternions:

For the 1st cube I set Euler rotation and animated a linear rotation, with Copy rotation constraint copied that to the second cube and then baked the animation on it with Object > Animation > Bake Action (visual keying on). This resulted in (the gif is little laggy):

This could be done easily with Sinusoidal easing type. Setting correct easingIn/easingOut for keyframes yields to this nice result:


Can we skip some pre-defined Frames while rendering, to prevent blender from re-rednering the same scene? I am an animator on blender and i want to know that Can we skip some per-defined Frames while rendering, to prevent blender from re-rendering the same scene?

Because while rendering there are scenes in which camera stops for a while and all of the objects are stopped and only audio is playing in the back. So for that period let say camera and objects stops for 4- 5 seconds which means at 24Fps 120 Frames will be re-rendered again and again although they are ditto same. Is there any feature in blender 2.81 version else i will have to manually skip them which is a time taking task.

If your output is set to be .png images (which is recommended) you can change the duration of any frame of your choice in the video editor. If you want your output to be video you can set the Frame Start and End in the Scene Tab, render the first sequence, then the frame where you want to stop, and for last render the rest of the animation. after that, you would put everything together in the video editor.


Microdisplaement in Blender projecting only in one direction! I am trying out Micro Displacement in Blender... but facing a strange issue - all the projection happening in one direction instead of polygon normal (please see the screenshot below)

I would really appreciate if anyone could point out what I am doing wrong :(

Here is the scene file if anyone needs:

I will upload the blend file also in case anyone wants to have a look at it.

You are presumably using a version of Blender later than the official 2.79b release - at release 2.79b the Displacement socket of the Material Output node was a 'Scalar' value (meaning it represented a displacement along the surface normal at each point on the surface).

Note that the True Displacement feature was an Experimental feature at that release and subject to change at some point in the future.

If you were to download one of the 'nightly build' pre-release versions of Blender (eg, 2.79.5) or build from the latest source you would find additional features. One such feature affects the True Displacement - the Displacement socket of the Material Output node is no longer a Scalar value (it has changed from being grey coloured to being blue - to represent a Vector. This means that the Displacement now represents a Vector displacement (in Object space).

In order to mimic the previous behaviour (where the displacement would act along the surface normal) a new Displacement node has been introduced which will generate the vector from your scalar value to then pass to the Displacement socket.

See https://blender.stackexchange.com/a/112162/29586


Shadow Catcher object causing brightness issues in scene Okay!  Through help on this page I was able to go from this tutorial about camera tracking...
https://www.youtube.com/watch?v=CVPcT0dJmoY&t=2121s
Redoing the whole thing with Cycles instead of Blender Render also helped because I was able to use Shadow Catcher which is very easy, thanks to some advice from cegatron.  However, when I go to render, the Shadow Catcher object can be seen as a brighter area than the rest of the scene.  It's meant to be a whole in the ground, which works fine, but the surrounding area is very bright and washed out inside the area of the Shadow Catcher object.  This is only visible though, when you do the final render, How do I fix it.  Below is a picture of my blender workspace.  At the right, you can see the final rendered image with the bright ring of washed out area which is Shadow Catcher object.  The hole in it was cut out and a cylinder is underneath it, just so you know.

As per request I've added an image of the scene without rendering in solid view.  The object that is the shadow catcher is listed as Circle and is actually a circle I extruded out into something of a plane with a hole in it.  Under the whole is an object labeled Cylinder that I am using for the pit of the hole.  I have also added an image of the Compositing Node Tree.  Thanks for your help!

EDIT: Still haven't quite fixed the problem but I found a half measure.  I took the outer edge of the Circle object that is the shadow catcher and extruded the edge up so it covered the whole shot.  However, I still have a problem of a washed out scene and a pit that's too dark.

I went back and looked at one of cegaton's solutions to a similar question and figured out how to fix it.  I simplified my compositing nodes and the problem seems to be gone.


How to bend a sci-fi corridor BUT maintain the straight panels? Howdie, guys and gals! Okay so I've been using 3DS Max for about 19 years now but I moved over to blender about a month ago. I've settled into it rather well and can use it with great speed now so it's all good there. Really liking Blender so far! However I am wanting to, for personal development only, create some sci-fi corridors. I had intended to create them in a sort of modular format so that I could simply model one section, UVW unwrap it and then copy it multiple times. Below is the model that I had been working on. However I'd like to be able to bend multiple copies around whatever arc I'd like to.
I thought that maybe it wasn't working because of the arched ceiling panels but, as seen in the second picture, they have something similar and are able to do it. When I do it I just get big gaps between the two models.
I've been trying to figure out the best way to do it for days and I just can't figure it out. I've tried using a bend modifier and an array with a curve. They somewhat work but the panels get heavily distorted and/or curved. I need to be able to keep the panels, etc. straight.
Do you think it's because of the drastic angles that I have going on? I originally thought that may be the problem but, as seen in the third image, it shouldn't be an issue...
Any ideas?

I was finally able to work out how to do it... Basically I only bent the major forms and made sure to use as few vertical edges as possible. For the little insets, things that NEED vertical edges, I used a simple object - copied a few times, joined to and then bent with the main panels. After that, using the "Normal" transform orientation and making notes of scale values, etc. I was able to then work along the faces at their respective angles.
It's a repetitive process but I can think of no other way of doing it without causing deformations.
In a way I suppose it's better to work like this as it means I can save out exact measurements and scaling values, etc. for the other modular pieces so that things remain uniform.
Of course I'll continue to look for an easier way of doing this - maybe align perfectly to centre of a face somehow? I had originally had a plane going around as well, to snap the other parts to but it didn't seem to work properly.
For now this will do!
[


Why is the colour in my image texture getting washed-out? This is my project file. I'm modeling a banana. When I use an image texture the colour becomes fake.

You simply need to un-tick ambient occlusion in your world settings. It can be confusing but Blender doesn't need that activated to calculate AO, instead it will make an additive AO pass and therefore wash it out.


Optimise triagular mesh on model for a given triangle size Hello there Blender community!

I am a Blender noob and am helping a mate come up with a solution for a work of art that he is putting together.

Basically we are going to create a 3D model of a scale plasticine replica of the final work using photogrammetry. From there we'd like to mesh the model with triangles that will directly represent steel rods that will be welded together.

What I'd like to know is whether Blender is going to be a suitable package to optimise the number and geometry of the triangles over the model so that for a given triangle size the number of welds and amount of material used can be reduced?

Any guidance or suggestions are greatly appreciated.

Thanks,
Oliver.

You can reduce face amount by using Decimate modifier. It provides severl methods and options to simplify the mesh.

However, it works more like collapsing. It is not aimed to accurately reduce by a given size or number. I don't think Blender currently support this specifically.


Can’t move hierarchy to collection or parent in outliner I have this one chain hierarchy in my outliner and it doesn’t move to the collection when I parent it to an object in that collection. Even if I try to move it manually it just stays there outside the specific collection in the Scene Collection.

Here I have a collection FISHING BOAT and an empty that serves as a parent for all the parts. When I try to parent the chainlink hierarchy to the empty or move it to the FISHINGBOAT collection, it just stays outside.
What is happening here?
Thank you very much in advance for any ideas or insights!

An object(A) in a certain collection (lets call it Collection 1) can be parented to an object(B) in another collection (lets call it Collection 2), while it(A) remains in Collection 1.
So what you are experiencing is normal/intended behavior.
If you want the child(A) to also be in the same collection as its parent(B), simply select the object(A), press M to move it to another collection, and choose the one the parent is in (Collection 2).


How to create a twisted spiral tunnel? I need to to create a twisted tunnel. Example:

Though the stripes should have volume since the tunnel is the inner side of spiraled marshmallow tubes. Example:

I started adding a screw modifier to a plane which looked promising from from the tutorial, though not on the inside:

Any ideas or should I try to start with a bended cone, add a twisted color ramp & bump?

The hard way
But the way you can use to pour sugarlicious material on.
As usual we'll begin with a simple vertex. Easiest way is to add a cube, or plane, and go into edit mode, vertex select mode, select all with A then Right Click > Merge > At Center.

Add a Displace modifier set to X, lower the midlevel and increase the strength. Don't mind the vertex group, you don't need it.

Add a Screw modifier, increase the screw, iterations and steps (viewport and render)

Let's give it some thickness ! First add another screw, but set the steps to 1.

How to create a noodle. Don't worry about the wonky shading just yet.

Add a Bevel modifier set to angle and crank up the width. Add a Weld to remove the seam in the middle.

The tricky part. Add an empty, set it as the object offset in a new array modifier. Now we drive the empty rotation so that the result is always equally separated.

Set the array count to 10.

Add a Bezier curve, scale it. Add a Curve modifier to the other object, and set the curve as the target.

Let's shade this masterpiece ! (Easy part)

What the ?? Everything's white !

Let me show you the simplest magic trick in the book. Offset UV in the Array modifier.

Final result :

I'll let you play with the settings, not all the fun for me :)


Vertex relative distance locking As in the title i want to lock the distance between a group of vertices so when i edit the object they won't move in the group but be able to move as a group.

Those are the vertices.

Can it be done?

I don't believe that it's possible to actually lock vertices. I can think of a workaround though.

Select the vertices you want locked in vertex select mode, and press H. This will hides them, so you won't be able to move them around.

When you're done, and you want to bring them back (unlock them) just press AltH