Blurry Render for a Character My problem is that I have my character with clean lines in Texture Mode and when I try to render it, it becomes blurry. In Cycle Render it's even worse, I can't see the textures I have created on Gimp.

Here are my render settings :

I looked at many answers on Internet but didn't find the answer I needed...

Well, have a good day !

I believe this boils down to the way Blender displays pixels. It attempts to blend them together to make low-res textures less obvious.
You can set how Blender blends pixels together in the material node editor, on the image texture node.
By default, Blender sets pixel blending to "Linear." This blending mode will result in the blurry effect you want to get rid of.

Setting the  blending mode to "Closest" will allow for the sharp pixels I assume you are after.
Hope this helped!


Reflection artifacts when rendering Sometimes I get these weird white reflections, that don't look real at all. I have a white sunlamp in the scene. Is there something I can do to stop this?

EDIT:

10x smaller sunlamp, added glare (perfect ad for a washing up liquid).

That is the reflection of the sun lamp.  The size is related to the size property of the lamp.  If you change it to 0, it will disappear.  You will also have perfectly crisp shadows.

The sun lamp reflection looks unnatural because cycles produces a perfect reflection, instead of the soft edged sun were used to seeing because of the atmosphere.  And there is no bloom that happens in your eyes or in cameras to bright objects.  More info

So instead, You can add the bloom as a post process.

Or, use HDR an illumination map instead of a sun lamp.

Or, on the lamp, uncheck the box for "Multiple Importance".  If the glossy shaders have no roughness, or set to "Sharp", the glint with disappear...

More info on multiple importance: 1 2


How can I combine the object with tape? I have problem :)

I'm working on a project which is basic electric motor model and ı almost finish the project but ı noticed the interetesting thing which is ı dont know
How can I combine the object with tape?

This is example:

This is my model:

As you see tapes are broken in the my render:) I need help .

Create the tape (from a plane) approximating the shape of the battery and wire.
Go into sideview and extrude the plane. (the more accurate this is done the better will be the result)

Subdivide it, to get higher resolution (the more verticies it has the better will be the result). You can use Catmull-Clark or Simple both work.

Duplicate the object you want to get wrapped (select objects and press ctr + d,the location,rotation and scale has to be the same as the original)

Join the duplicated objects to one Mesh and hide the original objects (select the objects you want to hide and press h, select the objects you want to join and press ctrl+j)

Select the tape and add the shrinkwrap modifier

select the object you want to wrap around as target (battery and wire)
set the mode to Project
set the axis to x and z (this depends on the orientation of your scene, ether x and
z or y and z)
check at direction both Positive and Negative

Add a solidify modifier, to add thickness to the tape

Hide (not vieible in viewport and render) the copy and unhide the original objects.
And add smooth shading.

You can increase the subdivision level afterwards to get more or less detail.


How can I change (theme) the color of my objects in Object Mode? Heads-up: I'm not talking about assigning materials or matcap, ok?? I'd like to change the default color of objects when you startup blender with a raw scene or when you haven't assigned them materials and is (not) using matcap. :))

I've been trying to customize my interface in Blender but I haven't found an option to change the color of the object in Object mode. It stays that slightly purple/blueish and I can't change that. However, there is an oprtion for changing the object's color while in Edit mode, very customizable.

Does anyone know how can i customize the color of my object in Object Mode?

Object color in solid view is controlled by the lights in User Preferences > System:


Incorrect transparent texture rendering in cycles The transparent texture

Rendering result

Material setup

ImageTexture [Color] ------- TransparentBSDF --------|
                |                                    |---- MixShader-----SurfaceOutput
                |---------------DiffuseBSDF----------|      [Frac]
             [Alpha]-------------------------------------------|

It seems the dark edges come from nowhere...

Switch the order for diffuse and transparent


Find location of a specific point on a UV texture on the 3D object I am creating a simulation to later on use with OpenCV to detect black and white square markers on an outdoor terrain. For the markers I am using the following texture:

The markers are applied to a terrain using a shrinkwrap modifier in my simulation. In order to verify my openCV algorithms I would like to know the exact position of the inner corner of the markers.

Is it possible to somehow mark the inner corner in my UV texture and be able to retrieve its position in the 3D object (after using the shrinkwrap modifier)?

Alternatively, how could I at least find the center of the marker object after the shrinkwrap is used (as I need the actual position of the marker on the rendered image)? This would assume that the inner corner stays in the center of the marker, which is not necessarily the case with the modifier. However, it is at least a starting point.

Thanks in advance,

Nils

I figured out a way, although I am not sure if it's the simplest solution:

In order to locate the inner corner of the marker I need a vertex at that point. Therefore I seperated the marker into two faces and created a UV map like this:

Next, using a script (see related lines below) I select the marker and apply the shrinkwrap modifier (it is important to apply it so that the positions of the mesh/vertices are actually affected).

Since these markers only consist of now five vertices, it is fairly simple to select the one in the center of the marker and read out its local coordinates. Finally, with the object's world matrix I can calculate the inner corner's global position.

# make the active object the current marker
bpy.context.scene.objects.active = marker

# apply the shrinkwrap modifier to access the exact marker position
bpy.ops.object.modifier_apply (modifier='Shrinkwrap')

# get the local position of the inner corner of the marker
# (assuming the additional vertex in the center is at index 4)
local_inner_corner_pos = marker.data.vertices[4].co

# calculate marker position with respect to the global coordinate system
global_inner_corner_pos = marker.matrix_world * local_inner_corner_pos


Python Create Custom Armature without ops how do you create an armature in Blender Python 2.7x without using bpy.ops? With meshes I would use something like

mesh = bpy.data.meshes.new(name)
object = bpy.data.objects.new(name, mesh)
bpy.context.scene.objects.link(object)
mesh.from_pydata(verts, [], faces)

I can do something similar with armatures however how do I make the actual bone body? In the outliner I can see the armature object but there is only an origin point in the scene. When using dir on the armature I don’t see an option along the lines of from_pydata.

pivot_bone = bpy.data.armatures.new('spam')
object = bpy.data.objects.new(name, pivot_bone)
bpy.context.scene.objects.link(object)
print(dir(pivot_bone))

Ultimately I would like to use Python to create a custom bone shape.

Fairly sure that mesh data is the only one that offers from_pyData for others we need to manually position items as we create them, which we can do by reading the py data.

Armatures can get confusing, there are bones as well as edit bones that contain the basic armature structure and properties and then there are pose bones that stores constraints and animation data for all the action.

Different data paths are used to access different bone data -

obj = bpy.data.objects['Armature']
obj.data.edit_bones # adding, deleting, positioning bones
obj.data.bones # adjusting bone properties
obj.pose.bones # adding constraints, custom shapes...

An example of adding some bones and creating a custom mesh then setting it as the custom shape for one of the bones -

import bpy, bmesh

arm_obj = bpy.data.objects['Armature']
# must be in edit mode to add bones
bpy.context.scene.objects.active = arm_obj
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
edit_bones = arm_obj.data.edit_bones

b = edit_bones.new('bone1')
# a new bone will have zero length and not be kept
# move the head/tail to keep the bone
b.head = (1.0, 1.0, 0.0)
b.tail = (1.0, 1.0, 1.0)

b = edit_bones.new('bone2')
b.head = (1.0, 2.0, 0.0)
b.tail = (1.0, 2.0, 1.0)

# exit edit mode to save bones so they can be used in pose mode
bpy.ops.object.mode_set(mode='OBJECT')

# make the custom bone shape
bm = bmesh.new()
bmesh.ops.create_circle(bm, cap_ends=False, diameter=0.2, segments=8)
me = bpy.data.meshes.new("Mesh")
bm.to_mesh(me)
bm.free()
b2_shape = bpy.data.objects.new("bone2_shape", me)
bpy.context.scene.objects.link(b2_shape)
b2_shape.layers = [False]*19+[True]

# use pose.bones for custom shape
arm_obj.pose.bones['bone2'].custom_shape = b2_shape
# use data.bones for show_wire
arm_obj.data.bones['bone2'].show_wire = True


How to design a shoe cap I'm designing my models for shoe soles (3d printing) using blender. I'm a real beginner and so I just used the basic extrude, bevel and proportional editing to reach my goals. But now I would like to design a toe-cap. Right now the model looks like this:

But I would like someting more like this:

But I can't get the mash to "bulge" over the toes. Proportional editing will always also pull the lower layers in... Any ideas are highly appreciated.

Bridge Edge Loops is Blender's lofting tool, with a reasonable range of options.
One way to capture the curvature:

Rotate a duplicate of the top edge of your sole-rim upwards, towards the top profile of the shoe. If you have an actual front elevation of the shoe to work to, for the profile  edge, so much the better. (You could create a curve for that, convert to mesh, adjust the number of vertices to match the base edge. Loop Tools > Space is very handy for getting a fixed count of vertices evenly spread along a curved mesh-loop.)
Either use an existing top-surface, or extrude a temporary approximate one out, to give Bridge Edge Loops something to work to, and then use Bridge Edge Loops, with 'Blend surfaces' set. Adjust the number of 'Cuts', and 'Smoothness' to get as close as possible to your desired result.
Delete the temporary surface, and maybe Relax or Smooth some regions of vertices to improve the shape.

All this happens before detailing, and subdivision.


How to make a spiked sphere? I know how to make it manually with cone rotation around the sphere. but maybe there's much simpler solution or addon that has that option, preferably not very high poly solution.

Also if possible I would like the spikes not to be very pointy if that makes any sense

Here is what I kinda have in mind

Thanks

If you want to model it as a one mesh you may achieve it beveling the Ico Sphere.

Add the Ico Sphere (Shift+A-->Ico Sphere) with the 3 subdivisions.

In Edit Mode (with edge selection type) select the whole mesh (A), press Ctrl+B, then V to bevel the vertices only. With a cursor placed in the middle of the mesh and a pivot center type set to 3D Cursor extrude selected elements and then scale them (E,S). Next change the pivot center type to Individual Origins and scale all tips with S.

Give the object the Subsurf Modifier. Select the edge loop at the bottom of the spike, click Select-->Select Similiar-->Face Angles. Then press Shift+E to crease them.


Luxrender PBR materials I know that you should usually ask questions about "direct problems" here but there is a problem where I can't find an answer to. There is a quite similar question but the answers don't really help me at all:
PBR dielectric material in luxrender?

Now here is the question:

A few days ago I have seen an amazing tutorial about PBR materials by BlenderGuru:

https://www.youtube.com/watch?v=V3wghbZ-Vh4

However, this tutorial only features the Cycles Render engine. Since I am trying to get used to LuxRender I cannot just use the .blend file from the project. I have already thought about just recreating the steps from the tutorials but since I am new to Blender I think it is better to ask for an advice.

Has anyone experience with LuxRender and PBR materials and give me a hint what to look up?

Thanks for any help.

Kind regards,

Fabian Lins

You can use Disney Shader in LuxCore Render Engine with PBR textures.

Connect Albedo multiplied by Ambient Occlusion (if any) in Disney Material Base Color. Normal map in Bump socket (Checking Normal map tick box). Roughness and Metallic in their corresponding sockets. See Displacement note below.

Things to check:

Base Color is the Albedo multiply by Ambient Occlusion and both needs gamma 2.20 (sRGB Color Conversion for a standard PBR texture.)
All other maps (metallic,roughness,displacement needs gamma 1.0 (Linear color for a standard PBR texture)
for Normal map check normal map in image node
for Displacement use height Displacement node>plug the displace texture in height socket and a subdivision node(For limiting subdivision amount) in shape socket and connect Height Displacement node in shape socket of Material output.

For more clarity, here is a PBR setup tutorial for Lux: https://youtu.be/AXACxDlvZAY

See the image attach:


Need help with modeling the cross-guard of a sword I have the hilt of the sword and the blade I feel confident I can make but I can't figure out the best way to model this cross-guard and the angles on the faces.

I was wondering if anyone could give me some pointers for modeling something like this because i'm kind of stumped at the moment.

I've tried something, tell me if this is what you want:


edges sharp though edge split modifier not added Hello Blender Community,

I imported an OBJ mesh into Blender. When I set the shading to smooth some edges appear sharp and others don't, though I haven't added the edge split modifier.

If I go into Edit Mode I can see the blue lines indicating the sharp lines. I already checked if there are doubles by merging vertexes by distance and I checked if the normals are all pointing in the right direction.
Does anybody know what happened here?

Here's a picture of the object:

Here's a pictuer of the object in edit mode:

I've figured it out by myself now: In Properties > Object Data > Normals > Auto Smooth.
It's kinda like Edge split but not as an Modifier but it works the same, maybe even better.


What is the space used by Scene.ray_cast()? This is the complete 2.8 documentation for Scene.ray_cast

  ray_cast (view_layer, origin, direction, distance=1.70141e+38)

  Cast a ray onto in object space

  Parameters:

  view_layer (ViewLayer, (never None)) – Scene Layer

  distance (float in [0, inf], (optional)) – Maximum distance

  Return: (result, location, normal, index, object, matrix):

  result, boolean

  location, The hit location of this ray cast, float array of 3 items in
  [-inf, inf]

  normal, The face normal at the ray cast hit location, float array of 3
  items in [-inf, inf]

  index, The face index, -1 when original data isn’t available, int in
  [-inf, inf]

  object, Ray cast object, Object

  matrix, Matrix, float multi-dimensional array of 4 * 4 items in [-inf,
  inf]

Can someone flesh this out for me?

"Cast a ray into object space": which object?
Which object's space are origin and direction in? And the
returned location?
What is the matrix?

Do these all belong to the 'target' object? How would I know what that was before hitting it?

@ batFINGER was correct in his commentary.. All vectors are in World Space,  the matrix, the hit object's matrix_world.


How do you stretch and then release a soft body or cloth so it springs back like elastic? I have a soft body mesh and an armature.

I have one bone holding one end of the Soft body and another bone used to stretch the soft body.
I then want one of the bones to let go of the soft body so it springs back like a piece of elastic that has snapped.

You can animate the bone so it returns to the first position but this stops the mesh moving correctly.

Any ideas how this can be done?
It doesn't have to be an armature it could be empties, etc.

Demo of what this does here:

I just had a quick play with this idea and got something pretty close.

Create soft body.
Create armature with two separate bones.
Parent soft body to armature.
Stretch the soft body by moving one of the bones.
This is where it gets a bit limited, but apply the armature modifier as a shape key (I know, you're stuck with the amount of stretch at that point, but trust me, it has some effect and might help).
Keyframe the value of the shape key so that it stetches out slowly over maybe 50 frames, then key it down at 0 about 5 frames later.
Play the animation, and notice how the oscillation of the soft body seems to have been amplified by the quickly retracting shape key.

I really didn't think this would work at all, so having it do at least something made me quite pleased.

See what you can do with that.

I tried keying the deform influence of the bone on and off but that didn't have any effect as far as I could tell.

Nb. I used Automatic Weights. If you don't then there should be a weight painting step between 3 and 4.


Why does part of my scene not appear in my final camera render but appears in all other situations? I am new to blender and and not quite sure what info should be included here so please be patient with me.

The usual suspects are render layers or the render option being turned off in the outliner.
See the attached image for what I mean.
Here you can see the bottle in the 3d view but missing from the render.
Hope this helps.


How to store multiple added empties IDs used in a warp modifier so they don't conflict with new warp modifiers? this is my first time coding for Blender, I haven't gotten around to organizing the code yet. I'm self taught so my code's not the cleanest.
I'm attempting to create a 'dorito' deformer using this code, by selecting a vertex and running this script, it would create two empties that would be used for a warp modifier that would be added to the selected object.  I am using bmesh to access the selected vertex's coordinates so I could add the empties to that location, storing it into the "vertex" variable.
I am storing the return value of the empties to an empty list, but I don't know how to use that to be able to add more empties to a second or third warp modifier making the script actually useful.
Any input is appreciated!
PS: I am scripting this for 2.92.  Just in case there are relevant changes in the API.

import bpy
import bmesh

if bpy.ops.object.mode_set.poll():
    bpy.ops.object.mode_set(mode='OBJECT')

object_data = bpy.context.object.data
meObject = bpy.context.active_object
bm = bmesh.new()
bm.from_mesh(object_data)

bpy.context.view_layer.objects.active = meObject

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

#gets vertex position to add empties
vertex = (0,0,0)
for v in bm.verts:
    if v.select:
        vertex = tuple(v.co)

#changes mode
if bpy.ops.object.mode_set.poll():
    bpy.ops.object.mode_set(mode='OBJECT')

#empties list to store empties
empties = []

#adds first empty for warp deformer,  and appends to list
empties.append(bpy.ops.object.empty_add(type='PLAIN_AXES', align='WORLD', location=(vertex), scale=(2, 2, 2)))
#names empty added
bpy.context.active_object.name = 'Parent'

#sets parent name
bpy.context.object.parent = meObject

#adds second empty for warp deformer
empties.append(bpy.ops.object.empty_add(type='PLAIN_AXES', align='WORLD', location=(vertex), scale=(1, 1, 1)))
#names empty added
bpy.context.active_object.name = 'Deformer'
#changes empty used
bpy.context.object.empty_display_type = 'CUBE'
bpy.context.object.empty_display_size = 0.75
bpy.context.object.parent = bpy.data.objects["Parent"]

bpy.context.view_layer.objects.active = meObject

#adds warp modifier
bpy.ops.object.modifier_add(type='WARP')
bpy.context.object.modifiers["Warp"].object_from = bpy.data.objects["Parent"]
bpy.context.object.modifiers["Warp"].object_to = bpy.data.objects["Deformer"]

if bpy.ops.object.mode_set.poll():
    bpy.ops.object.mode_set(mode='OBJECT')

Using API methods.
A common misapprehension in blender is that create / add "anything" operators return the newly created thing, instead the newly created thing is found from context. Eg for add object primitives the new object is context.object directly after the call (if run in OBJECT mode) A newly added modifier sits last in the objects modifiers collection.
That said, it is a lot, lot, lot  easier (IMO) to totally ditch the operators  & instead use related API methods which return a reference.
Below is an operator-less re-rig of question code to run entirely in EDIT mode

Select a vertex

Adds a warp modifier, once again using the related API method new_mod = Object.modifiers.new(...), so we have its reference.  The new modifiers show in edit mode is set, so we can see the result.

Adds two empties, the first is at the location of the vert, the second is offset from the first by the value set for offset These are assigned as the "from" and "to" objects of the modifier.

The empties are given a name to reflect object warping, which modifier, from or to.  Other things to consider would be putting the empties into their own collection.

Looped over the "object_from", "object_to" properties of the modifier.  setattr(warp, k, ob) is equivalent to warp.object_from = ob when k == "object_from".

The offset is in global coordinates. This is converted to local since the empties are being parented to the warping object. Think this answer helps explain the maths used Which matrix to use to transform children local coordinates to global?

Test code.
import bpy
import bmesh
from mathutils import Vector
from bpy import context

offset = Vector((0, 0, 1))

col = context.collection
ob = context.object
mw = ob.matrix_world
mwi = mw.inverted()
me = ob.data

bm = bmesh.from_edit_mesh(me)

vert = bm.select_history.active
# if not a vert then throw error
assert(isinstance(vert, bmesh.types.BMVert))

warp = ob.modifiers.new("Warp", type='WARP')
warp.show_in_editmode = True
for k in ("object_from", "object_to"):
    mt = bpy.data.objects.new(f"{warp.name}_{k}", None)

    col.objects.link(mt)

    if k.endswith("from"): #
        mt.location = vert.co
    else:
        mt.location = vert.co + mwi @ offset

    setattr(warp, k, mt)
    mt.parent = ob


How to preload a python module into blender console on startup I have a set of tools that I use with blender and wanted to know how can I pre-import this module into blender's python console and have it accessible all the time. Just like how bpy works and I don't need to import every time I'm opening the program.

At startup, Blender reads the contents of the scripts/startup/ directory for python modules and imports them.  You can also choose to use scripts as add-ons (turn on/off via Add-Ons manager):

http://www.blender.org/api/blender_python_api_2_73_release/info_overview.html


I cannot get the grease pencil to render I want to draw an image on top of an object I have created with the grease pencil.  When I then select render the object will appear, but it will not show the lines I drew with the pencil.  How can I get the grease pencil lines to show up in the render?

It seems that at versions of Blender prior to 2.78 the only way to directly render the Grease Pencil is using the OpenGL Render option - since this effectively renders the scene as it would be viewed in the viewport.

However, in the Grease Pencil panel there is a Convert option which can convert your Grease Pencil layers into a path or curve. This can then be used to generate geometry (eg, by setting a Bevel Depth in the curve properties) and this can then be rendered.

It does appear that there are plans for a significantly improved Grease Pencil at later versions as detailed here https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.78/GPencil and this includes an additional GP_Layer when rendering OpenGL to multi-layer EXR.


Model error apparent when uv uwrapping. How can I locate and delete errant faces? I have a model which looks OK in the various 3d etc views but which produces 2 odd faces in the UV map. These are completely separate from the main map so I am assuming they are being caused by some kind of geometry error.

If I select one of these faces in the UV map and go hunting for it on the model then I simply cannot find it. Its quite a simple model so this again suggests they are being caused by some odd vertex/face error.

How can I select these faces in the UV map so that:

They are the only faces shown in the 3d view or...
the 3d view snaps to their location or...
I can simply delete them?

I have tried the last by selecting in the UV view but of course pressing delete deletes the whole model as the whole model is selected. All I want to do is find or get rid of these errant faces.

Thank you to Mr Zak for his comment and solution.

By using the Keep UV and Edit mode selection in sync button in the UV editor ( its the one approx centre that looks a bit like a Pac Man eating a mouse pointer arrow) selected I was able to then select the two errant faces in the UV map and have them shown in the 3d view.

This confirmed that they were modelling errors, rather than say miss-aligned vertices, and I was then able to delete them.

Co-incidentally it also showed up a corner where the vertices were non-aligned rather than connected correctly. A very useful little button...


How to evenly distribute edge loops I created a mesh with some Edgeloops, which happen to be at different distances from each other (see pic). But i want them to have the same distance between each other. how could one achieve that without remodel the mesh(or positioning them manually)? I do not mean to distribute the vertices on a single edgeloop. I would like to have something like: select X edgeloops, press "wonderous button to do the dreamed task" -> create same distance between the loops. something like this.

It is basically answered here:
How to evenly space vertices?

But for parallel edgeloops you need to set "Input" in Looptools-Space to parallel(not selected) in order to function.

Thanks to Ray Mairlot for clarification.


Blender UV map unwraps weird? I'm working on a model and I've noticed that when I look at others, they don't seem to end up with the same "mess" that I get and I would like to know if there's a way to avoid getting this result?

I don't mind having to fix this manually but I'm mainly curious as to why this happens. The model I'm making is a humanoid creature that's thin, tall and disproportionate.

Again, I don't mind having to undo this and I'm mainly curious as to why this happens every time I unwrap a model.

This happens, if

you change a model that was already unwrapped by adding geometry.
you join separate objects into one mesh while not all of them were unwrapped.
you join separate uv-unwrapped objects into one mesh, without adding seams between them.

It might also happen, if you join two separate uv-unwrapped objects with unapplied scales.


why .stl-model in blender differ from .stl-model in makerware? I made Blitzcrank even though it's not blitzcrank.

[Fig-1]

Fig-1 Doesn't have edge on face.

.stl file is made in blender and exported.

when i import .stl file into makerware, i see Fig-2.

[Fig-2]

edge was suddenly made in makerware!

How to solve this issue?

That is the result of non-planar faces.  STL files only support tris (partly for this exact reason).  So when you export a mesh to .stl, Blender will automatically triangulate all faces.  So if a face's vertices are only slightly non-coplanar, in Blender it won't look strange, but once the model is triangulated you will definitely be able to see the extra edge placed across the face.

The solution is to either model in tris, or to manually make the non-planar faces planar.  The latter solution is probably your best bet now, though it is kind of ugly.

As a side note I noticed that some of your normals are inverted (the darker faces), this might cause problems if you are planning on 3D printing your model.  To fix this simply select the faces and hit Ctrl+F > invert normals.


Rendering in Black and white I'm doing some basic renders in version 2.9 and they are appearing in black and white after render, but in the render view while editing, they look fine.

It works well on my computer. Maybe you messed something in the "Display Channels" menu ? It should be set to "Color and Alpha".


trying to box select vertices doesn't select all vertices I'm trying to Box Select some vertices but for some reason it has problems selecting overlapping vertices.

Here's a video that demonstrates this behaviour: https://streamable.com/hvj34

What am I doing wrong here?

Thanks

The selection tools by default only select vertices not hidden by other faces. In your case, the vertices very close to each other (on on the same point) are preventing one or other of each pair from being selected.

To avoid this ‘masking’ you can swap to wireframe mode (Z) before making the selection. This will allow you to select all vertices within the box region.


BGE: How do I hide the player HUD from other players or cameras? I'me starting work on a FPS and want it to support two local players. I will be using low poly characters, but I,d like to be able to create higher poly fps arms and a HUD system that would be hidden from the other player. Does anyone know how to do this? my guess is it involves coding and perhaps multiple scenes.

thanks for the help!

You should use the overlay scene in the game logics. I played around with that and you can find something easily on the internet. Good luck and have fun.

Some more details:
In the game logics you can add an always sensor and connect it to the add overlay scene node. I think the connection has to be a python script but i'm not shure. Then you can code the properties of the player and connect them via scripting to the overlay hud.

I watched this videos some time ago and i think they are very good for you. They are for 2.6 but i think the bge didn't change that much...
Creating a HUD in bge

Personally i hope the game logics get an upgrade. They should be more like a node editor as in UE4... But i think i have to wait a bit longer...

I hope that helped. Later i can try out again for you and send some screenshots.


Cannot enter edit mode or change to orthographic view? I'm a beginner to all this video creation thing and started reading the "Introduction" and "Starting" of the Doc. 2.6 Manual. At the end of "Starting" there is "Your First Animation" where I tried "1/2: A static Gingerbread Man". There I had the following problems:

After moving the camera and lamp to the 10th layer the cube was not selected anymore. I selected it by Select -> Select All by Layer. Is this correct?
After using Numpad 1 I hit Numpad 5 but the front view still remained and did not change to the orthogonal view. By the way, why should I use Numpad 1 during this example?
By pressing Tab I could not enter into Edit mode.

Could above problems result from my German keyboard and using Windows 8.1?

No, I don't think so. What matters is that the cube is Active (usually the last selected, with a yellow outline).

In Blender there are three selection states:

Unselected
Selected
Active

There can only be one active object at a time. The active object defines which object will go into edit mode when you press ↹ Tab, which object's options are shown in the properties panel, etc.

Selecting an object with A, select by layer, etc. will not change the active object.

To make the cube active, click on it with  RMB.
That's odd.. Are you sure the mouse cursor was over the 3D view?
I suspect this is because your active object was either the camera or the lamp, not the cube.

You can tell which layer the active object is on by looking at the layers in 3D view > Header. The orange dot represents the active object:


Cycles texture paint independently of UV mapping I have created a section of road that has a tiled asphalt image texture with a combination of nodes setup. I then physically applied an array modifier to make it a long length of road and now want to manually paint some imperfections like tire marks and cracks etc.

When I try to texture paint in one place using stencil brush option it tiles the paint as though I am modifying the original image texture.

Is there a way to paint anywhere on the entire object on top of the original texture so the imperfections are placed independently of the original UV mapping? I wasn’t sure if I might have to map differently or there is a specific method I’m not aware of.

I think that you can still use two UV mapped textures but one is the perfect version, and the other is a damaged version. Here in my example, the procedural texture is set to generated coordinate and it is used to reveal the purple color by driving the mix factor of the color mix node. You can see I set the arrays to leave some space so the procedural texture effect is apparent. Better to experiment with procedural textures to see what is the best option here, but this is the best option for now until we get some kind of texture modifier that works on top of arrays and allows a separate uv mapping that includes the rest of the generated mesh.


Stray vertex that refuses to be deleted This Vertex does not want to be deleted. I went into edit mode (i selected my model) and i selected this vertex, pressed delete and clicked vertices. But it did not go away. I checked if blender was being stupid and tried deleting face and edge after selecting it, but it still did not delete. Nothing I tried can delete this stray vertex. Also in object mode, when im trying to rotate my object it rotates about the vertex.

That doesn't look like a vertex, it looks like the Object Origin - the point which marks the location of the object in 3D space.

You should be able to confirm this by looking at the status bar at the bottom of the window. It should show 'Verts 0/0', showing that all vertices have in fact been deleted:

You can't get rid of the object origin without deleting the object, which you can do by switching to object mode and pressing Delete.


Render multiple material previews I have a blender object, and a large number of materials that I need to apply to the object.

Can you please share a python script that applies various materials to an object in a loop and saves output images to a given location?

This code will animate (cycle) through all materials based on current frame value. Run this in Text editor, select some object (it works on active object), set frame range from 0 to number_of_materials-1 and render the animation as images.

import bpy

def my_handler(scene):
    if bpy.data.materials:
        ob = bpy.context.active_object
        mat = bpy.data.materials[min(len(bpy.data.materials)-1, scene.frame_current)]
        if len(ob.data.materials):
            ob.data.materials[0] = mat
        else:
            ob.data.materials.append(mat)

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


How to I get rid of these dots? I keep getting these red dots on the whole render. How would I fix this?

I’ve tried increasing the samples, this I what I got when samples are at 500:

Any help would be greatly appreciated. Thanks!

What you are seeing are called fireflies.the fireflies are often caused by there not being enough samples for cycles to render with. I recommend upping the sample size you are currently working with.

There is also a really good article on other suggestions which you can try to reduce the noise.

7 Ways to get rid of fireflies

Additionally if all else fails you can also use the despeckle node which is used to smooth areas of an image in which noise is noticeable, while leaving complex areas untouched.

This works by the standard deviation of each pixel and its neighbors is calculated to determine if the area is one of high complexity or low complexity. If the complexity is lower than the threshold then the area is smoothed using a simple mean filter.

This will reduce the quality of your overall scene if your samples are too low however.

Despeckle Node


How to make certain objects not effected by a light source. Cycles I have a light in the scene and I want to make only one object in the scene unaffected by this light.  Preferably without compositing render layers.  Is this possible in cycles?

If there is only one light within the entire scene you could set the material that object has to shadeless.


Why are uv faces always distorted? Why are uv faces always distorted? I even tried to delete all modifiers and shape keys, but it's still red. Even if I try to unwrap one single face, still red. I want to create map via texture painting. And this oddness in uv unwrapping confuse me. Please, tell where I made mistake.

The concept of UV unwrapping is to project a curved model into a plain (in which you will paint the texture), so a quad in your model will always result in a different (distorted) quad in the texturing canvas. A lot of UV options are available to try to let the UV unwrapping being "readable": for instance you can set the front view and then select "project from view": the result will be "what you see is what you get", but - obiouvsly  - the faces you don't see (the lateral ones expecially) will be heavily distorted.

The tipical workflow for unvrapping a human head is:

modelling the mesh trying to have all quads nearly in a real quad shape (not rectangular) and nearly of the same dimensions
mark some edges as "seams", to divide the head into smaller parts which can allow seams in the texture and which will minimize the stretch of the various parts

If your are unfamiliar with theese concepts I suggest you to start unwrapping simpler models, to get used to the procedure


Update a custom data field created with an addon I have an addon which shows a panel for objects with a custom data field.
    bpy.types.Object.AS_placeholder_properties = bpy.props.PointerProperty(
        type=AS_placeholder_properties,
        poll=lambda self, object: self['AS_placeholder'],
    )

I have an operator which creates the object and adds the AS_placeholder field, but I want to change the name of the field.
The issue is that there are already some files that have the old name, so if I update my addon with the new name for the custom data field, the old files will stop working.
Is there any way to update the files when load? I am thinking on adding some "migration" code in my addon which, when a file is loaded, iterates on all the objects, checks if it has the old name and update it, but I have no idea how to do something when the files is loaded.

On load handlers.
One way to approach the load event is with a persistent load post handler. However many side cases will be missed by it. Addon first enabled.  An appended object with the old prop.
bl_info = { # fill in to test as addon
}

import bpy
from bpy.props import PointerProperty, BoolProperty, FloatProperty
from bpy.types import PropertyGroup

class Foo(PropertyGroup):
    bar : BoolProperty()
    foo : FloatProperty()

classes = (Foo,)

@bpy.app.handlers.persistent
def convert(dummy):
    old_key = "prop"
    new_key = "foo"
    print("Convert")
    obs = [o for o in bpy.data.objects if o.get(old_key)]
    if obs:
        print("Converting...")
        for o in obs:
            if o.get(old_key):
                o[new_key] = o[old_key]
                del o[old_key]

def draw_test(self, context):
    layout = self.layout
    layout.prop(context.object.foo, "foo")

def register():
    for cls in classes:
        bpy.utils.register_class(cls)

    bpy.types.Object.foo = PointerProperty(
            type=Foo,
            )
    bpy.types.TEXT_HT_footer.prepend(draw_test)
    bpy.app.handlers.load_post.append(convert)

def unregister():
    for cls in reversed(classes):
        bpy.utils.unregister_class(cls)
    bpy.app.handlers.remove(convrt)

if __name__ == "__main__":
    register()

Copy Custom Properties from one object to another  Can ignore the '_RNA_UI' in this case, since its members are emulating those defined by the bpy.props property for drawing the prop in the UI. (name, min, max, soft_min etc).
Consider wiring into panel code.
Instead could roll back the panel to do no more than alert that an old property is set on an object and the fix button.
Example below, a red splash screen button is displayed if an object in the file is given a custom prop named "prop".
import bpy
### hacked in by way of example
class AS_placeholder_properties(bpy.types.PropertyGroup):
    foo : bpy.props.BoolProperty()
    pass
bpy.utils.register_class(AS_placeholder_properties)

bpy.types.Object.AS_placeholder_properties = bpy.props.PointerProperty(
        type=AS_placeholder_properties,
        poll=lambda self, obj: obj.get('AS_placeholder') is not None,
    )
####
class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    @classmethod
    def poll(cls, context):
        old_prop = "prop"
        if any(ob.get(old_prop) is not None for ob in context.blend_data.objects):
            cls.draw = cls.convert
        else:
            cls.draw = cls.draw_normal
        return True

    def convert(self, context):
        layout=self.layout
        layout.alert = True
        layout.operator("wm.splash") # convert op

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

        obj = context.object
        row = layout.row()
        row.prop(obj.AS_placeholder_properties, "foo")

        row = layout.row()
        row.operator("mesh.primitive_cube_add")
    draw = draw_normal

def register():
    bpy.utils.register_class(HelloWorldPanel)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)

if __name__ == "__main__":
    register()

The poll method above could instead test if your convert operator polls
if bpy.ops.object.convert2newpropname.poll():

intrigued by the poll method used for property group above. Would seem to always poll unless class is totally passed in which case will be boolean False. (eg comment out foo boolean above)  In as much as the bpy.props is defining the class and creating the custom prop, IMO always safest to use
ob.get("custom_prop_name")

or
ob.get("custom_prop_name", some_fallback_other_than_None)


CUDA error: Launch failed in cuCtxSynchronize(), line 1372 I have the following CUDA error when trying to render my project in cycles:

CUDA error: Launch failed in cuCtxSynchronize(), line 1372

My scene rendered well some days ago. After adding new elements and models the error appeared. I had this error already some time ago, while working on this project, but after changing the content and sample amount in the render settings it disappeared until today.

I am using a GeForce 1080 Ti with 11 GBytes of Ram. The scene use currently not much vram of my graphic card. So the vram can not be the reason.

Any ideas for a solution please? Maybe some developers are reading this too.

Thank you a lot for any tips

Chris

I struggled with this problem for months. Used different computers, re-installed Blender, re-installed windows (I am using 8.1 & 10), installed new and old drivers for my Nvidia card, changed the TDR and everything I could think of...but no luck.

Then it occurred to me that the Gforce Experience runs in the background (and being in my opinion, not a well written program) may be overlapping the memory of Blender or at least hogging the memory. So I un-installed it and magic!!! All Cuda errors and memory errors went away. Blender works again as it should!!!

I hope this works for you, as it did for me. Unfortunately, I did not discover this for months, until I had pulled every single strand of hair out of my head.


How to read scene(s) data without loading content I need to extract scene data without loading a blend file completely as some files might be in the upwards of 3GB and more.

Here is an example of the data I have managed to extract by loading everything in the blend via a python script.

{
    "scenes": [
        {
            "scene.cycles.samples": 250,
            "scene.frame_end": 250,
            "scene.frame_start": 1,
            "scene.frame_step": 1,
            "scene.name": "Scene",
            "scene.render.engine": "CYCLES",
            "scene.render.image_settings.file_format": "PNG",
            "scene.render.pixel_aspect_x": 1.0,
            "scene.render.pixel_aspect_y": 1.0,
            "scene.render.resolution_percentage": 100,
            "scene.render.resolution_x": 1920,
            "scene.render.resolution_y": 1080
        },
        {
            "scene.cycles.samples": 1111,
            "scene.frame_end": 250,
            "scene.frame_start": 1,
            "scene.frame_step": 1,
            "scene.name": "Scene.001",
            "scene.render.engine": "CYCLES",
            "scene.render.image_settings.file_format": "PNG",
            "scene.render.pixel_aspect_x": 1.0,
            "scene.render.pixel_aspect_y": 1.0,
            "scene.render.resolution_percentage": 100,
            "scene.render.resolution_x": 256,
            "scene.render.resolution_y": 256
        }
    ]
}

Note this is a very low level of access, not intended for general use.

So you could read this answer "no", unless you're willing to get into Blender's format internals.

This is possible but not trivial, especially for cycles settings which are stored in a generic IDProperty structure.

Blender comes with blendfile.py
This module can be used to load blend files and extract content without having to open them from Blender.
While we don't have docs for this, there is some example use.
It shouldn't take long to extract resolution, engine for e.g.
Cycles settings will be more work, if you have gotten this far you should be able to do it though.

This will work with files from both 2.7x and 2.8x

Edit: see this answer for a start on how to use blendfile.py.


Camera set / scene setup Why is the camera alway tilted sideways, upside-down, and at an angle?  Not exaggerating either. When I try to render a scene the camera is always off-kilter, and the scene renders at a great distance, not as viewed through the camera lens.

I obviously don't know what to do. Help please.

This sounds quite ridiculous, but your scene might actually be upside-down. If this is the case, just select all your objects, and rotate them 180 degrees on the Y axis. You can also rotate your camera to be upside-down the same way if your scene is to large to be entirely rotated. If the scene is not the problem, look at the camera settings. The view might be distorted, or the camera you are moving may not be the active camera.


How do I make 'Selection only' off by default when exporting? Is there away to turn this setting completely off?
Sometimes after I'm done exporting my work, I have to go back and re-export the files again because I forget to click Selection Only.

That's actually pretty possible and only becomes a problem when you install a new Blender version.

In your installation directory, you have the path:
scripts\addons\io_mesh_stl\

In that folder, there should be the .py files concerning stl import/export.

__init__.py

is the one to open and mutilate.

In line 166, I find:

use_selection = BoolProperty(
        name="Selection Only",
        description="Export selected objects only",
        default=False,
        )

The only thing you need to do is to turn 'False' into 'True' and you should have your checkbox filled by default. The same way you can adjust any default setting. Endless possibilities.


Mix node as identity function What is the difference between the following two node setups?

I was hoping to use the mix shader as a scaler, but it's not behaving as I'd expect..

Here are the render results:

The "direct" line is much stronger than the one going through the mix shader.

This is because you are using a Mix shader (Add node > Shader > Mix).

This does not work because:

A color output (yellow socket) is not a valid shader input (green socket).
A shader output (green socket) is not a valid value input (gray socket)

If you instead use a Mix RGB node (Add node > Color > MixRGB), it will work as expected:


Select vertex if vertex color is dark I've baked AO to vertex colors and would like to use the smooth modifier only on vertices that have a vertex color darker than 0.1 (for example).

How can I select vertices whose colors are below that threshold? I'd then create a vertex group from that and use it in the modifier.

I know you can access the vertex colors with bpy.context.object.data.vertex_colors.active.data[0].color.

This will give you a dictionary of colors attached to each vertex:

in the form {vertex_index :  [ color(s) ] ,... } .

import bpy

mesh = bpy.context.active_object.data
color_layer = mesh.vertex_colors['Col']

tk = {}
i = 0
for poly in mesh.polygons:
    for idx in poly.loop_indices:
        loop = mesh.loops[idx]
        v = loop.vertex_index
        linked = tk.get(v, [])
        linked.append(color_layer.data[i].color)
        tk[v] = linked
        i += 1

print(tk)

There are nicer ways to write this, using collections.defaultdict. In this example I also import pprint to nicely display the vertex<-->colors dict (tk).

import bpy
from collections import defaultdict

tk = defaultdict(list)

mesh = bpy.context.active_object.data
color_layer = mesh.vertex_colors['Col']

i = 0
for poly in mesh.polygons:
    for idx in poly.loop_indices:
        loop = mesh.loops[idx]
        color = color_layer.data[i].color
        tk[loop.vertex_index].append(color)
        i += 1

# you must cast this as a dict manually like  tk = dict(tk) ,
# if you need it as a dict, but defaultdict will behave mostly the same
import pprint
pprint.pprint(tk)

This will get you as far as being able to average the colors. The output for this Col (for sake of simplicity i use a 9 vertex planar surface)

is

{0: [Color((0.800000011920929, 0.4313725531101227, 0.04313725605607033))],
 1: [Color((0.11372549086809158, 0.800000011920929, 0.0))],
 2: [Color((0.27450981736183167, 0.27843138575553894, 0.27843138575553894))],
 3: [Color((0.7882353067398071, 0.7921568751335144, 0.800000011920929))],
 4: [Color((0.800000011920929, 0.4313725531101227, 0.04313725605607033)),
     Color((0.27450981736183167, 0.27843138575553894, 0.27843138575553894))],
 5: [Color((0.11372549086809158, 0.800000011920929, 0.0)),
     Color((0.7882353067398071, 0.7921568751335144, 0.800000011920929))],
 6: [Color((0.7882353067398071, 0.7921568751335144, 0.800000011920929)),
     Color((0.27450981736183167, 0.27843138575553894, 0.27843138575553894))],
 7: [Color((0.800000011920929, 0.4313725531101227, 0.04313725605607033)),
     Color((0.11372549086809158, 0.800000011920929, 0.0))],
 8: [Color((0.800000011920929, 0.4313725531101227, 0.04313725605607033)),
     Color((0.11372549086809158, 0.800000011920929, 0.0)),
     Color((0.7882353067398071, 0.7921568751335144, 0.800000011920929)),
     Color((0.27450981736183167, 0.27843138575553894, 0.27843138575553894))]}

To complete this, here's an example of how to average a list of colors (naturally, for greyscale colors you only have to concentrate on 1 component as R,G and B should all be the same.

import pprint
from mathutils import Color

cols = tk[8]   # unadulterated color list for that vertex
pprint.pprint(cols)

def avg_col(cols):
    avg_col = Color((0.0, 0.0, 0.0))
    for col in cols:
        avg_col += col/len(cols)
    return avg_col

print('average')
col = avg_col(cols)
print(col)

Now using the defaultdict that represents the vertices and their occurrence in vertex_colors you can average them, or do whatever calculations and create a new dict with a dict comprehension.

import pprint
import bpy

vcol_averages = {k: avg_col(v) for k, v in tk.items()}
pprint.pprint(vcol_averages)

''' outputs, nicely the averages.
{0: Color((0.800000011920929, 0.4313725531101227, 0.04313725605607033)),
 1: Color((0.11372549086809158, 0.800000011920929, 0.0)),
 2: Color((0.27450981736183167, 0.27843138575553894, 0.27843138575553894)),
 3: Color((0.7882353067398071, 0.7921568751335144, 0.800000011920929)),
 4: Color((0.5372549295425415, 0.3549019694328308, 0.16078431904315948)),
 5: Color((0.45098039507865906, 0.7960784435272217, 0.4000000059604645)),
 6: Color((0.5313725471496582, 0.5352941155433655, 0.5392156839370728)),
 7: Color((0.45686274766921997, 0.615686297416687, 0.021568628028035164)),
 8: Color((0.4941176474094391, 0.5754902362823486, 0.2803921699523926))}
'''

From this you might create a list of vertex indices following a threshold test.

vertices_of_interest = [k for k, v in vcol_averages.items() if v.r < 0.5]

pprint.pprint(vertices_of_interest)
# [1, 2, 5, 7, 8]

Selecting vertices, is easy once you get to this point.


Is there a way to tell my particle system what collection to use based on what color the color ramp is using? I am using the object info nodes random output into a colour ramp to decide the colour of my icing

Is there a way to assign what collection my particle system for the sprinkles uses so that I can set specific collections of sprinkles for every colour.
So if the icing is brown it uses sprinkle collection 1; if it's pink it uses collection 2; if it's blue it uses collection 3 etc.

I'd suggest to do it the other way around: Having diffrently colored objects in a collection and instancing them via the particle system.
In the render tab of the particle system choose reender as collection.

Option 1: pick random. (even distribution)
Option 2 if you want more controll how often the objects are instanced in relation to each other you can use the "count" feature.
(Option 3 for even more controll use the AddOn Animation Nodes)

Update 1:
This intent you have is a advanced procedural workflow. I think its fun to work like that but it needs a bit of trickery often. As far as I know Blender has no native functionality like that, because this is very specific also, and blender is not a fully procedural tool.
The AddOn Animation Nodes is a gamechanger in terms of making the python interface more acessible and easier to handle.

Here is a barebone example in AN (Animation Nodes) that changes instancing collections in the particle system. The boolean value (See A) would get your logic as input that does the color allocation or gets the color from the material and sets the corresponting partile collection.

Going this far with animation nodes, maby it is simple to use it also for color allocation. At the moment you do it with ObjectInfo.random wich gives you no controll. If you have multiple Color-Sets you could smoothen the workflow with Custom Object Propertys that AN interprets an does the rest.
Then the only thing you would have to do would be to duplicate the object and change its custom property.


Why are there non-visible objects in my final render? Have Blender on about 4 machines rendering animations.
Just spotted on one of the machines its rendering something different from the actual scene that I have setup.

Top window shows a different set of layers objects to whats actually being rendered in the rendering window below.

In my scene contents, layers objects 1-5 are not visible, but these are the ones that look like they are being rendered.

The only thing I can assume is that perhaps it might be because I did not save the document before clicking render, but I would not have expected that behaviour (you dont need to save your word document before printing it).

Can anyone confirm why this is happening?

If you look at the outliner, some eye-icons are faded out to indicate that certain objects are hidden.

But there's hidden and there's hidden: hidden in the viewport (eye-icon), and hidden for rendering (camera-icon).

You may paste the following code line to the Python Console (at the bottom of the Scripting view) and hit return, to make the render visibility match the viewport visibility automatically:

for ob in bpy.context.scene.objects: ob.hide_render = ob.hide


Difficulty seeing through transparency on images as planes I'm trying to import images as planes to make a diorama in blender, and with Cycles, the images have this strange artifact where you can't see through some of them: The black part in the image below. Right now i have them all as blend mode: Alpha blend, and shadow mode: alpha hashed. Does anybody know what could be going on?

Below is what the same setup looks like in Eevee with a reflection plane, was wanting to use cycles to try to make the reflection they're standing on like water and add some ripples and things. Any idea what could be happening? Thank you!!!

Alpha Blend and Alpha Hashed are only used for Eevee, those settings don't matter for Cycles.
In Cycles, Alpha transparency is shown different in Rendered View and Material Preview. Alpha transparency (like from an alpha channel or the Transparent Shader) is shown in black for Alpha = 0 in Material Preview or not shown as transparent at all when Alpha > 0, it's only transparent in Rendered View.
When the transparent parts are shown black in Rendered View then you maybe have to go to Render Settings > Light Paths > Max Bounces and set a higher value for Transparency, this is for materials with transparency set in the Alpha channel of the Principled BSDF for example or where the textures have Alpha maps to mix in with a Transparent Shader or volumes like a Smoke Domain etc. The Transparency Bounces can be set independently without having to change other bounce values.
If you instead have a Glass BSDF or other transmissive material like using the Transmission channel in the Principled BSDF, then you have to set a higher bounce value for Transmission in Light Paths, and maybe even in Total if it's too low. Because unlike Transparency, the Transmission (and other) bounces are dependent on the Total value. Setting Transmission to 16 with a Total set to 4 will result in having Transmission clipped to 4 as well, so the Total value should cover the highest value of the individual bounces (except for Transparency).

PS: I've included the Smoke Domain as example for Transparency bounces because, apart from having a bounce value for Volume here as well, low transparency bounces are what sometimes causes smoke to have ugly black artifacts, which I've seen a lot in smoke tutorials but tutors tend to call it a bug or clipping by the Adaptive Domain.


Able to mask out the eye but the glowing part of it I use a plane on a different render layer to mask out the character.  The result comes out quite nice:

EXCEPT for the mask for the eye glowing effect (I duplicate the eye mesh to a different object on a different layer in order to have only the eye glowing, not with the armor (got a glossy shader) glowing too). As you can see, half the eye is still visible despite of I masked that out. It works for the glowing part, though:

Thanks for reading!

Here's come the blend. file:

In your node group change the way the matte is mixed with the glow. You want to add black to the matte in the shape of the plane:

Then add the result to the rest:


Workspace custom property doesn't work as driver's variable I've tried to use a workspace's Custom Property as a variable for a Driver, but it looks like the path to the Custom Property is broken. Is there anything that needs to be added to the properties path?

Define the prop.

In as much as I agree with @DRF that using workspace properties as input into drivers is not a good idea...

Appears it is with custom properties, ie those defined via custom props panel or via script with

context.workspace["prop"] = 44.55

on the workspace that create the error.  Trying instead the  users property of the workspace it "works" (ie doesn't throw the error) as a driver variable.

If in script a property is defined via

bpy.types.WorkSpace.prop = bpy.props.FloatProperty()

in which case can address it via

context.workspace.prop

it will also work as a driver variable.

Since prop is stored as the custom property of same name will see the API defined message beside it.

Note: as mentioned this "works" as in it doesn't throw an error.  It does however print warnings to the system console, and updating by pressing "Update dependencies" button.

Unhandled ID WSGeneral
add_relation(RNA Target -> Driver) - Could not find op_from (RnaPathKey(id: WSGeneral, prop: 'prop'))
add_relation(RNA Target -> Driver) - Failed, but op_to (OperationKey(type: PARAMETERS, component name: '', operation code: DRIVER, 'location')) was ok


Why does Quaternion.rotation_difference() always return 12.666471 for x-rotation? I tried to calculate the angle between two vectors.

First 3 Quaternion rotations (qx,qy,qz) are defined and multiplied to q. A vector v (1,0,0) is rotated by q.

From the vectors q and qrot I want to recreate the original roation qcalc but the x-value of qcalc is always 0.

from math import cos,sin,radians,degrees,sqrt
from mathutils import Quaternion,Vector

def eprint(e):
    print("euler X=%f Y=%f Z=%f" % (degrees( e.x ),degrees( e.y ),degrees( e.z )))

qx =  Quaternion((1.0, 0.0, 0.0), radians( 15.0 )) # <--- has no influence to the result
qy =  Quaternion((0.0, 1.0, 0.0), radians( 30.0 ))
qz =  Quaternion((0.0, 0.0, 1.0), radians( 45.0 ))
q = qz * qy *qx
#q = qx * qy *qz
print("-"*40)
eprint(q.to_euler('XYZ'))
print(str(q))

v = Vector(( 1.0 , 0.0 , 0.0 ))
print("v=" + str(v))
vrot =  q * v
print("vrot=" + str(vrot))
qcalc = v.rotation_difference( vrot )
eprint( qcalc.to_euler( 'XYZ' ))
print(str(qcalc))

prints

----------------------------------------
euler X=14.999997 Y=30.000008 Z=45.000005
<Quaternion (w=0.8977, x=0.0183, y=0.2853, z=0.3353)>
v=<Vector (1.0000, 0.0000, 0.0000)>
vrot=<Vector (0.6124, 0.6124, -0.5000)>
euler X=12.666476 Y=30.000008 Z=45.000008
<Quaternion (w=0.8979, x=-0.0000, y=0.2784, z=0.3410)>

It doesn't matter which value for x-rotation is used for qx the result is always X=12.666471 why is that?
The Quaternion should be WXYZ: .898, .018, .285, .335

I verified the rotation order in the console with enabled mathvis addon:

# show quaternion rotation order
qx =  Quaternion((1.0, 0.0, 0.0), radians( 15.0 ))
qy =  Quaternion((0.0, 1.0, 0.0), radians( 30.0 ))
qz =  Quaternion((0.0, 0.0, 1.0), radians( 45.0 ))
q = qz * qy *qx
qx = qy = qz = None
o = Vector((0,0,0))
right = Vector((1,0,0))
r2 = q * right
r3 = [o,r2]

Another implementation I've adapted from ogre has the same issue (x-rot in quaternion is 0)

# https://bitbucket.org/sinbad/ogre/src/9db75e3ba05c/OgreMain/include/OgreVector3.h?fileviewer=file-view-default#cl-651
def rotation_between2( u,  v):
    cross = u.cross(v)
    cross.normalize()
    ul2 = u.length * u.length
    vl2 = v.length * v.length
    d = u.dot(v)
    l = d / sqrt(ul2 * vl2)
    w = acos(l)
    q = Quaternion( cross , w )
    q.normalize()
    return q

The issue is the test data, the vector v = Vector(( 1.0 , 0.0 , 0.0 )) lies exactly on the x-axis and a rotation around x has absolutely no effect, therefore the information is lost.

In order to get the rotation from v to vrot it is requiresd to invoke rotation_difference() on v insteadof vrot.


Blender using memory for no reason; Blender loading up Memory Usage. Why is that? So there's actually 2 problems I have regarding Blender's memory usage, which probably aren't much for a regular computer but really slow work for weaker ones and can even cause crashes.

So I have a scene in which there's 4 walls, a towel hanger and a towel with 2 simple materials and 1 million hair particles. When opened, this scene has about 840 MB of memory usage, which makes sense since this number of hair particles needs to use quite some memory to be calculated. Problem is, this amount of memory is present in the viewport when all hair particles are hidden, and anything I do to them won't lower the memory usage. However, when deleting the particle system, the memory usage drops to down 440 MB ,and then when I repeatedly click on a render layer (found this method drops the memory usage to its regular level, I'll explain in the second problem) it drops down to 25 MB. That's a clean-up of 815 MB used for practically nothing. My question is, why is Blender using up all that memory for the hair when it isn't even visible or being used in the viewport? Not to mention, when turning on viewport visibility, while having the display disabled or rendered with a 0% value, it still uses up an extra 300MB of memory.
When visualizing said scene with rendered view and making different changes, the memory usage can rise up from 840MB to 2500MB+. Even when reselecting solid mode and moving to an empty layer, the memory usage stays the same. But when repeatedly clicking on a different layer, the memory usage slowly fades off. Which means when wanting to toggle some materials and visualize them in a scene, for example, I have to continuously deal with time to time lag which obviously slows down the work and quickly gets really annoying. So why is Blender not automatically getting rid of that unused memory usage? Are there any ways I can prevent any of these problems? Thanks.

Basically the problem you're facing is that blender is storing a large amount of memory for the undo steps.

You can change this by going to File -> user preferences, under the Editing tab you'll find a section called Undo.
Here you can adjust the number of undo steps and memory limit.
The lower the amount of undo steps, the less memory blender will have to store.

That's why repeatedly clicking on random operators is clearing your memory stored in previous computationally expensive undo steps.


Does Smart UV unwrap preserve the area of each face in the mapping I want to unwrap an object and have the UV mapping preserve the relative area of each face. Can any of the unwrapping options be configured to ensure that the relative area of each face is preserved?

For example, when Smart UV unwrap is used on a cylinder, the mapping shown below results. This appears to maintain the relative area. However, it is not clear if the relative areas are preserved. Are there UV unwrap options that will ensure the relative areas?

Yes when you unwrap with Smart UV unwrap it does not skew or stretch (you will get a lot of seams though) if you apply textures to it. If you mark seams but do it wonky, you will get skewing. You also have to keep in mind the resolution of the texture because it will appear to skew if the resolution is too low.


Armature not following path for animation I'm very new to blender - i've basically made "the doughnut" and a bunch of apples. I'm doing first solo lego project and blagging my way through.
I've created an armature and mesh and animated it so it basically runs on the spot. I then thought i could get it (either armature or meshes) to follow a Path so it could actually move.
On setting it all up, a blue dashed line does follow the curve and is stuck to my armature, but the armature itself does not move.  any ideas?
Also, i kept my different meshes separate as i thought this might be useful later on. should i parent them or join them or does it not make a difference?
Any help would be great as i've just had one of those "1.5 hours of bashing my head against a wall sessions"
Thanks

Press on the constraint Animated Path button, otherwise the object won’t move
Put the Offset at 0 if you want it to begin at the beginning of the curve
Press AltG to put it at the beginning of the curve, the new world center of the object is the beginning of the curve now that it is constrained to it, so reset location will bring it to this point
Choose Forward Axis > X as it is the front direction of the armature

It should work


Particle system within particle system? Is there any way to use a particle system within a particle system?

I'd like this:

But currently have this:

I'm trying to avoid having multiple real meshes (as I've done to create the first image).

Current Workarounds:

Manipulating an array to achieve the inner particle system (long tubes) -- it works but is cumbersome.
Adding 2 particle systems to one larger mesh (larger hexagon), and again manipulating the location. It's difficult to work with as well because I keep thinking there must be a more straightforward way.

In the end, I'd like for only these 3 meshes to be "real".

This is because I'm going to largely increase the amount of particles, and ideally add a fourth mesh encompasses the previous three (the largest hexagon would be it's particle). I'm not so concerned with the fourth mesh though.

The meshes are just are simple cylinder and a "screwed" edge (hexagon), but here's the .blend

While particles can give a varied result, it looks like you may prefer a more structured duplication system. I would suggest using dupliverts. Start by creating a mesh that has a vertex positioned where you want each cylinder, only vertices are needed but you can add edges and faces if it makes it easier for you to work with.

Then parent the cylinder to the vertex only mesh, and enable duplication for verts.

You can then repeat the first step with a larger spiral, here I duplicated the first mesh and scaled it up. Then parent the first mesh to this larger one and also enable dupliverts, you will get the first mesh and its cylinders duplicated at each vertex location. You will find it helpful to have the first vertex and the child object both located at the object origin to keep things aligned.


Is it possible to limit the volume of fluid ejected from a mesh? 2.82 I am working with some fluid simulations in 2.82 which I am planning to add to my scene. My goal is to create a fluid sim which looks like rain water flowing off a roof.

So far I have a cylinder set up as my inflow object inside its domain. I have the inflow initial velocity z value set to -.01. I thought this would give me a slow dripping or runny effect but the fluid still looks like it's coming full blast out of a hose. Is there a property in the settings that allows you to control the volume of fluid particles being released?

In the fluid simulation tab, the domain part, you should have Fluid Particles panel. Go there and set Generate to a more than zero value, like 0.5


Is it possible to recursively instance object particles? I have a seed object with some particle hair strands. I've specified this object to be instanced in another particle system, then specified that object to be instanced in yet another particle system.

To clarify:

I have a cube with hairs strands
I have a Suzanne coated in cubes with hair strands (the hair strands only appear in the render, which is fine)
I have another Suzanne coated in Suzannes, but these Suzannes don't have cubes or strands like I was hoping..

Is there a way to get the particle systems to keep recursing, so that the last Suzanne is coated in Suzannes coated in cubes coated in strands?

Here we have a red Suzanne, emitting blue Suzannes, emitting green cubes, emitting grey hair.

I have managed to do this with the 'Particle Instance' modifier.

The Particle Instance modifier is applied to the object you want to instance. On the modifier, you then pick an object that has a particle system that you want to instance the object onto (at the position of each particle.)

For the above image I added a hair particle system onto the red Suzanne. I then created a smaller, blue Suzanne and added a Particle Instance modifier to it, picking the red Suzanne as the target.

I then added a separate cube (green) and added a hair particle system to that.

The final particle system is added to the blue Suzanne, under the Particle Instance modifier. It emits the cube in the normal fashion by choosing the cube as the render object on the particle system.

As you noted, the hair emitted from the green cubes does not appear in the viewport but do appear in the render.

Note: The blue Suzannes will not be identical, they will each have a unique placement of green cubes on them. I wasn't able to solve this, the linking was already getting quite complex and slow.

This is quite a complex setup so I may have forgotten a few settings or overcomplicated the setup. For this reason I have included the blend file.


Need help trying to project shape onto cylinder... I'm trying to take this cylinder and circle combined shape and remove it from the pyramid so the pyramid has a hollowed out shape. Tried to do it with boolean difference, which didn't work and now I've tried knife project. Which also doesn't work. For some reason the cylinder shape doesnt seem to be registering as a usable object?

I somewhat remade your scene, and was successful so I will contribute what I did. I think what may be causing you the biggest problem is the lack of geometry in your pyramid object. Try adding several loop cuts to support the boolean operation.

Here is what I did:

Default cube, enter edit mode select top face and scale to 0 and scale as needed to create the pyramid object. (I also scaled the bottom face slightly).

Add several loop cuts in each direction with
Ctrl+R

In object mode, add a uv sphere, then go back into edit mode and
enable proportional editing by pressing O and select only
the top vertex.
Move the vertex on the z axis until you have the desired shape, and then scale to size.

Go into object mode and align the sphere object with the pryamid
object, and add a Boolean> Difference to the pryamid object, setting it's target to the sphere and delete the sphere from the scene or move to another layer.

After following these steps, also an edge split and subsurf modifier added- this is the result:


Spot light with square shape Is it possible to produce a spot light with a different shape than a circle? In particular, I would like to produce a spotlight that casts a squared image into a wall, and the spotlight can be occluded by certain elements in the scene.

Edited: Using Cycles blender

The Geometry node Normal can be used to control the profile of the light emitted by a lamp and this can be used with an image texture to give full control of the lamp output.

Consider the following nodes :

Here the Geometry Normal is passed through a Mapping node to rotate it into the desired direction before being split into its X,Y,Z components. The X and Y components are adjusted to remove the 'bending' caused by the spherical Normal coordinates (otherwise you get distortion of the image at the corners) before being passed through a second Mapping node (to adjust the aspect ratio of the image) before being passed to the Image node for the texture - simply apply your own image in the Image node.

This can produce the following result :

Replace the Image with an image of a plain square - or any other shape - for your desired result.

This method will work with the Point and Spot lamp types - but the Spot will also be limited to a circular spot (in the direction of the lamp) so the Point lamp gives more control since you can simply provide whatever image you desire. Note also that the Lamp includes a 'Size' setting - setting to affect the blurriness of the lamp - setting this to zero will produce a very sharp image (as in the above example). Setting it to larger values will produce progressively blurier projections.


Hide/remove lines in a face How can I hide or remove these lines, but keeping it's face? Unless it's not possible yet.

EDIT: Will this also ruin beveling?

You can hide edges using Bmesh, and it won't hide the faces they're attached to. Users of Sketchup might find this handy but it isn't something you'll find very much use for as your proficiency with Blender increases. But the option is there if you need it.

To run this script you would first select the edges you want to hide, then open the TextEditor window, paste this code into it and press Run.

This example assumes we have a mesh object in Edit Mode, and you have a few edges selected.

import bpy
import bmesh

# Get the active mesh
obj = bpy.context.edit_object
me = obj.data

# Get a BMesh representation
bm = bmesh.from_edit_mesh(me)

bm.faces.active = None

# Modify the BMesh, can do anything here...
for e in bm.edges:
    if e.select:
        e.hide = True

# Show the updates in the viewport
# and recalculate n-gon tessellation.
bmesh.update_edit_mesh(me, True)

to unhide the edges you press Alt+H, while in Edit Mode


How do you make an SSS texture (Using Principled BSDF) only affect part of a mesh? (Image/gif inside) (Albedo texture on left and SSS texture on right just for reference) https://i.stack.imgur.com/veTGy.png

I've been trying to figure out how to have an SSS shader apply only to certain parts of the mesh it's attached to (The skin, usually) with little luck.

It's not making the entire mesh look like a tomato, but it gives all parts of the texture that aren't skin a strange artifacting(?) effect that makes all parts of the model that aren't skin look terrible. Shown here: https://imgur.com/a/ADmiXiG (Note that the Subsurface intensity starts at 0.1 in this gif, then goes to 0 (disabled), and ends on 1.)

Strangely enough, even if the entire texture is transparent other than the skin itself this weird effect still happens ("Use Alpha" was enabled on the texture too, I checked.)

Any tips on how to solve this issue? I might be going at this totally wrong, so any responses would be greatly appreciated!

The best way I can think of is to have Image Texture for Subsurface value which will behave as a SSS intensity control. Where black color = 0 and white = 1.

In my example I've used such setting with two textures, one for SSS color and another one (black and white) for SSS intensity. This way you can control where SSS will be visible (and how intense).


Compositor and rendered image not the same I have set render layers, combined in compositor.
Post processing is checked for compositing.
the rendering rendered all 3 layers but the final outcome is only one fo those layers.
the viewer and the final render is different.

(something that is weird: i tried both cpu and gpu to render, previously does not have this problem but recently when i render after the 1st layer, the img of the first layer is still visible while rendering the second layer, only "overwrite" when the boxes render the portion, i wonder if it is a bug...)

This is because in your file, the image viewer is set to display the "Bangle" renderlayer:

Select "Composite" instead to view the output of the compositor.


Blender Does not Render Image My image is not rendering in cycles render. I can see everything in the rendered viewport but when i do a final render i only see a Black and grey checkered screen. After a while blender will crash.

I have tried to uncheck sequencer and render but same thing happens. All the objects are not hidden and fully seen. I have tried both using f12 and the render image button in the menu to render the image.

Would appreciate if someone can help me out its been a pain trying to figure out the issues ty :)

If you have a few View Layers you should properly manage it render settings.

Please share some screenshot with us!


Make specific color in a texture transparent I am working with very old model files that have BMP textures. The designers did not use a transparency in the textures or a separate alpha b/w texture. They used a specific color value that was then removed by the engine to create a transparency, similar to a chroma key. In this case, all textures used a bright purple/pink color.

I cannot modifying the original texture images by converting them to PNG and add an alpha. I would like to figure out how to do it all in nodes.

The goal is to have this value keyed out and transparent. I have been messing around in the shader editor and cannot figure this out.  I've also been looking around online and in this forum, but the only search terms I can think of are chroma-keying which only results in Compositing results, which I don't believe is what I'm looking for.

Here is an example of the texture (its very small) and it's context:

Any help or direction would be much appreciated!

You can use a "Mix RGB" node set to "Subtract" and invert the resulting mask to get your alpha value.

Note : "Compare" node is a "Math" node with the operation set to "Compare"
Note : "Length" node is a "Vector Math" node with the operation set to "Length". Why it is important.
Result :

You can tweak the third input of the compare node if your magenta isnt pure, to add a threshold. This will also progressively get rid of colors that are closer to the input color. Example :

Also real-life example (Green screen) :


How do I remove transient pixels from rendered image? How to remove this semi-green pixels? I need exactly G = 255 color

I render this image. And if you zoom in, you can see those pixels as shown above.
My goal is to remove those transient pixels from it, so that this pic have only 4 exact colors. R = 255, G = 255, B 255 and Black.

Solved my problem by setting filter size to 0.00px


I'd like to speed up an animation, Changing FPS doesn't do anything When I try to edit my FPS in my animation, it doesn't affect anything. The animation is very slow and I'd like to speed it up. If you need any files or such to help please ask! BTW: This happened when I started Blender, I didn't change anything.  I just rigged a model and animated it.

If the problem is just your animation speed in the viewport, your computer might be lagging. You can fix this by changing your Playback Sync setting from No Sync to Frame Dropping at the bottom of your screen:


Adding additional automatic weights to my original mesh without redoing it all Okay, so I'm making a rig and i need to redo the automatic weights on the hands, but already went and hand weight painted the face and the face and everything is perfect. If i parent the mesh with automatic weights to only the bones in the hand, it still redoes all of my weight painting in the face (the entire body is one mesh). So is there any way to only assign new weights to a certain area or bones without redoing the entire thing? The only way i thought of doing it another way is to separate the mesh of the hands and re parent that.... i also am asking specifically about using automatic weights, i know how to use empty groups, just wondering if there was a faster work around. thx.

Mark the hands with a vertex group (we'll call it "dtHands".)  Duplicate your mesh.  Autoweight your duplicate.  Give your original a data transfer modifier, targeting the duplicate, copying vertex groups on the basis of topology, limited by dtHands vertex group.  Hit "generate data layers" button as necessary.  Test deforms, possibly smooth out the border of dtHands group to make a more even transition.  Apply the data transfer modifier then delete the duplicate.


Re-order quick favorites in blender How can I re-order my quick favorites (accessed by pressing the Q key) in Blender 2.83?
I looked at How to change the Quick Favorites key in Blender 2.80 Beta?
But I don't have them bound to any keys?

Sadly it doesn't seem to be possible. You can remove and add items to the quick favorites to somewhat reorder them but that seems to be the most you can do for now.


constraint one object within another & then rigid body I am completely new to blender so, if the question seems incorrect or stupid, please excuse & guide me to relevant site/page.
Here is what is want to achieve.
I have the red object (it is a cylinder with cross section as below). Then I have the Blue object which is inside the red object (this is also as cylinder). Both of these are solid bodies so, one cannot penetrate the other. Now, what i want to do is to push the blue object with the green object and show how it tilts. How do I do this with Blender? Please let me know.
Thanks.

Push -
Not entirely clear how a hollow square can be a cylinder so I've done this as per your diagram.
All are 3D pieces and all are 'Rigid Bodies'.

The T-piece is suspended from a "Rgid Body Constraint" set to "FIXED".  That's positioned well above.
I see now I'm back online that your T-piece isn't moving, but hinged.  That is just a matter of lowering the constraint Empty down close to the T.  You could also try with the constraint set to "Hinge".
The red outer container (Cylinder/box/whatever) is a passive rigid body.

The brown 'Pusher' is also passive but ticked as 'Animated' and keyframed to move left to right.
Addendum  8th March, 2021
A 2nd Blend file has been added below, this one without the Rigid Body Constraint.  That allows the T-piece to sit on the box/cylinder and react to surfaces it comes into contact with.  In an extreme case where the pusher moves excessively, it will, as in the real world,  actually force the T up far enough to get underneath it.
With a normal stroke and without the RB Constraint to hinge the T piece, it is able to react with collision surfaces in the manner you're seeking and still in similar fashion to the movie clip above.
You'll notice the T-piece's physics 'Shape' has been changed to mesh and it's Collision Margin changed to .01 .
1st Blend file -

2nd Blend file -


How do I change where imported objects appear in the world? All objects I import go the center of the grid. Is there anyway to change this.

Objects appear in the center of the world because that is where the 3D cursor is set by default.

All objects have what is called an origin (a pivot point or a "center", usually represented by an orange dot) The origin of the the created object is then placed where the 3D cursor is on the scene.

But you can move the 3D cursor wherever you want the new objects to appear. Note that the origin of the new object will be at the 3D cursor's position.

To have your objects appear in a different place, just move the 3D cursor.


What exactly is "hard surface modelling"? I've seen the term "hard surface modelling" on CGCookie and wanted to know what it means and how it differs from regular modelling.

There are many ways how to achieve the end-result shape of your object. Sometimes it's not only one way, but multiple ways are used based on how they are fit. We can distinguish these modelling techniques:

poly-modelling (extruding polygons from a primitive into complex shape)
spline-modelling (lofting curves into complex shape)
box-modelling (dividing a primitive into complex shape)
sculpting (controlling all surface points of complex shape with brushes)

The first 3 are parametric modelling techniques - you control limited amount of points to define the surface. You create curvature using Beveling or by Subdivision surfaces. Because of this, these techniques are useful for modelling fairly regular hard-surface shapes that do not change.

Because these techniques are parametric, it is easy to precisely define surfaces that need to be perfectly flat, need to have exact curvature or carefully placed creases. It is very fast to construct simple shapes.

On the other hand soft-surfaces, like organic tissue, are highly irregular. To model them would result in using too many control surface points. Because of this sculpting is the preferred technique here as it allows to quickly define irregular shapes.

Techniques used to create hard-surfaces have similar mindset of building control surface topology and they complement each other closer, so that's why such modelling is referred as hard-surface.

Sculpting is another skill-set to master, that is why it is usually separated.

In 2D graphics the analogy is vector vs raster - vector graphics allows for exact shape definition and raster allows to make complex shapes fast with brushes (sculpting in 3D is not exactly a raster technique, as that would need to be voxel sculpting, but we can honestly squint eyes to make the comparison).

My 2 cents on the matter:

It is unfortunate to split modelling between hard-surface and organic today, as now it is obsolete and has mostly historical reasons. Many sculpting packages are good with dealing with hard-surface with addition of specialized brushes and tools. Imho it makes better sense to distinguish techniques between sub-d (parametric) and sculpt (and if you want retopo, but topology knowledge comes intrinsic from sub-d and vice-versa) to be clear.


Is it possible to simulate an optical fiber with cycles? Is it possible to simulate an Optical Fiber in cycles?

E.g. like these:

I tried to simulate this with a glass shader with an IOR of 1.62, (a value gotten from wikipedia) however not much light seems to come out the end of the "fiber". After 260 samples:

Is this possible?

Image from Wikipedia

if you just want to have the looks of fiber optics, faking it is a much easier approach.

But this is definitely an interesting experiment for Cycles. It was surprisingly easy to achieve the result:

A few things I learned:

the fiber needs to be a volume. Make sure the two ends are closed.
Just like a real FO, too much kink in the fiber will kill the internal reflection.
I tried to model the core(high IOR) and the cladding(low IOR) as separate geometry, that didn't seem to work too well. I just ended up using only the core (and basically using air to model the cladding material)
Render with lots of bounces. High sample value helps make the image smoother, but if the bounce value is too low, no light will come out of the fiber.

Blend File


Random face color in Cycles NOT based on normal direction I'd like to have random (different) color for each face of object. Objects has different shapes, but there are mostly flat so solution should be not based on normal direction. I tried various ways including vector transform without any luck. Is there any OSL solution for that?

edit: looking for node (material) solution for that.

Would a vertex color layer do?

If you select all the objects you want to treat this way, and run this script:

import bpy
import random

for obj in bpy.context.selected_objects:

    mesh = obj.data
    if not 'Rnd_face' in mesh.vertex_colors:
        mesh.vertex_colors.new(name='Rnd_face')

    color_layer = mesh.vertex_colors['Rnd_face']

    for poly in mesh.polygons:
        rgba = [random.random() for _ in range(3)] + [1.0]
        for idx in poly.loop_indices:
            color_layer.data[idx].color = rgba

..and assign a material which accesses the vertex color layer through an Attribute node..

here, on a bunch of subdivided planes ...

(you could use the per-face values in all sorts of other ways, in the node tree)


Why doesn't this lightmap capture the correct shadow? I'm trying to bake lightmaps. This is how my scene looks like as rendered by cycle:

As you can see, the blinds should cast shadow on the floor. I then wanted to generate lightmaps that can capture this shadow for real time rendering. But I don't know why, the lightmap doesn't contain this shadow, but a few gray patches.

The uv mapping seems to be correct.

I got it now. The problem was that the floor and walls had their normal flipped. After I checked backface culling, this became obvious. Fixing the normal direction solved the problem.


Trying to flip pose along x-axis does nothing I'm follow Sebastian Lague's RPG Graphics Tutorial for rigging and character animating (https://www.youtube.com/watch?v=gFf5eGCjUUg&t=173s).  I've done everything up to weight painting except i've hit a road block when I noticed I couldn't flip a pose along the x axis.  Trying to Copy a pose and Paste a flip X-Pose does absolutely nothing.  However, I've noticed that if i select everything and then flip along the axis, it reverses everything along the x axis, but along both sides.
Before:

After:

I'm seriously stumped, I've followed all tutorials on here. Don't wanna go through all the weight painting over again :(
Blend Link:
EDIT:  So i restarted blender and now it can reflect along x axis perfectly now?  I am very confused.  If someone can give an explanation, I would be love to learn why this fixed it.

Maybe your problem is the following one:
Paste Pose Flipped will paste the pose you've copied to the opposite side.
But let say you copy the left upper arm bone pose only, to paste flip it to the right upper arm bone. The problem is that the right upper arm is part of the right lower arm IK chain, so, whatever pose you’ll try to give it, it will obey to the lower arm IK's target. That's probably why you think sometimes paste flip doesn’t work.
If you select the left IK controller (called HandIK.L) and paste flip it, it will move the whole right arm, this time the copy paste flip is visible because you did it on a bone that controls and not obeys.
If you select all the bones and copy paste flip them, it will paste flip all the bones poses, so it will paste flip left IK controllers to the right side, and right IK controllers to the left side, and all other bones as well, it will completely invert the pose.


Change linked object to appended? I have linked maybe 20 objects into one blender file, but now I want to change it to appended objects. I want to use this blender file in Unity, and it seems the objects get broken if I include linked objects.

Is there a way to change linked objects into appended objects, or any way to separate them from the original file, or to import Unity in any better way?

There is a operator accessible from the 3D view header Object > Make Local > All  (or L) that will make the linked objects local copies.  *Do note that this is not undoable.*

The difference between the options is not stated in the manual.

Selected objects Only make the object local, you can move, scale and add modifiers, but all the mesh data, materials, etc stays linked to the source file. (you can not enter edit mode.)
All copies everything and there are no links for any objects. All linked objects are now editable.


Update parameter on bpy.context.active_pose_bone changed I would like to update a custom scene parameter when selecting between different pose bones.  Blender does not allow value to be updated on draw() method.  Though I might need to add a method to a handler but I can see any for active_pose_bone or selection changed.

Does anyone know how to update a parameter on selection event?

Getter (Setter) on a property

Small example, added active_pose_bone_length property to the scene.  Reports the length of the active pose bone or zero if none.  (AFAIK Blender bones cannot have zero length)

This way you are computing your property based on the selection, rather than checking selection change.

import bpy
from bpy.props import FloatProperty
from bpy.types import Scene

def get(self):
    pb = bpy.context.active_pose_bone
    return pb.length if pb else 0

Scene.active_pose_bone_length = FloatProperty(get=get)

alternatively could make this a context property

import bpy

def get(self):
    pb = self.active_pose_bone
    return pb.length if pb else 0

bpy.types.Context.active_pose_bone_length = property(get)


How do I divide the driver value? I have an Empty x-position driving the rotation of a Cube.

And I want to divide the value of the position of the Empty, so that the Cube rotates half the value.

Add a single driver to the cube (e.g. Z-rotation)
Go to Graph Editor and switch to Drivers mode
Set Ob/Bone of the variable var to reference the Empty
Enter the Expression var/2 (or var*0.5)

var is equal to the X Location of the Empty, dividing it by 2 halves the "influence" of the location to the rotation of the Cube.


2.8 - Non Linear Animation Editor - How to remove tracks? I was wondering, how can I get rid of unwanted/unnecessary tracks in the NLA Editor? (i.e. [Action Stash] & [Action Stash].001)
Rightclick -> Remove Empty Animation Data does not do the trick.
Thanks!

Put your mouse on the track name and press X


Multiple addons using the same name (OS X) I got an error message in User Preferences > Addons tab

Multiple addons using the same name found!
likely a problem with the script search path.
(see console details)

But under OS X I don't see "Console" item on the list as Window users.
How can I found duplicated add ons on mac?

To see what Blender thinks, you need to run Blender from command line.

Open Terminal application
Write cd then hit spacebar and drag&drop your folder with Blender into Terminal window
Enter
In Terminal window write ./blender.app/Contents/MacOS/blender
Enter

Then if you open Blender's "User Preferences" tab "Add-ons", Terminal displays all conflict add-ons.

(There is also patch to show these add ons directly in User Preferences window https://developer.blender.org/D791 for better future)


Minecraft render animation skin not working Im trying to animate my Minecraft character with a template, however when I click replace image with my own skin, this happens:

Without the original blend file I can only think that:

The template model is using a custom unwrap texture*.
Your skin is a custom skin*.

*not following the minecraft uv or model uv setup.
Download the original steve skin, replace the templet skin with the steve one, select the model, go to edition mode with the UV editor open on one window, select all the vertex and look if the unwrap is well done.


boolean and mirror problem I am learning Anvil tutorial by Blender Guru (here) and whenever I try to mirror the anvil after using boolean I am able to do it but for some reason, I am having the base of the anvil as it is and there is no face where boolean is used. here is the blend file.
P.S this object is in a collection named "2nd try" and my blender version is 2.92

Just move your mirror modifier before your boolean modifier like this:

Then it works:

UPDATE:
ok, then just add a mirror modifier for your cut object (cylinder) too like this:

result:

blend file:


Some areas of the mesh are dark (Shadow artefacts) I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.

I hope you can help me fix it.

This is called shadow terminator artifact and happens with some render engines on low poly meshes. It is a limitation that Cycles has, devs know about it.

Bug T37814: Artifacts in Cycles render for lowpoly models

The solution is to increase the polygon count.

The black on the silhouette is another kind of artifacts you might encounter called rejection sampling - also does go away with polycount.

You can change also the shading method. Your whole surface is set to smooth - it is interpolating the surface normals making shadows where there probably shouldn't be. You may want to turn on Auto-smooth or set some sharp edges:

How to smooth shade an object while retaining hard edges?