text:
Aligning/joining two objects (Head/Body) with matching edge list
I want to align two objects with Blender because for whatever reasons, the head was exported by another program in random orientation. I can easily generate two edge lists which perfectly fit. Knowing the edge lists it should be possible to calculate a the correct orientation of the head, right?

Perhaps relevant     https://blender.stackexchange.com/questions/39784/snapping-two-objects-by-edge-in-object-mode?rq=1    which is suggested by the web page on the right side.  You may also want to search [Create Orientation].  You may only need 3 vertices to create a plane normal.

Can you also explain [perfectly fit]? Is this vertex count or length or angles determined by a Script? Casual Inspection?

You may also want to see [merge].

@atomicbezierslinger Your link does not solve the problem of finding the right orientation, it is only for location. Also Create Orientation does not give me any useful results on BSE.

@atomicbezierslinger
yes

This is my workflow for aligning objects that are accuratelly separated but  rotated randomly. The tutorial seems to be complicated but it is actually quite quick method (if you remember how to do it :) and accurate. Unfortunately I don't know about any addon that would do that automatically.
I will demonstrate it on an example with Suzanne model so warning - this tutorial contains drastical images.
The whole idea is to rotate the model gradually by using 3 common vertices.

Rotate & align both objects so they fit to each other roughly

No we need to find common vertex pair and snap objects there

Detailed steps:

set Snap target to Active (remember, the active vertex / edge / face is the one selected the last)
set Snap Element to Vertex CtrlShiftTab
select the object you are going to fiddle with (it is the top part in our example), switch into Edit mode Tab, then Select All A and select the vertex you are going to use for the snap (now it is the active one)
enable Snapping ShiftTab or you can always hold Ctrl while grabbing instead
grab G the mesh while holding Ctrl and move it / snap it to the same positioned vertex in the second model

Use the previously aligned vertex as a pivot point, then snap the model's rotation to the vertex on the other end of the same edge. This needs to be done for each axe separately

set Pivot point to 3D cursor .
make sure you have the common vertex selected and move Cursor to Active ShiftS
select whole model and then a vertex on the same edge as previously snapped vertex (so it is active now)
press R and then X to rotate around X and snap it to corresponding vertex on the second model, repeat this for Y & Z axes (after that, double-check the mesh doesn't rotate anymore on any of these axes so it is aligned perfectly)

When we have the common edge, we can rotate model around it to make the fit complete

Pivot Point to Active Element
Transform Orientation to Normal
Snap Target to Closest
turn off snapping ShiftTab
select whole mesh A and ...
select the edge between our previously aligned vertices as last (so it is active)
rotate the mesh around normal Y axe by pressing RYY so it roughly fits the other model

turn on snapping ShiftTab and use the same rotation method as in the previous step, now it will (hopefully) snap perfectly

If you are about to join the objects (by selecting them and pressing CtrlJ), don't forget to go into Edit Mode Tab, select all A and Remove Doubles by W > Remove Doubles to merge the common vertices.


text:
Mirror modifier: holes in my model and a line down the middle
I'm trying to mirror my human mesh but I can not get it to align perfectly. There are holes in the model as well as a protruding line down the face. My mesh shows in edit mode that there isn't any holes or another line down the middle. What do I do?
And also yes I have selected the line down the middle and put Cursor to Selected and Origin to 3D cursor. It just doesn't look good in the object mode.

Make sure that the Mirror Modifier is above the Subsurf one. Also check out this answer: https://blender.stackexchange.com/questions/353/how-can-i-make-the-mirror-modifier-work-right

Thank you so much! However now are you saying I can't add my Multi-res. modifier until I finish what I have to with my mirror modifier?

You can add Mirror modifier below the Subsurf, it just will mean that first you'll smooth out the half of the model and then mirror it. But as in your case you have Multires, you can't put any modifier above it. Holes with Mirror mean not all the vertices are placed on the mirror plane, some are either overlapping or not touching it, just like in linked answer.

source: Stack Exchange

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

sort: votes


text:
Blender Game Engine control material values

I'd like to have dynamically changing materials in the Blender Game engine.
Is there any way for the game logic or a python script to change the properties of a node in a material?
For example, in the image, I would like to be able to change the red "value" input that connects to the color ramp.
(I know that the BGE can assign an overall color to an object, but I would like to do more complex things than just single colors. If I could input that object color to the node set-up, having those 3 floats might be enough to work with)
Thanks for any help you can offer.

Yes you can use a python script to change any value you can change by hand

I've found a hack: the "Lamp data" node gives you the distance from a specified lamp to each fragment. That gives you a float to control the material, and the position of the lamp can be controlled with the game logic.
This is a fairly terrible solution.

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

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


text:
Hair particles: Unwanted, irrevertable mirroring!
I've been styling hair particles for an asymmetrical look. To speed up my workflow, I turned on x-mirror in the particle edit tools panel when working on individual strands, then turning it off to create asymmetry. However, I left the x-mirror option on when I exited particle edit mode, and now whenever I return to particle edit mode, the entire system is forced into symmetry and half my work is undone!

Ctrl+z does not work here. What can I do to avoid losing half my work?

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


text:
stormy rainy window effect
I'm making an indoor scene with a storm outside.
I want the windows in my scene to have rain just bucketing over them. Ideally I would like some animated effect that can be composited over the background, which might be something like a bokeh image. How can I achieve this?

A polygon-rich approach
I gave it a go with a shower of particles. This may be a little bit too resource-intense for just a background feature though.
The setup
I created a simple "room" with

a double-layered window (two plane meshes);

a plane out in the sky, almost vertical, with a particle system;

two strong wind force fields that push the particles toward the window;

a simple icosphere as a dupliobject.

The building and the inner window layer are set as Collision objects with "Kill particles" activated.
The outer window is a Collision object with very high stickiness (no kill), and high damping/friction on particles.
The particle system has strong Normal velocity and low Gravity field weight, so that the rain drops don't fall off screen too quickly; "Object" > "Icosphere" is selected as "Render" option, with "Emitter" un-checked.

(this preview is from an earlier version, with less particles and less friction on the surface)
The render
By giving the icospheres and window layers a Principled shader with very high transmission; adding some orange streetlamps and violet "dusk" sun (and a sad Suzanne in the storm); with some DOF and motion blur: this is a very rough result:

     (Only 7 frames)
Using nodes and a "Geometry" input, I made the raindrop's shader completely transparent (shadeless) when the "y" coordinate is less than y0 (the position of the window) to cut away the part of the sphere that "permeates" the first layer.
This answer's blend file

Even heavier for a close up shot (with metaballs)
If you want a close-up shot as in here, an additional Particle System with similar physics, but from a nearer plane (just near the camera) and with big meta-balls as DupliObjects, can help:

Result:

This is certainly an approach I can take, so I'll try it. Thank you! What bothers me about simulation approaches is that they work up from the ground rather than down from the impression you want. For example, unless you have an extreme close-up shot of the window, the individual drops are invisible: https://www.youtube.com/watch?v=3J40T2-lWZQ

Yes, I realize that obtaining a particular result with a simulation approach would require some intense trial and error. However, I'm uploading an updated version of my file and render

Anyway, given this footage, I would have two different particle systems for such a close up shot: one for the background with spheres and one for the window (particles falling almost vertically from very close) with metaballs

@dixiepig updated with an additional particle system, just for close ups

@dixiepig I was looking at my file and I can say that the wind is really too strong in my file, and it's also too parallel to the window; also, the friction on the glass' surface should really be high! My simulation looks a lot like a moving train


text:
UV flipping material
I need a way  to flip the UVs in a material depending on the angle of the viewer.
I'm creating an NPR character that looks like this:

The eyes and mouth are textured billboards:

They look incorrect if viewed from the wrong side of the face:

I want the UVs to automatically flip when viewed from the left side.
I had some limited success by cross-multiplying the normal and view vector, but that works per-fragment, not affecting the object as a whole all at once:

I think to make this approach work I need both the angle of the view/camera, and the angle (world coordinates) of the mouth object. But I haven't been able to find a way to input them into the material nodes.
Any clues at all would be appreciated!

Here is what I came up with:

A bone, parented to the character's head bone, that points at the camera using the "Track to" bone constraint
A value input in the material node setup with a driver applied, driven by the rotation of the camera tracking bone
If the rotation of the camera tracking bone is negative, flip the UVs.

I use a "less than" node to threshold the value to 0 or 1 depending on if the rotation of the camera tracking bone is positive or negative (i.e. if the camera is viewing the left or right side of the face). Then the other math nodes change those thresholded values to either -1 or 1, which when multiplied with the x value of the UV input will either flip the UVs or do nothing.
I hope this crazy thing proves helpful to someone else!


text:
Merge overlapping vertices of different objects
The array modifier has an option to merge the overlapping vertices of two segments. Is there a way to do this with the overlapping vertices of two separate objects?
One advantage of this feature with array modifiers is that it allows other modifiers below in the stack to work on a contiguous mesh with no splits.
In the picture below, I have 3 objects that make up a single whole: two arrayed objects, and another to transition between them. They need to remain as separate objects because they have different modifiers. But the splits where the objects' vertices overlap interrupts the subsurf modifier, creating artifacts like the one circled.

The start and end caps of an array can themselves be 'live' (unapplied) arrays.

If 'merge' is checked in the array modifier, the start and end caps merge with the arrayed object.
So you can apply the array modifier to your transition object (no repeats) and set your first array as the start cap, and your second array as the end cap of your transition 'array'.

This can require a care with component origins, fixed ( not relative) offsets, and merge distance, to ensure the cap vertices coincide with the transition vertices.

Obviously, there is no way to use different meshes as a single one. :-(
All you can do, is snapping and removing doubles after you apply the array modifiers. And nothing forces you to kill the original non-modifiers-applied objects, instead of hide and keep them.
And maybe you can create your own custom modifier to handle this.


text:
Placing the sun at a specific angle
Is there a way to put the sun on a location that is specified by azimuth and altitude, using a script?

There is the sun position addon that calculates azimuth and elevation from latitude / longitude / time.

sun position addon @batFINGER referenced.

May be interested in this old BA thread  and also this Q&A

check this! http://oscurart.blogspot.com.ar/2013/06/blender-script-connect-sun-with-cycles.html This addon is old, but works fine.


text:
primitive_cube_add() creates only edges of cube
I am trying to understand how Blender deals with objects and data by experimenting a bit, starting from the default start-up screen.
I deleted the cube, looked how the stored objects and data responded and then tried to put the cube back, but I keep failing at the last step: I only get the edges of the cube, not the faces.
I first thought perhaps I needed to return to object mode explicitly, but if I uncomment that line it results in a "wrong context" - error.
Why can't I go to object mode, and why is only part of my cube coming back?
This is the code I ran:
# From startup screen:

for ob in bpy.data.objects:
    ob.select = ob.type == 'MESH' and ob.name.startswith("Cube")
bpy.ops.object.delete()

print("Objects:" , list(bpy.data.objects)) # Camera, Lamp
print("Mesh data:", list(bpy.data.meshes)) # Cube ---> Cube data still exists!

print("Hello")

bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)
bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)

print("Bye")

print("Objects:" , list(bpy.data.objects)) # Camera, Lamp
print("Mesh data:", list(bpy.data.meshes)) # [] ---> Cube data gone!

# Back to startup configuration: add primitive cube

#bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.mesh.primitive_cube_add(location = (0,0,0), radius = 1)

The reason is probably that bpy.ops.object does not exist, because the active object was deleted. Try to activate the camera or something else.

@Dimali I selected the camera before running, and pasted
cam = bpy.context.active_object
before anything else in the script. At the end I included
bpy.context.scene.objects.active = cam before the primitive_add, but I still get edges only.

You are going to lose context after bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)  Recommend not saving files in script like this as it is not easily undone.  If you want to run code on load events and the like look at handlers.

@Gnub Selecting (by script) is not the same as activating, is the camera the active object?

@Dimali Sorry, yes I meant I made the camera active and then ran the code with the two exta lines from above comment.. Besides I don't get why the absense of an active object would prevent the primitive_cube_add from doing its job properly..

@Gnub Ok forget my comment. The mesh is correct after you switch to edit mode and back manually. Not sure how to fix it in code though.


text:
Can I make a deep image with OpenEXR?
I went through the OpenEXR technical introduction found here: it says that besides multi-channel files, OpenEXR also allows for the creation of "deep" files: i.e. it allows for assigning multiple recordings of a value (or a set of values) to the same channel.
I am using Blender to simulate reflection spectra. For this I loop through a parameter that takes on more than 300 different values, and for every value I use Cycles to render a new image of my scene. Instead of assigning every RGBA-output of every rendered image to a new channel, I would like to assign all 300 images to the same channel, in an ordered way. All 300 values of the parameter should be stored together (also ordered) in another channel of the multichannel EXR.
This would mean that within the same file, I would be able to look up every one of the 300 rendered images (beauty passes) by its corresponding value of the parameter.
Is there a way to do this with Blender? I found good explanation about how to create multichannel EXR, but nothing on how to make a channel in such a multichannel file "deep". I tried connecting many input nodes to the same output channel but this isn't possible.

maybe you can try to composit your layers in nuke. it is possible to script it, so you don't have to merge the 300 layers by hand. look into deep merge node. https://help.thefoundry.co.uk/nuke/content/reference_guide/deep_nodes/deepmerge.html
Natron also provides a deep pipeline.

Blender is not the right tool to do this. You can do almost everything in Blender, but sometimes coding and doing it yourself is required.
You cannot obtain the deep image directly, because there is no renderer (as my knowledge goes) that can output that (a volumetric output).
You get multi-channel output at most (beauty pass, z-depth, shadow pass,..) - and this is what most 3d apps will let you save:
Save all render passes to a single EXR image
Some will let you save this as deep image, for example MentalRay.
To get your image with deep pixels, you would have to create it from all the rendered images. To be able to do this inside Blender, you would have to use the OpenEXR source code and code it yourself and run it from Blender through python bindings. Some compositing applications offer creation of openEXR deep images, like Nuke for example.
A deep image is nothing else than volumetric data structure in camera space. You cannot 'render' such data in Blender, but you can create them (smoke, fire, ..) and export as Alembic (in global space). From there it might be easier to handle such data externally.
If you need to convert particles or geometry into volumetric data structures, Houdini is a good tool to do that.

@brockmann I think it's the same as with MentalRay or Arnold - it's the comp layers saved as deep image instead of multi-channel image. Probably some other renderers can do it also. I really don't know one that can output 300 custom layer volumetric camera space image..

Looks like Arnold does produce a volumetric cloud: https://support.solidangle.com/display/AFMUG/Deep+EXR. But Nuke can do this already from any image with z-depth buffer data, another dead end..

RenderMan is also able to write deep files, but I don't know if this is possible with the blender plugin. Might be worth looking into, since RenderMan is free for non-commercial use.

@yann there was a comment mentioning this to which my first comment is replying. It's deleted now.. There are 2 cases of deep images I know of that various renderers can produce - deep image composed of individual render passes or deep image of the beauty pass spread out in space with z-pass. I don't know one that can do 300 custom images, it would have to do what an MRI machine does..

i recommend to just make it an animation and use frame number as your parameter index. should even be possible then to use it in a cycles material as texture node supports avi-frame numbers

Octane for blender has the option to render and write Deep EXR.
You can download a fully usable demo .
The only limitation is that you can only use one videocard.


text:
Assign cycles material to mesh in script
I have a mesh object, and I want to fiddle with its material properties in Cycles through a script. I have tried this:
I created an object:
g_d = bpy.data.meshes.new(name="GroundM")
g_o = bpy.data.objects.new(name="GroundO", object_data = g_d)
scene.objects.link(g_o)
g_o.location = (0,0,0)
g_o.select = True
scene.objects.active = g_o

Next I define the material to be made, and what to do with its nodes
def create_cycles_material(name):

    mat = bpy.data.materials.new(name)
    mat.use_nodes = True
    nodes = mat.node_tree.nodes

    node = nodes['Diffuse BSDF']
    node.location = 600, 120
    pass   # Some more node-engineering here

Next, I define a function that should link a material to a mesh object:
def setMaterial(ob, mat):
    me = ob.data
    me.materials.append(mat)

Finally I make the material and assign it to the mesh object g_o:
ColoredGround = create_cycles_material('GroundCol')
setMaterial(g_o, ColoredGround)

The object appears as it should be, and the material with all its specified nodes is created somehow, but I still have to go to the object afterwards and manually add a material and then select the material that I scripted, to assign it to my mesh.
I did look into this answer applying to Blender Internal render as well but I still can´t figure out why my script does not work.

Does your "passless" create_cycles_material(...) return the material created?  ortherwise it will just set it to None which will appear as an empty slot.

As batFINGER mentioned, you just forgot the return statement.
I tried out your code (and had to modify it a bit, because I got the error that 'scene' was not defined) and it worked fine when I added return mat to the function create_cycles_material.
Here's the ready to use code:
import bpy

def main():
    g_d = bpy.data.meshes.new(name="GroundM")
    g_o = bpy.data.objects.new(name="GroundO", object_data = g_d)
    scene = bpy.data.scenes[0]
    scene.objects.link(g_o)
    g_o.location = (0,0,0)
    g_o.select = True
    scene.objects.active = g_o

    ColoredGround = create_cycles_material('GroundCol')
    setMaterial(g_o, ColoredGround)

def create_cycles_material(name):

    mat = bpy.data.materials.new(name)
    mat.use_nodes = True
    nodes = mat.node_tree.nodes

    node = nodes['Diffuse BSDF']
    node.location = 600, 120
    #pass   # Some more node-engineering here
    return mat

def setMaterial(ob, mat):
    me = ob.data
    me.materials.append(mat)

if __name__ == '__main__':
    main()


text:
What does focal length mean in Blender?
I know how lenses work, and I know what a focal point is, but I don't get what Blender means by "focal length".
I can set the distance to the focal point of a camera in the depth of field panel, while changing the focal length in the lens panel changes my FOV, (larger focal length -> smaller FOV) but what quantity is this change based on?
I need to set the FOV with great accuracy, based on distances calculated from the geometry in my scene, so I would like to know what the meaning is of the distance that I have to fill in in the lens panel.

Focal length is the distance between the lens and the focal point:

At focal point the image is sharp and it's the place where the camera sensor is located (or camera film). The Field of View of each lens depends on the sensor size:

The conversion formula is this:
FOV = 2 * arctan(half_the_diagonal_of_sensor / focal_length)

Blender allows you to enter the "zoom" of camera in either Focal length (mm) or in Field of View (°):

But then why do I still need to set a depth of field? I thought this was the distance to the focal point..

@Gnub Depth of Field is another thing. It's how fast sharpness diminishes on each side of the focused distance. It is driven by the size of aperture opening (how much light is allowed through). It is measured in F-stops or also in millimeters (in Blender). It is this iconic element of the camera lens assembly: http://d2rormqr1qwzpz.cloudfront.net/uploads/0/1761/24206-lensaperture.jpg

@Gnub In camera lens assembly there are multiple lenses inside, and with such system the camera can focus over different distances while still maintaining the same field of view (zoom). This is simulated with the Depth of Field Focus distance in Blender.

It's the length of the lens group of the virtual camera, which will modify the perspective of the image: an orthographic view is the same as an infinite focal length, a classic telephoto is 200 mm, the eye's approximate view is 50 mm, a classic grandangle is 28 mm, under 16 mm we can call it "fish-eye", and so on ...


text:
What does "number of diffuse/glossy/... bounce samples" mean?
In Cycles render, when enabling branched path tracing, one can specify the number of diffuse/glossy/transmission/... bounce samples for each AA sample. Can someone explain to me in little more words what this means?
I know what diffuse/glossy/... materials are, but I don't know what is meant with a glossy bounce sample.

BPT allows you to give sampling priority to materials which take longer to converge.  As you have probably experienced, some more complex shaders (SSS, translucency, rough gloss, etc.) often create much more noise in a render and thus require more sampling than materials such as diffuse or a sharp gloss.
(If you are unclear on the technical meaning of samples, check out this post.)
BPT lets you adjust the relative amount of samples for each type of shader individually to manually optimize your rendertimes.  So if you are getting a lot of noise in your scene from a particular SSS shader but your diffuse surfaces look fine, you can knock up the SSS samples to reduce the noise from the SSS without having to waste samples on the diffuse surfaces that don't need any more sampling.
Keep in mind that when used, BPT does seem to take a little bit longer and generate a little bit more noise than standard path tracing.  So it is best used in situations where the difference in noise created by different shaders is quite large so the gains are large enough to outweigh the higher base values for noise and rendertime.
This is a more practical explanation of how to use BPT, if you want a more technical explanation check out this post

Thanks! I have an additional question:
So in both methods the light bounces in some direction that Blender picks, based on a choice within the possible shaders of an object -and potentially a bit of randomness introduced by the shader that was picked as well. And the way Blender makes these random choices is by use of the sample pattern algorithm (Sobol or correlated multi jitter), do I get this right?


text:
Delete meshes - context error
I try to delete all meshes I made by putting together about all I could find from this question , using this code:
def delete_things(spec_type):
        oldMode = bpy.context.mode
        bpy.ops.object.mode_set(mode='OBJECT')
        bpy.ops.object.select_all(action='DESELECT')
        for o in bpy.data.objects:
            if o.type == spec_type:
                o.select = True
            else:
                o.select = False
        bpy.ops.object.delete()
        bpy.ops.object.mode_set(mode=oldMode)
        bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)
        bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)

def delete_all_mesh():
    delete_things('MESH')

delete_all_mesh()

I thought I made sure to set the right mode, still I get the error " bpy.ops.object.mode_set.poll() failed, context is incorrect"...

The error you are receiving is due to the fact your trying to change the object mode when no objects exist, because you've deleted them all.


text:
How do I use bmesh on a set?
I have an array that is called ccValids, which contains "good" center coordinates for the cylinders I want to create. These cylinders are created as follows:
for c in ccValids:
    leafs = bpy.ops.mesh.primitive_cylinder_add( location = c, enter_editmode = True )

bm = bmesh.new()
bm.from_mesh(leafs)

It appears that the cylinders are created as one object, which is very good since there is a great number of them and they are all supposed to be manipulated by the exact same operations. However the bmesh.new() command does not work.
The error I get is "Expected 'Mesh' found 'set' instead". Is there a way to use bmesh methods on my nicely gathered cylinders though?

Firstly the issue and error with your code.
Operators only return a python  set containing the status of the operation, for example {'FINISHED'} if finished normally, or {'CANCELLED'} if there was a problem.
On looping a primitive add operator, the object will be context.object the mesh context.object.data on each iteration.  If run in edit mode, (enter_editmode takes you into edit mode on first iteration) then all will be added to the edit objects mesh. This is why you have one object.
Secondly, I'd probably use the bmesh create cone operator as pointed out in answer by @TLousky,  for completeness here is a way to put the created cylinders into a "live" bmesh, that is a bmesh from the edit objects edit mesh.  To demonstrate, I've put in code to select the ngon caps of the cylinders.
import bpy
import bmesh
context = bpy.context
ccValids = [(1, 1, 1), (2, 2, 2)]
for c in ccValids:
    leafs = bpy.ops.mesh.primitive_cylinder_add( location = c, enter_editmode = True )
# we will now be in edit mode
bm = bmesh.from_edit_mesh(context.edit_object.data)
# deselect all but ngon faces
for f in bm.faces:
    f.select = len(f.verts) > 4

Result.  Still in edit  mode, cylinder ngon caps selected.
When you've finished operations, a bmesh.update_edit_mesh(context.object.data) will update the edit mesh.

You need to create cylinders with bmesh's create cone operator, then create a mesh, an object and link the object to the scene:
import bpy, bmesh

# Imports used to demo code since I don't really have ccValids
from random import randint
from mathutils import Vector, Matrix

# Generate 5 random centers for our cylinders
ccValids = [ Vector([ randint(-5,5) for axis in 'xyz' ]) for i in range(5) ]

bm = bmesh.new()
for c in ccValids:
    # Create a cylinder using the create_cone operator with an identical top and bottom diameter
    m = Matrix()
    bmesh.ops.create_cone(
        bm,
        diameter1 = 1,
        diameter2 = 1,
        depth     = 3,
        segments  = 12,
        matrix    = m.Translation( c )
    )

# Create a mesh and object to represent our bmesh data in the scene
m = bpy.data.meshes.new('cyl')
bm.to_mesh( m )
o = bpy.data.objects.new('cyl', m )
bpy.context.scene.objects.link( o )

The Create cone operator takes various parameters and can control whether the cone / cylinder has caps, uses triangles or quads and other stuff in addition to the obvious parameters of diameter and depth.
create_cone()
BMeshOpFunc bmesh.ops.create_cone(bmesh, cap_ends=False, cap_tris=False, segments=0, diameter1=0.0, diameter2=0.0, depth=0.0, matrix=Matrix(), calc_uvs=False)
-> dict(verts=[])

I looked up what create_cone does, but I don't get the matrix-parameter. It says "matrix to multiply the new geometry with", what does this mean? Why is it not just a vector that denotes the origin?

@Gnub, this is the entire Transformation matrix of the new object, which controls translation, rotation and scale all at once. I only set the translation as shown above, but you can also use m.Rotation( r ) and provide an Euler or Quaternion, or set an m.Scale( s ) with a scale vector.


text:
Why does Blender not save multichannel OpenEXR?
I created a multichannel OpenEXR file by script, everything seems to be working well except for the fact that Blender does not save my file when rendering.
This problem is specifically for the multichannel OpenEXR; if I create many simple (not multichannel) OpenEXR files they do get saved in the correct directory.
The node tree that is produced by my script looks like this:

And the relevant part of the script, that I use to set up part of this node tree:
def take_picture(index):
    bpy.context.scene.use_nodes = True
    tree = bpy.context.scene.node_tree
    nodes = tree.nodes
    links = tree.links

    # create layer + metadata nodes
    rl = nodes.new('CompositorNodeRLayers')

    l_node = nodes.new('CompositorNodeValue')
    l_node.label = 'Wavelength'
    l_node.name = 'Lambda'
    l_node.location = 300, 0
    l_node.outputs['Value'].default_value = 5

    # call output exr, create extra output slots
    f = nodes.new('CompositorNodeOutputFile')
    f.label = 'EXR Multichannel'
    f.name = 'OutFile'
    f.format.file_format = 'OPEN_EXR_MULTILAYER'
    # If I cange this to 'OPEN_EXR', I do obtain my output files in the specified folder.
    f.base_path = "//Rendered images/Test/Img"

    f.file_slots.new('Lambda')
    f.file_slots.new("image_" + index)

    # Links
    links.new(l_node.outputs['Value'], f.inputs['Lambda'])
    links.new(rl.outputs['Image'], f.inputs['image_'+index])

    # render
    bpy.ops.render.render()

When I run this function for some index specified in my script, it works fine and all nodes are created the way I want them to be, but I don't get any output file..

I found this very useful answer on stackoverflow, worked like a charm for me..
The clue is to include write_still = True explicitly in the render command.
Also, unlinke for 1-channel openEXR, the filename is not determined by the name of the terminal of the file output node. Now that I come to think of it, this is in fact logic since the terminals should determine the keys that are included in the exr file header. For 1-channel exr there is only 1 channel, thus only in that case the key can also specify the file name.
My last two lines now look like this:
bpy.data.scenes["Scene"].render.filepath = '//Rendered images/Test/im_%s' % index
bpy.ops.render.render(write_still=True)


text:
Texture doesn't show up after UV wrapping
I have made a model, UV mapped it and made a UV image, but it doesn't show up on the actual model. I feel like I'm doing everything right, and don't understand what I'm doing wrong. Blender version is 2.77.


text:
How to create a bone that move but constrained by 2 bones
I’m trying to animate the movement of the back door of a Lego star war gunship with bones. I captured what movement I want in the following video.
Lego Star Wars - Blender Rigging Problem
In the first part, this is what I want. In the second part, we can see that the bone R_BackDoor is not constrained by the 2 arm bones when I would like to.
My problem is, I cannot find the right bone constraint to obtain the first part of my video.
Could someone please help me with that ?
A real life reference if needed : Lego Star Wars Custom Republic Gunship REVIEW
Anoter point of view not showed in either video. If you need others pictures, don't hesitate.

Thank you for you help.

you need only 3 bones for this.

bone.002 and bone are connected.
bone.002 has a damped track to bone.003

bone.003 has a copy location to bone

result:

when i made the animation i had another bone, which just has a copy rotation to bone, but it isn't really necessary. But maybe you want it for the second "guide arm".

Yes it was that! Thank you very much for your help! I had to tweek the axis because the door is leaning but everything work.

You are welcome


text:
UV unwrapping: Blender always selects an edge ring as a "seam"
So I have the following issue:
I'm trying to unwrap the top of this platform.
I choose some vertical seams on the sides (screenshot), with the objective that the unwrapped model will look like it was flattened from above.

The problem is, Blender always seems to choose one entire edge ring as a seam. I tried "Clear Seam" and "Clear Edge", with no results. This is causing some vertices split, and is giving me some problems when painting the texture.
Is there a way to tell Blender NOT to cut through a specific edge when unwrapping?

Hopefully you guys can help me achieve my expected result :)
Thanks in advance!

Did you try to select all and Remove Doubles? So you can be sure your geometry is all connected.

Are you the default Unwrap? Smart Unwrap?

@JanKadeřábek  I didn't! Now that you mention it, I think this might do the trick. When modelling this I split the platform top into two separate objects and later I rejoined them, perhaps I have duplicates.
I'll reply if it worked later today when I get home.
I just used the default unwrap with 4 seams (2 of them are shown in the first picture, the other 2 are on the back side)

Removing Doubles did the trick! Many thanks @JanKadeřábek!

I am happy it helped! I have added my tip as an answer, you can accept it so others can quickly see the solution. Thanks and happy Blending :)

This is often happening when the mesh of your model is not all connected.
To merge vertices placed in the same position:

Go into Edit Mode Tab
Select all A
Open Specials menu W, select Remove Doubles

Unwrap the model again


text:
Outilne wireframe
How can I get a solid with a wireframe outline for all my edges?  I don't want to see the lines if they are on the opposite side of the object.  I want what is in the picture shown but I don't want to have to be selected on it for it to work.  Help!

Wire can be overlayed in solid view object mode.

Go to Properties panel
Object tab
Display
Check Wire and Draw All Edges

Without Draw All Edges Blender will hide edges with low angles to make the viewport less cluttered.


text:
Why has a circle when the point light through my glass？
I found there is a circle when the point light through my glass material using the circle render.  How could I solve it?

When looking through glass, the light path is considered a transmission ray instead of a camera ray, and the full sphere of the point light is visible to transmission rays. Point lights in Cycles are not true point lights unless size is set to 0 (as these are non-physical and usually look bad). If size is > 0, you instead get what's technically a spherical area light. And like a regular area light, the surface is visible through glass (and in reflections). As far as getting rid of it, there's a bunch of possible solutions:
You can just hide the lamp from transmission rays by unchecking object data > Cycles Settings > Transmission. But this will also make the lamp not cast light when viewed through glass, which I suspect isn't the result you want.
A better solution is to change your glass to not be true glass. Some render engines have an "architectural glass" shader designed to fix this sort of issue. Cycles doesn't have one, but the node system allows you to recreate one pretty well:

This glass will not refract, but otherwise looks exactly like the glass shader. For very thin and flat panes of glass, the refractive effect isn't very noticeable anyway, so you can get away with this. It will still reflect like glass, but as far as light rays are concerned, objects seen through it are still viewed directly ("camera rays"). Not only will this keep lamp objects hidden, but it also has some other nice side effects, like passing the alpha channel through, and preventing clamp indirect from affecting things seen through the glass.

Technical mumbo jumbo P.S.
The geometry > backfacing node is to prevent reflections on the backface, which would otherwise appear black. There's actually a slightly neater way to do this, as fresnel - backfacing, rather than fresnel * 1-backfacing as in the other setup. Doesn't really matter, but it's a little cleaner on the nodegraph at the cost of being slightly less intuitive:


text:
Tracking beginning of the light path
I am writing postprocessing script to the cycles rendering.
Can I somehow track the whole lightpath of a single pixel from the camera to the origin of the light?
For example the I have 3 lamps(A, B, C) and an environment map in my scene. I want to know that pixel (200,100) is in 30% made from light of lamp A and in 70% from lamp B.(some of render samples came across one, some across another) And pixel (300, 200) reflects the environment map’s coordinate (2000,1000).
Is there any way to extract the information about from where the light comes, maybe at least from single render sample?(since in one sample each pixel should reflect/refract only one light source) If so, at which level I should integrate with blender? Python scripting is ok or do I need to recompile some parts of cycles?
My final point is to find origin of each light path and track how the object interacts with environment.

What have you tried so far? That sounds like waay to much info to extract from an already heavy and slow process that is rendering. I'm not a coder or anything, but I'm not sure there is any way to access that type for information directly, and certainly not from a final rendered image as far as I know.

@DuarteFarrajotaRamos
I am doing something like diffraction/reflection mask which will be applicable to already rendered images(as an extension for photoshop, krita, gimp etc - it will allow you to place for example glass on an image without rendering it again). I have already made algorithm which applies this mask on image, but have to make all masks manually, so I want to make cycles extension which will export image to my format.
So I have done another part of my program and I am just starting with blender part(and gathering information how to do it the most efficiently before I start)

Rendering doesn't work like that. Tracking only 1 light path would give a very bad representation of the scene and would be inaccurate.
Each pixel is an origin for infinite amount of light paths leading into different light sources, each bounce determined by probability. Rendering infinite samples is not doable, so the more samples (light paths traced), the better the image (better representing the scene).
There are 2 approaches you can go:

Render the image in N-dimensional color space, N being the number of light sources, each light-source being monochromatic only. Render as many samples as you can. Each pixel's color will exactly correspond with what light influenced it.
My guess is you will have to compile your own Cycles for this.
Render the image multiple times, one light source at a time. This can be scripted with python, or even done by animating the lights and rendering N-frames long animation, where N is number of lights. Each frame will be an exact map of how that light influences the scene.

I know that. But if so, I can gather more samples(one by one using script) and make average of them(In fact I am only looking for the most common one and the scenes are quite simple - only single object per one render)
Thank you for your first approach, it looks quite good, but takes a lot of effort. The second one on the other hand unfortunately doesn't allow me to detect from which place of environment map the light comes.

@wefhy Then render a colorful image and assign each point of environment different color: similar how UV space looks like: https://i.sstatic.net/CpO0n.png.

Thanks, great idea :) although it works only for grayscale objects, I think, I'll be able to somehow solve it with multiple renders :) It's very helpful, I'll use this idea in my project.
One, last thing, but it's additional - do you maybe have an idea how to deal with bluring objects(for example refractive with roughness)? Can I somehow determine the blur radius? If I solve this last thing, I'll be ready to work on this project.

@wefhy You will have to know the distance between the rough surface and the thing that is reflected/refracted on that surface. The blur amount is dependent on the distance. Other than that you can use image morphology to determine the amount of blur (or also the direction if it is motion blur) with doing Fourier transform and looking into the frequency spectrum of images:https://image.slidesharecdn.com/ibjovz0rte537dqa8ing-signature-e4320cc6f2d23ac9e32803ea5cf6efe1db06e000f22b332d12e0094ebbd14b21-poli-160109133359/95/lecture-11-9-638.jpg

Ok, that sounds at least doable. I think I'll focus on only the first part for now and then think about bluring a bit more.
I still don't get how to make that spectrum neither how to use it to determine bluriness.
If I get it right, on this pass I disable difraction (set IOR to 1) and then analyze how the image behind is blured. Or just how is roughsess-on blured in comparison to roughness-off?


text:
Weird deformation after exporting Rigify from Blender 2.8 to Unity
Trying to export an animated character from Blender 2.8 to Unity 2019.02! I have a few animation done and almost all of them look exactly as they look in blender, except for the Head bone in the action “Attack”, It seems like it gets overly sized when exported to FBX or even when I bake the animation to the deformation bones inside blender, what could be affecting this bone besides the “Head” control to make it this way?
•   Scale in blender file was changed to .01 in metric system as recommended for FBX export
•   Location, rotation and scale in the Rigify Armature is applied
•   I already tried baking animation on the “head” “neck” and “chest” rig controls

First image is how it looks in blender, 2nd is how it shows in Unity.
Now, baking the animation to only the deformation bones messed up the setup for the rest of the animations BUT when I do that I get the same deformation than when exporting to FBX so I know it's something with the Rig setup more than any export setting:

Something extra to say It's that i have to keyframe  the "head_Follow" and "neck_follow" setting on rigify at the beggining and end of every action, So I'm assuming that this problem is not there.
What else can I try to have it exported with no weird deformations?
Is this a common issue?

I had a similiar Problem with a Quadruped, where Parts of the Animation were completely broken: the Head had a wrong position while the ears were in the right position.
Apparently the Parent Child structure of the Deformation Bones is not suited for baking and does not always work correctly outside of Blender.
I solved this with the ORG Bones (Bottom Last Layer) as Deformation Bones instead of the actual Deformation Bones (Bottom Third Last Layer).
Step by Step:
In Edit mode:
- Select all Deformation bones in the Bottom Third Last Layer, go to Armature->Bone Settings->Deform (Hold Alt while clicking the checkbox, so it will untick the deform option for all of these bones)
-Select all Deformation bones in the Bottom Last Layer, go to Armature->Bone Settings->Deform (Hold Alt while clicking the checkbox, so it will tick the deform option for all of these bones)
-Rename the vertex groups so they have the Prefix ORG instead of DEF.


text:
New Blender User with a Mouse Problem
Perhaps I should have been more specific with my mouse question.  I am a new Blender user with a Logitech MK300 mouse.  I am watching the "First Steps with Blender" tutorial.  I have used the Logitech SetPoint to set the scroll wheel to a middle mouse button (MMB). The tutorial says I can hold the MMB and rotate the view to any angle.  This isn't working; all the scroll wheel does is zoom. I've looked through some of the links and still can't find a solution.  Any suggestions or do I just get flamed again?

In the browser, if you scroll the wheel it scrolls the page, if you click the wheel it shows a movement icon, and scrolls as you move away from icon, if you click the mmb (hold down) and drag it both moves the icon and scrolls.  This mmb clicking and dragging is how you rotate the view in blender.  Consult the manual on mouse settings  If your mouse doesn't do this logitech support

Logitech SetPoint and similar "management" software will only create problems and cause possible conflicts between what is essentially a regular mouse and whatever software you are trying to using.

Please do not ask the same question again, but rather edit your first one.

Any 3 button mouse by default, with no software modifications will function in blender as you describe (Hold MMB to rotate the view).

I still think your question is not specific to Blender. I bet that if you have some other software that makes use of the middle mouse button you would find the same result in that software too.
First of all, the scroll wheel is supposed to zoom. It's when you actually push it downward (not scrolling) that it functions as a button. In Blender if you push it down like this and then move your mouse around you will see your viewing angle change in the 3D Viewport.
Second, make sure your mouse buttons are configured correctly. Although it is for a different model, here is a page explaining how to configure what the buttons do on a Logitech mouse in Windows. Here is another page explaining how to do it in macOS.


text:
How come the video sequence editor does not show an accurate representation of render output, but "show backdrop" does?
This is an issue I ran into while editing last night. I repeated a video clip, added a transform layer on top and cropped it, moving it into position as seen in 1. When rendering, it did not show up. Out of curiosity, I clicked "show backdrop" and noticed the overlay absent. I had noticed the same problem using the text tool, where it would appear to fit in the video sequence editor, but would show cut off in the render.
I did, however, discover that the "show backdrop" feature actually accurately displayed what the render would show. So my question is, why on earth is that video output string not shown in the VSE window, and what can I do to fix it?


text:
Is there any way to activate Rigify Buttons from a Python Script?
Some background as to why I want to be able to do this:
I've written a script that finds and replaces specific widgets with my own custom made ones (I read the names of existing objects inside the widget collection, and then replace all with a specific prefix by a custom mesh). Every time I want to regenerate my rig, and run the script to replace all the widgets, I also need to delete the original widgets, and purge the orphan data. This is because when you press the rigify "Generate rig" button, it will generate objects with the correct names, but the meshes themselves will be named .002 instead of .001, because all the orphan mesh data means they can't be named the original.
So, instead of manually deleting the widgets, purging the orphan data, selecting the mesh and generating the rig each time... Instead, if I could simply use select_set(True) on my metarig, and activate the "Generate Rig" from a script, then I could let my script handle everything from the the widget deletion, orphan purging, rig generation, and widget replacement, to eye parenting, driver assignment and bone constraints all in one, which would save me heaps of time!
Thanks in advance!

Well, I guess I'll be answering my own question!
After reading up the barely commented documentation, I figured out how to do this. It's very likely that what I have done is very inefficient, but it works. Here's the code I concluded with!
RigGen = True #Just in case I don't want to replace the rig every time

#Define a deselect command for all selected items - it'll be useful later.

def DeselAll():
    for obj in bpy.context.selected_objects:
        obj.select_set(False)
DeselAll()

##Then, we delete the original widgets found in the "Widgets" collection
if RigGen == True:
    widg_del = bpy.data.collections["Widgets"].objects
    for obj in widg_del:
        bpy.data.objects.remove(obj)

    #Then, we removes all orphans stored in the meshes data block
    for block in bpy.data.meshes:
        if block.users == 0:
            bpy.data.meshes.remove(block)

#At this point, the context has been changed, so we need to change it back to object mode
#Else, our rig generation will not work unless you hover your mouse over the 3d viewport.
    bpy.ops.object.mode_set(mode='OBJECT')
    cnt = bpy.context
    scn = bpy.context.scene
    mrig       = bpy.data.objects["Metarig"] #"Metarig" is your metarig object name
    mrig.select_set(True)
    rigify.generate.generate_rig(cnt,mrig)

DeselAll()

It's slow, but it's faster than doing it all manually!

This is something that both blender and 3dsMax (expensive!) have in common.  Barely useful documentation with few examples.


text:
How to add another option to set object origin hotkey
I have a script that sets the objects origin to the center and the lowest point in z of the object.
Everything works and I have it in my own custom tab under tools.
But how can I add it to the shortcut ctrl+shift+alt+c?
I have been able to add it other places (like the add mesh menu, although obviously not where I need it) but I cannot find any info on adding something to the set object origin menu.
Any help?

To adjust an existing menu, you need to start by finding the python class name of the existing menu you want to alter. You then create a function that uses the same argument list as a classes draw method and append it to the menu in bpy.types. You can see an example of this in the add object template script.
In the case of the set origin operator, the menu is created by the operator, it is based on an enum that appears to only exist in the C source code and isn't exposed to python, meaning it doesn't appear to be adjustable,
If you can't find the name of the menu, then you can create a replacement menu yourself. You would then create a shortcut that calls your menu and disable the original shortcut.
An example addon can be found here.


text:
Script for loop issue
So I should be missing something simple. (Amateur here...) I am testing snippets of code to create an addon.
The idea is to create markers on the timeline from a list.
The code below works in the python console but not in the text editor
scene = bpy.data.scenes['Scene']
for j in range(len(markerLIST)):
    scene.timeline_markers.new(markerLIST[j], frame=j)

Can someone explain to me why that is? And how it fix it?
Thanks

If you read the python console start message you will notice that some modules and some variables have been imported for our convenience.  eg bpy and C = bpy.context.  You need to include your imports in the text editor.  Too see errors https://blender.stackexchange.com/questions/6173/where-does-console-output-go

also consider using  for j, name in enumerate(markerlist): to enumerate without using range and length methods.  And using scene = bpy.context.scene will use the current (context) scene no matter its name.

Thanks for the reply.
I look for the module that corresponds to the markers

scene = bpy.data.scenes doesn't work without the ['Scene']. Maybe I am missing something.

I am missing where you got the idea to use  scene = bpy.data.scenes   I suggested bpy.context.scene

Oh... yes. ok. Thanks again.

If you read the python console start message you will notice that some modules and some variables are builtin or have been imported for our convenience. eg bpy and C = bpy.context.
PYTHON INTERACTIVE CONSOLE 3.7.3 (default, Apr  3 2019, 19:16:38)  [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]

Command History:     Up/Down Arrow
Cursor:              Left/Right Home/End
Remove:              Backspace/Delete
Execute:             Enter
Autocomplete:        Ctrl-Space
Zoom:                Ctrl +/-, Ctrl-Wheel
Builtin Modules:     bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports: from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data

You need to include your imports in the text editor. To see errors Where does console output go
also consider using for j, name in enumerate(markerlist): to enumerate without using range and length methods. And using scene = bpy.context.scene will use the current (context) scene no matter its name.
import bpy # NEED THIS

scene = bpy.context.scene # < the context scene

markerLIST = ["foo", "bar"]

for j, name in enumerate(markerLIST):
    scene.timeline_markers.new(name, frame=j)

Consider giving the list both the name and frame
import bpy # NEED THIS

scene = bpy.context.scene # < the context scene

markerLIST = [(1, "foo"),
              (20, "bar"),
        ]

for j, name in markerLIST:
    scene.timeline_markers.new(name, frame=j)


text:
Checkbox array functioning as one. How do you separate the checkboxes
I trying to see if this is possible. I want to have the ability to choose which frames to re-render with checkboxes.
First issue I am having is that the checkboxes active and de-active together. I build the checkboxes with a for statement. How to create unique checkboxes?
lastly, is it possible to obtain a list of active checkboxes? I want to use this to render specific frames.
The Print Operator is to test the Checkbox list before I attempt to the render Operator
import bpy
import os
from bpy.props import (StringProperty, BoolProperty, IntProperty, FloatProperty, FloatVectorProperty, EnumProperty, PointerProperty,)
from bpy.types import (Panel, Menu, Operator, PropertyGroup,)

###########     Scene Properties         ###########
class BoolProperties(PropertyGroup):

    frame_bool: BoolProperty(
        name= "checkbox name",
        description="A bool property",
        default = True,

        )

###########     Test Operator - Print    ###########
class PRINT_OT_Check(bpy.types.Operator):
    bl_idname = "print.checkboxes"
    bl_label = "Print Checkboxes"
    bl_description = "Print Active Checkboxes"

    def execute(self, context):

        return {'FINISHED'}

###########     Test Operator - Render   ###########
class PRINT_OT_Check(bpy.types.Operator):
    bl_idname = "render.checkboxes"
    bl_label = "Render Checkboxes"
    bl_description = "Render Active Checkboxes"

    def execute(self, context):

        return {'FINISHED'}

###########     Panel in Active Tool     ###########
class FANCY_PT_Panel(Panel):
    bl_label = "Checkbox Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'Tool'

    @classmethod
    def poll(self,context):
        return context.object is not None

    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)

        colortool = bpy.context.scene.color_tool

        fstart = bpy.context.scene.frame_start
        fend = bpy.context.scene.frame_end + 1
        if fend > 21:
            fend = 21
        collection = list(range(fstart, fend))

        layout.label(text="Colorway Render Selection:")
        row = layout.row()
        row.operator('render.checkboxes', text="Render Active Checkboxes")
        row = layout.row()
        row.operator('print.checkboxes', text="Print Active Checkboxes")
        row = layout.row()
###Checkbox generator###
        for y in range(len(collection)):
            checkname = str(y + 1)
            row.prop(colortool, "frame_bool", text = checkname, icon = 'MATCLOTH')

###########     Registration             ###########
def register():
    bpy.utils.register_class(BoolProperties)
    bpy.utils.register_class(PRINT_OT_Check)
    bpy.utils.register_class(FANCY_PT_Panel)

    bpy.types.Scene.color_tool = PointerProperty(type=BoolProperties)

def unregister():
    bpy.utils.unregister_class(BoolProperties)
    bpy.utils.unregister_class(PRINT_OT_Check)
    bpy.utils.unregister_class(FANCY_PT_Panel)

if __name__ == "__main__":
    register()
```

Short answer, yes it is possible, before going down that route  Consider how a print dialog does this via a string property, eg  1, 2, 3, 8-14, 17 ie print pages 1. 2. 3. 8 to 14 and 17.

You realize your print and render classes have the same name? You only have one stored boolean for all the checkboxes. See https://blender.stackexchange.com/questions/6975/is-it-possible-to-use-bpy-props-pointerproperty-to-store-a-pointer-to-an-object Finally, I agree with @batFINGER, there are too many checkboxes in a row on that panel


text:
Blender displays the wrong X-relosution for JPEGs,
A bit of context first, I setup a Node group that helps me scale textures to real world scale. So I use the images DPI or PPM for this. Thus I scripted the inputs for the Node groups to automatically grab the relevant information.
It works fine with PNG and TIF but not with JPEG.
I use the script below to gather the DPI.
node_tree.nodes["IMAGE12"].image.resolution.y

For JPEGs, I get the wrong DPI, 72 dpi (2834.646 ppm). Even it the correct value should be higher, blender always displays 72dpi.
So, is there a script to access the EXIF of images directly? so that I get the correct DPI all the time.
Thanks

OK, found a solution.
Basically, blender is missing an EXIF reader. Luckily, python has the modules. We just need to install it.
Below is a basic method to install a module
https://b3d.interplanety.org/en/how-to-install-required-packages-to-the-blender-python-with-pip/
But did not work for me. Perhaps, its because of the office firewall or network....
So I installed the module using the wheel file, .whl, with the function below with blender (Not a powershell)
import subprocess
import sys
import os

# path to python.exe
python_exe = os.path.join(sys.prefix, 'bin', 'python.exe')

# install required packages
subprocess.call([python_exe, "-m", "pip", "install", "C:/LOCATION AND FILENAME.whl"])

Don't need to install pip because since 2.8 its already installed.
I am using the ExifRead module. Arbitrary selection. The code below gets me the dpi I want.
import exifread

# Open image file for reading (binary mode)
f = open('C:/Users/csemeon/Desktop/Fabric/RED 1200dpi.jpg', 'rb')

# Return Exif tags
tags = exifread.process_file(f)

for tag in tags.keys():
    if tag in ('Image XResolution'):
        #print ('Key: %s, value %s' % (tag, tags[tag]))
        dpitest =  str(tags['Image XResolution'])
        dpi = float(dpitest)

Had to use a two steps to convert the value to float (or int). Because the Dpi is a tag and doesn't convert directly to float.
Hope it helps someone.

I'd recommend to file a bug report if the dpi values are wrong... Just go to Help > Report a Bug to let the blender devs know about that. In best case this workaround is redundant at some point.

Also read: Using 3rd party Python modules


text:
multiple template_preview flickering issue
I have been working on a panel that contains a list of textures and additional information. This is for rendering a garment with multiple textures.
The main idea is to facilitate non-3D users to load a file with a garment, camera and lights. The add-on aids in listing the textures and quickly render single views.
So, to focus on user-friendliness, I want to display the textures in the panel. There are two option I found, template_icon and template_preview. I added both to the script to see the different.
template_icon works but display quality is low.
template_preview works with only one display. Having multiple previews either starts flickering or displays only one texture.

Below is my Panel Operator. Maybe it is how I setup my panel.
###### Panel for texture list
# ------------------------------------------------------------------------
class CADListPanel(Panel):
    bl_label = "CAD List"
    bl_idname = "VIEW3D_PT_CAD_list"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'CAD List'

    def draw(self, context):
        ###For Preffix and Suffix
        render_inputs = bpy.context.scene.NameInputProps

        scene = context.scene
        layout = self.layout

        box = layout.box()
        col = box.column(align=True)
        grid = col.grid_flow(columns=1, align=True)
        grid.scale_y = 1.5
        grid.operator('render.cads', text="Render Colorways")
        grid = col.grid_flow(columns=1, align=True)
        grid.scale_y = .75
        grid.prop(context.scene, 'output_path')
        grid.prop(render_inputs, "preffix_render", text="Prefix")
        grid.prop(render_inputs, "suffix_render", text="Suffix")

        ###Checkbox generator
        box = layout.box()
        col = box.column(align=True)
        grid = col.grid_flow(columns=1, align=True)
        grid.label(text="Colorways to Render")

        split = col.split()
        columns = [split.column() for i in range(5)]
        cad_list = bpy.context.scene.cad_list
        for i in range (len(cad_list)):
            if i >= len(cad_list):
                break
            rendercheck = str(i + 1)
            ###Use scene.cad_list[i] instead of cad_list[i]
            columns[(i) % 5].prop(scene.cad_list[i], "renderbool", text=rendercheck, icon='MATCLOTH')

        box = layout.box()
        col = box.column(align=True)
        grid = col.grid_flow(columns=1, align=True)
        grid.label(text="Activate Render Preview to aid in centerline position")

        #####CAD info and options
        for idx, cad in enumerate(scene.cad_list):
            try:
                box = layout.box()
                col = box.column(align=True)
                grid = col.grid_flow(columns=3, align=True)
                grid.label(text="")
                grid.label(text=f"CAD {idx + 1}")
                grid.prop(cad, "renderbool")

                grid = col.grid_flow(columns=1, align=True)
                grid.prop(cad, "name")

                ###Open and Remove
                grid = col.grid_flow(columns=1, align=True)
                if cad.image is None:
                    open_operator = grid.operator("scene.open_cad", text="Open", icon='FILEBROWSER')
                    open_operator.index = idx  ###Pass the index as a property
                else:
                    remove_operator = grid.operator("scene.remove_cad", text="Remove")
                    remove_operator.cad_index = idx

                grid = col.grid_flow(columns=2, align=True)
                icon = 'TRIA_DOWN' if cad.toggle_options else 'TRIA_RIGHT'
                grid.prop(cad, 'toggle_options', icon=icon, icon_only=True, )
                grid.label(text="Toggle Information")
                if cad.toggle_options:
                    ###Display the texture
                    if cad.image is not None:
                        ###Image input field
                        grid = col.grid_flow(columns=1, align=True)
                        grid.prop(cad, "image", text="")

                        grid = col.grid_flow(columns=2, align=True)
                        ###X and Y positioning
                        grid.prop(cad, "posx")
                        grid.prop(cad, "posy")

#####Comparing texture display options
                        grid = col.grid_flow(columns=1, align=True)
                        ###Preview layout Function
                        grid.template_preview(bpy.data.textures[cad.name], preview_id=f"cad.preview{idx + 1}")
                        ###Icon layout Function
                        grid.template_icon(cad.image.preview.icon_id, scale=10)

                        ###DPI and Scale
                        grid = col.grid_flow(columns=2, align=True)
                        row = grid.row()
                        row.alignment = 'CENTER'
                        row.label(text="DPI")
                        grid.prop(cad, "dpi")
                        row = grid.row()
                        row.alignment = 'CENTER'
                        row.label(text="SCALE")
                        grid.prop(cad, "scale")

                        ###Dropdown list
                        grid = col.grid_flow(columns=1, align=True)
                        grid.prop(cad, "matchinglist")

                        ###Color inputs
                        row = grid.row(align=True)
                        row.prop(cad, "colorbutton")
                        row = grid.row(align=True)
                        row.prop(cad, "colorthread")

                        ###Boolean option to hide/unhide Color 3
                        row = grid.row()
                        row.prop(cad, "nocontrast")
                        if not cad.nocontrast:
                            row = grid.row()
                            row.prop(cad, "colorcontrast")

                        grid = col.grid_flow(columns=2, align=True)
                        icon = 'TRIA_DOWN' if cad.toggle_options2 else 'TRIA_RIGHT'
                        grid.prop(cad, 'toggle_options2', icon=icon, icon_only=True,)
                        grid.label(text="Additioanl Options")
                        if cad.toggle_options2:
                            grid = col.grid_flow(columns=1, align=True)
                            grid.prop(cad, "saturation")
                            grid.prop(cad, "weave")
                            grid.prop(cad, "color_variation")
                            grid.prop(cad, "backside")
                else:
                    if cad.image is not None:
                        grid = col.grid_flow(columns=1, align=True)
                        image = cad.image
                        grid.template_icon(image.preview.icon_id, scale=5)

            except AttributeError:
                ###Handle the case where the image preview is not available
                layout.label(text="Image preview not available.")

        ###Add texture button
        layout.operator("scene.add_cad")

    def update(self, context):
        self.report({'INFO'}, "Panel Updated")
        bpy.context.area.tag_redraw()

use https://docs.blender.org/api/current/bpy.utils.previews.html

I don't Have enough Reputation to leave a Comment, but I am experiencing the same issue and I believe this is a bug in Blender. I created a ticket here for anyone experiencing the same issue: Having Multiple Blender texture previews is broken #112702


text:
Import of volume Data from Paraview for physical simulation
I'd like to ask : how can I import my volume data from Paraview to blender?
Let me preface this with the fact that i just started using blender.
To clarify, what i want to do is this. I have a fluid (smoke) simulation from OpenFoam, that I animated in Paraview, and i wish to recreate the animation using Blender's superior renderer.
So I thought I should export the scene as an x3d file, specifically the density in the "volume" format, and the import it in blender and render it there. But when I do so I don't see anything. If I export the "surface" the exact same way I can see it just fine. Eventually I thought i would export all the frames to
create an animation, but i cant even see the first frame.
So, what is happening. Is my data format wrong? Should I instead try to import my VTK files instead?
Any help would be appreciated


text:
Fluid Flow always starts from Domain Boundary Issue
Eventhough my inflow is in the center, the fluid flow always starts from the domain boundary. I have ensured that the normals are not inverted and the cache folder is deleted.Usually the first simulation works fine.
The blender file: https://drive.google.com/open?id=0BzhkRkqiPRPtRnVYbFZrSkV2T0U

I tried your file, it seems to work well here, try to delete your cache manually and retry. if "the first time works" this could mean the cache is created correctly, but after something strange happens...

Did you bake it multiple times? Also, by delete cache manually, do you mean delete the files in the folder? I did that :|

This appears to be a long outstanding issue:
https://developer.blender.org/T28756
and has been added to the "TODO" list at:
https://wiki.blender.org/index.php/Dev:Source/Development/Todo/Tools#Fluid_Simulation
The problem appears to occur when you have a relatively small fluid object compared
to the domain size.
Generally speaking, using an UVSphere as an inflow object isn't a good idea due to the
smaller triangular faces at its "North and South poles".
A less problematic option would be to either use a cube or a level 1 or 2 subsurfed
cube (apply the modifier), if you want to keep the inflow object the same size.
Also, it's good practice to keep all of the fluid simulation elements at a scale of 1
(Your inflow object had a scale of .025, Apply Scale, Ctrl + a > Scale).
(Dimension of 0.05).
Here's your blend file modified using a Subsurfed level 2 cube (subsurf modifier applied)
at the same dimensions (0.05) as the UVSphere inflow object:

Using an inflow or obstacle object that contains faces with even/equal surface area
doesn't guarantee a successfull fluid simulation result when the voxel size approaches
the size of your fluid object(s). In this case, the only option would be to scale
everything up; which can necessitate tweaking any animation you may have on your fluid
objects.

Thanks a ton! Just started learning Blender and spent an entire day figuring it out. One question: Is there an advantage to use a subsurfed cube vs a normal one?


text:
Rendering - Render Buffer Slots
Render buffer slots show only the last rendered image instead of showing different images rendered (with different settings to compare) in each slot as done earlier in 2.7x versions.  Is it a bug or any settings I have to make in 2.80 beta?


text:
2 Different Rigs, Copy animation using key bones?
I'm wondering whether it's possible to get a second figure to copy the motions of the first by having the former's key bones (or as many as are logically similar, even!) ?parented? or otherwise keyed to the other's?
Put another way, while I know it's ideal to have one rig for multiple figures, could you still copy an animation sequence by having a second figure mimic the gross movements of the first? You could do the same thing if you moved all bones, keyframe by keyframe to match the original, but it seems like there should be a way to automate this a bit ...

All animation data are stored in a datablock called "Action": you can access it in the dopesheet window, changing the menu from "dopesheet" to "action". In the proposed situation, they are keyframes data reporting loc, rot and scale values of bones.
As long as the names of all bones are the same, the action can be applied to many different armatures, and you can (i.e.) apply a location offset to a main bone for having them working "in parallel", for instance.
Be aware that if the names of the bones are the same but their position and size is different, the animation can give unexpected behaviours.
All animation data referring to a bone name not found in the armature will be simply ignored.
You can "code" rename as occur to re-assign them in single bone strings (dopesheet/actions).
So select the second armature (which could be a copy of the first) go to the action editor window, assign the action, and both armatures will move in Sync.


text:
Breaking an environment into multiple objects
I'm completely new to Blender and wanted to gain some experience with the software. As my first project I decided to recreate an entrance to a underpass that's close to where I live.
The walls from the structure are mostly continuous so I'm not sure on how (or if) should I break them into multiple objects. I tried leaving it as a single giant object but I don't know if it would give problems when adding modifiers (as I'm looking forward to round the wall edges a bit).

I also thought about breaking it down it like so:

But it still feels like the objects are too big, and since everything is a single scenario I don't know if it's really a good idea to break it down to multiple pieces. What should I do, and if there's no concrete answer, what are the pros and cons of each method?

I'm an advocate of breaking meshes up. There are numerous reasons that I feel this way:

Not many objects in real life are solid chunks.  Maybe concrete walls to a certain extent, but even those tend to have seams to allow for movement and expansion so they don't crack.  Seams will add realism.
When your object starts to get large and/or complex, the mesh topology can get weird in places.  For example, I would guess you have a lot of extra edges where the stairs connect with the walls.  Those edges wouldn't be needed if the stairs are separate.
It's way easier to UV/unwrap smaller, simpler objects than it is with large complex objects.  Similarly, it's a lot easier to assign materials to whole meshes rather than selecting individual faces.
Even as separate pieces you can still group the objects together in Blender so you can move them as a unit, so keeping them together doesn't really give you much of an advantage there.

That's mainly what I can think of off the top of my head.  I hope that's helpful!


text:
Mirror and flip objects with mirror modifier
I have a environment that is mirrored and flipped along the world origin. I placed an Empty object at the world origin and applied a Mirror modifier for the objects to get mirrored along the Y axis, but I can't get them to flip along the X axis too.
Here's what I'm looking for:

Here's what I'm getting:

How can I achieve this mirror + flip result?

@MrZak that would make four copies of a single object. The objects in the image aren't the same.

Then the simplest solution would be using Interactive mirror tool based on 3d cursor. Up until 2.79 it was mapped to Ctrl+M. Note though that it inverts scale thus when applying normals get flipped. Another solution could be using Array modifier with Object offset set to that empty (circular array basically). Though the origin point of objects has to be set to empty

@MrZak so it's not possible to do by only using modifiers without moving the origin of each object?

It is generally possible with Array set to both Object and Constant (or Relative) Offset. Object offset will move to the center, constant offset will move to place. However this way requires coordinates for Constant / Relative offset, e.g if your object is at X -5, Y 5 then offset should be at X 5 Y 5 like https://i.sstatic.net/7k10Z.jpg

What you actually are doing is rotating the object 180 deg in the Z axis.
You can do that procedurally with an array modifier and an empty rotated 180 degrees.

That way the object appears at the same place as the Empty object. How can I keep the distance from the Empty the same?

Or are you assuming the origin of the object is at the world origin?

@Tiago Exactly, place the objects origin at the world location. Otherwise you will have to use two empties at the exact target positions.


text:
Game Asset texturing; high poly to low poly
What is the "proper" way to texture detailed game assets? I have baked a normal map and now I want to add color, logos, warning signs/stripes, and all kinds of details to the low poly asset. The details need to be in the correct positions (on insets, recesses), so doing them on the low poly UV map doesn't work since the low poly doesn't have these. How would I go about this?
Do I use the normal map as a UV layout background layer in GIMP and paint on it accordingly?
Do I create a UV map for the high poly as well? (I'm not seeing how this could work, and also the normal map baking worked fine without it too)
Do I add stuff on the high poly mesh and bake them on the low poly mesh like I did with the normal map? How is this done? (I tried something like this, but got an error that I couldn't figure out)
Search results of "game asset workflow", "texturing", "texture map baking", "high poly to low poly" etc usually yield:

Tutorials of adding a simple repeating texture pattern (brick walls, wooden barrels) onto the object.
Making just the normal map.
Texturing an object but very little to none about transferring the stuff onto another object.
Using GIMP/Photoshop to paint stuff on the UV map of the low poly (Which in my case is missing all the edges of the high poly)
Something along the lines of Rest-of-the-owl i.e. "And then you just texture it. Thanks for watching."
Something completely unrelated.

Have I done this completely wrong? Should I have added textures/materials while I was making the high poly? Am I missing something?
Things to note:

The high poly is one mesh, there are no separate parts.
I'm an absolute beginner with this stuff
If there is a way that is better and/or I haven't considered, please do point it out.

Thanks in advance.
EDIT: Not seeing the image description so:
From left to right: High poly, low poly with normal map, plain low poly

In case someone else is struggling with the same issue (Cycles Render):
Presets:

Make a UV of the low poly
Make a UV of the high poly (Smart UV Project did a wonderful job)
Make a new material for both objects.
Make a new image in the UV/Image editor for both objects
Add an Image Texture in the Node editor for both objects, with their own images (those made in the previous step) assigned to them. If you can't add nodes, tick the Use Nodes box
High poly object was painted in the Texture Paint mode, Display mode/Viewport shading set to Texture. Face selection masking was enabled, in order to paint specific faces. Brush set to Fill
Hit Image > Save Image once in a while in the UV/Image editor so not to lose hours of work. (It did this to me a few times.)

The baking:

Go to Render > Bake, like you would when doing normal maps.

Set Bake Type to Diffuse and then uncheck Direct and Indirect, leaving only Color toggled on. (Because if there are no lamps in the scene, the result will be dark)

Remember to tick the Selected to Active box.

Select both objects, the high poly first, the low poly last. Making the former the Selected and the latter the Active

Make sure both objects are occupying the same coordinates / are in the exact same place.

Hit Bake and wait.

Like I said in the original post: I'm very new to this, but these steps got me the results I wanted, or at least I can use it.
Here's a pic just for good measure, don't mind the ugly colors, those were just for the proof of concept.

And here it is in Unity almost finished

TexTools could help you in baking stuff like Color ID maps: http://renderhjs.net/textools/blender/

Just small notes - unwrapping highpoly isn't generally necessary unless texture to be baked should be using UV coordinates; waiting while baking isn't needed if you bake Diffuse color only since this pass doesn't depend on samples, one can enter 1 sample and bake Emit, Diffuse (color only) or Normal passes without quality loss


text:
Glossy object seems dark and non-reflective

Hi all, having trouble seeing a good render (cycles) of this donut I'm trying to make. Setting is glossy, but seems dark and non-reflective, just looks like puddy and basically all other BDSF looks basically the same. Is not glossy/ reflective!
specs:
windows 8.1
intel core i5-4210U
GeForce 840m
Thanks

Looks like you need some lightning and other objects for it to reflect off of. Additionally you could load it up in a game engine with a glossy shader and test it that way.


text:
Is there a way to select 'back' vertex/edges/faces without having to turn on x-ray?
Say I'm on perspective view and some vertices on a cube are 'hidden' away from view and I want to select with the front vertices...I'd have to turn on x-ray, right? I just find it a unecessary step most of the time I'm modelling...can I turn this off?
Tks!

X-Ray isn't the best solution for similar case. Turning off Limit Selection To Visible, modeling with X-Mirror set to given axis or Mirror modificator to work only on half / quarter of mesh, sculpting mesh with Grab brushes with high radius might be better ones. Though it's not clear what is the certain problem with modelling as you mentioned

2022 and this limitation thanks god for 3ds max

Is this some kind of a principal point of the Blender team? I really don't understand this. EVERY other 3d tool works like this. I don't need to see the backfaces - I KNOW what I am selecting and otherwise I turn around to be sure. It feels that this could be a simple setting and it's driving me mad for a further great tool.

I may misinterpret what you say but:

The shortcut to switch from Solid to Wireframe mode (and thus to grab a hidden vertex) is Z in 2.79 and shiftZ in 2.8.
When you are in Solid mode you can activate/deactivate the Limit Selection to Visible (2.79) or Show Whole Scene Transparent option (2.8) on the horizontal menu bar.
In 2.8, in both Edit or Object mode, use altZ to switch to transparent/not transparent.

I understand, and no you didn`t misinterpret..I just really wanted the option of selecting hidden vertices without having to go to x-ray to be my default.

if you want to select a vertices behind, you need to see by transparency, no? And when you are in Solid mode you can activate/deactivate the Limit Selection to Visible (2.79) or Show Whole Scene Transparent option, so I'm still not sure what you lack or where is the problem

Is not necessarily a problem, I come from the fallen XSI and although I see there's an advantage in this procedure I never really needed or used it. In xsi the default drag box selection of polygons/vertices/edges gets everything in the way but it's only really used when you want to select a chunk of your model. If I want to select a group os polygons withoug selecting the back of geometry for example I can just 'paint' over them using polygon select tool. It may sound weird but it's incredibly fast and pratical;

Anyway, I feel like it's not just a matter of getting used to the tool, which has amazing features by the way but also unecessary steps that blender takes to approach simple tasks, like I'm on 'faces' selection mode so why can't I simply click and drag drawing over the polygons I want selected and insted I have to switch select tool-paint over-switch back to gizmo for example...You get what I mean?

Anyway, i was just wondering there might be a way around this...thanks for the help anyways! :)

hard to understand but sure, some things can be improved  ;)

I've edited my answer, alt Z allows you to quickly switch from transparent to non transparent in 2.8, in both Object and Edit modes.

I use a free addon called BorderOcclusion, which mimics Modo's select-through functionality. Essentially it turns x-ray mode on automatically when you click and drag the right/middle/other mouse button. Works like a charm, no manual switching into another mode required.

where can we find this addon? Could you share a link? Maybe add a short explanation explanation of how to use it or a few screenshots of the workflow.

I use the addon too , the Border Occlusion is the best addon for it
You can download the addon here -
https://github.com/Darcvizer/Border-Occlusion

The version of this plugin that works with 2.9 is here https://blenderartists.org/t/border-occlude/679738


text:
How can I go straight to edit mode by choosing selection modes?
That's basically it,is there a way to configure blender to go straight to edit mode when I choose a selection mode(eg; 1-for vertex,2-for edges or 3-for polygons)?
It may seem silly but I think it's bureaucratic since these shortcurts alone have no real utility.
I appreciate any help :)

The numerical keys outside of numpad in 2.80 actually retain the functionality of previous versions if you have collections(previously layers). You can easily toggle visibility of collections with them. This might be a really useful feature to have easy shortcuts for. It might be worth to consider this.

I understand these things have a purpose which was previously though and for someone has a utility, yet I think in a rank of priority I can`t imagine a scene in which switching between collections would be more relevant than sparing the time and bureaucracy to access such a simple function.
IMO tthe schortcus could be dynamic when it comes when switching windows, lets say they could have a functionality when in collection screen(can we please change it to explorer hahaha) and another when in 3D aditing viewport.

You could set up your keymap to work like that - differently in different areas of the UI. I think it is set to work in 3d view like that intentionally with collections. I just mentioned it because I thought the functionality is not immediately obvious, but sure, if you are not going to use it this way, it makes sense to set it up the way it is convenient for you.

Sure, but do you know how I could do that? coding perhaps? 'Cause i have no idea how to do it

I agree with you - and set up a macro on Belkin Nostromos Keypad.   So I kind of cheated to solve this (and set it up outside of Blender).    I also have been playing with this same macro with "VoiceMacro" to do the same thing.   "Vertex" is programmed to: Press ESC (make sure I'm out of circle select),
Press Tab, 6 (edit mode)
Press 1, (vertex select)

It will take me sometime to understand what you said, could you explain it in a more simple way please

You can use a macro to accomplish this task.   Outside of Blender assign many keystroke sequences to one keypress.   Look up a product called autohotkey.   I use it all the time.

Here's the link https://www.autohotkey.com/


text:
Loosing shift+select when in lattice
I'm using lattice and have selected a certain number of vertices but every now and then I try to shift+select other and blender 'loses' its select box. I'm pretty sure I'm must be doing something wrong...any idea what it might be?
Tks

When you say it "loses its select box" do you mean the control points you have selected already become deselected? Or do you mean that Border Select doesn't work?  I think you mean you press Shift and Right click, and the other points become deselected?? If so, maybe you're pressing the mouse button before you have the Shift down. Make sure you press Shift first, and hold it down while clicking.

Border select wasn't working, but now I realise that I didn't have it selected on the menu cause I'm currently using the gizmo...so now eeeevery time I have to switch back to selection box tool..but thanks!


text:
Bumps on my mesh (and no edges there)
Hi everyone i donot know what has happened to  my mesh it display many bumps in render mode but when i look in solid view mode there a are no bumps and there is not even an edge there.

Related - https://blender.stackexchange.com/questions/7729/how-to-flatten-a-face-to-avoid-distortion-make-an-ngon-planar and https://blender.stackexchange.com/questions/16258/why-is-this-surface-wrinkly

you have nonplaner faces, meaning they are not flat. Because a face can only be flat you are seeing the tessellation.

you can use the bundled 3d print addon to check mesh problems like those (and mode)

thank you very muck mr zak it worked i am gretly thankful


text:
Force draw objects in front of others
Here is what i want to do:

I want the penrose triangle behind the flask. The triangle is partially in front, but i want part of it to render behind the flask. However the flask is glass, so the triangle needs to also be visible behind the flask.
The only I can think of is to break the triangle into multiple objects and join them in the compositor. Any better suggestions?

I have a somewhat imperfect solution for you, but I think you could work it up into a perfect one.

That's a very raw render from the technique I'm suggesting.

And here's the compositor node tree.
I've used two render layers, one for the flask and another for the triangle. I've also given both objects Object IDs and the layers Object ID passes. Rendering uses the Transparent setting in the Film section.
Take the Object ID masks from the two layers/objects, and use the Math converter "Minimum" to create a binary mask of their overlapping areas.
Feed that into an Alpha Over node that takes as its input two versions of the flask layer, one opaque and the other translucent.
Then some more jiggery pokery to make sure that the transparency of the background is preserved, because otherwise it would obscure the triangle. That takes the Minimum of the Alpha values from the previous Alpha Over node and the original Layer.
Then another Alpha Over with the mixed-alpha flask as the second input. It shows the flask in front with the triangle visible through a translucent section.
Unfortunately there is no refraction, as there would be with rays cast through glass. You might be able to achieve it with a more complex set up, if you want to. But as it is, the flask is always in front but with the triangle visible.
Please forgive the crudeness of the models and render.
Edit: Slightly better example:


text:
How can I make a running text strip at the bottom of my video, please help
How can I make a running ( horizontal) text strip at the bottom of my video. I have used text strip and currently using blender 2.79.
Request you to please help or if any video is available please let me know , will be of great help.
Thanks

Please attach an image or gif on how you want it to be. Otherwise this question shows no effort on research. Before asking question check this out-https://blender.stackexchange.com/help/how-to-ask. Thank u

I think the easiest way would be to do the animation manually if you don't have too much text. just specify a keyframe with the position of your text outside of the camera output, then move that as you need and specify that with a new keyframe.

And i recorded a video how to do it https://youtu.be/PE0jZ1-nzlQ

in the Graph Editor (or Dope Sheet) press T to make the movement Linear (instead of moving the curve handles)


text:
Face disappearing when imported to Unity (Not Normals)
I have search through multiple threads for an answer to this, but I can't seem to fix it. I am having a problem where a face in my model is disappearing upon being imported to Unity. I checked my normals, and the face's normal is going the right way. I have attached the .blend file. Any help is appreciated! The face not showing up is the left eye when you are looking at it from the front. Thank you!
.blend file

Try exporting it to an FBX file, and then importing it into Unity. It worked for me, and it seems like the .blend import is broken somehow.


text:
Appending Characters but Asset Library doesn't load

I have created my characters, made my shape keys, created a pose library and saved everything in the asset browser as illustrated in the picture attached (Screenshot 1)., However, everytime i append the file into another scene, the poses of the characters are never imported to the new file, what am i doing wrong? (See screenshot 2)

Hello ! What exactly are you appending to the other file ? If you append only the character, I'm not sure the action poses are also appended with it

to see the poses of the library you need to select it. In the second screenshot, you still have "Current File" selected.


text:
Set Position by using mesh islands in GeoNodes
I've divided my geometry into multiple mesh islands and stored a named integer attribute to identify which vertices belong to the same group. Then, I split edges to make some offset adjustments, and now I'm trying to set the position of points in the unchanged geometry to the nearest points in the modified geometry. But I can't figure out how to prevent it from going to the nearest point of a different island that's closer.
Ideally, I would like to use a unique integer for every vertex before splitting the edges, then match them back together using the same values.
Does anyone know if this is possible in GeoNodes?

Geometry nodes, how to select nearest edges of mesh islands or maybe Is there a way to limit "Geometry Proximity" to only instances that share the same instancer point? Otherwise maybe sketch or manually model what you want to achieve in geometry nodes? Cheers!

(Using Blender 3.6.12)
The following GeometryNodes modifier is shifting every mesh island away from one another, before calling a Geometry Proximity node to find the nearest node, in the split and modified geometry, to every node of the unchanged geometry, belonging to the same mesh island. Eventually, mesh islands are shifted back.

1. The offset between two mesh islands is set to 10% larger than the object Bounding Box to avoid any overlap between mesh islands.
2. For the demonstration, a Random offset is applied after splitting the edges.
Resources:
(Blender 3.6.12+)


text:
How to bring out a detail through Displacement
I am planning to model a large scale project for my design semester and due to the limited time frame I have, I want to get things done through quicker effective options. Since in this project I'll have to model each element, I need to provide a great deal of detail for one of them i.e. the Columns. This is a traditional Hindu architectural column

The problem is I don't have enough time to go through tutorials atm to model every bit of detail so I thought I could rely on the Displacement modifier to do the Job. I am using Knald to generate the required maps, and on its 3D Preview I see great and promising results.

However, when I try using these maps in Blender's node editor they are still quite flat. The displacement modifier gives me a weird result as all the faces have this linear length-wise bump, and the detail is seen only at the top and bottom faces.

Whats the best I could do to fix this? I'd definitely like a result as seen in Knalds 3D Preview.

You simply don't have enough geometry. Try to use MicroDisplacement while rendering, There are plenty of guides about it.

the above is right: displacement needs geometry (normal mapping fakes geometry)

When you say it needs more geometry, what does it actually mean? Do you refer to subdividing the object? or does it need to have more faces that is projected and extruded?

it is basically the same: you need more geometry on the mesh surface that needs to replicate a such complicated pattern... you could use subsurf levels (save file before), or as suggested, try microdisplacement (if using cycles). How many vertices are you using in the last image?

I have sub divided the cube quite a lot..and whether I sub-divide it by 10 or 50..I see the pattern only in the top and bottom face. I even tried increasing the no. of views of the subsurf modifier, but all it does is slows the system.


text:
How do I change the file path for all the textures used?
I have made a scene in blender following some tutorials, however, since my C drive was getting too loaded, I shifted all my Blender stuff to the D drive. Now when I make a render in blender, all objects have a Purple colour to them. Reading other questions, I figured that it might be because the source of all the image textures have been shifted from C to D drive.
I changed the source of my textures on the current model I am working on through the node editor, however, for all my other .blend files, do I have to correct each textures location file one by one or is there an easier way?

Possible duplicate of Why are all the textures in my file pink?

Side note: Always use relative paths for external data .Always put all project assets inside the same parent folder.

did you try file -> external data -> find missing files?

I have a problem that I believe is related to the conversation below. We have a scene set up and working properly, but the texture sizes are too large for our needs. We want to use lower-resolution textures instead, but we're unsure how to make Blender read the new textures from a different location. Can you help us with this issue?

File -> External Data -> Find missing files -> Choose your texture folder -> Find missing files.
Blender will then replace all missing textures with the fitting ones from the new selected folder.

From five years in the future, thank you. Life saver.

Thank you, find missing files is quite a strange name for this.

I had this same problem and wrote an add-on to help, it's here:
https://github.com/cskilbeck/bl_TextureLocator
It's still in Testing but if it's useful we can see about getting it migrated into the repo.

Wouldn't this addon still require manually switching for each material? Is it possible to switch folders for all the materials?

I'll look into it, I'll update the GitHub issue if/when I get it done