Can viewport playback be improved by moving elements to other layers? I am currently working on project that is made entirely of 2-D elements, images-as-planes.  I have the whole scene on one layer right now and the viewport playback speed has slowed down badly.  I have changed the fps to 24 and have checked "frame dropping" but the best it can do is 15 fps.  If i moved parts of the scene to different layers and then made them invisible would I be able to improve viewport playback speed? All of the elements are images-as-planes and are being loaded from an external hard drive; is there a way to bake an image-as-plane so it does not have to be loaded over and over?

Would packing all the external data into the Blend file reduce the problem?

And finally, if 15 fps is the best I can do with the viewport, is there any problem with rendering the final project as 15 fps ?

Thank you!

Blender viewport performance is known to degrade with many objects, and frame rate can decrease significantly depending on scene complexity.

The rendering system is a bit archaic and doesn't currently take full advantage of high end hardware, it's planed to be overhauled in the near future, but unfortunately there is not much one can currently do to to overcome the underlying problem until then.

Where your images are loaded from (external hard drive, local disk, or packed in blend file) as little effect on viewport performance, except when reading them for the first time, before they are loaded into memory.

That being said, hiding objects that are not needed has a huge influence in viewport performance, you can either hide unneeded objects, move them to different layers, or even organized them into several distinct groups and use the Outliner to toggle viewport visibility en-mass. All those should have a positive impact in performance.

Additionally depending on what render engine you are using, (if you are in Blender Internal or Game Engine) you can switch to GLSL viewport shading mode which is said to have slightly better performance. N Properties Panel > Shading > GLSL

If you have an nVidia graphics card you can also try to turn on VBOs in the user preferences, which generally give quite a considerable performance bump in many cases. You can find it in User Preferences > System Tab > OpenGL Column > VBOs Checkbox.


How to get rid of wrinkles How can I get rid of this wrinkles? Any help would be appreciated.

.blend file : https://drive.google.com/file/d/1vFLS6B21GgeRlYZSQhvdItLg6IqvyVYz/view?usp=sharing

I think there are too many problem in your topology to be able to answer with few words, for example I see that there is a transversal edge, so I drag up a vertex that is supposed to correct the problem, now I see that you actually had several vertices overlaying, so you need to remove doubles, also you have many ngons, etc...

For example, if you use the knife tool you can create quads and correct the topology:


Particles are not killed when video is rendered I have 2 images (as planes) and a particle emmitter in between. When previewing, no particle come through the image as in this screenshot: Link

When rendering the video, the particles do come through the image (as plane), like this: Link to second screenshot. Why is this happening? I have "Collision" physics with "Kill particles" checked for every mesh and node.

Here is another screenshot which describes this pretty good:

I can confirm that the collision system (die on hit) is not 100% accurate or at least is not calculated when two meshes touch (it could be also because of settings from the "integration" panel under physics - like integration type, Timestep or Subframes).

The solution I can suggest is to create a duplicate version of your collision mesh and move it a little closer to the emission object. Set this duplicate as collision and hide it from the render.

It will act as emitter killer, but it won't be rendered.

The distance from the original object should be something around the RADIUS of the object you are using as source (calculated also with in mind the Scale of Render simulation).

Check this image:


Is there a way to connect two bones to one? I'm rigging a cat with two tails, using the default rigify cat armature is there a way to connect an extra tail rig to the main spine in any way? is there an easier method to achieve control of two different tails connected to one spine?

You can 'Parent' the extra tail to the same 'Bone' that the original tail is parented to. A Bone can have multiple 'children' but only one parent.


Link Keyframes to Markers Is it possible to link Keyframes to Markers?

I'm at the point of creating more complicated animations and have created a number of Markers at key points in the timeline. It would seem logical to me to be able to link keyframes to markers so that moving a marker would automatically move the associated keyframes relative to the associated markers - for example, if one keyframe was 25% of the way between two associated markers then moving one of the marks could rescale the associated keyframes so that they remain at 25% of the way between the new positions of the markers. Is this possible?

I know I can select the keyframes in the dopesheet and move/scale them from there but moving markers and having them move/scale automatically would seem somehow more logical. Or is there a better way?

At this stage - no. A marker can be linked to a camera as a way to change the active camera during an animation but there is no link between markers and keyframes, it is not possible to move both markers and keyframes at the same time.

It would be possible to create an addon that would allow you to move markers and keyframes at the same time.


Python Script to import obj and create collections I’m having trouble updating a script that worked in Blender 2.7 over to 2.8. Since Scene Layers have been changed over to Collections. The script takes all the OBJ files from a location and brings them into Blender, which is working great.

The issue is after the objects are added to their collections there is also another "linked" copy in the Outliner.

Why is this a problem? I want to hide all the collections apart from the first one. Having these linked objects means when I try and hide the collection the object(s) stay visible.

Does anyone know how I can import objects into a collection without it linking a new copy?

I tried bpy.ops.object.move_to_collection function instead of linking objects. But I could not make it work in my script.

Here is the script:

import bpy
import os
import glob

directory_im = 'C:/Users/mila/OneDrive/Desktop/OBJ for test/'
files = glob.glob(directory_im + "*.obj")
for f in files:
    head, tail = os.path.split(f)
    collection_name = tail.replace('.obj', '')
    bpy.ops.import_scene.obj(filepath=f)
    myCol = bpy.data.collections.new(collection_name)
    bpy.context.scene.collection.children.link(myCol)
    for ob in bpy.context.selected_objects:
        myCol.objects.link(ob)

And this is how it looks like after the import:

I guess what happens here is that the command bpy.ops.import_scene.obj imports the obj files into blender as children of the Scene Collection (i.e. bpy.context.scene.collection). This just seems to be the behavior of that import command and there seems to be no parameter of that import command allowing you to change the behavior.

Now, your code creates new collections and links the imported obj's to those new collections. Linking means that these obj's are referenced by those new collections as well as the Scene Collection.

The point here is that objects can be referenced by as many collections as you want. This effectively allows you to build a graph, not just a tree. That behavior resembles the behavior of layers in Blender version < 2.8.

What you need to do is unlink those obj's from the Scene Collection which you can do by adding an unlink command in your for loop:

for ob in bpy.context.selected_objects:
    myCol.objects.link(ob)
    bpy.context.scene.collection.objects.unlink(obj)


Blender 2.78c crashes on startup This message is displayed in the command prompt when I launch Blender:

    Switching to fully guarded memory allocator.
read file
  Version 272 sub 2 date unknown hash unknown

ordered
 OBCube
 OBLamp
 OBCamera
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
ED_screen_refresh: set screen
found bundled python: C:\program files\blender foundation\blender\2.78\python
Fatal Python error: Py_Initialize: unable to load the file system codec
  File "C:\Python26\Lib\encodings\__init__.py", line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax

Current thread 0x00000e0c (most recent call first):
AL lib: (EE) alc_cleanup: 1 device not closed

Any idea why Blender is crashing? Is my python version wrong? :(

Uninstalled my old python version. Blender is running now.


how bake three different materials belonging to an object into one single textured one I have a texturing Question. I wish to make a textured bread sliced in 9 parts. I textured the whole bread with projection painting, and after that I sliced it in nine parts. In the holes created, I made a surface on every side of the slices which were textured creating a new UVMap and new material. Now I want to bake the three textures (the crust and the two sides) of every slice into one (the fourth), to export it to an external program, but every time, some parts remains white. However, the method works with the ends of the bread, where there is only a single section. I attach a blend file example with a slice and one end, sou you can see it. I use Blender 2.79, 64 bit in Windows, and I work with Blender Internal Renderer.  Thank you.

blend file

After some correction I got the baked image.

Second Figure is original .blend. There were some errors.
The Map name on the right is painted with a caution color. In addition to it, there are blank names in Map of other textures.
Blender is not specified what to use from multiple UV maps.
And perhaps the active material of object _2B.004 is UVMat.2A.


How do I make a normal/displacement map when all I have is a photo? In order to make a rendering look more realistic some additional maps are useful.

The documentation lists: diffuse,specular displacement-maps .

I watched a video tutorial The Secrets of Realistic Texturing which uses a commercial tool.

Are there any alternatives to calculate normal and displacement maps from an image texture, or can this also be achieved by some build-in transformations?

NOTE: As requested, this is related to image-textures that have been downloaded from a site like cgtextures which are image-only and lack of normal- and displacement-maps.

I've compiled a list of options when it comes to normal and bump map creation. All that remains is to try few of these out and see which results you like best.

To me, the most advanced of the free solutions is MaPZone 2.6, but I haven't tried any of these so I am not sure.

Or you can try the web based Smart Normal, for very basic normal maps generation.

Another tool is  Knald which offers high quality, accurate height maps generated from a Normal/Derivative or photo-sourced texture.

I didn't include urls, since they can be easily googled.


Blender Automatic Weights: Is it grabbing more mesh than it should? When I use automatic weights when parenting a model and armature, it works but there's an issue where it seems to grab more "mesh" around it. For example, when I rotate the left leg to test if it's been rigged properly, the leg moves but so does part of the right boot(it stretches and follows the movement of that leg)

Another example is the braids I've rigged, except instead of following another limb/the wrong bone, they stay in place when I move the character's midsection(plus the eyes also stay in the same place but I'm not going to worry about that now)

Does anyone else experience this issue with automatic rigging? If I were to change the model's default pose from the classic "T" pose to one that looks like a jumping jack and try it, would that help or not?

Here's a few screenshots of the issues I'm talking about but I will not be uploading the model itself(past experiences with thieves)

I've rigged a very basic "Test Model" for my game I'm working on and it's basically a blank mannequin in appearance that never gave me this issue. If it's because of the details, is there a way to avoid these random bits from moving with the wrong limb or detaching from the model?

I'm still fairly new to blender but I've learned enough of the basics to get me this far, however any help would be appreciated(again I'm not uploading the model file because of thieves)

Usually I join the clothes to the model but in this case I haven't because I want to update the outfit later on and rather then build from scratch, it'd be easier to switch them out.

I used the same method of parenting the armature and body for the dress, boots and hair.

Also if anyone knows how to make the eyes, teeth and tongue follow the head(WITHOUT joining these models to the main body) I would greatly appreciate it since whenever I try, the mouth becomes huge and appears in the centre of the grid.

Yes, automatic weights don't always give the desired deformations.  You'll likely have to weight paint things manually to get the exact look you're going for.  I'd set my weight paint mode to 'Add', and set the strength to 1.0, and weight paint the leg bones to 1 -- then normalize everything when you're done.

If you'd like the eyes, teeth and tongue to remain separate mesh objects, you can try putting an armature modifier on those mesh objects too, and weight paint those on the same way you would the rest of your model.


Invert primary values in a photo I am interested in trying to edit infrared photographs in Blender to match this process. In this process, the user uses Photoshop's Channel Mixer to swap the values of red, green and blue channels (other programs, such as Color Efex Pro, seem to do it too).

I assume this would have to be done in the Compositor, but I haven't found a way to do it yet. I tried separating channels but it didn't work.

Can one swap channels in Blender when editing photos or videos?

You can do pretty much whatever you want with the channels of an image with the compositing nodes. Look through the nodes in the Add menu(Shift+a in the Compositor). In the Converter section there are a lot of interesting nodes and amongst them Separate RGBA and Combine RGBA nodes that split and combine channels, so you can simply connect the channels in any order you want. You can also use all kinds of maths and other manipulations:


How can I change video (or image sequence) speed (slow or fast) in blender composition? I want to use slow down effect in composition. I can't find any control. I found time node.
https://docs.blender.org/manual/en/dev/compositing/types/input/time.html?highlight=time%20node#example

But I can't figure out how to use it.

You want to use Time remapping, a quick google search for that will help you.  Also when I get to a computer I will update this answer.


Apply 3D printed look / texture I'm really new to Blender but I'm not getting how the following has been done:
I wanted to have a texture that looks like 3D printed.
After hours online and trying, I still didn't figure out a bit and I found this thread: How to make a mesh look like it was 3D printed
The model from Leon Cheung (the first of the two monkeys) is exactly what I'm looking for: "I'd recommend the Wood procedural texture for this"
This might be really straight forward for you guys but i somehow don't get how this is applied...not even close. And at this point this is driving me nuts. Can't be that hard.
I'm running v. 2.83.0
Let me know if this makes sense and if you need anything else.
THANK YOU for your help!!!

Based on the link you provided, I think you want a setup that looks something like this:


Particles timestep not working in render (works in viewport) Working on my first scene! I have a particle emitter (from khaos plugin) and I want to create a slow motion effect (slow motion explosion). I increased mass and drag and lowered timestep to 0.001. In viewport everything seems ok, slow motion works, but when I render it in cycles time goes back to normal. Tried it in blender 2.90, 2.91, 2.82, same behavior. What bothers me is that I see a different thing in viewport and a different thing in the final render (time-wise only). Am I doing something wrong?

To anyone else who might find themselves into the same situation, the solution is to turn of the khaos plugin before rendering..


Applying textures to a maze I am very new to Blender so any help would be appreciated,

I am trying to create a 3D maze to import into an OpenGL project. I have created the object the way I want it for the maze now I just need to apply the textures to the walls, floor and top of the walls. I have not been able to figure out how to apply the separate textures efficiently. This is what my maze looks like as of now:

If someone could point me in the right direction to apply textures to the correct place that would be great. Ive tried to unwrap each individual face and apply the texture but it seems like there would be a faster way to do this.

To select each component:

Floor - select a face on the floor and hit Shift+G --> coplanar
Top - same as floor (just select a top face)
Walls - select any face from the top and any from the floor, select coplanar again, then invert the selection with Ctrl+I. Alternatively, select any two wall faces with different normals and select similar normals with Shift+G

To unwrap the floor and top, I'd suggest going into a top-down view and using project from view. Then scale up the UV's to be a reasonable size for a tiled texture.

For the walls, select and hide the top and floor components, then use L to select a section and unwrap with follow active quads (must make one face active in the selected group first). You'd need to do this for every island. This will give the benefit that the texture wraps cleanly around corners.

If you are fine without this benefit, select a wall face going in one direction, then do Shift+G --> normals, then unwrap with Project from View after setting your view appropriately. Finally, deselect everything and do the same to the wall faces going in the other direction.

Here is an example maze with concrete and dirt textures split with walls and floor by this method:

Another option is to use UltiMaze (disclaimer - I am the developer) and use tiled objects that are already textured. You can download the add-on for free here, purchase or read the documentation here, or discuss the add-on here. If you don't want to bother yourself with going to GitHub, use this direct link to download the master zip that you can install.

These "mazes", e.g., were generated using this technique:


Creating a hole out of an custom shape I'm having trouble cutting a hole out of this niche, knife project tool is not working. How can I do it?

Model:

To model a hole you will have to engineer a vertex by having an edge perpendicular to the edge shown. There are other options such as a bool. The main issue I can see here is that the surrounding topology could be better and any cuts would distort what you have due to the curves in the object.

Here is an option if you have a vert and I have shown it on a simple plane. You can take the process and do the same on yours but will need that edge crossing to create a vert.

Select the vertex

Ctrl + shift + b to bevel the vertex with 2 segments

Roughly get the shape of a circle.

Select the faces and right click to get your loop tools. If you do not have loop tools then get them via preferences add on (they come with Blender). Very useful to have if they are not already there.

With loop tools select circle and that will make your shape more circular

select i for inset and make a small inset to create a supporting edge for your circle and then delete the inner faces. Add the edge cuts (knife) to create quads.

With a sub surface modifier x 2 you get

Your issue here is getting that vertex. You could try this but I suspect it will distort at the bottom of the shape. Maybe it is worth a go but most options from here will probably distort a bit due to the existing topology.


Adjust "texture density" during UV mapping? I have a wood texture such as this one.

If I UV map it to a plane of the same aspect ratio, the spacing between the wood seams will be well preserved, and I can see the same patterns.

However, when I UV map it to a twisted, arbitrary surface, the vertical seams become so dense that no other texture (such as the circular ones) is visible.

How do I have a little control over the UV mapping such that the original pattern is still visible across my surface?

There are two ways:

1) classic; in edit mode select all vertices UV mapped, then open an UV image editor, select the wood texture, select all the UV grid and press S to scale it at the desired size.

2) If you don't want to modify the UV mapping, in the node material editor add an input UV node, plug it into a mapping node, and plug the latter in the vector input of the image texture node, then adjust the scale values.


How to store the contents of a variable in a file? I am using the following two scripts "text" and "print":

See the Blender file at:

https://drive.google.com/file/d/188u-SkTq5q7y1GSkdG4fgcaK6yMpHn6c/view?usp=sharing

In the logic editor I use a Keyboard sensor connected to a "text" and "print" scripting controller. Simply pressing a specific key on the keyboard executes the script "text", but, to my surprise, I see in the console that pressing the key causing the re-execution of the script does not increment i.

System console shows:

0
0
0
0
0
0

instead of

0
1
2
3
4
5

An experienced man told me that this is normal because the reexecution of the script does not keep the variable i in memory.
He told me that to remedy this, it is necessary to create an external file, use the fopen function, etc ... in order to save a variable which will be used during each re-execution of the script, but I do not know how to do it correctly.

Can you please help me to realize the script and use this external file?
Can this external file simply be an internal text file in Blender's text editor?
If so, what is its path to use with open ("text file path)", "r")?

Thank you for your help

I don't use BGE so I don't know how it works in BGE, but if you needed to store a value in a Python script in Blender you could store it as a custom property. The property can belong to pretty much anything, for example the current scene:

import bpy
bpy.context.scene['some_number'] = 50

When this script is run, the property gets saved with the current scene in the open .blend file. It can then be accessed by another script:

import bpy
bpy.context.scene['some_number'] += 15
print(str(bpy.context.scene['some_number']))

Everytime the script runs it adds 15 to it so the output when the script is run 5 times will be:

65
80
95
110
125

Obviously, if you open a new scene bpy.context.scene will point to a different scene so you could use a property of bpy.context.window_manager if needed.

You can use a file as well, you do not need bpy for that:

file = open("C:/SomeFile.txt", "w")
file.write("Hello World")
file.close()

file = open("C:/SomeFile.txt", "r")
text = file.read()
print(text)
file.close()

It is important to make sure Blender has write permissions in the directory used for creating the file. C:/ might be protected by the OS. You can just use your project's directory.

I don't think it is possible to write to Blender's text block this way. I might be wrong here. It does not seem to me like a very elegant way to store a variable anyway. I would use custom properties.


Hard Surface Texturing I'm currently working on a set of hard surface models, one of which I'd like to start texturing. Loosely speaking the model is a Tank and is a fairly early version,

What I'd like to know is if anyone can point me towards a good resource for learning to properly texture hard surfaces?

This is a pretty solid tutorial:

https://www.youtube.com/watch?v=IlMVx7HZH14

But all I really did to find it is google Blender Texturing video.

Try looking on BlenderCookie, too.


How to soften the edges/faces of a solid? (beginner)
If I have this:

How can i soften the edges in the following way?

It is very important for me to get Softness only along the XY axis, without changing the dimensions of the Z axis.
(sorry for my bad english)

What you can do is select the left and right edge, as well as the top and bottom loop like so (make sure to do so while selecting edges, not faces):

Then, click N to bring up a tab on the right. Under Transform, set the mean crease to 1 like so:

Then, add a Subdivision Surface modifier to your object:

And you're done, your model should look something like this:

The smoother you want the object to be, the higher the View and Render number in the modifier should be.


How to create a flower unfurling effect? The effect I am looking for is not like a simple flower but more like a plant unfurling over it's length. Like This:

I am not a beginner with animation nodes but in figuring this out the greatest problem is I don't really know where and how to start.

Here's a link to the actual video. -- By alex sirbu

Now to the question,
The effect is like the tip is moving forward while still unfurling.

So any help with understanding and executing this effect will be helpful.

Create a flower petal, use the object instancer node to duplicate it and connect it to a for loop.

The key concept will be the following: Connect a Time Info into Animate Number nodes. Use this value to drive the Rotation and the Scale to make the petals flip open and "grow".
Now all object will flip open at the same time. To make them open one after each other, qdd the instance number to the Time Info.

The rest is just getting the proper timing, spacing and interpolation.

This node setup should get you started.


How to make opaque glass lamp shade How do i make material like this lampshade?
Let light through, but not be transparent.

Thnx, but i solved it before i read your post.
This is what i got

EDIT:
Here's how i did it


Select object and recalculate normals via script? I have a script that allows to import and export .obj files which is working fine. However, I'd like to perform some operations in between these calls, for example select the mesh and recalculate the normals (outside). If I try that, I get a context error and I'm not sure why...?

RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect

    bpy.ops.import_scene.obj(filepath=source_to_file)

    print("Starting--------------------------------------------")
    for obj in bpy.data.objects:
        bpy.context.scene.objects.active = obj
        # go edit mode
        bpy.ops.object.mode_set(mode='EDIT')
        # select al faces
        bpy.ops.mesh.select_all(action='SELECT')
        # recalculate outside normals
        bpy.ops.mesh.normals_make_consistent(inside=False)
        # go object mode again
        bpy.ops.object.editmode_toggle()
    print("Ending--------------------------------------------")

    bpy.ops.export_scene.obj(filepath=target_to_file,use_materials=True)

How is it possible to know the object imported by any operator (there is no return value) and how can I recalculate the normals per object that is triggered by a button?

Making normals outside can also be done with the bmesh module operator recalc_face_normals(bm, faces)
Sample script
import bpy
import bmesh

from bpy import context

#bpy.ops.import_scene.obj(filepath=source_to_file)
bm = bmesh.new()
meshes = set(o.data for o in context.selected_objects
            if o.type == 'MESH')
for mesh in meshes:
    bm.from_mesh(mesh)
    bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
    bm.to_mesh(mesh)
    bm.clear()
    mesh.update()

bm.free()
#bpy.ops.export_scene.obj(filepath=target_to_file, use_materials=True)

Saves the need to flip mode and context object.


My Blender v2.83 didn't show "follow path" after press Ctrl+P Why are there no follow path options for the camera after pressing Ctrl+P?

To make a camera follow a path:

Add in a path

Select the camera

Go to object constraint properties and select follow path

Check fixed position , Follow curve and curve radius

Blender 2.79 had a hotkey Shift +Ctrl+C to add constraints


Forced material refreshing before render I am no familiar with scripting, but I can't see another way to solve my problem with material updating in Animation, so help me please.

Render engine is Blender Render and this button is a part of built-in Node Wrangler add-on.
Basic scenarion for the script is to select Output node in a list of materials (or at least one material) and click this Reset button on every frame change.

I didn't figure out how to automatically click that button, so tried to cut/create link between Output and previous node.

This code is kind of refreshes material named "Material" before rendering (at least my case).

import bpy
def remove_link(scene):
   mat = bpy.data.materials['Material'].node_tree
   node1 = mat.nodes['Mix']
   node2 = mat.nodes['Output']
   links = mat.links
   link = node1.outputs[0].links[0]
   links.remove(link)
   link = links.new(node1.outputs[0], node2.inputs[0])

bpy.app.handlers.frame_change_pre.append(remove_link)


cant unwrap lowpoly mesh Long story short : Im making a lowpoly mesh for game ready asset thing.
The guys who does this said i should remove any unnecessary loops. However removing some loops makes my unwrap wrong. I'm not finding a way without such loops.
Is it possible to make this unwrap without these loops ?

They are not loops anymore. You can check that by pressing Alt+Shiht+Click.

You would have to reconnect the corners (Snap these vertices to edge and Merge by distance or Merge (M) by Last) ...

And then select those edges and Delete (X) Disolve edges.

But I would rather keep these loops because of very spiky shape of face.


Basic concept question of Scripting What does class here mean?
Does it mean blender will use this class as blueprint to create a instance object of bpy.types.Panel?
(I'm new to python and blender scripting.)

The syntax class DerivedClassName(BaseClassName): is for declaring a class DerivedClassName that inherits from BaseClassName. In the case of your code example VIEW3D_PT_monkey_grid inherits from bpy.types.Panel. More information about Python's syntax and concepts can be found in its docs.
The code does not instantiate an object from the class, it only declares the class. In order to use the panel VIEW3D_PT_monkey_grid you will have to register/unregister it in the register/unregister function. This is how objects for UI elements are instantiated in Blender.
This answer by p2or should give you a complete overview of UI creation through Blender's Python API.


Faces shading looks strangely segmented after extrusions I extruded something from this Obj model and the shading looks segmented as if there were distinct models.

I have already checked that my normals are not inside out.

Normals look ok:

The issue is that you extruded faces which edges were marked as sharp (hence the light blue lines), so the extruded geometry kept those properties.

To fix that, select the concerned edges in Edit Mode, hit Ctrl E and use Clear Sharp function:


Extrude while sliding I learned about the slide operation on edges. I use it to select a border edge loop, press gg and then hold alt to slide and increase the size of the border faces. Now I'd like to use this while extruding, rather than moving the edges. I want to keep the original edges and faces, but get a new row of faces along the selected border edge loop. The new border edge loop would be the result of sliding as usual, only the old loop is still there.

Note I don't want to slide the border edge loop to be in the new position and then have to recreate a new loop at the old position.

For example the following shape, viewed head-on orthographically.

Say I want to extrude the selected edges by sliding them. Extruding and immediately scaling is no good: (e, escape, s)

Instead I want to extrude along the lines also used for sliding: (gg, hold alt)

However I want to keep the old edges too. I want to add a new row of faces, the same as when extruding, but the shape of those faces is determined the same way as when sliding.

I hope I make myself clear. I think this question is asking the exact same, however they did not get a correct answer.

Cheers!

To scale the outer loopcut (like Edge Slide with Clamping enabled does) scale along normals.
Press E to extrude and Esc to cancel. There were created double vertices which have the same position as their parent vertices.
Now press Alt+S to scale along normals.

Note that after the scale procedure is done scaling won't provide the same result as normals' orientation for newly extruded vertices changed; they will move towards the view point because of that (Edge Slide will work instead).


Emission object renders black Inside the barrel of the gun is an object emitting a gradient (purple - teal) light.  You can see the light is being emitted, but the object itself is black.  How do I get the object to render with the material I've applied to it?

Things I've tried:

Clicked on the camera icon right of 'UVMap_final' to activate it as the UV map for rendering.
Disabled auto smooth under Object Data -> UV Maps
Checked to make sure the layer is set to be rendered and isn't masked.
Added a hemi light above the object (although this shouldn't matter, the only object rendering black is one that I have set to emit light).

I feel as though this could have something to do with my node cycle settings (or lack thereof):

Here are close-ups of the object in "Materials" view and also in rendered view so you can see more clearly what I mean when I say the object is black:

Per request below is a screenshot of what the Gun.001 materials node setup looks like:

I found that this problem originated from deleting the extra materials that came with the exported Waveform (.obj) from Photoshop.  I believe this is a unique problem, probably different from the other "help my object(s) render all black" found around here.

To fix this I simply re-imported the original object and left all 5 materials that came with the object.  It's not an ideal solution for me because I would prefer to have one single material applied to all facets/sides of the object rather than have to manipulate and work with 5 separate ones for such a basic shape, however, this works 100% and addresses the source of the problem thus I'd like to close this out.

Example:

If I find further information regarding how to simplify the object's materials into a single mat, I will post that in a new question and link it here.


Texture behaves weird on a plane I'm in a making of a video game and I have an alpha texture on a plane. The plane is subdivided once (without smoothing). However, when I deform the plane symmetrically, the texture doesn't deform symmetrically even though the plane is symmetrically deformed. By any means of logic this appears very strange to me since the UVs are symmetrical with the image as well -

Flat -

Deforemed -

And as I move the bottom left and top right vertices on the Z axis, the texture remains still as if the plane is not deformed

What seems to be casing this and how can I fix it?

Every Quad is in reality 2 triangles and the behavior you observed is caused by this. Triangulate your mesh with Ctrl+T and rotate the created edges like you want with Ctrl+E > Rotate Edge CW / CCW.


Particle system objects rotated wrong I was watching this video on how to make a battle scene in blender, but the video cut out before finishing. I got to the end but when I put my mesh down they're all on their side! I've used turned rotation on and off but it didn't do anything ]3

Try changing the Initial Orientation in Rotation settings as indicated by the arrow. If the setting does not work try the other settings for Initial Orientation. One will work. You may need to go to the start of the particles frames and move through frames to see the result. The particle system display may need to calculate and play catch up.


How do I sperate an object while having both objects retain the same face? When I pres p and separate the cube I want the face withe raise pyramid to be on the bottom part of the cube and also on the top.  I want the parts of the cube to fit back together.

I hope my question is clear enough to understand as I wasn't exactly sure how to phrase it.

Select the faces you want, then duplicate them with Shift+D. Offset in the z-direction if you want them to stay lined up (Shift+D, Z, move mouse, left-click to make it stick). Once you've done that, you'll have something that looks like this:

From here you can separate the selected faces from the object, then go down to the original and delete the faces you don't want. (Another option is to duplicate the object and delete the unwanted faces in each.)


resolve camera from two photographs Could be blender used for resolve camera focus and position, and reconstruct real point position in space from two static photographs?

In some blender versions it seems that camera tracking can do this job, because it can handle two images as "two frame movie", but it does not work with different focal distances. Recent blender versions, moreover it seems, need some minimal count of frames.

No, blender rally can't do this,
but solution for now calls fSpy:

https://fspy.io/

Standalone application with blender plugin.
Formerly known as Blam.


how to get number of selected vertex and the number of total vertex with python? how to get number of selected vertex and the number of total vertex with python?
and how can I select an object by its name and make it the active?

You have multiple questions there:

import bpy
import bmesh

obj = bpy.context.active_object
if bpy.context.mode == 'EDIT_MESH':
    bm = bmesh.from_edit_mesh(obj.data)
    verts = [ v.index for v in bm.verts if v.select ]
else:
    verts = [ v.index for v in obj.data.vertices if v.select ]

print(verts)
print(len(obj.data.vertices))

and for the second question:

bpy.context.scene.objects.active = bpy.data.objects[name]
# fix shortcoming identified by Omar :
for obj in bpy.context.scene.objects:
    obj.select = ( obj == bpy.context.scene.objects.active)


Issue with creating an Object Array I'm having an unexpected problem while trying to create an object array.
I've followed a few video tutorials and I don't see what I'm missing.
What I'm trying to create is something that would resemble jet engine fan blades as viewed from the front.

So what I've done to do that is:

1) Create my object, scale and position it to where I want it.
2) Create the empty axis object
3) Select my primary object in edit mode.
4) Add the array modifier
5) Set with the following settings (Count 4, deselect relative offset, select object offset and set it to the empty axis object);

Exhibit A:

As you can see, it generates some sort of multiplication of the base object size along the x axis.  Further, if I rotate them, they will distort while hey rotate.  So what did I do wrong?

Exhibit B:

Exhibit C

The first issue revealed a second issue, both of which were corrected.

1)  For the first issue, the jet fin object needed to be scaled (Ctrl+A in Object mode, drop down menu select Scale)

2) The follow up issue was due to the origin point of the jet fin object and the empty axis object being offset along the Y axis.  Resetting the jet fin object to zero fixed this.


Why are my model's clothes collapsing in on itself? I've just finished doing some animations for my model for my Unity game and I noticed that on the top, it sort of collapses on itself (see screenshot provided) and I'm not sure why it's doing this.

I had a look around and everyone talks about how the model's clothes clip through the body but not the clothes itself.

The top only has 1 layer, it's not a box shape but I believe I have used one of the modifiers to change the thickness of the material(I was following an online tutorial but removed the cloth simulation due to it causing more errors then it was worth but even after removing the cloth simulation, the material kept the same thickness)

If screenshots could be included with any helpful advice, it would be greatly appreciated as I still consider myself a novice when it comes to blender :)

Also please note that due to this model appearing in an upcoming game, I cannot share or upload the model, sorry.

The simplest solution is to remove the inner faces of the clothing model, since they should never be seen when worn on a character. In game development, its in your best interest to exclude any faces of a model that will never be seen, so you don't bog down your frame rate with excess geometry.

If you absolutely must keep the inner faces of cloth on your character for whatever reason, then your issue exists in the outer vertices of the cloth having more or less influence than the inner vertices. You'll want to improve your vertex weights to accomodate the thin thickness of the cloth.


Animate 2D Circle being drawn I am trying to get the effect seen in the answer for this question How do you animate the labels for a diagram in Blender? to work on a circle. I created a new curve -> Circle, set it to 2D, set fill to "none", increased the bevel depth and resolution, and then animated the bevel factor, but to no avail. How should I go about achieving this?

A Curve>Circle is not going to work for what you want to do, a circle is a closed path and you need an open one.

Create a curve and make the circle so that the start and end point of the curve are in the same place, but do not close the path.

Then animating the start or end of the bevel factor should work fine.


Blender 2.8: Join doesn't work In Blender 2.8 I tried to join several objects together using CTRL + J: function doesn't work and can't find it elsewhere. I want to join into 1 object so that I can append that file to a new one and not have to import several objects. Anyone know how to join in 2.8?

Link to .blend file

If you select every thing Mesh objects, Lights, Camera etc then open the Object menu you will find that the Join option has been greyed out, and it wont appear in the search either.

If you select only the Mesh objects then you can use the Join function and Join operation will appear in the Search.


Import SVG option doesn't appear on the import menu I am using Blender 2.81 and 2.82a.
I want to import a SVG graphics, but the import SVG option doesn't appear on the import menu. I checked on both Blender 2.81 and 2.82a and it doesn't show. I checked on Add-ons, and the only import add-on I see is the AutoCAD DXF. Is this normal?

Does anyone know what can I do to bring the import SVG option back?

Thanks

Enable the Import-Export SVG add-on in the user preferences


Smoke Simulation Breaks Apart I have been having a problem with a smoke simulation that falls apart after about 60 frames, and I can't for the life of me figure out why. For the first part of the simulation the smoke looks as I would expect but then it falls apart. The smoke is being produced from a particle emitter set to produce 1500 particles for 15 frames. It is for a train smoke simulation, and the domain is parented to an empty that the train is also parented to and begins to move at the time the simulation starts.
There are wind force fields - turbulence and wind. But removing the turbulence made no difference. I've done everything I can think of - including using a single emitter which actually was worse. It looks like there is an animated force field - something I definitely didn't do deliberately and cannot find anywhere anyway.
I just can't understand why it breaks apart the way it does. Note the screen grabs...the first picture shows what the simulation looks like just a few frames after the one on the right.
Has anyone seen this before? Can illuminate?

Select the emitter object and in the smoke physics tab turn up the Sample Sub-steps. That may help.
What I did when I was experiencing this issue is select the domain and in the domain physics tab under 'Field Weights' I turned off every field except for the one in my scene (which was only a turbulence field that was parented to the emitter object)
Hope this helps. :-)


How do I adjust an image on a sphere? Hello I'm new to blender and my goal is create 3D Countryballs, however, currently I'm stuck trying to make the flag on the sphere appear as it does in a reference 3D countryball I've been inspired by. Am I incorrectly applying the image or do I need to go about the application in a different manner. All help appreciated!
1st image (my work):

2nd image (what I'm trying to imitate):

From your screen it seems to me you use Sphere object (not IcoSphere).
Blender basic objects are unwrapped automatically. Image node is also automatically mapped with UV coordinates.

For the country flag you can use UVmap generated by default (when object is added).

Switch to UV Editing layout, in 3D view switch to edit mode, select all vertices
in UV Editor appears UVmap so just select all and stretch on X axis until you see image as circle

To avoid repeating texture from backside change Repeat to Extend in Texture node.

Your reference image deformation in corners is same so I guess it was unwrapped in the same way. If you want to avoid thouse deformations you would have to apply black parts separately or change UVmap.
Another option is to use object to control texture coordinates.
If you add any object (I used Empty) and for Sphere material you add some image (logo in my case) you can mix them together.

By default image texture is positioned to object by left up corner, so I used Mapping node to shift center of logo to center of Empty.
To follow Empty surface of Sphere enable Snapping > Face and check Align Rotation to Target.


Why are two of the teeth stuck in space away from my dinosaur? I'm sure there are a lot of other issues with my file, because this is basically my first actual animated rig in Blender, but the only issue I'm really concerned with right now is the two bottom teeth that are floating in space.

In edit mode with the mesh selected as well as rest position of the armature, the teeth are in exactly the right place. But when I'm in pose mode, where I've actually animated the dinosaur, two of the teeth are floating in space. Please let me know how to get them to stay in the mouth where they're supposed to be!

Thanks in advance!

Without knowing the details of your rig, the most significant difference between the two floating teeth and the adjacent teeth or the teeth on the other side is the vertex weight in the DEF-jaw vertex group.

Assigning full weight to both teeth for this group seems to fix the problem.


How do you make the hat transparent but show the parts that are colored in? I was trying to figure how to make this black part on the head transparent and the one that isn't black not transparent. This is 2.80

If you use Cycles and the black parts in a Image Texture, then you can use Mix Shader to use transparency.

The other way (with Image Textures) is just using Transarency of the Image (png file with transparency e.g.).


Switch between two locations I have an object that I wanted to only be limited to two possible locations, ex: X=0 OR X=1... so if the object is on X=0 and I move it forwards, it jumps to X=1, and if X=1 and I move it backwards, it jumps to X=0.

Using the Limit Location constraint only allows me to limit the object location inside a range (if min=0 and max=1, location can be 0.5, 0.3, 0.8 etc).

Is there any way to do it, even if using drivers and python expressions (maybe using an OR logic gate)?

For simplicity and avoiding the use of extra information:

You can check 'use self' which allows to get data from the object directly.

Using 'self' calculates the expression during the move, but keeps the current value (so that no circular dependencies) and finally apply the expression.

So for instance if the expression is:

(self.location[0] <= 0.5) * 0 + (self.location[0] > 0.5) * 1

you obtain:

Edit: of course in this case, the expression can be shorten to:

self.location[0] > 0.5

Edit2: following the comment of @DuaneDibbley, for your information.

A Python boolean expression can be True or False and True is numerically equal to 1, False is numerically equal to 0.

So you can use them as numerical values.


How do I fix this body rig Im using rainv2 using this link https://cloud.blender.org/p/characters/5f04a68bb5f1a2612f7b29da
im following this tutorial https://www.youtube.com/watch?v=_C2ClFO3FAY&t=784s
This is the problem im experiencing im fairly new to blender but know the basics to please help,
https://youtu.be/sb7xfeVRsfA
I dont know why the rig wont behave like normal it like the objects aren't parented to each other or something, I would really appreciate the help as I really want to do this tutorial, thanks.

You need enter to pose mode to do that

select the armeture and pres ctrl+tab
or you can select and change object mode to pose mode when armeture selected


How can I scale my fluid simulation so that the droplets aren't so large? I am trying to become competent with Fluid Domains, trying out various tutorial stuff.  Thought I would try to build a simple fountain to learn more about Inflow and Obstacles.  Here is the render:

https://www.flickr.com/photos/rootlessagrarian/32201697302

I figured out the timeline issue (I think) i.e. it seems that the fluid sim runs for X seconds (its own internal time) and I need to set X equal to the duration of my clip if I don't want a slo-mo effect.

However, I think there's a scale issue that I don't yet understand:  the water droplets seem awfully large and blobby.  I kept my fluid domain smallish as recommended by just about everyone, because I didn't want huge render times; and I thought that the .5 meter size shown in the fluid domain parameters indicated how the fluid was scaled within the domain.  But my finished render looks more like macro photography, like a very tiny model of a fountain.

Can someone unconfuse me on this point?  How can I scale the fluid physics so that droplets, ripples, and other behaviours look right for a given scale of object (like an ornamental fountain maybe 2 or 3 feet tall)?

After Ray M rewrote my Question headline, the changed wording caused the site search engine to find a similar -- duplicate, actually -- question (Smaller drops in fluid simulation) and this led me to the answer:

Higher resolution will make droplets smaller.

I have therefore done a 2-hour Bake at resolution 200, and am awaiting a multi-hour render to see the result.  I think I'm learning that realistic Fluid Sim is very, very expensive in CPU time. [btw thanks Ray :-)]


How to parent object to armature without losing vertex groups Hi I have a mesh which I have already defined vertex groups for the bones but have not parented to the armature yet. I want to parent the object to the armature without losing my vertex groups (whenever I press armature deform envelope weights or automatic weights, my vertex groups are cleared and blender inserts its automatically calculated vertex groups for the bones). Is there a way to do this?

You can select your mesh, go to the properties panel, assign an armature modifier and choose your armature as "object".

If you use Ctrl+P
, "Armature deform" is the same, as long as you are sure not to have choosen "with empty groups", nor "with envelope weights", nor "with automatic weights".


Texturing Not Displaying Fully On Face I'm brand new to texturing and fairly new to blender. I can get the texture to appear on the model but it looks like only part of the image is actually on the face I assigned it to. Basically the face has about a fourth of the texture on it. It also looks like there's some folds in the face, or a slight bend, but I can't figure out why as there are no edges in it... See pictures for "with bend / crease" and "without".

My question is, how do I get the texture itself to display itself fully on the face, instead of the way it is now?

With Crease, The Model Itself

Without Crease, The Texture Itself, No Model

The problem is that you need to change the size/format of your UV map.
Go to edit mode in the viewport and then you will see the UV map in the UV/image editor:

EDIT: in order to see the uv map, you need to select the vertices in the viewport while in edit mode or select this option:

Then select one or all of the vertices in the UV/image editor and move/scale.


Is it possible to append objects to the same layer as they are in the source file? When appending objects to new .blend file, is it possible to make objects to retain their original layers?

When you click append, select all your objects then in the lower left hand corner, there should be an option panel. Untick the Active Layer option.


Why does .obj exporting hang and output so many files? I frequently encounter this issue while exporting to .obj that causes blender to freeze (or sometimes crash) and output hundreds of copies of the same file.

What's causing this to happen?

This happens when you have selected the "Animation" option in the export options. You get a new file for every frame that the number of frames is set to in your output properties.


Mirroring a mesh across the origin I made a path based on a background image, which is the peace sign. Now I've created a path and then turned into a mesh using Alt+C.

Since the sign is symmetrical I'd like to mirror this piece of mesh using the mirror modifier and make a separate mesh, which in turn will be moved along the x-axis. The overall goal is to use the knife project to carve a disk and eventually make the peace sign.

One of you guys here in SE has suggested going into edit mode and selecting vertices. That's not possible in here since the mesh is irregularly shaped from the path.

How can I make a separate mirrored shape?

As you can see, Blender is creating one mesh.

The problem is that your object's origin is in the middle of your object. The Mirror Modifier uses the object's origin to mirror from, so you need to do one of two things.

Either set the origin of the object to your 3D cursor
Or add an Empty to the center of your scene, and select it in the Mirror Object option in the Mirror Modifier to mirror from the Empty's origin


Best sound baking settings I'm building an audio visualizer in Animation Nodes. It's working well, but there's always just a strong peak, rather than well distributed activity across the board.

I've been trying various settings in the Bake Sound node, to try and concentrate the sampling resolution on where the audio is most active, but I am still just getting a peak of activity concentrated in one area.

Here's a logarithmic spectrogram of the sound file I'm using (using Audacity). From this I'm reading that most of my frequency bands need to concentrate around 50Hz and 300Hz. Am I right?

How can I best set up the Bake Sound node to properly represent this audio?

In this answer I shall demonstrate what the Attack and Release values represents. Though, I will update the answer with more concepts and practical implementation as soon as I get the time.

Attack And Release

In music production, there is a concept called ADSR or Attack Decay Sustain Release. When we define an ADSR envelope of some sound, we are basically describing how its intensity changes over time by defining four values, that is, Attack, Decay, Sustain and Release. The Attack value is the time period it takes the sound to reach its maximum intensity when played, so if piano notes have low attack time, upon pressing a note, the sould will reach its maximum intensity almost instantly, on the other hand, if piano notes have high attack time, upon pressing a note, the sound intensity starts to increase smoothly till it reaches its maximum intensity after some time defined as the attack value. The same goes for the release time, release time is the time period it takes the sound to vanishes. So if a piano has a low release time, upon releasing the note, the sound vanishes instantly and if it has a high release time, the sound takes sometime to gradually decrease till vanishes. A typical ADSR envelope is shown below:

Where A is the attack time and R is the release time. Decay and Sustain are not essential to understand for us. So what does the attack and release values mean for us in Animation Nodes? Well, it means that for low values of attack and release, the intensity changes rapidly and for high values, they are more even and slow. Below, the sound intensity controls the bars height, the right bar has low values while the left one has high value:

So if you want your music visualizer to have rapid changing intensities, choose low values and if you want otherwise, choose high values.


Same animation is displayed different in edit/object mode when animated object is selected I made an animation in the edit-mode and then I noticed that it looks different in the object-mode.
I wonder why there is such a difference, and I have no idea what thats causes.

The problem appears only if I select the animated object.

Here is the animation in the edit-mode:

And here in the object-mode:

Maybe it has something to do with the empty objects, or with the empty objects in combiation with the path.
I already tried to change them but that changed nothing at the outcome.

So why is there a difference, and how can I remedy this?

The Blendfile is attached.

EDIT: If I delete the path the problem is gone. But I need the path.

There are transformations and deformations by modifiers.Enable Display Modifier in Edit Mode on the modifiers to see the modifier effects in edit mode. Optionally also Adjust cage to modifier result.


Toggle Grease Pencil "Use Lights" value using Python I'd like to toggle the checkbox shown in the image with the Python editor in Blender, but can't find anything in the documentation that matches what I'm looking for.

You can use:
bpy.data.grease_pencils['GPencil'].layers['GP_Layer'].use_lights = False

The grease pencil object is:
gp = bpy.data.grease_pencils['GPencil']

Its 'GP_Layer' layer:
gp_layer = gp.layers['GP_Layer']

And its use lights property:
gp_layer.use_lights


Efficient Landscape Mesh Optimization I need to render an expansive landscape on a render target which lacks the ability to do heightmap-based displacement or mesh subdivision operations in hardware. Thus my only option is to bake the mesh and split it into separate static models to be loaded and unloaded when needed.
As for the landscape mesh itself, being a displaced subdivided plane, there are many relatively flatter/less dense in detail areas in the mesh that don't need nearly as many quads to be represented, but other than going through the entire mesh by hand I don't know how I can efficiently optimize the landscape.
Is there a script/workflow/outside program that can take a mesh of quads and convert it into a mesh of more efficiently-placed triangles/quads based on the shape topology? I don't know if this is the best way to word it so if more explanation is needed please ask.

A landscape mesh can be simplified, while retaining most of the shape, using a combination of tools.

The decimate modifier using the planar option
Triangulating the mesh in the edit mode

Example:
This is a mesh for a portion of Bryce Canyon formed from a quad mesh. It has about 21,000 vertices.

Applying the decimate modifier with the planar option selected and 3degrees, then applying removes about 1/2 of the vertices, leaving about 13,000 vertices.

After applying the modifier and entering edit mode, the resulting mesh has the flat regions automatically merged. A final step is to triangulate the mesh in edit mode.

Note, there are other tools in edit mode that can help simplify the mesh:

Select > Sharp Edges to select edges with high angles
Mesh > Clean Up > Limited Dissolve to eliminate edges with low angles
Mesh > Clean Up > Degenerate Dissolve to eliminate long skinny facets


Fluid running into invisible wall So i'm trying to make a fluid simulation where the fluid runs in a glass pipe and falls out. My problem is it doesn't fall out, it hits an invisible wall at the end of the pipe.
The obstacle is set to shell, i am in cycles render and everything seems to be fine. Does anyone know why it's doing that?

Invisible wall? Are you sure it isn't just the fluid domain?

Check your other layers. It's possible one of them has an object in it that is interacting across multiple layers and influencing your fluid sim even though it's not on the same layer.

Also try pressing alt h to unhide all objects. Try setting the obstacle to volume only. Test these out by baking at a low res so you know it would work with a higher res.


Timeline zooming question Is there a way to zoom into Timeline (Mwheel) at the current frame, instead of at the middle? 2.79b

A Web search turned up Why am I always zooming at center of grid?, which didn't help.

Numpad 0 may do what you want.

Numpad 0⌨


Equirectangular world-map UV layout My first time posting, but I've already learned a lot from lurking around here over the last week, so thanks all.

For my first project I wanted to model the earth 100 million years from now based on the youtube linked: https://www.youtube.com/watch?v=uGcDed4xVD4

I started by projecting an equirectangular displacement map (white continents, black oceans) onto a globe, and then extruding the continents with a displacement modifier. I then sectioned the continents from the globe using a boolean difference modifier with a second globe just-about the same size, leaving me with a loose continent "skin". I seperated the continents into individual objects, rigged them and moved the continents, and voila:

And that's where I'm stuck. I want to unwrap this new earth and create a new equirectangular world-map from it, but for the life of me I can't figure out how. Straight unwrapping it isn't working. I suspect the combined geometry of the raised continents and globe and everything is just too complex. I've tried simplifying things using decimate, I've tried dissolving and otherwise cleaning up, I've even tried shrink-wrapping another globe over the model and using THAT instead, but I can't seem to get rid of the shrinkwrap "stretch lines" around the raised areas.

I'd appreciate any advice. I'm new to blender and to 3d in general, so my understanding of modelling is limited to what I could glean from forum posts and youtube tutorials - I expect there are much better ways to solve this problem than how I went about it.

Here is a .blend containing the model as far as I've managed to take it:

Note: Each face on the sphere is 10 degrees by 10 degrees, but I've added a cylinder each at 0 latitude and 0 longitude for convenience. I left them out of the model I tried to unwrap.

Thanks lots.

Set camera to side view, press "u" and select "Sphere Projection".

If you want PRECISE equirectangular projection, you'll need to write a script that generates uv coords based on vertex position. Shouldn't be too difficult, seeing that your geometry is normal sphere.


Exporting from .obj to .fbx source code I dont know if this is the right place to ask..

For a programming assignment in school I need to find in the source code where the export is made to an FBX file. Do you have any idea to where I should start to look? I've built everything with Cmake(it does not compile without 500 errors) and got a Blender project open in VS.

You can find the FBX importer and exporter code in the addons folder:

Blender_Installation_Folder\Your_Blender_Version\scripts\addons\io_scene_fbx

On my system it's here:
C:\Program Files\Blender Foundation\Blender\2.74\scripts\addons\io_scene_fbx

More about paths in blender in different operating systems

By the way, you don't need to compile from source to see this code's source, since this is a python script (you can just download and install an ordinary package for your operating system).


Object is hollow with boolean modifier I was following this tutorial https://youtu.be/WxMwa0njGSM?t=327, at 5:27 we can see that the object is full inside, but when I try to reproduce, it's hollow (1st and 2nd are mine, 3rd is tutorial screenshot)

Searching on google I see that being hollow is normal for Blender, but that doesn't explain how the tutorial author made it solid by default?

Boolean modifier is applied on Anvil (=cube), as Difference with the Cylinder. Also the author has version 2.78.5 while I have 2.82.

Files:
*
*

I know I'm 6 months late for this but I would just like to share an answer since I was also currently doing Andrew's tutorial for the Anvil and I also encountered this problem. I think the issue here is that after deleting the half of the model, you basically declared to Blender that your particular model is open and empty inside and that is why whenever you apply the Mirror modifier, you end up with a hollow model since the base model was hollow in the first place.
The solution I found for this is after deleting the half of the anvil, select all the vertices that were left and press F to create a new face.

Then do the rest with the Boolean modifier and the model should be solid inside. And also make sure that the Boolean modifier is on top of the Mirror modifier to see the cut on both sides. Hope this helps :)


Cylinder Subdivision Surface Modifier Problem - Smooth Shading When I add a cylinder in blender and then add a subdivision surface the vertices of the cylinder get all rigid and pointy. How do I make the cylinder have smooth faces when using the subdivision surface modifier without it making the vertices rigid. I want the cylinder to be smooth so I can model something like a cup. Even after I add the subdivision surface and then put smooth shading the vertices are still rigid and pointy and even when I subdivide it as well.

To subdivide a cylinder with a Subsurf modifier, you'll need to add holding edges to where you want the edges to be sharp.  This can be achieved by using the bevel tool.

While in edit mode, Alt-select the edges that you would like to be sharp, then press Ctrl-B to set a bevel width.  I set the amount of Segments to '2' and a Profile of '1' so that if I need to remove my holding edges, my original edge will be where I originally had it before beveling.

Afterwards, you can add additional ring-cuts on the flat surfaces (Ctrl-R) to avoid any visible triangulation in the rendered result:


My blender textures are only visible when in texture paint, but disappear when in any other mode I made a cylinder and UV unwrapped it with with an image in the UV editor. I start painting textures and they show up, only to disappear after I go to a mode other that texture paint :/
Also, I forgot to mention, I'm sort of new to blender and don't know how to use nodes and some other stuff.

You can add a new material and apply the texture you painted to it and then you can go to material preview or rendered view to see if it looks good.


Weird problem with BEVEL modifier In the image below you can see a switch button selected and its modifier set to 0.001 (1 mm) of bevel.
As you can see, the scale of the object is 1,1,1.
Right below the button is the plaque, also with the same exact bevel modifier. All the values are the same, and also the plaque is scaled 1,1,1.
Yet the bevel size is totally different.
Wasted half an hour already to try to understand what can be wrong here, but I really can't get it.

The smaller object has Clamp Overlap enabled, so it's not actually being beveled by the shown Amount. You have to disable it.
Clamp ON

Clamp OFF


How to scale an animation in blender I have an animation in blender, but its very small in dimensions. I have to scale it to a factor of around 10. However, I just realized that just scaling an object won't actually scale the whole animation ( while rendering ). Is there anyway with which I can scale the whole animation ( including each keyframes )?

Thanks

EDIT: Sorry for the confusion, I dont want to extend the moving area of the animation. I want to increase the dimensions of the image used in animation. When I am trying to scale up the object in 3D view, it does scale the animated object placed on the scene, however, when I play the animation, the scaled dimensions aren't preserved.

I hope its a bit clear now what I want to do.

Thanks

Go to the graph editor,

place the 2D cursor at the origin (the arrow on the screenshot below),
choose the 2D cursor as pivot . (the rectangle below)
select all A (or only the keys you want B)
scale S on the vertical axis Y


Problems animating bones-paper plane After practicing sculpture, I decided to get into animation and run into a problem. I started practicing animation, but I have a problem.
I chose the bones for this exercise.
The exercise was to make a turn of paper and I wanted it to fly, to do it in other ways, but I had never done it before with bones.
At the time of trying to fly, the plane is deformed very ugly.
Any idea how to fix it?

You can join all your bones to make a unique armature (ctrl J) or recreate your armature from scratch. In both cases it's better to create an additional big bone which won't have any weight on the mesh but will be the parent of all your bones. To do that you will have to select all your bones, then, at last, the parent bone you have created and ctrl P > Keep Offset. You also have to control that the influence of your bones on the mesh is correct, either in Weight Paint mode, or with Vertex Groups assignments.

When all this will be finished you can create the wings animation and repeat this animation in loop with the NLA editor, and move the whole armature along a straight line or along a curve with a Follow Path.


Why did Global Texture Coordinate disappeared in Blender 2.80? Global Texture Coordinate disappeared in Blender 2.80

I need Global texture coordinate for boolean cut texture animation

The global coordinates where an option that only existed for the Blender Internal render engine.

  Global

  The scene’s global 3D coordinates. This is also useful for
  animations; if you move the object, the texture moves across it. It
  can be useful for letting objects appear or disappear at a certain
  position in space.

It wasn't and isn't an option in Cycles or Eevee. The closest equivalent would be the Camera output of the Texture Coordinate node.

  Camera

  Position coordinate in camera space.


No connectors on shader nodes When I go into Shading and I load a new material it adds in the Principled BSDF and Material Output but they are not connected. When I try to connect the output to the input (left click on green dot) nothing happens. If I add more nodes it also won't let me make any connections between them. Do I have some setting turned off causing this? I am using Version 2.82.7

Did you try dragging the connectors instead of clicking them?


How to create vertex at the middle of a group? I am currently working on a model of a cute little microbe with these little green hair things coming out.  Currently, the hair object ends with a ring of vertices, but I want to create a single vertex connected to all of the outside vertices, like how a UV sphere is when it is created.  How do I do that?
The first image is the hair object currently, second is a newly created UV sphere.

With the face selected, press CTRL + F and select Poke Faces

Alternatively, you can inset the face with I and then press M (Merge), and select At Center.

Same result either way:


Add animation to armature which is already animated I imported a armature from Daz3d to Blender. This armature has an animation. Next I added another armature into Blender. Can I add the animation from the first armature to second armature?

Most animation data recorded in blender gets saved as an action, an action can easily be applied to another object, it will work fine as long as the animated data path names match in both objects. For an armature that means an action created with one armature can be applied to another armature and it will move bones that have the same name as the first armature.

For non-matching armatures not all is lost, but could be more work than it's worth. You can add constraints to have a bone follow the motion of another bone. If your animation is simple it may be easier to just animate the new armature, you can use the original as a reference to make it easier.


Need help moving the origin to center I got a logo in blender and im trying to rotate it 360 degrees. But when i rotated it i realized it isnt centered. I found out that the logo got some invisible edge or something, because when i do "Origin to Geometry" it still isnt in the middle. (Sry for my bad english + second project in blender)

If you can use some vertices to find the median point (such diameter, diagonal...), you could follow these steps:

In edit mode, select the vertices to find the median point and press shift + s to move the cursor to selected

In object mode, press ctrl + alt + shift + c to set origin to cursor


I was wondering if my render time is slow, for what I have Good afternoon everyone. So I'm currently using a GeForce GTX 1060 and my processor is an Intel i5 6600k but my render time for 1 frame is about 5 minutes which to me in way more than it should be.

Of course I'm using the cycles engine and here are my settings:

A file for the project I'm working on can be found here (yes it's a Minecraft scene)

http://www.mediafire.com/file/ut8xi4l84psu0lp/Darnies.zip

I have some experience with Blender and understand most of the basics and the settings but can't wrap my head around why this would take so long.

The questions I basically need to know are

Is my render time about where it should be
How can I speed this up (note my settings cause I've already changed a bunch)
Would it be advised to use Blender Internal if there is no other way of speeding this up
How do I know that my graphics card is working to its fullest (GPU rendering has been enabled in the settings and on the right tool bar)

Thanks for your time ^_^

Rendering takes time. How long is entirely dependent on the complexity of your scene, render size, the resources available on your computer, and the quality you are after.

It is normal to have a frame render for 5 minutes as it is normal to render in a few seconds, 5 hours or  5 days, it all depends on the variables listed above.

You can optimize your resources is by:

Setting the number of samples to the lowest number in which you consider the noise level acceptable.

Find the optimal render tile size. Depending on the complexity of your scene and the capability and vRAM of your card. Start with something like 128 x 128 and test by doubling or halving that number until you find what size render faster. The optimal size is unique to your system. A number that works for others might not necessarily work for you, or for a particular scene.

Other than that keep,
the detail of the vertices to the lowest number of vertices that you can. Bake simulations, maybe bake materials, optimize the size of your textures according to their size on the final render.


Remove Paint brush through python Can texture paint brushes be removed through Python ? I wanted to remove a brush of a specific name for example "Brush57". Removing it by shift clicking the x button usually sets it's user to 0 so it still remains in the memory. How am i to remove the brush from the memory/datablock ?

The brushes collection is available thru bpy.data.brushes  Like most (maybe all) ID object collections in blender, items can be removed with collection.remove(obj).

import bpy
# get the brush
brush = bpy.data.brushes.get("Brush67")

# if brush is None well make a new one for example

if brush is None:
    brush = bpy.data.brushes.new("Brush67")

# remove the brush

bpy.data.brushes.remove(brush)


Color hair particles by emitter's texture Following this answer I wish to color my particles based on the emitter's texture.
The problem is, the feathers of my papagei don't even remotely look like the colors from the base mesh's texture.
Here's what I see in the viewport. The mesh has the paint I assigned to it.
 I turned off the feathers for now, they are white btw.
Next is my material setup for the mesh (which is also assigned to the hair):

This featherColors material is what determines the color.
And lastly I present a quick preview render from the viewport, which is all brown-ish. Note that the mesh itself is colored brown as well for no apparent reason.

Could someone lend me a hand so the feathers pick up their colors from the emitter's texture?
Note that by "feather" I really just mean clumped hair particles. Those are not individual meshes.

Sod it, broke the connection in the material between Attribute and Image Texture and the problem is solved.


Python deleting objects with duplicate location? So, I have an imported UE scene with many duplicated objects. Like. 1000 objects and 100-200 of them duplicated 2 or 3 times.

Now my idea was to use Python to compare coordinates and rotation and then delete the "spare" objects. We tried around a few hours but couldn't find any working resolution.

This is the last code we've got:

import bpy
selected = bpy.context.selected_objects
tmp = []
for ob in selected:
    if ob.location in tmp:
       bpy.data.objects.remove(ob)
    else:
       tmp.append(ob.location)

Blender tells me that the object can't be deleted because there are still users left.
Including   ob.user_clear()
Makes Blender instantly crash.

Any ideas?

Be wary, ob.location is a reference to objects data

Use a copy of an objects location to your tmp list tmp.append(ob.location.copy()), otherwise you are keeping a reference to an object you may* be deleting. (Which crashes blender).  Will point out this isn't the case in the logic of question script

A simple script to demonstrate.

import bpy
ob = bpy.context.object
tmp = []
tmp.append(ob.location)
ob.location = (10, 10, 10)
print(tmp)

will always print [Vector((10.0, 10.0, 10.0))]

import bpy
from bpy import context

selected = context.selected_objects
scene = context.scene
tmp = []
for ob in selected:
    if ob.location in tmp:
       scene.objects.unlink(ob)
       # do_unlink to be sure to be sure
       bpy.data.objects.remove(ob, do_unlink=True)
    else:
       tmp.append(ob.location.copy())

Might also pay to check that (u-v).length < TOL where u is location of current obj, and v is each vector in the list, rather than trusting location in list.  On a few tests with duped cube works ok without...

Script below uses tolerance on each objects matrix_world.translation for global location.  It sorts the selected object list by this vector, rather than checking against another list every iteration.

import bpy

context = bpy.context

TOL = 0.00001
obs = sorted((o for o in context.selected_objects), key=lambda o: o.matrix_world.translation)
obs[0].select = False
for i in range(1, len(obs)):
    o = obs[i].matrix_world.translation
    p = obs[i-1].matrix_world.translation
    obs[i].select = (o - p).length < TOL


Animation Nodes: How to snow in the text? I have two examples below and I wish to make text drop in like snowflakes. How do I do that with Animation Nodes? This is for future projects with motion graphics.
Any assistance is greatly appreciated. Thanks in advance.

In second example below, how do I make random letters drop, again with Animation Nodes.

Starting from the position of each of the characters, create a random walk biased in the direction of the positive y axis. The random walk is easily done using a loop as described in the documentation. The path of the walk for the first character is shown below:

We are going to edit this slightly such that the first random step has no x component so that the tangent to the path at this step is pointing along the y axis, this will ensure the character will be upright when it reaches this point if we orient it based on the tangent. This is done by multiply by zero if it is the first step, that is, if the index is equal to zero. We will also add a Seed Offset, which is just an integer that is added to the seed to differentiate between different splines:

Then, we are going to loop over the character positions, use their positions as the initial point of the random walk, and their index multiplied by the resolution of the spline as their offset seed. The outputs of the random walk is used to generate a spline which is then evaluated based on some parameter iterator:

Finally, we generate the parameters using an inverse delay falloff and orient and position the the characters based on the output positions and tangents:

To achieved the second effect, simply shuffle the parameters list and maybe reduce the delay:


Realtime auto keying framing on the timeline don't work as expected on blender 2.81 Hello blender masters.

I'm trying to track and save on the timeline the facial movements of a character using OPEN CV and two custom python scripts that I found here :

https://www.youtube.com/watch?v=RY_eErKlilw

I'm using blender 2.81. This is how it works : after having loaded and ran the two python scripts I go in object mode and I click on the last icon located on the left of the screen,called "Open CV animation". As soon as I do that,a new icon called "OpenCV animation" appears on the right of the screen,under the Active Tool tab. After that I click on "Capture" and a new window appears. It is the OpenCV output window that shows that it starts tracking the face movements of the man on the source video. At the same time I open the tool manycam and I load inside it the video of the man who is talking. Good.

The 3d character that's inside the 3d view of blender starts moving,reacting to the facial movements of the man who is talking. Now,what I want to do is to save on the blender time line the facial movements of the 3d character in realtime,as soon as they are created. The problem is that when I'm on object mode and I click on "auto keying" no keyframes are added.

I tried also to click the "auto keying" button even when I'm on the pose mode,but also,no keyframes are added to the timeline. Can you give me some suggestion ?

I have attached a recorded video to show you what I do. thanks.

https://drive.google.com/open?id=1hDZ4qIlagSGhSum_mz1L0W0IHhBWZoJm

If you need to record an animation on the fly, you have to start the playback first. So that time goes on in Blender's point of view and it can record what you each frame passing by:

Without that, time isn't involved, only the frame under your playhead can be keyed, and it will only do so when a transform is validated (like when you move your object somewhere and release your mouse button to confirm).

Hopefully this is just what you need.


Modeling a bipyramidal shape I need to draw some bipyramidal shape in Blender (for a nanohub simulation) but I am completely new to this field.

Can anyone help me understand how to model such shape?

Create the bi-pyramid's base.

If the base is going to be a regular polygon, just do: Add > Circle, then look for this menu to change the number of vertices. The menu is obtained using F6 in Blender <2.79, or you can just find it in the bottom-left of the Viewport in Blender2.8+

Jump into Edit Mode (Tab). Select all the vertices (A), then Extrude upwards in the Z direction (E then Z). If you hold Ctrl after starting the extrusion, you can do it by snapping to fixed increments.

Deselect the top vertices, select the bottom vertices (I used the B Box Select tool), and Extrude them downwards

For both the top and bottom ends: select them, then scale to zero: S, 0, Enter

To finish, select all the vertices (A), then do Remove Double Vertices from the right mouse button menu (Blender 2.8+) or from the W button menu (<2.79)

The mesh is already done after step 4, but step 5 gets rid of redundant geometry and open surfaces (which is a requirement for many operations, including boolean, subsurface, 3D printing).


Antialiasing textures in cycles (Blender 2.77 and higher) I would like to get an answer to a frustrating question.

https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/Cycles

In this link is "Anti-Aliasing is now enabled for baking. (c359343)"

This the great news, and unfortunately in my case it is not working. I try to bake normal maps. I need to bake in full resolution (4k, 8k), and it is not possible to bake 4k and manually changing texture size to e.g 1024 to get in this way manually 4x AA. Currently, I must go to bake in Xnormal (Because I must use cage...Blender internal cannot by used). Xnormal uses AA in bake. The difference in quality is very high.

My question is: It is possible to bake in Cycles normalmaps with AA or if not, whether in the near future it is planned?

Sorry for my very bad english and best regards! Blender is the best! :)

Today I checked this again . It seems that Blender bakes almost everything except normal maps with AA . In Ambient Oclussion bake based on the settings in the samples overlap. In the case of the Normal Map settings do not the influence. So please someone versed in the subject matter of the transfer this information of the creators of the blender / notification a bug , etc. There may be a slight correction in the code allows you to add AA ? I see many people need this function.

This is not exactly a solution, but I highly recommend a program called 'Substance Painter 2' - it lets you do fantastic mapping and texturing for a relatively low price, You can trial it for 30 days free, and it bakes normal maps, AO etc all with AA much better than Blender does.

I actually gave up trying to bake normals with Blender, as the results always had errors and artifacts. Substance Painter made it really easy, I didn't have to use a cage anymore, and it was worth every dollar.

I got it via steam at 50% off a couple of months ago, so if you can't afford it now and you have steam, put it on your wish list.

Regards, C.


Everything is just Orange. Shockwave missing beats Can someone help me. I'm new to this and have made it far in 2 weeks, but being I am not an expert I've finally hit a dead end. If someone could help me, or flat out correct the 2 problems I'm having and tell me how you did it so I'll know next time, that would be great.

1.) Everything in my project is Orange and I only want my Shockwave, Wings, and Glowing Outline of my letters Orange like in my screenshot below (everything else comes out orange except my A). My big A is rendering all black and wont take on a color at all.

2.) My created Shockwave hits on beat in the Animation and Vid tabs, but when I render it and open the file for playback its hitting late and then starts playing choppy (out of sync altogether).

I have screen shots of the COMP. view, but as far as my Shockwave the screenshots wont tell you much you'll have to play it yourself. I really would love to finish my intro like this weekend coming up as I want to post a video on the 4th. If you think you can assist me let me know. I can send the rest of the screenshots. The actual project file is available below.

Since there is a lot going on I'm going to break it down into bullets.

The black A: Lights don't go across layers. Layer one with the A has no lights causing the A to be black.

Everything is orange because you only have one render layer and do the compositing to the whole scene. You need to make a non orange render layer and have it alpha over in the compositor. See the below images:

Settings for orange layer. Notice how only the second layer is selected.

Settings for non orange layer. Notice how only the first layer is selected. Also turn OFF sky.

I'm not sure why you have additional compositing to the viewer I ignored that. Coming out of your current final node use an alpha over to combine the render layers.

I don't do audio in Blender so I can't help you there.


How can I export animation? I just made an idle pose.

I manipulated several key frames, but then I watched a tutorial video

I am supposed to generate keyframe for every frame.

I don't understand what he means by that.

Anyways, I would like to make animations separately

like run, idle, attack and etc.

But then again, in the video he makes all the poses straight

and doesn't seem to divide.

To sum up,

Procedure for exporting an animation (things I have to checkbox and etc.)
Is it better to make all at once then divide export? or else?

Screenshot is added so as to explain my situation.

Select your armature and export in either BVH or FBX. This will export the animation of your armature in a commonly known format.

If you want to export parts of your animation separately then BVH is the way to go as you can specify to export a specific frame range as shown below:


Dynamic Paint is slightly shifted I'm using dynamic paint to simulate a marker on a paper using true-to-life dimensions. The brush is set to use proximity (distance 0.001) and I notice that the resultant paint is offset a couple vertices to the xy direction.
(1) Is this something that can be fixed? I have tried adjusting it to use mesh for paint, I have adjusted falloff, projection, the brush geometry (cone and sphere), and subdivided the canvas and nothing corrected it.
(2) If this is not something that can be fixed, how can I compensate with the shader? The vertex color node does not have any inputs that I could do a transform on.
Here's a demo of the issue:

I found that using "Image Sequence" format for the canvas instead of vertex was a far simpler solution that solved this problem (or at least made it easier to work on).
I'll leave this question unanswered as there may be a better solution that someone may find.


Is Blender the only open source Non-destructive editor? Blender's "Nodes" function seems to make it a non-destructive editor.

The "Mix" node enables the user to composite using "blend modes".
For me, the "Add" blend mode is the most important of these blend modes but often it the Add blend mode is not included in compositing tools.
This and the fact that Blender is seemingly non-destructive is the reason I'm using Blender.

I am currently using Blender as a 2D compositor only, meaning that my "RenderLayers" nodes provide Blender with an image that mocks a 2D vector (as though I were using Adobe After Effects's "Shapes" tool to composite onto image/video). I have always to ensure the camera is pointing 100% downwards i.e. in-line with the z-axis.

The problem is that Blender takes a long time to composite; The whole process seems extremely inefficient when I compare Blender with Adobe After Effects.

Please could you advise me on whether I should quit using Blender for this application?
Thank you for your time

If the problem is only performance, Blender can also leverage OpenCL running on the GPU and CPU to speed up the node compositing. From my experience, it significantly speeds up the process.

You can turn it on in the node editor panel.


Get "Object Color" property in Cycles I need a way to get the Object Color in Cycles. I was thinking about using the attribute node, but I don't know what to write in the name entry.

Is there another way to get the color?

Please don't edit the title or the description; when I write Object Color, it's because that's the name of the property.

In Blender Render, I just have to check this box:

I don't want "Vertex Color" or "Viewport Color"; I need the Object Color attribute.

Vertex Color:

Assuming that you mean Vertex colors, and that you want to get it in the node editor, then you would type the name of the vertex color layer into the attribute node:

From the wiki:

  Retrieve attribute attached to the object or mesh. Currently UV maps and vertex color layers can be retrieved this way by their names, with layers and attributes planned to be added. Also internal attributes like P (position), N (normal), Ng (geometric normal) may be accessed this way, although there are more convenient nodes for this.

Note that if you have a UV layer with the same name it will be used instead.

Object Color:

For the Object Color property, the answer is no, this is not possible with the Attribute node currently.

You could try using a driver to get the color into a node tree, however I don't think it will do what you want it too. The driver can only access the object color of one object at a time, so you wouldn't be able to use a different color per object in one material.

As an alternative, you could specify the different colors in the node setup by using object pass indexes and the Object Info node:

Create an "equal to" nodegroup:

Then setup something like this:

If the object index is 1, the object will be green.
If the object index is 2, the object will be cyan.
If the object index is not 1 or 2, it will be red.
The object info node uses the Pass index of the object as the index. You can set the Pass index in Properties > Object > Relations:

You could write a python script to automatically set the colors, Pass index, and create the appropriate nodes for all the objects in your scene.

Here is a script (thanks to iKlsR and sambler for answering my questions here, here, and here) that will automatically setup the pass indexes and create an "Object Color" node group which you can add to your node setups:

import bpy

# Add "equal to" node group:
group = bpy.data.node_groups.new(type="ShaderNodeTree", name="Equal to")
group.inputs.new("NodeSocketFloat", "Value")
group.inputs.new("NodeSocketFloat", "Value")
input_node = group.nodes.new("NodeGroupInput")
input_node.location = (0, 0)

group.outputs.new("NodeSocketFloat", "Value")
output_node = group.nodes.new("NodeGroupOutput")
output_node.location = (600, 0)

# Add a greater than node
gtr_math_node = group.nodes.new(type='ShaderNodeMath')
gtr_math_node.operation = "GREATER_THAN"
gtr_math_node.name = "greater"
gtr_math_node.location = (200, 100)
group.links.new(input_node.outputs[0], gtr_math_node.inputs[0])
group.links.new(input_node.outputs[1], gtr_math_node.inputs[1])

# Add a less than node
lss_math_node = group.nodes.new(type='ShaderNodeMath')
lss_math_node.operation = "LESS_THAN"
lss_math_node.name = "less"
lss_math_node.location = (200,-100)
group.links.new(input_node.outputs[0], lss_math_node.inputs[0])
group.links.new(input_node.outputs[1], lss_math_node.inputs[1])

# Add an add node
add_math_node = group.nodes.new(type='ShaderNodeMath')
add_math_node.operation = "ADD"
add_math_node.name = "add"
add_math_node.use_clamp = True
add_math_node.location = (400, 0)

# connect nodes
group.links.new(gtr_math_node.outputs["Value"], add_math_node.inputs[0])
group.links.new(lss_math_node.outputs["Value"], add_math_node.inputs[1])
group.links.new(add_math_node.outputs["Value"], output_node.inputs[0])

# Create main "Object Color" node group
main_group = bpy.data.node_groups.new(type="ShaderNodeTree", name="Object Color")
main_group.outputs.new("NodeSocketColor", "Object Color")
output_node = main_group.nodes.new("NodeGroupOutput")
output_node.location = (600, 0)

#Add object info node:
ob_index = main_group.nodes.new(type="ShaderNodeObjectInfo")
ob_index.location = (-600,0)

index = 1
# Iterate through all objects in the current scene, set the path indexes and create nodes with the object color
for object in bpy.context.scene.objects:
    if object.type != 'CAMERA' and object.type != 'EMPTY' and object.type != 'LAMP':
        object.pass_index = index
        col = object.color
        if col != (1,1,1,1):

#            add frame node:
            frame = main_group.nodes.new(type="NodeFrame")
            frame.location = (-70, index*200)
            frame.label = object.name
            frame.use_custom_color = True
            frame.color = (0,.005,.133)

#            Add equalto node:
            group_node = main_group.nodes.new("ShaderNodeGroup")
            group_node.node_tree = group
            group_node.label = "Equal to"
            group_node.location = (-200, index*200)
            group_node.name = "eq_" + str(index)
            main_group.links.new(ob_index.outputs["Object Index"], group_node.inputs[0])
            group_node.inputs[1].default_value = index

#            Add mixRGB node:
            mix_node = main_group.nodes.new(type="ShaderNodeMixRGB")
            mix_node.location = (100, index*200)
            mix_node.name = "mix_" + str(index)
            main_group.links.new(group_node.outputs["Value"], mix_node.inputs["Fac"])
            mix_node.inputs["Color1"].default_value = col
            if index != 1:
                main_group.links.new(main_group.nodes["mix_" + str(index-1)].outputs["Color"], mix_node.inputs["Color2"])
            else:
                mix_node.inputs["Color2"].default_value = (1,1,1,1)

            index = index + 1
        else:
            print ("ob-color is white")
    else:
        print ("is camera or lamp")

main_group.links.new(mix_node.outputs["Color"], main_group.nodes["Group Output"].inputs["Object Color"])

# Optional: uncomment the following to add the node group to the active material automatically:
#tree = bpy.context.object.active_material.node_tree
#group_node = tree.nodes.new("ShaderNodeGroup")
#group_node.node_tree = main_group
#group_node.label = "Object Color"

Note that it sets the pass index for every object in the current scene that is not a Lamp, Camera, or an Empty. If you have pass indexes already set, this script will overwrite them.

Usage:

This is script can be run by pasting it into the Text editor and clicking Run Script. This will create the "Object Color" node group with all the nodes and colors set according to the actual Object Color property.

You can add this group to your setups by pressing ShiftA> Add > Node > Group > Object Color.

To change the colors, press Tab with the node group selected to edit it and change the colors of the Color1 slots on the mix nodes.

To update it for new objects etc. you will have to run the script again and create another node group.