Changing IOR for Subsurface Scattering in Cycles I am using subsurface scattering node in cycles and want to change IOR of mesh (human muscle). But there is no option to do so. IOR option comes with Glass BSDF node but it changes my mesh appearance. Is there anyone how to to that?
Does anyone know physical background (formulas, or law) behind subsurface scattering node in cycles. How much light will penetrate, etc? I checked in blender wiki but it is not stated there.
Thanks

Well, I'm really happy that you asked this question.  I decide to try using the Fresnel Input Node to modulate the various Input sockets of the SSS shader and the results are interesting.  Using Fresnel for the radius adds depth, but it does dampen the SSS effect for the front facing poly's, so maybe it would be better to mix this setup with a stock SSS node.  Using 3 Fresnel Nodes with different IOR values and a Combine node for the Radius not only adds depth but adds a tone gradient which makes the SSS results interesting I think.

Here is a basic setup which uses a model that I recently rebuilt for someone so it can be used with Cycles bake.

There is an Environment Texture set to a value of 3 and a front facing overhead sun light at about 11:00.

The model on the Left uses a stock SSS shader with radius values of 0.9, 1.5, 0.7. for the hair.  The values are 2.0, 1.45, 0.35 for the face.

The model in the center uses a Fresnel node plugged directly into the Radius of an SSS node so all 3 values have the same input.

The model on the right uses 3 separate Fresnel nodes to control the 3 values of Radius for the SSS node.  The Fresnel values are the same as the radius values for the model on the left.

It's subtle and mostly just visible at the edges the way I did it here, but if you put some effort into it you may get somewhere with this.


How do I make something light sensitive? Say I I’m shining a flashlight (spotlight parented with camera) at something, how do I make that something react a certain way. (Ie. what sensor do I need to use for an object to be able to detect light?)

Any simple tips would help, just a beginner here.

For the light itself you can't, but you can fake it using a physics object with the light shape and detecting this object through collision. The file below is a working example, and contains the instructions below on the Text Editor for convenience.

Use the Outliner to click the described object and check the given properties.

Project Structure

Scene '_lib_props':

'player' objects in the first layer, all added to the group 'player'.
'box' objects in the second layer, all added to the group 'box'.

Scene 'scenery':

'ground' and 'walls' are mesh objects.
The 'player' is a group instance of the group 'player' from the lib scene.
The 'boxes' are group instances of the group 'box' from the lib scene.

Player Structure

Check the Outliner for a better overview of the structure of the player.

Object 'flashlight_lamp_collision' is a mesh object parented to 'flashlight_lamp', and it contains the following properties:

Property 'flashlight' to be detected by the boxes.
Physics type Static, Ghost enabled, Invisible enabled, Collision Bounds set to Triangle Mesh.

With these options, this object can be detected by the 'box_sensor' objects.

Box Structure

Check the Outliner for a better overview of the structure of the box.

Object 'box_visual' is a mesh object parented to 'box_sensor', and it contains the following properties:

Physics type Static, Collision Bounds set to Triangle Mesh.
Object 'box_sensor' is a mesh object, and it contains the following properties:
Physics type Sensor, Invisible enabled, Collision Bounds set to Triangle Mesh.

With these options, this object can detect the player's 'flashlight_lamp_collision' using a collision sensor.


Blender as a fluid dynamics simulator I want to ask if I can use Blender as a fluid dynamics simulator in a physics school investigation to determine for example the space travelled by a particle moving through a fluid, varying the viscosity. First of all, I watched some tutorials about fluid physics and I thought it could be suitable for this experiment, the problem I found is that I cannot determine in a scientifical way the space travelled by the particle. Also, I don't know how to give to the particle a determined speed value.

(This answer was updated for Blender V2.82 and higher)

As it was mentioned above, it depends on what you want to do.

If you want to go all scientific and have simulation data that you want to analyze then you should use a free software called DualSPHysics, http://dual.sphysics.org/, which specifically deals with fluid dynamics. They are using it to simulate sea shore erosion, brake wall effectiveness and so on, here is an example for usage https://www.youtube.com/watch?v=EvSDFRfJToQ or in Blender https://www.youtube.com/watch?v=U6lloRvgoXA. There is also a Blender plugin for this software which is called VisualSPHysics, https://github.com/EPhysLab-UVigo/VisualSPHysics.
If you actually want to analyze the data then you may need to also use a software called ParaView, https://www.paraview.org/, which is a data analysis software. You can see what happens to velocities, pressures and a multitude of info.

If only accurate visuals are the main objective then from blender V2.82 and up has a new fluid, smoke and fire simulation engine called Mantaflow based on the FLIP solver. Mantaflow replaces the old fluid simulation engine which used the Lattice Boltzmann based method of particle based fluid simulations, https://en.wikipedia.org/wiki/Lattice_Boltzmann_methods. Blender V2.82 Beta is available as a daily build here https://builder.blender.org/download/ but it will be released as the main version in a few days of this article update.

There is also a paid version plugin for fluid simulations called FLIP Fluids, https://blendermarket.com/products/flipfluids, which is a matured plugin for Blender V2.79 and now they have it for Blender V2.8x as well.
Mantaflow is like FLIP Fluids but it is capable to do more then the paid one. Mantaflow can already deal with smoke simulation whereas FLIP Fluids exclusively deals with fluids only. Currently, at the time of writing this, Mantaflow cannot deal with viscosity changes but FLIP Fluid can. In future, Mantaflow will be able to deal with viscosity.

FLIP Fluids and Mantaflow are using very similar methods of calculating the fluid dynamics. They both use a FLIP solver, which is a type of hybrid between a particle based and volume based fluid simulation. It stands for FLluid Implicit Particle solver. It can generate Foam, Bubbles, Spray and it is faster than the SPH solver system, discussed below.

DualSPHysics uses Smoothed Particle Hydrodynamics, SPH, to solve fluid dynamics problems which can also be used to simulate other than fluids such as solid mechanics, https://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics. This fluid dynamics solver is a volume based simulation. It creates accurate simulation data that can be later analyzed either numerically or visually with external software such as PraView, see above. Because it provides detailed calculation data it can be 10-100 times slower then the FLIP method but it is the ideal one for research.

Hope this extra info will help you out with your project.


BGE mouse over doesn't work. How to fix it? My Mouse Over sensor doesn't work when I try to use it for a cube, although it works very good when used for other objects.
First I wasn't sure if it maybe was due to the fact that I changed the Physics settings to "No Collision" in the physics tab, but after changing it back to "Static" it didn't work either. What can I do? Do you need the file?

Yes the object can not be set to No Collision, Occluder and Sensor also do not work.

The mouse sensor will detect any static, dynamic, rigid body, soft body, and character objects.

To make testing easier enable the mouse pointer in the game.

Then set up just a Mouse sensor, set to Mouse Over, and some actuator like Visibility, or End Object just to test the mouse interaction. Put that on the default cube.


Objects not appearing in Blender in 3d viewport The local view port has a can I made earlier, but when I come to global 3d view everything disappears please see the second 3d viewport its global perspective ,why is this happening as you can see in ouliner the objects are visible why is this happening ? I have attached image and file itself

https://imgur.com/QCO58G1

https://www.mediafire.com/?9crrwp8hv3do73d

You are on the wrong layer as your objects are in layer one, just press 1 with the mouse over the 3d view.


Execute blender addon from script I'm trying to run the LDR-Importer addon directly from a script but I don't know where to start.

I tried using the python command that was underlined in the addon bpy.ops.import_scene.ldraw() as seen in the image below.

I get the following error message:

[LDR Importer] (21:24:45.57) Standard-res primitives substitution selected
[LDR Importer] (21:24:45.57) Found LDraw installation at */ldraw/
[LDR Importer] (21:24:45.57) Preferences saved to
*/Blender/2.78/scripts/addons/io_scene_ldrimporter/prefs/LDR-Importer.json
[LDR Importer] (21:24:45.57) Attempting to import
[LDR Importer] (21:24:45.57) ERROR: Reason: Invalid File Type
Must be a .ldr or .dat
Error: Error: Invalid File Type
Must be a .ldr or .dat
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/Applications/Blender.app/Contents/MacOS/../Resources/2.78/scripts/modules/bpy/ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Error: Invalid File Type
Must be a .ldr or .dat

I then tried my luck by puting directly the file I'm trying to open as an argument bpy.ops.import_scene.ldraw("model.ldr") and now I get the error message:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/Applications/Blender.app/Contents/MacOS/../Resources/2.78/scripts/modules/bpy/ops.py", line 187, in __call__
    ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
TypeError: Calling operator "bpy.ops.import_scene.ldraw" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_SCREEN')

Any idea on what I'm doing wrong and what I should be doing instead?

Alright after some tinkering around I stumbled upon this page. Basically I had to pass the argument as a keyword:

bpy.ops.import_scene.ldraw(filepath="model.ldr")

And now everything works as expected.


3D printer simulation i am trying to build something like a primitive 3D printer in blender using fluid dynamics . I am having real problems to control the fluid dynamics .
i was looking for something like this as a start but better if the fluid is a little less viscous when reaching the print bed ...

https://www.youtube.com/watch?v=Se4v-QRWtYA

the idea is to build a fun low polly structure then actually print the results .
any pointers would be great thanks.

A 3D printer doesn't really push out fluids... Fluid dynamics is the wrong way to approach it I would say.

I would personally try to simulate it more using a particle system replicating small spheroids or cubes, where the particles have 0 motion and randomness out of the nozzle, and become children of the bed plate object to move along with the bed plate in your motion system.

I've designed the chassis of my printer with Blender and am looking at doing something similar for video demo purposes, will post an update if you still need help with that when I get over the hurdles I'm facing.


I am rendering in lower resolution, but background is not scaling down to match when rendered I am trying to make a scene with camera math (using Blender v2.91.0).
When I test-rendered the scene, it took all day to render, even though it is a very simple scene so far (my computer is not very fast).
So I would very much like to reduce the render-resolution to speed the rendering.
But when I set set the Resolution to 50% (or something else smaller then 100%) it only scales the rendered elements down, the background image it put in full size cropped (It correct in the viewport and when I render in 100% resolution).
I have tried all I can think of, to correct this: "Frame Method: Stretch", "Frame Method: Fit", "Proxy Render Size 50%"
And I have spend a long time trying to Google solution, but with no luck.
I guess, it is a simple thing, I have missed, and I hope someone here can help me.
The first picture is how it is supposed to be (screen dump from viewport).
The second picture is how it looks rendered in 50% resolution :(

No, blender will not automatically resize the image when you render at 50%. It will only render 50% percent of the pixels around the center of the image (Think of the percentage not as a resize, but as a crop).
If you want to resize use a scale node, set it to render size and Fit, so that the image is rescaled using the output resolution.


Make changes to the Radius of the default Circle? How can I create a circle with a certain diameter/radius?
I know there's a way, but I don't know how to.

Here are the steps you can follow.

Hit ShiftA on the keyboard.
Select Circle.
Hit T to activate the Tool panel.
Under the "Add Circle" Header, key in the radius of the circle you need.

Note Take care not to move the circle before you change it's radius the option would be unavailable if you moved the circle before hitting T


How to Ungroup (UnJoin) a Mesh I Need to know how to Ungroup Meshes that were Previously joined Without Undoing History.

I Am attempting to ungroup things like these.
If you select anything on the models in there you will notice they are a big mesh made with the CTRL J Trick

I Need to know how to Ungroup it from that.

(Unless it can't be done. -_- and i have to try to recreate the meshes entirely)

Select your mesh
Enter edit mode
Select all vertices using ctrl+A
Select mesh menu->Vertices->Separate->by loose parts or just Press P and choose by Loose Parts

This will separate your mesh into different meshes again.


ctrl+alt+0 moves geometry for me When I press Ctrl+Alt+0, trying to move the camera to the current view I end up in a view like this:

and when I after some struggling comes back to controlling the 3d view again, I can see that my geometry has moved, far far away, into another galaxy.

What can I possibly have done to let this happen?

Ctrl+Alt+0 moves the Active Camera to the current viewport position.

For this to work there have to both be a camera in the scene and the camera must be set as active object.

If some other random object is incorrectly set as active camera that object will be moved instead.

Either add a new camera to your scene and make it active, or make an existing one active for the scene by selecting the camera object and pressing Ctrl+0.

If you want to keep the current view you can then press again Ctrl+0 to return to the previous state and finally press Ctrl+Alt+0 to bring the now active camera to line up with the current view.


Is there any way to erase very thin lines in blender 2d? I note that when I make very thin lines in blender 2d they become almost unerasable by the eraser tool. I have tried point and stroke erase they dont erase it immediately.

Select an erase brush of type Soft/Hard.
Adjust brush settings.
Click and hold LMB or use the Pen tip to delete strokes on the viewport.


Generating hooked curve through "n" number of points with python It is possible to generate a curve in python through n number of points and the curve to be hooked to the points?
Extrapolating I want to be able to generate curve through center of cubes curve that will stay hooked with the cubes so any update to the cubes will update the curve.

import bpy
from mathutils import Vector
cubes = [ob for ob in bpy.context.scene.objects if ob.name.startswith('Cube')]
spline = bpy.context.active_object
length = len(spline.data.splines[0].points)
for i in range(length):
    bpy.ops.curve.select_all(action='DESELECT')
    point = spline.data.splines[0].points[i]
    cube = cubes[i]
    point.select = True
    point.co = Vector((cube.location.x, cube.location.y, cube.location.z, 1))
    cube.select_set(True)
    bpy.ops.object.hook_add_selob(use_bone=False)
    cube.select_set(False)

It's a bit quick and dirty, so here are the preparations you need to do:

The scripts selects the cubes by name, in alphabetical order. If any object in your scene starts with 'Cube' (e.g. Cube.001), it will be added to the cube array. There are more elegant ways to select a group of objects, but this was the simplest one.
You need at least as many cubes as the spline has points.
You need to select the curve and go into Edit Mode before running the script.


Blender 2.8 subdivision creating small bumps I'm new to blender and I tried making a face but it ended up having small and sharp bumps well as creases. So how do I make it smoother?

The cause of this most likely is because of overlapping faces or your normals are on the wrong side. Meaning that the physical plane of your mesh is on the inside of your mesh and building it around that somewhere caused overlapping faces. You can see if your normals are on the wrong side by going into the material viewer on the right side of the view port render shading option, which is the down button next to the transparent globe and view the backface culling status there by checking the backface culling option.


Select vertices based on other object (like boolean modifier) I have a geometrically complex sheet and would like to make this sheet have the shape of a bowl by deleting vertices that do not lie within a volume defined by some secondary object the shape of a bowl. This is the sheet:
You can imagine the type of operation I want to be like a boolean modifier, which calculates the intersection of all vertices with my bowl. However, the boolean modifier does not work on "leaky" objects like mine.

Is there any way of selecting only the vertices that lie within some other object, so I can then invert the selection and delete all the other ones?

Thanks!
T

Edit (I don't have enough rep to post a comment, so I will address some of the comments here. + I rephrased my question, hoping to make it clearer)
@Atomicbezierslinger:

I know about proportional edit and circle select and don't see what my experience with modelling has to do with my question. Also I am not interested in recreating a new model. My question is about selecting a set of vertices that lie within the boundaries of some other object of my choosing.
A simple intersection does not do what I want. This is because the boolean operation looks for enclosed volumes and my model isn't a volume but a surface. This is what it looks like:

The model is in fact subject to very precise specifications as it is (pretty exactly) a Lidinoid (https://en.wikipedia.org/wiki/Lidinoid).

@m.ardito:
It is a sheet, because it is a 2d surface in 3d space. Its shape is that of a Lidinoid (see above).

Solved it myself now with a littles script I cobbled together based on zeffis answer to this: How to find if a point is inside a mesh?

import bpy, bmesh

def is_inside(p, max_dist, obj):
    # max_dist = 1.84467e+19
    point, normal, face = obj.closest_point_on_mesh(p, max_dist)
    p2 = point-p
    v = p2.dot(normal)
    return not(v < 0.0)

obj = bpy.context.active_object
bowl = bpy.data.objects['bowl']
bpy.ops.mesh.select_all(action="DESELECT")

mesh=bmesh.from_edit_mesh(bpy.context.object.data)
for v in mesh.verts:
    p = obj.matrix_world * v.co
    if is_inside(p,1,bowl): v.select = True

This can be a little slow, but does the trick:


Character Motion in BGE: Hold Two keys at the same time I am making an FPS in BGE and I am confused on something.  Before I upgraded to Blender 2.74 it make it so if you would hold the W and A key at the same time then the character would move both along the x and y axis at the same time to make the character go diagonally.  Now it will not move at both axis at the same time, but whatever is pressed last.  The problem is that you can't move left and go forward at the same time, or right and forward ect.  I am probably making some simple mistake.  I have an example below. Thanks!

Solution

All you literally need to do to fix this is Click this button. (on all of your Motion Actuators)

Reason

When the Ad button is not clicked, each Actuator is setting the location, and is is overriding any other Actuators activated previously, regardless of whether or not they are still running. Enabling the Ad button makes each Actuator add to the change in location, enabling multiple Actuators to be executing at the same time.


Is there a way for me to copy the oriuentation of an object in blender game to another while the game is active? So I needed a way to reset the 3rd person camera view, since the camera seems a little wonky. I'm able to have a proper reset 50% of the time, reverting the camera to the same orientation of an empty group just like I want it to. The other 50% of the time it's flipped 180 degrees in the wrong direction. Does it have something to do with the fact I used a secondary mouse control to allow the character to be observed without changing its faced direction?

I essentially just want the camera to have a reset-able view after someone looks at their own character.
 I've been using track-to in order to copy the rotation to the camera.

I'd be fine with it if a coin toss didn't determine the success of the program working.

Api reference localOrientation

from bge import logic

scene = logic.getCurrentScene()
own = logic.getCurrentController().owner # Cube.001
obj = scene.objects["Cube"]
print("obj",obj.localOrientation)
print("obj",obj.localOrientation.to_euler())
print("own",own.localOrientation)
print("own",own.localOrientation.to_euler())
obj.localOrientation = own.localOrientation
print("obj",obj.localOrientation)
print("obj",obj.localOrientation.to_euler())
print("own",own.localOrientation)
print("own",own.localOrientation.to_euler())


What does the 'F' button and '2' button do (materials tab)? First, I know that clicking the '+' button on the right side of the material list makes an empty material slot, and after clicking the 'New'-button it adds a new material. But isn't it the same as just only clicking the 'New'-button (without clicking the '+' button first = empty slot)?

Second, I know that clicking the '+' button at the bottom next to the 'F'-button copies this material and makes it as a new node. Activating the 'F'-button will not delete unused material after closing the file.
What exactly does the '2' button do (when 'F' button activated)? Is it the same as just clicking the '+' button (at the bottom, next to 'F' button)? So what exactly does the 'F' button and '2' button do?

Some Theory

To understand how these buttons work, you first need to understand the concept of datablocks and users.

Everything in Blender is a datablock. An object is a datablock. A material is a datablock. A particle system is a datablock.

A user in blender, is something that uses a datablock. If you have a material, and you apply it to an object, that object's datablock becomes a user of that material. If you have a particle system applied to an object, that object's datablock becomes a user of it.

A datablock can have an infinite number of users. For example, there is no limit to how many times a material or a particle system can be applied to another object.

Blenders Garbage Disposal System

Before we can actually get into what this button does, I need to explain Blenders garbage disposal system.

Blender has a really neat, but somewhat annoying method of getting rid of datablocks.

Blender never deletes datablocks unless they have not users, and then, only when it's closed. So if you have a material that not objects use, and you close Blender, you lose that material.

The Fake User Button "F"

The way to stop this from happening is to use the "F" Button. The "F" stands for Fake User. This is exactly what it sounds like. It creates a fake user, so that the datablock always has at least one user, and doesn't get deleted by Blender when Blender is closed.

The "Number" Button

This also ties in with the whole idea of users. Basically, this displays the number of users this datablock has. If you click on it, it simply creates a duplicate of it, with 1 user (the datablock it's applied to).


How to retrieve missing vertices from STL file I was coloring my object A and found this piece in blue has large area of missing vertices

I still have the original STL file

My plan was to segment those missing vertices from original uncolored object (call it B) and paste back (or merge) to A. I import the STL file to my project, I can do Shift+D to duplicate, but they are on separate objects/canvas, there seems to be no "paste" and Ctrl+j won't work...

Please help me to recover those vertices. Thanks!

Verify that you have not restricted painting to certain faces.  Blender has elaborate tools for restricting access.  Face Selection

Verify you have not hidden vertices with the letter H.  See the Blender Menus to Hide and Unhide.  This is in Edit Mode.
Inspect a render to see if vertices are missing

After the above steps consider joining.

Be in object mode.
Make sure you select both objects, then join.
Join of two or more [selected] mesh objects in [object mode] works.

Selection in Object Mode.  Select Multiple Objects

Shift Click.
Letter B to rectangle select.
Letter C to select by the centers of objects.

I you have not invested too much time in painting consider starting fresh with the correct STL file. (Delete the damaged mesh) Maybe your painting skills are faster than vertex joining skills.

Joining the vertices in recovery mode seems a challenge.  Blender has many vertex fill tools.


Does Blender allow to perform operations on multiple objects at once? Let's say five objects are parented to the same 6th object. Is it possible to remove the parenting links at once. Selecting all children and removing the parent doesn't work:

Only the "active" object is un-parented.

That's curious since the inverse operation, parenting multiple objects to the same parent, is possible at once.

You are not doing inverse operation to parenting. Modifying a parameter of active object (properties display active object) only influences that object.

Operators can operate on selections, like Ctrl+P and Alt+P do.

If there is no operator to do it on multiple objects then RMB on the field > Copy to Selected. Works on most parameters in general.


Fluid Domain -- Resolution Divisions field disabled (grayed) after freeing bake I have a Fluid Domain where I just freed the Bake in order to change the Resolution Divisions field, yet it remains disabled (grayed).  Any thoughts on how to "jiggle" this to get RD enabled?  The cache folder is clean after freeing the bake.
Here is the  file with "proprietary" things removed.

instead of modular choose "All" and you can change it again.


Animation node set growpoint of instances How how can I set the growpoint of the instances?
It seems to always grow from the center.

It worked out by applying both SCALE and LOCATION (object) before setting the origin point and the number of instances.


How to align objects to the center of another object I am new to Blender (2.8) and trying to model a kind of turret, to try and learn by myself.

I am encountering a rather simple problem : I have placed 4 cannons relative to one another, and would like to align their center to the body of the turret (the grey elongated cube behind the cannons).

I would like to align them to the body of the cannon, either by :

Distributing them all along the length of the grey cube. (on the x axis)
Moving the cannons "as a whole" to the center of the cube.

I believe this should be simple, and has probably been answered before but I can't find where so I apologize.

The way to solve this is pretty simple: Select the objects you want to align, go to the "object" tab, and select "transform". This will give you another drop down menu, which at the bottom of is the option "Align objects". Select this, and a menu will appear on the left. It will show some options for aligning the selected objects. Play around with these settings until you have a pleasing result. You can also shift-click on the x,y,z align options to align on multiple axes at the same time.


How to initialize a variable which won't be refreshed I am coding a node for animation nodes. I need to initialize a set of variables so I can use them, but I need to do it in such a way that they won't be refreshed (reset to the default value) every time I send an output to the node.

I probably want to define the variables before my create(self) method, so it won't refresh every time I send/receive I/O from the execute(self,a,b,...) method.

I have this:

    def create(self)
       new.Input(...)
       new.Input(...)
       new.Output(...)
       etc...

def execute(self,a,b,etc..)
   loops involving variables.

Where do I define my variables, and what is the syntax for calling them to check or change values without resetting them to their default start settings?

You can define such variable outside of the node class and call it as you would call a global variable. Take the Text File Reader node for example, it defines a cache dictionary to cache file reads, the cache is initially defined outside of the class as:

cache = {}

class TextFileReaderNode(bpy.types.Node, AnimationNode):
    bl_idname = "an_TextFileReaderNode"
    bl_label = "Text File Reader"
    ...

And it assign and read the cache in the execute function normally:

with open(path, "r", encoding = encoding) as f:
    data = f.read()
    cache[key] = (lastModification, data)
    ...

You can also use the node identifier as a key in the dictionary to have a per-node variables. For instance, if you want a variable xBounce for every node, create an empty dictionary called xBounce and in the execution function, set its value using xBounce[self.identifier] = something and retrieve its value using xBounce.get(self.identifier, 0) where zero is the default value


Loop Actions with a Cycle F-modifier I am about to create a ~3 minutes long forest scene with some rabbit roaming around.

I created a rabbit with two animations: Sit, Walk.

I then created a curve and key framed the evaluation time so that the rabbit is following the path and sometimes stops.

I added a Cycle F-modifier to loop the movement.

The thing is. I have two actions in the NLA editor. Sitting and Walking. When the rabbit moves, I add a "Move Action" and blend it in, like this:

The first NlaTrack does nothing, I use it to determine the length of the NurbsPathAction to easy copy and paste. Each red block is a full loop of the path.

This works fine. But I have to copy everything for each curve loop. This is rather inconvenient.

Here are my questions:

Is there a way to group all my actions and repeat them X times?
If not, is there another way to make an endless loop out of my combined Actions?

Edit:
Here's a Video:
https://youtu.be/BBQitinKwnM
I scroll through every loop. As you can see, each loop consists of a block of several animations in the NLA editor. I guess there is no way to group them and automatically repeat them X times instead of copying?!

OK, so my approach would be to first set up your scene as you want it,

Then select your armature and press Space and search for Bake Action, trim the timeline to roughly fit your current take before doing so.

This might take a while depending on legth, don't worry that's normal.

After it's done you'll have something like this:

Once you are there, delete the last key that's generated at the end of the timeline, unless you trimmed to perfectly fit.

then convert this to an action:

I'm driving the motion with a childOf on the bunny that follows an empty with a followPath constrain.

So you'll have to sync their length and pauses once:

Then just input the same number in the repeat box, as many times as you want to do so:

If you wanted you could instead drive the actions by F-Curves, or maybe make all strips Meta-Strips of the same length and then instance those. But I feel this method is the most scalable to a bigger set of layers being mixed.

You can and should keep a copy of the original actions in case you want to tweak the animation later.

Note that this will make longer animations quite heavy, as it bakes every n-th frame, using 1 is a bit extreme in this case, toy around with a 2 to 8 frame step, and you can do cleanup afterwards if you want.

Here's the blend file:


Trying to make a water droplet, rotate line into 3d object I'm trying to make a 3d stl of a water droplet (for a 3d printer).  Essentially what I was thinking was to draw out a line like so

\
 \
  |
 /

And then rotate it around the z axis to make a 3d shape.  First, I can't seem to figure out how to do this, second, is that the best way to accomplish this task?

USING A SPIN TOOL:

With the pivot point type set to 3D Cursor snap the cursor to the center of a grid (Shift+C) then add a single vertex. In side view create the droplet's profile by extruding the vertex with E or Ctrl+LMB. Go to the top view and press Spin button (located in a Tool Shelf). Play with the steps number.

USING A SCREW MODIFIER

Select the profile and give it a Screw Modifier. Set the steps as you like. This is a better method as it's not destructive for a mesh.


How can I make flaky edges for cinnamon stick? I would like to achieve as much realistic result as possible for a cinnamon stick, one of the things i find challenging is making the flaky fragments at the edges only.

REference image as indicated with number 2 below

here is my blender file

thanks for the help

I separated the Object Data so I could modify each model independently.

The model on the left has the Solidify Modifier Applied since it restricts Vertex Painting and UV Mapping, (I wanted to try a few things there.)

The model on the right is mostly the same as you made it.

I used Vertex Paint and a Particle System on both of them.

There is a Group of several jagged models on a hidden layer that are being used to simulate the flecks along the edges.

It's really now just a matter of cloning those pieces using the particle system and using weight painting to control the distribution on the cinnamon stick models.

To make a series of Objects connected using a Group, press g while in Object mode after you have selected all the Objects for the group.  They should now all be highlighted in green.  I find this works best when you have the Objects facing down the y-axis with the Origin at (0,0,0).  I also, prefer to rotate them in Edit mode to avoid having to apply the rotations.

In the Particle's Render tab, activate the Group option and Select the group.  It would be better to change the name 'group' to something more like 'flecks' since Blender also calls Vertex Groups 'group' and since Weight Painting adds a Vertex Group, this can be confusing.

Also, in the Particles tab, add 'Group' to the Vertex Group's Density
field.  Now any weight painting that you've done on the model should control where the flecks show up.  Adding the Vertex Group control to the Length helps here as well.

Here's the modified .blend file.


How would I go about making water shoot out of a pipe rather than just flow out? I am working on a project that requires the water to shoot out of the end of the pipe rather than what it is doing right. Now, I have played with some of the settings but am kinda afraid to mess with it too much since I am new to blender, and it does not play well when I mindlessly click.

Would I generate more fluid particles? Or would I change some property about the inflow animation? I added a cylinder object to the top of the pipe as well, I think that will help keep all the water inside of the pipe.

Thank you once again and have a great day!

If you don't need a physically accurate simulation or continuity with the water coming out of the pipe you could fake it with particles instead.

Use a particle system on an emitter placed at the end of the tube (a simple plane should suffice).

Add a Metaball object as particle object, adjust size and resolution as desired. You can then control how far the water jet shoots by controlling the Velocity > Normal property of the particle system.


Animation 2D all frames moves at once I'm trying to make a 2d animation for my school project. When I was making and arranging the frame, it was smooth process first. But after a while, when I tried to move one keyframe it moved every other one on the same layer at once, it wasn't like this before. Example:

I tried to move only one of the frame.

but it moved all at once.

Can anybody help?Thanks!

I already found out the answer. The proportional editing needs to be turned off.


How to select scale x,y,z keyframes all at once in graph editor For a simple scaling animation, I am trying to change the bezier curve for all three dimensions at the same time. I know that I can box select the keyframe itself and move it with g, but I cannot figure out how to grab the handles for all three dimensions at the same time.

Thanks for the help :)

In the Graph Editor, on the right side you will see the sidebar that shows you all objects and items that have some animation attached to it. Select your object from that list and make sure to widen the drop menu of it beside its name. There you will see the different axis. Using Shift select all of the. Next in the actual editor press A once or twice so all handles are selected and then press S to scale all of them.


Transparency without transparent material in Cycles Is there a way to have an object (for example a small ring behind this cube) that is appears to be in-front without cube being transparent? I want the ring to still be green and I don't want to see the background or the cone bleed through the cube. Is it possible to move one object 'in-front' of another while it is actually behind? Hope this makes sense. Thank you

I don't believe this is possible within Cycles alone but can be easily achieved via the compositor by using different render layers and the Z Combine node.

First, set up the Render Layers - go to the Render Layer properties and create a new layer (by clicking the '+'). I named my layer 'No Cube'. In the 3d window, select all (A) and then press M to move them to other layers. On the layer popup, hold Shift and click the second layer box - you should now have both highlighted indicating that the objects (all of them) are now in both layers. Highlight those objects (ie, the cube) that you want to be transparent, press M again and just click the first layer box (this time without holding Shift) - this will place those objects just in the first layer. You should now have two layers - one with everything except the objects you want to be transparent and the other with everything (including those to be transparent).

Now switch to the Compositor and create the following nodes :

Press F12 to render the layers.

The two Render Layer nodes provide the results of the render. The Z Combine node combines them based on the distance from the camera. The Maths Subtract node adjusts the Z depth of the second image so that anything less than the distance specified in the Subtract node is classed as closer than the cube and so will show through it. Anything obscured by the cube that is further than the distance specified in the Subtract node will be still obscured by the cube.

Reducing the value of the Subtract node will change the difference in distance before the obscured objects will show through. For example, setting it to a value that corresponds to only part way through the cube can produce the illusion that one object is actually intersecting with the other (whereas it's actually behind it).


Can't copy and paste keyframes from another action I'm trying to copy some range of keyframes to another action.

In same action, copy and paste works fine, but paste to another action doesn't work.

I mean I have plenty bones but only single bone was pasted, even I selected all bones before copy and paste.

It happens often to me and it's really quite annoying. Why this is happening?

I'm not 100% sure, but mostly it works if I select all bones that have keyframes to copy, both dopesheet and 3d view.

However sometimes it's not working even do that, so that's why I said 100% sure.

I still facing this issue sometimes, but mostly works fine and some how it works after do something try to fix, but don't know what exactly fix this.


Noisy pixelated lightbulb filament emitter I've been trying to model a vintage light bulb, but the filament seems to produce a lot of noise and result in a pixelated render.  I think it has something to do with the glass material, since the filament looks fine without the bulb material.  It could also have to do with the high number of polygons in the filament.  I've tried different samples numbers and emission strengths, as well as different glass/transparent node mixtures for the glass, but it always seems to come out looking noisy and pixelated.  Any ideas?

I adjusted the glass material to be more transparent, which meant I could reduce the emission strength of the filament.  It's looking better, but still pretty grainy (Forgive the lower poly preview of the bulb, but I'm mostly concerned about the appearance of the filament and the wall right now).  I haven't been able to effectively reduce the fireflies with clamping.  I also tried adding a fake point light source but kept ending up with unwanted reflections off the glass, so I took it out (there's probably a way to get rid of these through the node editor, but I couldn't figure it out).  My next move might be to try to use the wider dynamic range color management (Filmic Blender).

I did crank up the samples to 2000 AA samples with 6X as many for diffuse and glossy, and 3X as many for transmission.  The fireflies became so numerous that they are now the majority (evidently the entire wall was supposed to be brighter), but the filament and its reflections still look like a crazy mess.

Should I crank up the Mesh Light samples?  Or is the filament doomed to look crazy because of my resolution and/or because of the limited dynamic range of the sRGB color space?

I love mesh lights so I use Branched Path Tracing & the Light Paths settings to get rid of fireflies and noise.

I get good results in most situations by, in the Sampling Panel, choosing Branched Path Tracing and setting Clamp Indirect to something between 0.1 and 0.5 and setting the Mesh Light Samples to 3ish.

In the Light Paths Tab, I set Max Bounces, Diffues, Glossy, and Transmission to 2. Lastly, you can check Denoising in the Layers tab to clean up any remaining noise. I just leave the defaults.

Attached pic has at least 7 mesh lights and used only 250 samples.(So you can still see some denoising artifacts, but for super low samples, not bad.)


How do I become better at using blender? I've started using blender 2.82 for almost 3 months. I've pretty much learned the basics of its interface however I'm still struggling to pull off good 3d art. I feel that my skills are not that good and pretty lost in direction. I was wondering if anyone has any good advice or tutorials that have helped them improve their blender skills? I really want to become good using this program but I feel so dependent on following tutorials and copying what they are doing but not actually understanding what they are doing.

First, try to think in terms beyond "good" and "bad" (good 3d art, good skills, good advice, become better...), a world of possibilities will open for you.
Don't follow tutorials blindly, stop wasting your life with them, most of them are crap, or made by want-to-be-entertainers who ramble but don't explain the tools, or the main concepts.
There is a manual for blender, use it! (yes, reading is still a great source of information). If you still insist on watching videos, then read about the tool you don't understand.
Set yourself a goal, a project that you want to do, and do it. Then do another.
Don't be afraid to fail, and fail again and keep failing until you find solutions. You will learn more from your own mistakes than following videos.
Start with the basic in small steps, until you reach a point where you don't know how to proceed, then ask specific questions on this site or others.


How can I see the result value in shading? The number 2 obeject of value is 2. 1 is less than 2.
you look at the nodes below.0.5 value plus 0.5 value can be seen. fac is 0.5
So I don't know what the result is. I can tell from the color that it is less bright.
I don't know what percentage of color 2 is and what percentage of color 1 is when the fac is 0.5.
Can I get the exact figures if I debug?

Use Math nodes. If the material output is white, the value is inside of the range. Carefully change the value to find the range of value.
Maybe there is more precise way to find value.


Limit Rotation to keep tip of rotating bone within a circle when rotating diagonally? I'm rigging some eyes, and I want to limit the rotation so that the iris stays within a realistic movement range. This is easy to do for horizontal and vertical movement, but runs into a problem when the movement is a bit of both.
The .gif shows a bone with -45/+45 deg limit on X and Z. When rotated on just 1 axis, the tip of the bone stays a consistent distance from the center. But when rotated on both, it gets further away from the center. ~32deg of rotation on each axis seems to be the correct amount at diagonal angles.
Is there a proper way to solve this problem? I'd like a method that could also work for keeping the tip limited to within an oval or almond shape. Of course some sort of driver or transform constraint could be used to reduce the amount of rotation done, but I'm guessing there ought to be a better and more precise solution than that?

A limit rotation constraint is never going to be very good for this, because 1) there isn't really any such thing as 3D rotation in 2 simultaneous axes; and 2) the nature of Eulers and aliasing means that even if you're careful about your angles, the angles you input are not necessarily going to be the angles that get limited.  (Think about how 180, 0, 0 is the same orientation as 0, 180, 180 and it becomes more clear that there is more than one way to reach any particular orientation, so Blender just picks one, which isn't necessarily the one you want.)
There are other techniques for what you want here-- for example, if you damped track a marker with a floor + limit distance (inside) constraint, you can constrain the rotation to a particular circle.  Or, you could do a single-bone IK, locked in Z and limited only in X, leaving the Y free.
But for you, especially since you're interested in non-circular shapes, I'd do it with a shrinkwrap constraint setup:

We start with a "root" bone (which, for an eye, would be your head bone).  The angle limits are actually defined by a mesh-- here, a slightly edited UV sphere.  This angle-limiting mesh is parented (bone relative) to the root bone.  Obviously, you want it disabled in renders, and perhaps shuffled off to some collection full of control doodads that you don't want to always have to look at.
The control bone is parented to the root bone.  The control bone has a child bone, SW, which has a shrinkwrap constraint targeting our mesh object.  (Setting this to "target normal" mode, and our mesh object to smooth shaded, will help interpolation.)  Then finally, our deform bone, which is parented to the control bone, damped tracks the SW bone.  That lets us define our angle limits with any arbitrary mesh we want.  Where can the bone point?  Wherever there's something for the SW bone to shrinkwrap to.
Notes:

Meshes are actually made out of flat faces of course.  Your interpolation and the extent to which your mesh actually represents a circle depend on its vert density.  Feel free to give the angle-limiting mesh a few levels of subdivision.  Because it will never get any other modifiers, and is bone parented, that subdivision only ever has to be calculated once; and shrinkwrapping a single point to a target, even a very high vert count target, is fast-- I haven't been able to make enough verts to notice any slowdown from a shrinkwrap constraint :)

A sphere, centered on Control, with the same radius as the length of Control, means that SW won't ever much move closer or further than control.  But try it with a circle instead, and see how the difference in shape changes the interpolation from on edge to the other.  This can be useful, but the main thing is to just know that it exists.

Obviously, feel free to change the shape of your angle-limiting mesh any way you'd like.  Starting with a sphere, cutting it with a knife operation, and then deleting one side lets you define the angle limits with your knife operation.


Best way to model this mushroom I have already modeled the mushroom but i'm not sure how best to approach the grooves at the top of the mushroom.

I would probably just sculpt that detail in sculpt mode with dyntopo enabled and detail size set to 3 - 5. I'd probably make the hat of the mushroom a separate object in order not to mess up the nice topology of the rest of the model. Also, if you keep a copy of the hat as it is now, you could then later use the high-res sculpted hat to bake displacement and/or normal maps to the low-res hat, if you're concerned about performance or render times for your final scene.


How can I create a normal map that points 90 degrees upward from a flat surface? Basically, I would like to have a cross billboard (such as the one below) have it's lighting come from above it. In other words, I would like the lighting to be as if the sunshine was hitting it from above.

The intention is for the billboard - Which will have a grass texture on it - To take lighting from the same direction as the terrain underneath.

The best way to do this, I believe, would appear to be with a normal map, making all 4 faces take lighting from 90 degrees upward.

Would this be possible to do with Blender?

Normal maps are not necessarily for adding detail but to change the way light falls on the surface. Here is a quick example of changed normal map without changing the detail using the Normal node:

Here is an alternative with the normal map generated dynamically by calculating the direction between the object and the light (Can I refer to another object's properties from a Cycles node shader? Drivers? If so, how?):

Watch this excellent tutorial by
Zacharias Reinhardt
https://www.youtube.com/watch?v=BtUS8QTsVZA&index=4&list=PLGodxM8aVtUfH9_xv4OdMM4xvBGZpggoA

in a nutshell, you have to

create your full object with material first
render it in ortho on a square plane
generate normal map and color texture for this square projection
use the normal and color textures as material for your "cross billboard"

To get a proper shadow is more complicated but can be achieved as per the great trick of part 2 of the video by Zacharias Reinhardt!


How to transfer weights between vertex groups on separate meshes I got 2 objects, 1 has all the vertex groups from the rigged armature, the other doesnt have those, but it has all of the weight paint vertex groups for hair length and density on it.

Object 1 did have these weights for hair, but were overwritten when parenting the mesh to the armature and doing "Automatic Weights" so i lost them and my hair is messed up. luckly i got a backup with those weights, problem is, i cant find a way to transfer those vertex groups from mesh 2 to mesh 1 without overwritting the already existing groups of mesh 1.
its there a way to transfer these WITHOUT overwritting the others?

am dum dum and found the answer like 10 min later.

Answer was to use a Data Transfer modifier on the mesh, have both Backup Mesh and OG Mesh in the exact same position, then enable Vertex trasnfer thingy, select the mesh you wanna transfer weights to in my case "UwU -> Nyaa"
(apologies for custom theme, hopefully its understandable)

this means whatever weights are on the "UwU" vertex group will be transfered over the "Nyaa" group. now the reason they need to be exactly positioned is because its more of a weight projection transfer rather than a seamless transfer.

Another useful and more practical method (suggested by moonboots in the comments, thanks!) is to use the "Transfer Mesh Data" tool, easiest way is to Search "Transfer Mesh Data" and once you click on it you will see similar settings than the modifier.

For transfering vertex groups make sure the active groups on both meshes are the ones you wanna transfer, way it works is transfering Active object's weight over to selected.


Why isn't my metallic material showing in lookdev mode? I'm watching a tutorial, and the author made his sphere metallic in Look Dev mode and it shows. I do the same thing and it turns black no matter what I do, whether I turn on scene world or lights or keep them off (his are off).
Here are pictures of his screen: First, he turns the background all the way down;

Then he makes his ball metallic.
Here is what happens to mine:

Why is his Look Dev mode options different from mine, and why is mine black?

I know a glitch that could cause this.
Sometimes when you focus on an object with the Numpad "." button, objects turn black and you can get rid of this by pressing undo.
Sometimes this can happen randomly (I don't know how), so I think that might be your problem.
(Save and then try this incase it doesn't work)


Hide axis of linked objects? Is there some way to hide the axis of linked objects?  I'm working on a model that's a composite of a bunch of others and all the crosshairs are making it really difficult to work with as most of the work has to be done in wireframe just to get the positioning right for internal objects. The image below demonstrates the issue:

You can try to set size of the crosshairs to 0:

To do this for multiple objects set the active one and copy to all the selected with right-click on property-field and Copy_To_Selected option.

This will only scale them and not eliminate them.

You can also set the viewport properties panel > Display > Only Render property:


How to make the mirror and actual mesh switch places I am working on a model from a video from Daniel Kreuter and I made a mistake and but the head outline and eye outline on the opposite side.
i want to know how i can make the mesh and the mirror side switch places

You can mirror a mesh or a part of it with the interactive mirror

set the pivot point to 3D cursor and place it correctly.
select the geometry you want to mirror
press CtrlM and one of the axis (x,y,z )
then press enter to commit


Why can't I paint on an existing texture? I downloaded a texture model for a tutorial and wanted to fiddle with the texture painting tools. I somehow got it to work, but after I updated blender to an newer version it stopped to work. Tried to reinstall both versions and take the clean file.

link to the blender file
http://www.blendswap.com/blends/view/74021

Help would be much appreciated

Make sure the the image editor is in paint mode. There is a dropdown box in the header, that will change the mode. By default it is set to view, so no painting.


"Unsubdivide" = Reduce vertices in loops I have several strands of a ponytail shown in the image below (project file here). I made these by applying Curve modifiers to several Bezier curves. As you can see, each loop in the strands has way too many vertices inside (I must've incorrectly applied Subdivide and gotten myself more points in the loop as well as more loops). What is the safest way to reduce the number of vertices per loop while preserving the overall shape? Decimate and Limited Dissolve seem to get me messy results (e.g. incomplete loops that go, say, 50-75% of the way around), and Unsubdivide gets me a spiky-looking mesh. Thanks!

From MoonBoots' comment, Checker Deselect seems to be an effective solution. Ctrl+Alt+RMB over a perpendicular (non-loop) edge; Select -> Checker Deselect; Select -> Edge Loops; and delete edge loops. Under Checker Deselect, the N option determines deselect pattern (e.g. n=2 means -/+ and n=3 means -/-/+ if skip=1), and the Skip option determines number of adjacent edges to be included in that + (e.g. skip=2 means (+/+)/- and skip=3 means (+/+/+)/- if n=2). See video (does not demonstrate use of N and Skip options): https://www.youtube.com/watch?v=Yptda_yKQIU


How to update appended object/armature, while keeping existing animation? I've appended a character object(along with armature) to a project. After animating a bit, I found something I wanted to improve upon in the character armature.

I have the orignal character object in blend #1 and my current project(where I've appended to) we'll call blend #2.

Is it possible to make changes in the armature in blend #1 and reload/update the armature in blend #2, while keeping the existing animation (animation that was in blend #2)?

select your old armature. In armature settings, change the armature data with the new one.


support for instantiation What is the best approach to building up a complex scene or object in blender composed of previously modeled .blend objects?  I have heard of linking the objects from another .blend file, but then all I get are untextured primitives (not to mention not being able to instantiate composite objects without losing the relationship between the composite parts). For example, I hope to instantiate entire .blend models (less the lighting and camera), not just components of one.

trying to clarify... I want to place a half dozen discrete .blend models at various positions in an empty .blend model, arrange those components geometrically and subsequently embellish that arrangement by adding more objects in the parent model, in a technique commonly known as hierarchical design.

I don't want to lose textures applied to component objects (in their individual .blend files) nor do I want to lose the relative position of components within contributing .blend files, e.g. an arrangement of rectangles should look exactly the same instantiated as it does within the defining .blend file.

In hierarchical design, instantiated objects are 'read-only' copies of the constituent models.

trying to clarify... I want to place a half dozen discrete .blend models at various positions in an empty .blend model, arrange those components geometrically and subsequently embellish that arrangement by adding more objects in the parent model, in a technique commonly known as hierarchical design.

I don't want to lose textures applied to component objects (in their individual .blend files) nor do I want to lose the relative position of components within contributing .blend files, e.g. an arrangement of rectangles should look exactly the same instantiated as it does within the defining .blend file.

In hierarchical design, instantiated objects are 'read-only' copies of the constituent models.

You question is very vague and hard to answer.
In Blender you can link or append various types of data, this is visible when you browse to append or link from other files, and you can choose from Object, Meshes (object Data), Cameras, Freestyle, Groups, Materials, Node setups etc.

Depending on the type of object you link, you'll get different results that can sometimes be overridden.

Linking object data like meshes, curves, cameras etc, will only bring in that data alone (raw mesh data without modifiers for geometry), whereas linking an object will also bring with it: it's materials, associated textures and modifiers.

When linking an object you can then make it a proxy in your current scene, this allows you to override some of it's properties like position or materials. You can also make the object local, which allows moving it in the scene.

Linking a group instance will bring in a static group of objects, as if they were a single object.

For more complex interactions you can link objects and armatures to rig it locally and animate it, although I am not an animator myself, so am not at all comfortable in this area.


Having problems with exporting to OBJ Hey guys i have a question i did a house model and i have a plenty of good materials with normal map, multiply shaders is there anyway i can join this all together to make a bake in order for me to export it to an OBJ?

Materials and shaders are not transferable with Obj format. It does not allow to export Blender materials and shaders. All it can do is to export a simple Phong shader plus some textures. And not everything can be baked into a texture. So the general answer is no.
You could bake all the color information into a single diffuse map. Use Cycles and bake with method Combined. Also a normal map should arrive. But the rest you most probably need to reassing in your target platform then.
Make sure to use relative paths so that the textures are not missing.


How to mirror an object along with its local transform orientation? So I need to mirror an object along a single axis, and this object has been rotated in object mode and therefore has a local orientation that differs from global. I need to keep this local transform because some constraints will apply to those objects for an animation. See the examples below:

The source is the red object and green one is the transformation result. This is what happens when using the mirror modifier, then separating geometry and resetting origin to geometry. The placement is fine, this is exactly where I want the object, however, the transform orientation itself matches that of the red object and has not been mirrored.

Now this is what happens when trying to mirror the object itself along the X axis using the 3d cursor as the pivot point (scaling -1 along global X). The transform orientation is then well aligned, but I wouldn't exactly call this a mirror! Now of course if I had applied the rotation before mirroring, the mirror would have worked, but the local orientation would have been reset so this is no use either.

This seems like a very basic thing to do and I'm wondering what I'm overlooking. I know that I can use other orientations like "normal" for modeling but this will not work with constraints. I will need to use constraints on local axes afterwards.

Any help is greatly appreciated.

Mirror Rotation too

While performing the scaling upon the 3D cursor as pivot, you are basically mirroring both the Location (e.g. from X to -X) and the Scale of the object. The only trasformation not affected by the operator is the Rotation.

I don't think that currently (2.77) there's an operator capable of doing all in one shot, but for the provided example it can be done manually by multipying the X-rotation channel value by -1 as shown in the image sequence below:


Problem with adding mesh whenever i add a mesh on another object,
the object is always linked :
when i add a cylinder on a cube and whenever i scale or transform the cylinder also the cube will scale or move, but just in the current project, maybe i changed somethings but i dont know what.

Means by which this could happen:

Object added in 'edit' mode then scale/move/rotate in 'object' mode

Is the object 'parented' to it?

Constraints or drivers can also affect loc/rot/scale.


Objects are moved after reopening the file I'm trying to add windows and doors to the walls of the house I'm making. All objects/walls were made using the Archipack add-on.
I'm using the boolean technique to cut openings in the walls for the doors and windows. It's proven to be a tedious task for me and I carefully spend my time getting everything just where I want it.
I also get a weird glitch after adding the boolean modifier where the windows and doors stretch hilariously large so I have to then go back and re-size them. Perhaps that's a trouble for another post...
My main problem here is that after I finally get everything sized and in place and it all looks good, I save and exit. However, when I re-open the file I get this weird problem where random doors and windows are no longer anchored to the walls.
I've repeated the process several times making little tweaks here and there but this problem persists. In the image, I've circled the object that has moved position after saving and closing and I've put a dot of the same color in the location of where it's supposed to be. There's also a random gap in the wall that keeps appearing? I just have no clue and have found no other helpful resources.
I'm using Blender 2.92 and Archipack ver 1.2.84. I've tried downgrading and upgrading without luck.

Don't use Object or Edit mode transformation tools.
For adjusting elements after you release it under Create tab > Archipack ... use Archipack Tab to manipulate and adjust elements.

Also check some tutorials ... you don't have to create each wall as separate object.
https://www.youtube.com/watch?v=8qJHGig67_0
The best point to start https://github.com/s-leger/archipack/wiki one of the links is Documentation.


Video texture is out of sync in blender, but fine in other programs I am attempting to use video textures to animate a "scoreboard" of sorts. I've gotten the UVs correct, and everything seems to be working. Until I try to sync it up to my audio.

As far as I can tell, the issue lies with Blender turning the video into a number of frames. Both Blender (Cycles Render) and the video editing software I am using (Vegas Movie Studio 11) seem to rendering at 23.98 FPS. If I attempt to sync the video file itself up to the audio, it works just fine. However, when I set it as the file for the texture, the video seems to be a certain % too long.

For example, at frame 8 in Vegas, the video is supposed to switch from a slide of "You" to a slide of "Won't." But it in Blender, it doesn't switch until frame 11. Then, the slide is supposed to change at frame 15 but in Blender it changes at frame 21.

In fact, there seems to be a delay of x + 3 frames, x being the delay prior.

I've also tried it with different renders of the same file, with no visible change.

To recap: It is a single AVI file, it appears to work correctly everywhere but blender, where there is a strange adding delay.

I'm sure I could tweak this file to be perfect, but I'm going to have to do this a lot during the project and it seems there must be a simpler way.

I would export out of vegas as a jpg sequence. then blender will use each file as an exact frame. you can then render out of blender and import into vegas matching the same frames per second.


3D View Glitches and Jumps around I'm hoping someone has come across this before. I was working on my project and things were fine, then all of a sudden they weren't. In the 3D view my mesh seems all screwed up and my camera movement is very jerky. When I switch to camera view or do a render everything looks fine though. I'd appreciate any suggestions. Below is the broken 3D view, then a render from roughly the same point of view with the same layers visible.

Edit:

The reason why is because the start clipping length of the 3d view is set to 1 micro-meter.

Blender doesn't like dealing with small numbers, so if you set that to something bigger such as 1 meter it should fix it.


Sculpting Viewport Shading Please forgive such a basic question but I'm very confused - my viewport shading in Sculpt mode is gray, instead of that nice red colour. I'm sure it always used to default to the red. I've restored the factory defaults, I've reset the preferences to factory defaults and I deleted the startup file under User/AppData/Roaming...etc. Nothing has worked. How can I restore the default behaviour, or have I overlooked something silly?

I'm using version 2.82

You probably just have your viewport shading set to something else. It varies by each individual 3D View window as well.

Click on the little icon as indicated. You will find the red material you're looking for in the matcaps section.


Weird deformation with fingers (automatic weights) Hello i was rigging an arm for my game and there's this bug if i rotate my fingers this deformation happens, How can i fix this? This is using automatic weights
I tried using other types but it didn't work, I tried redoing the rig but still same bug.
What i'm trying to do is not to make the hand move but the fingers, The fingers should move the fingers, not the hand.
https://i.stack.imgur.com/eXSjV.jpg

The rigging is bad: Select the armature, shift select the object, switch to Weight Paint mode, then select each bone, you’ll see what part of the mesh they affect. You can see that the first thumb phalanx affects the palm, which is not supposed to do. Some other phalanx also affect the palm.

So you need to:

Create a bone for the palm itself
Parent this bone to the last arm bone (Keep Offset mode).
Parent each first phalanx to this bone (Keep Offset mode).

In Weight Paint mode, paint the influence of the palm bone (enable the 2D Falloff option to paint through the mesh).

Also remove all the unnecessary influences.

Now it works fine (don't know why your arm has 3 bones though).


Armature is not modifying the mesh I am trying to create a robotic hand, for the fingers I add an armature then parent the finger to the bones. Then when I go to pose mode instead of modifying the mesh it pivots the finger on that joint. I have done about 7 tutorials on armature and have all gotten me nowhere unlike other characteristics of  blender like editing, painting, using nodes, etc... seem to be more developed and easier to use unlike the armature option. I have been using blender for 2 years now and have never seen a feature more vague and underdeveloped than armature. Maybe it's just that I'm bad at it, but watching 4 hours worth of tutorials on it and getting nowhere really frustrates me.

In the first screenshot, it appears that your mesh has no vertex groups. As far as I am aware, skinning requires that the mesh has vertex groups with the same names as the bones in the armature, and cannot work otherwise. The vertices you want to be moved by a certain bone must be assigned to the matching vertex group. To add vertex groups to your mesh, click on the + button on the vertex groups panel (visible on the right side of your first screenshot). You can also automatically create the vertex groups by selecting the mesh, then shift selecting the armature, then hitting Ctrl + P and selecting Armature Deform with either Empty Groups, Envelope Weights, or Automatic Weights.


How do I delete an armature but keep the baked pose? According to my notes from when I have done this before:

Q. How do I bake or fix the pose to the object?
A. Pose the model and then switch to Object mode. Select the model (not the armature) or shift select all the parts of the object if it isn't one single mesh. Next, add a new modifier and choose "Armature". Make sure that the armature is moved to the top of the stack and in the Object dropdown menu, select the armature that you created and then press apply.

So the problem that I am having is that I have followed those directions exactly, but then when I delete my armature, my pose resets and I lose the pose. It doesn't seem that it baked it at all.

What is going on? How do I delete an armature but keep the baked pose?

Ctrl + A to apply all transformations
Alt + P to clear parent and keep transformation
Apply all modifiers


Using Alt-D Versus Shift-D I'm aware of the difference between Alt-D and Shift-D; however, when I attempt to move objects modeled as rigid body that I've duplicated with Alt-D, they snap back to their original location.

When I relocate these same objects, duplicated with Shift-D, this doesn't happen?  However, I then have to go into the Rigid Body and change data on each one separately.

I'm using 2.8, new to me, and I apparently don't know how to make sure I don't have Snapping on somewhere...or I'm not doing something else right!  In any event, would certainly appreciate any help!

After you duplicate and place your object, try invalidating the rigid body cache.

One way to do that is by entering and exiting edit mode and jumping to the start frame (ShiftLeft). You'll notice the colored bar along the bar along the bottom of the timeline changes color, which indicates the cache is no longer valid.


Creating an object from a black and white image I would like to map the vertices of a shape to the pixel of an image. The mapping result will modify the position on the Z-axis of the vertex.
For example:

the pixel at position X=0, Y=0 is white (255 or 1): so the vertex will be positioned at (0,0,1000)
the pixel at position X=0, Y=1 is gray (128 or 0.5): so the vertex will be positioned at (0,1,500)
the pixel at position X=20, Y=180 is dark (22 or 0.*** ): so the vertex will be positioned at (20,180,***)

Is this possible?
Thank you

I don't think you can do this per-vertex (without using python), but you can do this with a heavily subdivided mesh and a displacement modifier. Is something like this satisfactory?
(Just to explain the image - I used the same texture as both the basis for the Displacement Modifier as well as the Material so the areas that are being "elevated" by their color value are colored accordingly)


how to import polygonal chains I have a mixture of polygonal chains, quite dense. These chains represent mixture of polymers (~5000 chains). I want to render it photorealistic (without using VMD or similar special software) so they look like smooth curves.
Chains are stored, for now, just as sequence of coordinates of the vertices. Is there a format which supports such data so I can import chains into blender?
Or shall I convert every chain into concatenated cylinders? Do you know some tools which do it with smoothing the chain with splines?

You might just want to use python to convert the coordinates into a mesh.  There are many examples on the internet.  I'll include an excerpt from http://web.purplefrog.com/~thoth/blender/python-cookbook/triangle-donut.html because it has an accompanying narrative linked at the top:

import bpy
import math

def triangleDonut(name, nChunks, r1, r2, z1, z2):
    verts=[]
    faces = []
    for i in range(2*nChunks):
        # the first ring of vertices; we create them later in the loop
        v1=i*3
        v2 = v1+1
        v3 = v1+2
        # the second ring of vertices; these refer to vertices created next time
        v4 = v1+3
        v5 = v1+4
        v6 = v1+5
        if (i+1 >= 2*nChunks): # connect the end to the start
           v4=0
           v5=1
           v6=2
        # each ring is at a different angle from the center, eventually sweeping a full circle by the end of the loop
        theta = i*math.pi/nChunks
        if 0 == i%2:
            z=z1
        else:
            z=z2
        # basic triangle geometry here
        c = math.cos(theta)
        s = math.sin(theta)
        # append the coordinates for v1..v3 to the verts list
        verts.append( [r1*c, r1*s, 0] )
        verts.append( [r2*c, r2*s, z] )
        verts.append( [r2*c, r2*s, -z] )
        # build faces that go from the freshly added vertices to the vertices we will add in the next loop
        faces.append( [v1, v4, v5, v2] )
        faces.append( [v2, v5, v6, v3] )
        faces.append( [v3, v6, v4, v1] )

    mesh = bpy.data.meshes.new(name);
    mesh.from_pydata(verts, [], faces)
    mesh.validate(True)
    mesh.show_normal_face = True

    obj = bpy.data.objects.new(name, mesh)
    scn = bpy.context.scene
    scn.objects.link(obj)

triangleDonut("donut", 20, 3, 2, 1,1.5)

There are many other examples at that site and around the internet.  the from_pydata method is probably a good search term, although it comes up with startlingly few results on stackexchange

Blender Python mesh.from_pydata?
Python: Create Polyline and Polyloop


sculpting is slow on high dpi display I was about to learn sculpting in blender, and I noticed it's very slow. Just the sculpting. Navigation and everything else is very performant. I tried scaling the blender window so it's 1/4 of my screen, then there's a significant performance increase. It's performant when I split the blender view-port into a little section as well (two view-ports). What should I do? Thanks!

I see many people having issue with viewport performances. try to switch 2.8, 2.81- or 2.79 stable version if that does anything good. For me 2.8 is better to sculpt- but for some its the other way around.


Multires Normal Baking Not Baking Normal Data I smart UV projected a model of the monkey head after subdividing it 5 times and lightly sculpting on it, then baked the normal data based on the multires, but all I get is a flat normal map texture with no directional normal data. How do I fix this?

Baking normal map from Multiresolution modifier data relies on the difference between the viewport number of Multires subdivisions and the highest level it was subdivided to:

The higher difference in these numbers is (Viewport vs. highest from Sculpt / Render), the stronger effect of the resulting normal map will be.

If your normal map is very light or flat then probably Preview level is set to the same one as Sculpt or Render is. Set it to lower number and choose how much of the normals change you want to bake.

Note that baked normal map should be applied to the low-poly mesh with the same amount of geometry as the mesh had with the chosen Preview level of the Multires modifier.


Channels and keys of animated bones do not appear on Graph Editor So I animated bones on an armature, things were normal for a long time. Today I decided to mess with the animation and to my surprise the keys are gone! The animation still plays normally, and the keys appear on the timeline, but channels and keys are nowhere to be found on the Graph Editor when selecting a bone.

I tried:

*Copying and pasting the same keys on the same channels on the same place or different places on the timeline to see if they would magically appear but it didn't work (by the way it works when copy-pasting keys from a bone to another, just create a key first then paste on the same channel)

*Messing with some controls on the Graph Editor that makes curves visible or hidden, and they didn't work

*Creating keys for the armature works but the keys are hidden too

*Creating keys for different objects, and it works. So the problem is not general, it's specific for the armature's bones

Can't provide the file right now but I guess that's enough info. By the way I am using version 2.79b. Researched a little bit to see if someone also had the problem. It seems to be a new thing.

Problem answered here:
Graph Editor does not show any keyframes

Apparently the button "show_hidden" on the view controls at the botton on Graph Editor must be set to true to allow the visualization of keys from objects or bones that are "hidden". To the right is the button "show_only_errors" to show only keys with errors or a red bar under (usually unupdated or related to a deleted object/bone/shape key) and to the left is the button "show_only_selected" for showing only keys from objects you selected, which if set to "false" makes all keys from any object and bone appear.

*Examples made from Blender 2.79b. The buttons do the same thing and are on the same place on the newest Blender's version to date

I cannot explain the status of "hidden" yet. It doesn't seem to have anything to do with "hidden from view", it is another type of "hidden"


How do I use the compositor to output colour based on the depth of objects? This setup seems like it should work, but it doesn't.

and another, more tunable.

the Z-buffer isn't really an image but a grid of distance values mapped from camera clipping start, and end (these settings are found in the Camera Object properties tab).

Use the limits tickbox to visualize the clipping start and clipping end range, (also called near and far clipping planes). Generally keep all your geometry in that range and you will be using the Z-Buffer like a boss.

PS: instead of the Map Range node, you can use the Normalize node and you won't have to set the range values, it will find the lowest/highest values in the Z-buffer and map them to 0...1 range


Calculate points on a Nurbs curve without converting to mesh I found this question: Getting the list of points that describe a Curve without converting to mesh

But I would like to do the same for a Nurbs curve. This Nurbs curve consists of a lot of splines and I would like to be able to pick a spline to get the points from. I could create a Bezier curve, but I would prefer to use a Nurbs curve in my script. How would I do this as there is no mathutils.geometry.interpolate_nurbs()?

extracted the source code for nurb curves and ported it to python - seems to work

import bpy
import bmesh
import math
import mathutils

def macro_knotsu(nu):
    return nu.order_u + nu.point_count_u + (nu.order_u - 1 if nu.use_cyclic_u else 0)

def macro_segmentsu(nu):
    return nu.point_count_u if nu.use_cyclic_u else nu.point_count_u - 1

def makeknots(nu):
    knots = [0.0] * (4 + macro_knotsu(nu))
    flag = nu.use_endpoint_u + (nu.use_bezier_u << 1)
    if nu.use_cyclic_u:
        calcknots(knots, nu.point_count_u, nu.order_u, 0)
        makecyclicknots(knots, nu.point_count_u, nu.order_u)
    else:
        calcknots(knots, nu.point_count_u, nu.order_u, flag)
    return knots

def calcknots(knots, pnts, order, flag):
    pnts_order = pnts + order
    if flag == 1:
        k = 0.0
        for a in range(1, pnts_order + 1):
            knots[a - 1] = k
            if a >= order and a <= pnts:
                k += 1.0
    elif flag == 2:
        if order == 4:
            k = 0.34
            for a in range(pnts_order):
                knots[a] = math.floor(k)
                k += (1.0 / 3.0)
        elif order == 3:
            k = 0.6
            for a in range(pnts_order):
                if a >= order and a <= pnts:
                    k += 0.5
                    knots[a] = math.floor(k)
    else:
        for a in range(pnts_order):
            knots[a] = a

def makecyclicknots(knots, pnts, order):
    order2 = order - 1

    if order > 2:
        b = pnts + order2
        for a in range(1, order2):
            if knots[b] != knots[b - a]:
                break

            if a == order2:
                knots[pnts + order - 2] += 1.0

    b = order
    c = pnts + order + order2
    for a in range(pnts + order2, c):
        knots[a] = knots[a - 1] + (knots[b] - knots[b - 1])
        b -= 1

def basisNurb(t, order, pnts, knots, basis, start, end):
    i1 = i2 = 0
    orderpluspnts = order + pnts
    opp2 = orderpluspnts - 1

    # this is for float inaccuracy
    if t < knots[0]:
        t = knots[0]
    elif t > knots[opp2]:
        t = knots[opp2]

    # this part is order '1'
    o2 = order + 1
    for i in range(opp2):
        if knots[i] != knots[i + 1] and t >= knots[i] and t <= knots[i + 1]:
            basis[i] = 1.0
            i1 = i - o2
            if i1 < 0:
                i1 = 0
            i2 = i
            i += 1
            while i < opp2:
                basis[i] = 0.0
                i += 1
            break

        else:
            basis[i] = 0.0

    basis[i] = 0.0

    # this is order 2, 3, ...
    for j in range(2, order + 1):

        if i2 + j >= orderpluspnts:
            i2 = opp2 - j

        for i in range(i1, i2 + 1):
            if basis[i] != 0.0:
                d = ((t - knots[i]) * basis[i]) / (knots[i + j - 1] - knots[i])
            else:
                d = 0.0

            if basis[i + 1] != 0.0:
                e = ((knots[i + j] - t) * basis[i + 1]) / (knots[i + j] - knots[i + 1])
            else:
                e = 0.0

            basis[i] = d + e

    start = 1000
    end = 0

    for i in range(i1, i2 + 1):
        if basis[i] > 0.0:
            end = i
            if start == 1000:
                start = i

    return start, end

def nurb_make_curve(nu, resolu, stride):
    EPS = 1e-6
    coord_index = istart = iend = 0

    coord_array = [0.0] * (3 * nu.resolution_u * macro_segmentsu(nu))
    sum_array = [0] * nu.point_count_u
    basisu = [0.0] * macro_knotsu(nu)
    knots = makeknots(nu)

    resolu = resolu * macro_segmentsu(nu)
    ustart = knots[nu.order_u - 1]
    uend   = knots[nu.point_count_u + nu.order_u - 1] if nu.use_cyclic_u else \
             knots[nu.point_count_u]
    ustep  = (uend - ustart) / (resolu - (0 if nu.use_cyclic_u else 1))
    cycl = nu.order_u - 1 if nu.use_cyclic_u else 0

    u = ustart
    while resolu:
        resolu -= 1
        istart, iend = basisNurb(u, nu.order_u, nu.point_count_u + cycl, knots, basisu, istart, iend)

        #/* calc sum */
        sumdiv = 0.0
        sum_index = 0
        pt_index = istart - 1
        for i in range(istart, iend + 1):
            if i >= nu.point_count_u:
                pt_index = i - nu.point_count_u
            else:
                pt_index += 1

            sum_array[sum_index] = basisu[i] * nu.points[pt_index].co[3]
            sumdiv += sum_array[sum_index]
            sum_index += 1

        if (sumdiv != 0.0) and (sumdiv < 1.0 - EPS or sumdiv > 1.0 + EPS):
            sum_index = 0
            for i in range(istart, iend + 1):
                sum_array[sum_index] /= sumdiv
                sum_index += 1

        coord_array[coord_index: coord_index + 3] = (0.0, 0.0, 0.0)

        sum_index = 0
        pt_index = istart - 1
        for i in range(istart, iend + 1):
            if i >= nu.point_count_u:
                pt_index = i - nu.point_count_u
            else:
                pt_index += 1

            if sum_array[sum_index] != 0.0:
                for j in range(3):
                    coord_array[coord_index + j] += sum_array[sum_index] * nu.points[pt_index].co[j]
            sum_index += 1

        coord_index += stride
        u += ustep

    return coord_array

if __name__ == "__main__":
    curve = bpy.data.curves['NurbsCurve']
    nu = curve.splines[0]
    resolution = (curve.render_resolution_u if curve.render_resolution_u else
                  curve.resolution_u)
    coord_array = nurb_make_curve(nu, resolution, 3)

    verts = (mathutils.Vector(coord_array[i: i + 3])
                for i in range(0, len(coord_array), 3))

    mesh = bpy.data.objects['Cube'].data
    bm = bmesh.new()

    prev = bm.verts.new(next(verts))
    for v in verts:
        current = bm.verts.new(v)
        bm.edges.new((prev, current))
        prev = current

    bm.to_mesh(mesh)
    bm.free()

    for area in bpy.context.screen.areas:
        if area.type == "VIEW_3D":
            area.tag_redraw()


Smoother shadows in Blender 2.8 (EEVEE) So recently I've been really diving into Blender's 2.8 beta, and most importantly EEVEE render engine, and I can't seem to get around these nasty looking shadows. is there a feature I'm missing?

Yea... shadows are a bit complicated to get right with real time graphics. It can get better but not perfect.

You can try if the Soft Shadow option will help your scene. The viewport will be sluggish with it on...


Need to get a 360 view of the object using cameras I need to render an object and get a 360 degree view. I plan to do this by taking pictures from atleast 36 cameras, at 10 degree separation to give a 360 degree view.

Since I have several objects, I dont want to this manually. I am thinking to write a script to do it.

Is there any better alternative to do it, other than writing a script? Some way if I can do it manually in a much faster way?

Thanks.

Animate a single camera

Parent your camera to an empty placed in the rotation pivot point.

Now the camera should follow the rotation of his parent object using its origin as pivot.

Than insert two keyframe to the empty's Z-rotation channel in 0,0 and in 36,360 to animate the rotation through time.

Remember to set the interpolation mode of your keyframes to linear if you want a constant angular velocity and to set the final render frame range to 35 as the 36th is the same as the first.

Set png, jpeg ... an image, non video, format in the output tab and than pressing Render Animation button you'll get each frame rendered individually.

Note: if it is suitable for your scene, you can also think about rotating the object(s), instead of the camera.


Rendering multi-layer EXR using File Output node in Python I'm writing a multi-view synthetic dataset generator and I want to save my rendered images as multi-layer EXR. I have a basic Python script that loads a template file with the compositing nodes below, append an object and renders from different views by varying the camera position.
When I render a scene in Blender, I get the desired result: a multi-layer EXR image with denoised colors, raw normals and clipped depths. However, I cannot find a way to render to the File Output node in Python, since scene.render.filepath is different than nodes['File Output'].base_path. When I call bpy.ops.render.render(write_still=True), I get a multi-layer EXR that essentially ignores my output node and just uses the value in Output Properties. This is true even if I remove the denoising node.
Is there any way to render through the File Output node in Python? Is my Composite node actually correct? I need compositing because I want to use the denoiser to reduce render times. Both scene.use_nodes and scene.render.use_compositing are set to True in my code.

In order to change the path of the output node you would have to set OutputNode.base_path. Make sure RenderSettings.use_compositing as well as Scene.use_nodes is enabled. Tested against the following node setup successfully:

import bpy, os

C = bpy.context

# Enable Post Processing and Use Nodes
C.scene.render.use_compositing = True
C.scene.use_nodes = True

# Get the File Output Node by name
out = C.scene.node_tree.nodes.get("File Output")

if out:
    # Set the output path of the node based
    # on the regular path of the output
    out_dir = os.path.dirname(C.scene.render.filepath)
    out.base_path = os.path.join(out_dir, "multilayer_")
    # Call the render operator
    bpy.ops.render.render(write_still=True)

Related: How to properly connect the Denoise node in Compositor?

Rendering in headless mode works as well:
./Blender -b file.blend -P script.py

Layer Contact Sheet node in Natron


How to rotate a gradient in the node editor? How do I rotate a 90% gradient in the node editor without rotating the object
(see attached picture). Can I do this in the space properties editor or I probably need to add another node?

All I want to do here is to keep the colours exactly the same, but 90% rotated in horizontal direction.

You use the Mapping Node, add it with Shift-A>Vector>Mapping. Don't forget to add the texture cordinate into the mapping node, it will not work otherwise.

You will then need to tweak the Y and Z values. To get 90o You will need to set the Y one to 90o

Here is it at work:


Scaling on X axis changes XY axis angles Change basic cube to a board shape, Z=.1, X=8, Y=.4. Edit mode; grab back left 2 vertices along X axis for a 60 degree angle on the left side of the board. Select all vertices, and do Mesh - Symmetrize - -X to +X. Now the other side looks great, too. Duplicate object. Scale smaller only on the X axis. Results is the 60 degree angle is now less than 60 degrees.

Why? Why didn't it make a shorter board with 60 degree angles on each end? Why did it not scale the back vertices the same distance as the front vertices? Is there a way to make it scale both the back and front vertices at the same time the same distance along the X, (or any), axis?

I tried "Delta Scaling" and got the same results. It seems to apply a percentage of distance, instead of the exact distances I provide it, thus distorting the shape.In other words, (and using different figures ... not the ones above), a 1 meter box with the front left at 1 meter, but the back changed to .8 meters, when scaled from 1 meter to .8 meters will take 20% off the length of the front, and 20% off the length of the back, instead of taking .2 meters off of both, as expected.

These angles don't change when the entire object is scaled, (vs. just one axis), using the Scale command, but it does when entering the exact values into the Transform tab, where one axis at a time has to be entered. Why would it do it differently for a single axis?

EDIT

It was wrong of me to expect someone to build this to see what I mean, so I made some screen shots:

As Mr Zak has said: if you scale a trapezoid board lengthwise, the angle of the skew end is modified. Would it perhaps be possible to use the Boolean modifier to cut the ends exactly?


Archipack Tools Location I created a simple wall in blender using Archipack but any time I change it, height etc, it deletes all my windows,  A little reading indicates that I must make it "safe to edit".

"In order to prevent any parameter edit and get a “safe to edit by hand” non-archipack aware mesh, use either “selected” or “all” found in Archipack Tools -> Kill parameters."

But nowhere does anything say WHERE the Archipack Tools are to find this option.

https://gyazo.com/c765953ad916dfdbd2305533760e194c

It's not in my right-click where I managed to get Loops tools to show up once.  It's not down the side with the Archipack - all I get there is the Material and the wall itself with its details.

(The answer below says that it should be in the side menu accessible by pressing N.  I don't have "Tools".  Extended Tools is from a Modeling Cloth add-on.)

In free version you must remove archipack parameters using python console.
Take a look at custom properties in mesh tab, you'll find the name of the property to remove. (for wall it is archipack_wall2)

Select your wall, then in python interactive console, enter

C.active_object.data.archipack_wall2.clear()


Problem with scaling uv's to tile textures at the right size Using cycles don't understand how to scale my uv so that it looks right on the model but remains small enough to fit in the uveditor image so i can bake it properly. The texture image is bricks and is about 500x500. Im using an image size of 4096x4096 in the uveditor window.

I have to scale the uv up so large to make the bricks look right that it's way to big to fit in the image size i want to bake at. Maybe my texture is too large or maybe cycles isn't the best way to do this?

Here are some pictures

Here is what the uvs look like right now

Now i scale the uvs up to make the bricks look right on the model

And this is where im stuck I want to bake a texture map here but the uvs are much too large to fit in the image at this size? Do I have to just increase
the size of the image or find a smaller texture image? Seems like there would
be a way to adjust the texture image size or tiling so that you dont have to scale the uv so big to make it look the way you want but instead decrease the size of the texture. Does something like this exist or is there another answer im over looking?

I think what you might be really looking for is using a different set of UVs to bake and a different set to map your source texture. This is a cleaner solution that will allow you more flexibility later on, and will also work nicely if you want to use texture atlases (bake many objects to one large texture).

This way you can scale the brick UVs without affecting the UVs used for baking. It's in Properties panel > Object Data tab > UV Maps > [+] button. You can have one UV set for the bricks ("brick uvs") and one for baking ("baking uvs"). Set the "baking uvs" as default for rendering (camera icon).

Then in Node Editor, instead of using the Input > Texture Coordinate node's UV output as you are now (this only uses one default UV layout) you can choose Input > UV Map, this lets you choose which UV layout you want to get your UVs from - pick "brick uvs" as input for your texture.

If you do this correctly you should be able to freely adjust the UVs for the bricks without affecting the UVs you use for baking.

Update: see this file for an example http://www.pasteall.org/blend/38727


The pixels are tearing after rendering. What to do? The pixels are tearing after rendering. What to do?

I think you may have the shading for that object set to 'Flat'.  In the 3D view press t to bring up the Tool Shelf and find shading (under tools).  Click on 'Smooth'.  See if that changes the render.

eh five


Approaching vertex groups with Python I want to approach two vertex groups belonging to two different objects, making sure that these objects are close together.
How can I do that scripting?

Thank you so much!

Given an object ob, you can access its mesh at ob.data, and its vertices at ob.data.vertices. The vertex groups are defined on the object as well, at ob.vertex_groups. Each vertex group has a weight() function you can call to get the weight of a vertex.

vg0 = ob.vertex_groups[0]
for index, vertex in enumerate(ob.data.vertices):
    try:
        weight = vg0.weight(index)
    except RuntimeError:
        # Raised when the vertex is not part of the group
        weight = 0.0

    print('Vertex #%d at %s has weight %f' % (index, vertex.co, weight))

For efficient distance queries (from a point in space to a mesh) you can use the BVHTree module. This may work faster than trying to compute the distance between every point of one mesh to every other point on the other.


Weird export noise after appending object I have a planet created in one blender file [A], which I am appending to another blender file [B]. The planet in file A renders beautifuly, while in file B, the render is noisy.

I have checked and can confirm that all Render, Output and View Layer options are set the same in both files. Besides the planet itself, the cameras and lights were also appended, so these should be the same as well.

I am using blender 2.8 & Cycles with both the files, rendering both on GPU. Could anyone give me any hints on what could be causing the difference?

Source files

The reason for the noise are the other lights and objects in the scene that are placed inside the planet. That's probably not where they are supposed to be because they can't be seen, but they have impact on the rendering and cause more noise. If you move them to another scene or exclude them from rendering it will look just like before. If they are supposed to be placed there and remain visible, you will need to increase the render sample to reduce the noise or you could enable denoising in the view layer.

Disable rendering for problematic objects.

Problematic objects

Before

After