Can I "lock" movement of a vertex to certain angles? In many 2d art programs, the user can draw lines that are "locked" to certain angles, e.g. in MS Paint holding SHIFT draws only 45 or 90 degree lines.

Is there a similar function in Blender, so that I can move vertices on 45 degree lines?

I know how to move vertices so that they stay on an axis, but I want to be able to constrain the vertices to a line 45 degrees between two axes.

Constrain to Custom Transform Orientation

I usually create a simple object (e.g an empty, or a cube...), rotate its local axis and create a Custom Transform Orientation from it (Ctrl+Alt+Space).

  Custom transform orientations defined from objects use the local orientation of the object whereas those defined from selected mesh elements (vertices, edges, faces) use the normal orientation of the selection.

Once created, the orientation can be selected in the Transform Orientation menù and called with doublepressing the axis shortcut (e.g. GXX) to limitate the vertex movement along the choosen axis.


How to change shortcuts in 2.8 I'm new to Blender, I've been using it only for a couple of days. I first downloaded 2.79 and change some of the shortcuts. I've just discovered 2.8 and I want to change them aswell. However this is what shows up if I try to enter user preferences. Isn't it possible to change it yet?

Just got to the Keymap Tab, that is where the settings are now.


Is it possible to create a Voronoi RadialLine? I could make something similar to Swirl, but I want to make a line towards the center of each Voronoi!
Would it be possible for me to make it?

Current node configuration

I want the texture to look like this.

Here, working in Object Space. The Position output of the Voronoi node is the location of the feature point from which the attributes (distance, etc) of the local cell are measured. If you subtract it from the shading point, you get the vector from the feature point to the shading point .. a mini UV map for each cell, with its origin at the feature point.

If you Nornalize those coordinates, you get a measure of direction from the cell origin expressed as XY (all the points in the same direction from the cell origin will all have the same unit vector), so that can be used for radial effects. Here, the vector is used to look up into a Noise texture.

Edit: Working in 3D, and normalizing at every stage, effectively ensures all the points used in the direction calculations are projected onto the unit sphere, towards or away from its center:

..and so straight lines become arcs:

(but this will work only on a sphere, not on any curved surface, and, to work in Object Space, the origin of your sphere-object should be at its center)
Edit 2:
You can animate the effect by scaling the sphere onto which the feature-point is projected:

With this sort of result:

This is the simplest way. To get more specific effects, you may have to extract, say, the Normal Z to work with, which would be a bigger tree.


Animating materials for blinking effect I would like to animate objects in my scene so they appear to blink, each at a different time. I created a cycles material that mixes two shaders (one in non-blink mode, the other in blink mode), and I can set keyframes for the mix shader factor parameter. A couple of problems...

It seems like each blinking element needs its own copy of the blinking material, so I can change the keyframes so they have different on/off times. If I have 8 blinking elements, I need 8 materials, and I need to modify each one so they turn on/off at different times. Is there a more efficient way to animate multiple objects this way with fewer materials?

I want the blinking action to be repetitive, so I don't have to define many on/off keyframes in a long animation. AFAIK, I cannot use the graph editor and f-curves since node parameters don't appear in the editor. Is there a way to "loop" the blinking for a material? Edit: I discovered that I can add the mix shader/factor property to the "Keying Set", so it then appears in the dope sheet editor and graph editor. I can then add a f-curve modifier to it to make it repeat.

In this image, you can see one "comma" blinking on, and the others off. And you can see the material I'm using for it.

It's hacky, and annoying if you want to use it for its intended purpose, but you can animate (or drive) the Pass Index of an object, and access it through an Object Info Input node.

Using a setup like this..

In this example, the Pass Index of each object is animated cyclically, with step-wise interpolation, from 0 to 4. This can yield an sequence like the one below..

..with all the objects sharing the same material, and their cyclic Pass Index animations offset in the dope sheet.

Following stav's suggestion of a rearrangement, here's a version in which the Pass Index is not animated, but used to set the phase: the number of frames a color cycle is offset for the object bearing it. (See comments)

The 'Frame No.' and 'Cycle Period' nodes are both Input > Value nodes, with the value in  'Frame No.' keyframed with a linear interpolation to match the frame number of the animation. The Color Ramp will be swept in the number of frames in the 'Period' node. In this case, the Pass indices of the groups of objects are 0,4 and 8, to get a trailing 1-on, 2-off effect.


how to set musgrave to get something periodic? I would like to know if it's possible to get something periodic only through the parameters of the musgrave node with cycles.

sorry if my question isn't clear, here is an example of what I'm doing:

the brick texture node is periodic, I mean f(0)=f(2*pi) while the Musgrave texture gives something with a discontinuity. Honestly I don't think it's possible to solve this problem trough musgrave node in general case, because I guess it uses a pseudo random generator and when you code a such thing you search to avoid periodicity.

The reason for the 'join' in the resultant texture is due to the discontinuities (edges) in the mapping into texture space and the solution is to change your mapping to join the edges to make the musgrave continuous. In order to visualise this, consider how the polar coordinates are currently being mapped into texture space.
The polar mapping can be considered as having the following marked boundaries (ABCD) :

In 'texture space' the marked boundaries map to the edges of a square (or rectangular) region as follows :

Note how the point A in the radial texture maps to the edge A in texture space - effectively compressing the texture down to a point in the centre. Edge B is stretched around the circumference while C and D are at the discontinuity of the texture and correspond to opposite edges of the plane in texture space.
The discontinuity is caused by edges C and D not corresponding to the same region in texture space. Therefore, the solution is to change the mapping to wrap those edges around so that they do coincide - ie, change the mapping in texture space to a cylinder rather than a plane :

Now, crosing the C-D boundary in polar coordinates does not produce a discontinuity since the C-D boundary in texture space correspond to the same region.
To achieve this was can use the following nodes :

This takes the output from the Radial texture (which varies from 0.0 to 1.0 as the coordinate moves around the centre) and converts it to Y/Z coordinates around the circumference of the cylinder in texture space shown in the above diagram. Note that since 0.0 and 1.0 map to the same location the mapping becomes cyclic, thereby hiding the join.
To make this more versatile we can add in two offsets - one to offset along the axis of the cylinder (to allow the texture to be animated into/out-of the centre) and one to offset the 'rotation' - and one to adjust the radius of the cylinder, controlling the density of the texure around the centre point to produce the following material :

One limitation of using a Gradient texture is that the output is always between the range 0.0 and 1.0 - beyond a certain distance the output does not change. To address this we can simply replace the Gradient with maths nodes to calculate the distance directly (ie, sqrt(x^2 + y^2)).

This can produce the following result :

Blend file included


Is it possible to make reflections in (UP)BGE? I'm working on a game and would like to know is it possible to make a reflective surface for stuff like mirror and high rise windows (via textures).

The image is from LEGO: Marvel Superheroes how to I add reflections like they did on the Empire State Building, but in blender?

Information
Both UPBGE 0.2x and 0.3x both have internal, real-time reflections.
You can get the exact same result in BGE but you'll need to use an external shader script.
Blend File (in a 0.2x release)
https://blend-exchange.com/b/XjnaWgkE
Screenshot (in 0.2x)


How to change the snapping increment in different units? I would like to know how to change the increments used for snapping transforms.  This would be useful in a number of situations but my problem now is that when I change the units it does not scale the snapping increments to match.  So when holding down ctrl the cube snaps from here:

To here:

I would like it to snap to the 1 foot grid, or possibly any other amount I find useful.  It would also be nice to be able to change the rotation snap as well.

If you hold ⇧ Shift while snapping, then it will snap in smaller increments:

Or if you view from an aligned view such as top ortho (Numpad 7), the snapping increments will be equal to the grid subdivisions (which change with zoom level):


How to access render layers? I'm rendering static images in Blender under Windows 10 and I want to have all the render layers available for post-processing, etc.
My problem is that the render layers are available only so long as the .blend file remains open after the render; once I save the .blend file and close Blender, then re-open the same .blend file, the render layers are gone.

Image/Read Render Layers (CtrlR) does not recall them.

Output/Cache Result is enabled, and while I have an cache folder path defined, that folder yet remains empty.

Meanwhile ever since enabling Output/Cache Result my .blend files have grown from a few dozen MBs to half a gig each, so I'm assuming the render layers I'm seeking are buried somewhere in the .blend file, but again: How do I access them?

Render your image to OpenEXR MultiLayer format and save the image after rendering.

When saving the image, ensure you have the composite node connected and not a viewer node connected, or the layers will not write.

Doing this, you can open the image at any time for further post processing or grading by simply adding an image node, and you will have access to all the passes and render layers from the image.


How to select the entire set of images to put into the video editor I've seen videos on how all one has to do is press Ctrl + A to select an entire bunch of images to create/edit a movie in the VSE from images. However, that was in an older version then 2.77.

There has to be a better way to grab all of the images when adding strips/images in the video editing. I rendered 30 secs of video, taking 5 hours, and ending up with 900 images. When I went to add them all to the Add Image Strip section in the File Browser, Ctrl + A did not work. Selecting the first image then holding the shift button and clicking on the last image did not work, either.

Keying B for Box Select did not work properly because it does not drag through all of the images (it only selects the ones that you can see within the defined box).

Basically, what is the proper way to import all of the images at once into the video editor?

I can provide screenshots if you guys need them.

A, not Ctrl + A.

If you key A, it will select all the images in the folder that you have navigated to. If you key A again, it will deselect all of the images.


Where is python file for exporting DAE (collada) I found the .py file for one for exporting .obj, modified it, exported a cube and confirmed the changes (after reloading blender). Good, I have a starting point to write a script to export to my own personal 3d file format. My format is in XML so starting from the collada (.dae) script would make things far easier.

But I can't find it in with the other scripts (or anywhere else). I notice in Blender it says "Collada (Default)(.dae)" where the others don't say "default"... Is there such a script or does the "default" part mean its compiled in with blender?

The collada import/export functionality is provided through c++ source code included with blender that links to an external opencollada library.

If you want a python example for collada have a look at the better collada exporter it is part of the godot project as is meant to be better than the default blender collada exporter.


Create a cloth with two control points at each end? [video example included] See video for example of problem: Watch on YouTube

I'm trying to create a cloth string object (made of a mesh with just edges and vertices. No faces) that can be controlled by two end points. Best I could find in my research, hooking both end vertices to hooks (empties being the hook point) seemed like the best option. BUT, when I playback the simulation, the hook points only affect the one vertex they're hooked to; they don't affect the rest of the string.

Is there a way I can achieve this effect of a cloth string that's controlled by two end points? Is there a better way than what I'm doing?

Maybe this file can point you the right way:

For simulation these kind of hairy strings, Soft Body Simulation is great. It's relatively fast to calculate, and it works on mesh edges by definition. In the sample scene, I just created an edge and subdivided it a few times. Then I added both end vertices to a group called Pinning, and created a hook for each end.

After that, I added a Soft Body Simulation to it, setting the Goal like this:

So very stiff, high damping, Goal Strength to 1 (so the end points will stick to the hooks), and choosing the Pinning Group to define the goal. When playing the animation, you get this:


Apply button is greyed out in subdivision modifier how to fixe this? The subdivision modifier apply button is grayed out, therefore I am unable to apply. Below is the screenshot for clarification.

I managed to solve the issue by selecting the object on which I have to apply sub div modifier, then I "make the single user object and data".

The problem was that I had created a Duplicated Linked object Alt + D instead of a Duplicate Object Shift + D.
For those who does not know the difference between Duplicated Linked Object Alt + D and Duplicate Object Shift D below is the explanation:

The  duplicate linked  Alt +D works as an instance. Meaning it creates the instance copy of the original model, and if I make changes on one model it will affect both.

The duplicate object Shift + D makes a complete separate copy of the object. Meaning that any changes to it will not affect the original model, as it is a completely as separate object.


Try to export as json, blender throws this error: AttributeErrpr: 'Image' object has no attribute 'file_path_from_user' Hey guys,
I recently started working with blender for a game which will be programmed in three.js. Therefore I export my model as a json file. As I load textures from png files in it, blender throws an error pictured in the photo.
Thanks for every advice!

You need to update your version of blender. The image.filepath_from_user() was added to blender in 2.70 and you are using 2.69

This answer appears to include an up to date source for blender.

If you are using steam you can also install blender from there.


How do (which) things need to be bend and twisted here? This is more a general 3D modeling problem I came along while replicating things to figure out what is possible using Blender and what is not. This problem can probably easily be solved, but I am simply not figuring out how. I'd like to get #1, but #2 is more or less the best result I come up with... Maybe someone can tell me how things need to be bend and twisted here.

(There is a .blend file at the bottom if someone wants to chime in...)

Your object is not vertical :

If you modelize your object like this :

And add a Simple Deform modifier like this :

You will obtain this :

Does it help ?


Camera renders blurry image in darker part of scene I have a school project for which I need to make a small movie in Blender. All the animations are fine, but the moment my camera gets into the airduct I made, the preview gets all dark and blurry. I tried to set the FOV but it didn't work.
In the room before the camera works fine. I also added quite a handful of lights so I don't think it might be the problem.

Anyway here is the render preview. There is a point light just above the cube.

It seems that your focus point for the camera is attatched to some other object in the scene, so that when you get into the air duct, it is all blurry. There are several ways to fix this, the best one is to add an empty (Shift+A > Empty > Plain Axis). Name it Camera Focus or something descriptive so you can find it easily later.

Now select the camera and go to Camera Settings > Depth of Field and select your empty.

You can now animate the position of the empty, and the camera will automatically focus on that point, so you can have it positioned near where you want to focus while it is still in the room, and then animate it to move into the air duct.

If your preview image is still pixelated like that, try rendering at a higher sample count.


Particles converted but materials are linked I converted a particle system with sphere objects.
I want to individually change the colors of objects.
It is linked, when changing the color of an instanced object it changes all others to that color.
Help?

A quick workaround would be to utilize the Random output of a Object Info node in the shader graph, plugging it into a Hue/Saturation node input. In this way you could randomly vary the hue or the saturation or both. I personally utilize a Bright/Contrast node in between to get the hues I need.

But I think the real issues is to be found in where exactly this material information is stored. You can conveniently decide weather to store it in mesh data or in object data opting in this drop-down menu in the material property panel.

If materials are assigned in mesh data ("Data") every instance (meaning linked copy) of that object will have the those materials and if you change them they will change over all objects. Otherwise if materials are stored in the object data-block different linked object will be able to have different materials.
If you prefer proceeding this way you'll have to change this property before converting the particle system, in the original sphere.


Weird gaps in mask texture painting I'm trying to paint a terrain mesh with multiple textures using a node setup involving masks, the problem is... Something is not letting me paint on these parts (where the rock texture is) The plains leave weird gaps, the mountains and coasts I can't paint at all. Any Ideas? This is driving me crazy.

Uf ...

Apply Scale Ctrl+A ... fixed painting, brush skipped all parts with even minimum slope.

Since painting worked fine without Displacement modifier I was just curious why you used Strength 3000 for such contrast displace map (usually 1 is more than enough). Than I saw your Scale ratio Terrain 7500 / 4500 / 1.

If you try to set Scale 1/1/1, you can see why brush could not handle that :)
Faces are too steep in original ratio. Brush probably thinks faces are on side or squeezed in such a small place to detect or what ever. Scale ratio cause quite a lot of issues in general.

BTW - the similar extreme is use for mesh as a one face for such kind of subdivision, I would suggest subdivide id few times in edit mode (first Ctrl+R to add loopcut in a midle so subdivision faces are square, not rectangle)


How to make twisted strips How can I make the twisted red and white strips on the cylinder? I have taken the cylinder and loop cut but how to twist the cylinder and get that spiral selection.

Create a circle and go into edit mode. I adjusted the number of vertices to 16.

In the Properties Panel, add a Screw Modifier to the object. Set the axis to Z and raise the Screw property until the proportions are correct.Apply the modifier if you wish.

In face selection mode, Alt+rightclick on the face loops and assign them a new material.


Difference between the vortex and the wind force In a recent answer, stacker stated that the vortex is better then the wind force for cloth simulations.
What is the difference between the vortex and the wind? How does each relate to cloth simulations?

This was for the use case when the cloth is pinned. Animating a flag (with a loose end) a wind force works well.

By using a wind force the sail in the scene stopped fluttering after a few frames like blown up. Which is probably more realistic if you have steady wind from one direction.

Since I wanted it wobble I tested a vortex which  behaves more dynamically, more like a fan where the airflow changes it's strength and also allows the canvas to retract.


Rigging Issue, that is effecting animation I notice whenever I make a model and rig it that whenever I try to rotate the head. Which is the very first bone I make, it rotates the whole model instead of just the head. I went through all the weight paint and made sure it was only the head painted but this did not fix it. Does anyone have an idea of what it is?

Could use more info.  And if you can, can you share the .blend file?  Or just delete the armature and copy this guy: https://www.youtube.com/watch?v=cGvalWG8HBU


Is there any way to offset curve and filling space between with mesh to make a ring? I'm trying to make some curved rings in Blender with realistic height and width and look as shown below. Can anyone suggest a way to do it?

I would recommend using the Taurus mesh to start with. You then can select the top and bottom ring of the Taurus to make it look like this.
I Created more rings using cntl+r so I could use smaller sections.
This isn't to complicated but the tutorials by: Blender Guru might help as they go over the basics and he makes a lot of objects. If you need tutorials that is.
https://www.youtube.com/watch?v=JYj6e-72RDs&index=2&list=PLjEaoINr3zgHs8uzT3yqe4iHGfkCmMJ0P
Final Image(I changed two or small things but this isn't really detailed so it isn't attractive.)
Edit: I forgot to say then you can extrude from a plane and make it connect off of multiple extrudes.


Is there a node that can separate colors by scale? Is there a node that can separate colors by scale?
I tried separate xyz but it didn't work.
Example:

What I get:

The geometry node does what you want. The geometry node looks like this:

And has a vector output for position. The separate xyz node can be connected to that and it'll isolate the z component of the vector. Then you can use a math node set to greater than and a couple of mixRGB nodes to combine colors.
What's a vector and why does this work?
Vectors are extremely important for anything procedural in blender. Simply, a vector is a combination of 3 components. In this case these components are x, y, and z. A color (having r, g, and b components) can also be considered a vector. The geometry node outputs a vector which maps x, y, and z for every point on the mesh. It's difficult to work with a vector, though, because it's hard to deal with multiple things at once. It's much easier to work with a scalar, or a single component of the vector. The separate x, y, z node separates a position vector into 3 scalars which you can modify with normal math nodes. There's also a vector math node which can be used in this scenario, but it's not as easy to conceptualize.
Here's the whole node setup which outputs a 1 for every point above 0.5 on the z axis:


How to generate a deformed mesh based on applied texture To make bump effect it is easily done by applying a proper texture and adjusting displace parameter to a given good resolution mesh. However it will be seen only in render. Our question is how to actually deform a mesh by applying a texture?

Apparently as seen above, Blender does deformation of the mesh, but where is the deformed mesh?

You can use a Displace Modifier to do this.

From the wiki:

  The Displace modifier displaces vertices in a mesh based on the intensity of a texture. Either procedural or image textures can be used. The displacement can be along a particular local axis, along the vertex normal, or the separate RGB components of the texture can be used to displace vertices in the local X, Y and Z directions simultaneously.

For example:


Why I got a bad result image background shadow? I am making this model but I got a bad final image when I used background and casted shadow on it. I think that I did everything well in materials and scene nodes. I attached blender file. that nodes I did is just to have a shadow on table.

It appears that the problem is due to the Alpha Threshold of the Render Layer affecting the Object Index.

The Alpha Threshold controls whether transparent objects in the scene register on certain passes of the render layer.

Anything greater than or equal to the Alpha Threshold will be included in that pass, anything less than the threshold will not. In your example scene the Alpha Threshold is set to 0.5 and this results in the Object Index pass from not being consistently present. By reducing the threshold (ie, to 0.2 in the screenshot below), the Object Index is included correctly and the compositor is able to process the index correctly.


Apply physics to multiple objects using script I'm trying to apply physics properties to multiple objects using following script:

for obj in bpy.data.objects:
     bpy.ops.rigidbody.object_add(type='ACTIVE')

but physics is applied only to the last object. Do you have any suggestions? I know how to copy physics using 'Copy from Active' but i need script.

Setup one object as template then the following code will set the template object as active object and select all objects. Finally bpy.ops.rigidbody.object_settings_copy() copies all attributes as the 'Copy from Active' button would do.

import bpy

scene = bpy.context.scene
scene.objects.active = bpy.data.objects["template"]
for obj in scene.objects:
    if obj.type == 'MESH':
        obj.select = True

#bpy.ops.object.constraints_copy()
bpy.ops.rigidbody.object_settings_copy()


How to append a bezier curve from another .blend When I try to append nothing happens. Tried 2.79, 2.81 and the latest 2.82 I just downloaded 5 minutes ago.

Steps:
1. start blender
2. try append a bezier curve called hhh_hhh (datablock is named hhh_ggg) from the file I added to this post
3. nothing happens, what am I doing wrong?

Here is a sample file you can try append a bezier curve from:
https://we.tl/t-GWCIAgFzgB

So the problem was because the author appended Curve data-block and can be solved by taking the correct curve object from Object data-block, as pointed to a similar question in the comment.


How to install Sun Path addon (Blender 2.8x)? Tutorial for version 2.63 that works with a sunpath package:
https://www.youtube.com/watch?v=lsovmL9hv80
Sunpath version that works with 2.71 here: https://www.ods-engineering.com/tools/ods-studio/download/#4
Python package for performing high-precision astronomy computations here:
https://pypi.org/project/pyephem/

Q: How to install the Sun Path addon in newer versions of Blender?

Manage to find the python scripts here:
https://github.com/ccamara/blender-architecture-scripts/tree/master/addons/sun_position


Why does applying smoothness to a mesh reduce the number of vertices? I was playing around with Blender meshes and importing them into Unity when I made an interesting discovery. In the tool shelf, under "Shading", there is a Smooth button and a Flat button. Now I already knew about these buttons. What I didn't know is that when I apply Smooth to an object and import the object into Unity, the object has less vertices than it would have had if it was set to Flat (which is the default).

I was always under the impression that applying smoothness to an object would increase the number of vertices. But it seems to be doing the opposite. This is great because I can now replace many of the objects in my game with their smoother counterparts from Blender, which should significantly reduce the number of vertices in my scene and that would be good for optimizing.

The shading options (Smooth and Flat) refer to how the vertex normals are calculated, which then essentially tells the renderer how to bounce light off edges.

For smooth shading, the vertex normals are calculated by averaging each face normal that they belong to. The face normal is simply the direction perpendicular to face, on the outward side.

For flat shading, each vertex can be considered to have multiple normals, one for each face it is part of, in the direction of the face. Many programs represent this by splitting each vertex into multiple vertices, one for each adjacent face. This is most likely what you are seeing in Unity, as that is most likely what the renderer in Unity is doing.

There is another kind of 'smoothing' called subdivision, which as its name suggests, splits faces into smaller faces. This obviously adds vertices, and is probably where you got the idea that smoothing adds vertices.


How do I anti-alias an image with a transparent background without getting semi transparent pixels? This question has already been asked and answered here:

how do I create a sprite with hard (aliased) edges, but still be antialiased inside?

But this does not work for me. I think something has been left out.

I would have simply commented on that question, but I need 50 reputation.

The problem was Full Sample. This needs to be left unchecked.


How to repeat an image which uses Sphere mapping in Cycles Cycles now supports Sphere mapping for image textures - but how do I increase the scale of the image (so that it gets repeated)?

If I use a mapping node and increase the scale like I normally would, the texture gets all distorted.

Both the cube and the sphere are using the same image texture, with a Mapping node between the Texture Coordinate and Image Texture nodes. The Scale of the Mapping node is animated from 1.0 to 5.0. The cube's texture is using UVs with the image node using the default 'Flat' projection. The sphere's texture is using Generated coordinates with the image node's projection set to 'Sphere' (as in the screenshots below).

Scale = 1:

Scale = 2.5:

This is the desired result, which was made by manually repeating the image texture in Gimp:

I would also like to be able to scale it only on the X-axis so that it does not appear so stretched in the middle.

The problem is that the texture coordinates node is not outputting a UV coordinates it is a genereted 3D coordinates ranging from 0 to on each axis ( X,Y and Z ) and since the Sphere mapping is not linear like the cube , scaling these coordinates will not get the desired result.
instead of manipilating the 3D generated coordinates I extracted the UV coordinates from the sphere projection and used this as a UV coordinates for the real image which is mapped using Flat projection.
extracting the UV coordinates from the Sphere projection is done by two gradiant image texture ( black to white direction is the same as the U and V axis direction )

here is the node setup :

Now you can manipulate the texture mapping as you want :

Note : you can eliminate the need for two image texture nodes in the first stage by using one image with  red gradient ( horizontal) and a green gradient ( vertical ) in one image

first image : used for U axis

second image : used for the V axis


Realistic Human Skin in Cycles I have a character with some strange textures, and I don't know how to use them. For example for face i have these files:

face_D.tga
face_L.tga
face_M.tga
face_N.tga
face_S.tga

Now, I need a node map, so I can put everything in it's right place, but I have no idea about what I need to do, because I'm too new to Blender and Material Nodes.
I want to use all of these files to create a realistic human skin material.

Here's a shot at what your tree might look like, as corrected by @Jachym.

Introduce the branches one at a time,starting with Diffuse color on its own.
Unlike the illustration, forget the AO branch to begin with. Plug the Diffuse map straight into the Base Color.
Then check the Normal. If you want to get a better view, you can temporarily unplug the Diffuse map to see  the effect on a white object.
When that's OK, plug the Diffuse back in, and go for the Shininess.
Now go for the Subsurface Scattering. Split the Diffuse, and plug it into Subsurface Color too.
Plug the 'M' map into the Subsurface Radius.
Depending on the size of your model, adjust the 'Subsurface' slider down. (I would recommend scaling the model in Edit mode, to life-size, in whatever units your scene is in.) Plugged in as shown, the RGB values in the red 'M' map represent the distances R,G and B are allowed to scatter through the object, in Blender Units, before attenuating to 0. Those distances are then multiplied by the value in the 'Subsurface' slider.

This is hard to check without the file.. but I hope it heads in the right direction.

If you really need the AO, (the lighting shouldn't really need faking..), use an RGB Mix node set to 'Multiply' or 'Overlay' to mix it with the Diffuse map on the way into the Base Color.

There's every chance @Jachym will have to correct me again :)


Where is the recalculate normals button? I really need that [ RECALCULATE ] button, from my tutorial. It should be here:

But it's missing:

What did i do wrong? The Tutorial said, select the whole Mesh with [a], so i did.. But the button is not there!

Its in the shading/uv tab of the tools panel, on the left. You can also use Ctrl-N to perform the action. If you can't find a button or remember the shortcut, you can use the Spacebar menu to try searching for it


Strange Twist in Bezier Curve I am trying to add a simple 2G timing belt to a pair of pulleys.  I am using a bezier curve with some modifiers to replicate a belt tooth long it.  Things seem to be going ok, but for some reason, there is a twist at the top of the curve and I cannot figure it out.  Specifically, the teeth are pointing out at the top and pointing inward (the correct way) along the rest of the curve.  Additionally, at the transitions to the top, there is a violent twist?  A picture is worth a 1,000 words right:

Can somebody help me out here so that all of the teeth are pointing to the inside along the entire path?

Blender 2.90.0 (2.90.0 2020-07-30) on MacOS 10.15.5

Compare to the default setting of curves, twist method was changed. I'm not very sure what's this setting doing. But set it back to Minimum will solve the problem.

Reply to the comment
Select all the points than set the Mean Tilt to 180 degree.
(Actually you can control the rotation of any point one by one. Just choose the points you want to twist than use the Tilt button from the left sidebar. Than click and drag the yellow circle.)


How can I customize the Render Button in the Render GUI to execute a custom script I am trying to customize the blender GUI so that I can customize the Render button in the GUI to call a customer script as opposed to the default option.

I would like to know if there is a way to achieve the same and would appreciate if someone can point me to the pointers for the same.

The easiest way is to right click on the render button (or any UI item) and select Edit Source. You will see a message in the info header to 'See properties_render.py in the text editor'. Simply change one of your windows to a text editor and select the properties_render.py from the text block list. You will find the cursor located on the line used for the UI item you selected.

If you search the blender python api documentation for UILayout you will find the operator function used there takes the operator name as the first argument. So you would change "render.render" to the name of the operator you want to use.

Remember to save the edited text block back to the text file. Also this file will be replaced with each blender upgrade so creating an addon may be a wiser choice for something you plan to keep using.


Blender 2.8 Grease Pencil disable x-ray How can I disable the X-Ray effect of grease pencil (aka Annotations), so that what I write on a face of a mesh cannot be seen when that face is hidden? Is it possible?

I had the exact same issue until I realized I shouldn't use the Annotation tool but a real grease pencil layer.

Add > grease pencil > Blank

You then switch from Object Mode to Draw Mode and switch the Stroke placement from Origin to Surface


No Viewfinder Box / Blender renders out entire scene So very new here. I must have hit something and now there is no camera viewfinder, and blender wants to render out the entire scene including objects that I have hidden.

Rendered image attached.

Few things come to mind:

You may have pressed / and entered local view. This will allow you to only view (in the viewport) the objects you had selected when you pressed the key. This does not affect renders or the hidden/shown state of objects.

If you've hidden the objects by pressing the "eye" icon, you've only hidden the objects from the viewport. If you pres the Filter button which looks like a funnel, you can see all the restriction toggles.

If you enable the icon with the camera, you'll see that camera icon next to each object. Toggling that will show/hide an object from the render.


How may I establish a render farm over WAN? I'm using the blender network render plugin in the official plugin list. I have a few computers throughout the internet(WAN) that I am able to render on. Assuming I can get network connectivity(forwarding ports and other considerations), what kind of bandwidth requirements are there?

I have mainly procedural materials of 40 or so nodes, and only one scene. The .blend file is approximately 9MB. Will this file need to be sent once for each render slave, and each frame sent back? Or will more communication be needed that is not negligible? (I'm not using baked or cached simulations)

I'm assuming bursts of high activity when sending and receiving frames. Would this be true in practice? Or would other bandwidth considerations need to be taken?

The bandwidth requirement are highly dependent on your scene. With the official Network Renderer, you will need enough bandwidth to copy the scene file over to the each of the slaves (once), and then get the rendered images back (every frame). The communication overhead is negligible.


How can I change rotating mode? I have got a problem with rotating. I want to rotate a camera and it is rotating around the world origin, when I want to rotate it 'normally'.
Also when I want to scale an object it is moving from world origin... How can I change it?
I hope the question is understable.

Your pivot point is set to the 3D Cursor, to change that you either need to press . and select "Median Point" to set it back to blender's default pivot point. or you can find the same options on the top of your 3D viewport as shown below:


How to stop objects moving together I've added a sphere into my project and it moves with the other object in my project!

How can I stop this? Now and in the future, as I'm relatively new to Blender.

The circle and the different movement speed tells me that you have proportional editing enabled by accident. In the old days, this was only available in Edit Mode for meshes, now it's available in many places. You are using it in Object Mode.

Blender goes through your selected objects and checks whether any other objects are within this sphere (shown as a circle) put around all your selected Object Origins, in your case a cylinder. If it finds any, they get moved, rotated or scaled proportionally with your selection depending on what you do. Shortcut is O. You can disable it here:

https://docs.blender.org/manual/en/dev/editors/3dview/object/editing/transform/control/proportional_edit.html


DirectX vs. OpenGL normal maps I'm curious which type of normal map works better? DirectX or OpenGL normal maps? Which one to use for cycles and eevee?

Only DirectX applications use DX normal maps. And DirectX run only under Windows mainly due to license. For everything else you need to use OpenGL. For sure is good always check documentation.

On image below you can find simple way how to convert DX to OpenGL (or OpenGL to DX)


Create a depression in a circle I am new to blender and trying to create an iPhone like model. This is what I have done so far:

Sorry about the black background I don't know why it exists :/

I have successfully added:

The white body (mesh cube) of the iPhone.
The blue screen as a mesh plane.
The volume button (mesh cube) on the right.

I want to create a circular button on the iPhone body near the bottom. As you can see in this image:

the button is slightly depressed towards the bottom. I want to achieve similar effects.

So, I first inserted a Bezier curve and then converted it to mesh object using Alt+C. I have tried using Extrude (both individual and region) but they didn't work. This is my wireframe (without extrude):

My question:

  Please explain how to depress the circle towards the bottom in the z-index?

Solution: Better way, Easier way

Start with a plane and add loops around the general square area that will contain the button.
Add additional loops to subdivide the square.  These loops will provide additional vertices for our circular button.
Use Inset Polygon to create a smaller square area.  Use LoopTools Circle to turn the insetted quads into a perfect circle.
Move the central vertex of the circle down in the Z-axis.  This will create the depression.
Add definition by creating further edge loops around the circle.
Add a Subdivision Surface modifier and your done.

The resulting topology is all quads and neatly subdivides.


Texturing Bricks and Applying Them I have a blender project that I need to complete and here's what I want to achieve. I need to copy a group of bricks so that they are opposite each other and I want to texture them blue. I would like to know the simplest method to copy all the bricks and paste them to the other side and texture them.

You can try adding a mirror modifier. If that's not working, you have a couple options:

Make sure you're mirroring on the right axis.

Make sure your object is centered. push shift+s> select "cursor to center." Then, in the tools panel (object mode) go to "set origin">"Origin to 3d cursor."

If you don't want to use a mirror modifier, you can select the object and push shift+d to duplicate it, then move it where you want.

As far as texturing goes, that really depends on what exactly you want done. I'd recommend doing a google search for BlenderGuru's texturing videos, I'm sure you will find them insightful.


keyframe multiple active objects I want to keyframe multiple duplicate objects created from a active rigid object. I have created keyframes for each duplicate object at different frames of timeline, lets say at frame 10, 50, 90, etc. When the animation is played all duplicate objects appeared at frame 1, instead of appearing at their respective frames i.e. 10, 50, 90, etc.
Does anyone know how to resolve this issue?

When you duplicate object, I think, you keep linked Animation Data. So if objects share same animation data, you can not create different animations for objects. If that so, click Object -> Relations -> Make Single user -> Object Animation

If you want to duplicate the animation data when duplicating objects, make sure that this checkbox is checked:


Technique to model a 3D button (Image attached) I've got this image from a skeuomorphic calculator interface and want to model it in Blender.

I was able to create this within minutes, with the following technique : Subdividing a cube multiple times and pull the face in the middle upwards with proportional editing on. Then I lowered the circle for proportional editing and lowered the middle face again.

The outcome is not exactly what I want, since the topology is round and not squared with rounded borders and stuff like this. So I was wondering if someone knows a better technique to achieve this?

Here's the Text version of the Step-by-Step (please see Images below for visual reference of each step).

In Object Mode add a plane by hitting: Shift+A -> Plane.
Hit TAB to enter into Edit Mode.
Select all Vertices by hitting A. Hit Delete -> Only Faces.
Select all Vertices by hitting A. (**NOTE: Repeat the Next Steps 3 Times) Hit W -> S.
Add a circle mesh by hitting Shift+A -> Circle. Next scale it down by hitting S -> 0 -> . -> 5 -> Enter.

Ensure all Vertices are selected (A to toggle - you will probably have to hit this twice at this point), then hit W -> E, this will invoke the Bridge Edge Loops command to fill the gap between the rectangular mesh perimeter, and the inner circular mesh perimeter.

Hover your cursor over one of the newly created connection edges (eg. about the mid-point on an edge that spans from the perimeter plane to the perimeter circle) and hit Ctrl+R. Next move your mouse until you have the desired shape, then Left Mouse Click.

Refer to

for how to manipulate it afterwards.


Bounding box dimension in blender I am using dimensions to get the bounding box dimensions of the object.

me_ob = bpy.data.objects['myobj']
cor = me_ob.dimensions

When i construct a cube with those dimensions, the cube appears to be shifted along the z & y axis. It is good along the x axis.

I am creating the cube from blender wiki

At first i thought that it be be because of the arbitrary shape than the cube or a cuboid. For cube and cuboid, the center can be found out by dividing the sides into two. but for a arbitary shape it will not always be half. To validate it, i shifted the cube manually. It fits perfectly after this.

Why do we remove the shift ?

Create a cube at the origin point position of the object you took dimensions from. That should help to resolve your issue.


How can I quickly make two normals opposites? The best way I can really explain this is, in a 2D space, two lines are parallel when you can draw a perpendicular line between both of them. In a 3D space, if you have two surfaces that are facing each other exactly, you could draw a normal between them (except when put into function, since both objects have normals, one of them would have to be the opposite of the other, so they could face each other).

For example:

It's easy enough to do in rotations like that, but with rotations like this, it's not as easy:

I want to rotate the cone so its base is 'parallel in 3D' and facing the side of the cube. The thing is though, I need a fairly quick method of doing this because I need to do this many, many times.

If you know the 3D coordinates of both unit-length normals $\hat n_1$ and $\hat n_2$ -- both expressed in the same coordinate system (e.g. global), and you want to rotate the object owner of $\hat n_2$, you have to rotate around axis:

$$
\hat u = \hat n_1 \times \hat n_2
$$

by an angle

$$
\alpha = \pi - (\hat n_1 \cdot \hat n_2)
$$

In Python:

def rotateObjectSoNormalsOppose(obj, n1, n2):
    '''
    Rotate object so n2 is parallel and opposite to n1

    @param obj (bpy.type.Object) Object to rotate
    @param n1  (mathutils.Vector) Unit-left normal used as reference (in global coordinates)
    @param n2  (mathutils.Vector) Unit-left normal to rotate (in global coordinates)
    @return The rotated object
    '''
    # Compute axis of rotation
    u = n1.cross(n2)
    # Angle of rotation
    alpha = pi - acos(n1.dot(n2))
    # 3x3 rotation matrix
    rot = Matrix.Rotation(alpha, 3, u)

    # Get current orientation of object
    curr_orientation = obj.matrix_world
    # apply delta rotation to obtain the new orientation
    obj.matrix_world = curr_orientation @ rot.to_4x4()

    return obj

where rot is a 3x3 rotation matrix that will rotate the owner of $\hat n_2$ so that $\hat n'_2$ will be parallel but opposite to $\hat n_1$.


How To Animate A Superhero Zap Into His Super Suit In Blender I'm trying to animate a superhero zap into his super suit. I have two separate characters, the identity, and the superhero.

I want the costume of the superhero to crawl up the legs of the identity but I cant figure out a good way to do this in blender.

If you can find anything on the internet that may help me with something like this, please show me because I cannot find anything related to this.

I need it to look a little like Iron Man mixed with Miraculous Ladybug.

Concept art related to what I'm looking for...

My Characters I'm Using

I imagine something akin to this might be what you're after. Much more in the way the sparkles are formed and travel, plus more mesh building, e.g. to form a pair of large boots from the ground up, could be added to enhance the overall effect.

Combining this with @Wossname's answer would enhance things also.

The main objective of this answer however, that of re-clothing your character from the feet up, is to demonstrate another relatively simple method of achieving this in Blender.

The exercise is performed in Blender's 3D Window, (stage) using a 3D  model.  You can use the same technique just as well with flat 2D drawings instead. (textured 2D planes)

The model (or drawing) of the character in normal clothing is in layer one. The zap-dressed model/drawing in layer two.

The secret is to have both models/drawings with EXACTLY the same dimensions so no change apart from the clothing would be noticable.

Blender will do this by duplicating layer 1's model, and moving the copy to layer 2.

The duplicate would then be allotted it's own exclusive material slots which would be textured this time with the hero's costume. Additional mesh for the boots & gloves would be added in this layer also.

In the case of 2D drawings, the first drawing plane would be duplicated in layer 2, so you'd need to retexture that with a modified drawing showing our hero with new clothing.

To keep both drawn characters at exactly the same dimensions, both would probably need to be produced in the same application that drew it in the first place.

i.e. Create a second drawing layer by duplicating the first, then repainting the clothing onto the copied drawing.

You would have two drawings, one in each layer.

Export both as separate image files with which to texture the two 2D planes in Blender.

Now for the zap!

-=============-

Both layers would be included in the final render but layer 2's model or drawing wouldn't be visible initially.

An 'inviso' mask is used to do this in the second layer.

When the mask is slid upwards in the z axis, it would progressively unmask (reveal) the new clothing.

The original drawing would be masked in reverse.  i.e. another 'Inviso' mask in layer 1 would rise from the ground up and progressively hide the original drawing or 3D model.

Both masks rise together and at the same speed to -

a) From the feet up, progressively render as invisible, the normally dressed character.

b) From the feet up, progressively reveal the zap dressed character.

Once the first model is hidden it can be instantly disposed of.

Animating limbs during this process is no problem because when duplicating, the copy inherits the original's keyframes.  Synchronization is automatic -

Layer one's mask is positioned so it's top edge just overlaps Layer 2's mask lower edge so there would be no gap.

Sparkles (particles) could be added where the two planes meet.  This one is parented to the Layer 2's Inviso.  As it rises the view alignment changes so keyframed adjustments to the sparkle emitter's Z axis "location" will be necessary to correct this.

Alpha layering the final clip is also handy for making promos/demos. Inviso masks work just as well with this process.

Note how once alpha layered, our char can be sparkling into his uniform whilst placed 'physically' within this jpeg image, using (again) inviso masks, one for the chair, the other for the table to mask the shadow.

-==========-

Inviso Masks - (Edited - New link 22/March 2019)

For details on how to create these, click here - How to put a mask into 3d space

NOTE:  Inviso's will only work when rendering using "OpenGL". (Top left of window under "Render") PLUS everything must be deselected.  i.e. Press 'A' before viewing or rendering.  Also select "Only Render" in the 3D windows properties panel-->Display. (Press N)

-==========-

A Blend file for this answer isn't possible in it's present form for reasons of copyright, (The 3D model)

The char has been replaced with a cube etc.  To view it properly switch to the CAMERA VIEW.   You can download the modified Blend file here -


How can I transition between two shapes? What would be the best way to animate a smooth transition between a mostly normal hand and a large blade? (The blade is part of the arm.) Something like clayface or prototype?

I would recommend using shape keys. Shape keys will warp between one shape to another.

To use shape keys. Create the default mesh, then go to edit mode and scroll down to the shape keys section. Click the plus and model the blade(make sure to use the same vertices as the hand model). Exit edit mode, and drag the influence slider to change the shape.


What's the best way to take a bezier curve and have it render as a freestyle line? I'm attempting to draw a road onto a mesh terrain and am looking for a better solution than the one I currently have. At the moment I create a bezier curve in the shape of the road then apply a Shrink Wrap modifier to it so it hugs the curves of my terrain mesh (Fig 1.). That part works fine.

The mesh terrain is rendered as a series of lines using Freestyle. I would like the bezier curved road to also be rendered as a single Freestyle line, but it doesn't seem possible to tell Freestyle to do that.

Instead I have to extrude the bezier curve by a very small amount, convert it to a mesh, and then use "Mark Freestyle Edge" on one edge (Fig 2.) to get Freestyle to render it (Fig 3.). That works to some extent, however (a) that seems like an ugly workaround, and (b) I don't want the extruded shape of the road to render at all, as it blocks a small part of my terrain – I only want the Freestyle line.

So, is there a common workaround for: bezier curve -> Freestyle line?

Fig 1. bezier curve shrink-wrapped to terrain

Fig 2. thin mesh with one edge marked for Freestyle line

Fig 3. low-res render result

I'd appreciate any thoughts.

Dunstan

I've been asking the same questions for 3 years, and apparently nobody can give this answer :( No we cannot render Blender Curve as Freestyle, unless TK the developer make changes.

The "dirty workflow" is to use the Curve Mesh itself, Beveled, or use Skin Modifier, if you are rendering just edges.


How to acess and change solid OpenGL lights settings via python? I have interested in create an addon to help on viewing models.

the idea is the properties for solid OpenGL Ligths be found in tools panel so we can easily tweak the colors and light direction for better viewing.

But I need acess the properties in user preferences change it and save the props in the .blend and of couse automaticaly load it when a file is open.

If you hover the color boxes with the mouse cursor you will find that the responsible python struct is UserSolidLight with the following properties

  base class — bpy_struct

  class bpy.types.UserSolidLight(bpy_struct) Light used for OpenGL
  lighting in solid draw mode

  diffuse_color Diffuse color of the OpenGL light

  Type: float array of 3 items in [0, inf], default (0.0, 0.0, 0.0)

  direction Direction that the OpenGL light is shining

  Type: float array of 3 items in [-inf, inf], default (0.0, 1.0, 0.0)

  specular_color Color of the light’s specular highlight

  Type: float array of 3 items in [0, inf], default (0.0, 0.0, 0.0)

  use
  Enable this OpenGL light in solid draw mode

  Type: boolean, default False

According to the Python API Documentation


Blender Python - Call function when face is newly selected in edit mode? What I'm making is a script that assigns values to each face, I have a GUI that has fields for each value assigned to each face. So when I click a face I the GUI element to be set to whatever the values are for that face.

So what I am looking for is a way to have an event handler for when a face is selected in edit mode. So when I select this face, this function is called.

I couldn't find a way to do this. So I presume there isn't an easy way. But the next best thing is to do add a keymap that triggers when MOUSESELECT is pressed. Here is an example of that.

# store keymaps here to access after registration
addon_keymaps = []

def register():

    # handle the keymap
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')

    kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
    kmi.properties.total = 4

    addon_keymaps.append(km)

def unregister():

    # handle the keymap
    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    # clear the list
    addon_keymaps.clear()`


Blender crashes before rendering I am following Blender Guru's tutorial as provided in the following link
https://www.youtube.com/watch?v=BIUDZZMfGNI&ab_channel=BlenderGuru
I completed my coffee cup with a 2K condensation texture applied and I want to render it. However, Blender crashes and closes automatically before it even starts to render without displaying any error messages. I reduced my render sampling from 256 to 128 but it made no change. My drivers and Windows are up to date. Below is my specs for my gaming PC:

AMD Ryzen 5 3600XT 6-core
ASUS ROG STRIX Radeon RX 5700 XT OC
Corsair Vengeance LPX DDR4 16GB 3200 MHz
Samsung SSD 970 EVO 500GB
MSI B450 Tomahawk Max

As shown in the screenshot, rendering doesn't even use up half of the RAM load so I am unsure as to why Blender keeps crashing.

I had similar problem and I deleted each object and try to render again just to find which one causes the problem.
In my case it was the hair and when I turned hair in mesh object, it worked fine
Hope this will work for you also


Two objects with same materials, modifiers and lighting are different What the title says. I have multicolor bubble materials in one project that look like bubbles. I have another project where I'm trying to recreate the material and it kind of looks like a clear bubble with some dark in the middle and it won't change color. I've tried comparing and redoing the textures a dozen times by now and they won't match up.
Can anyone spot the difference?
Broken Bubble

Multicolor Bubbles

Material Properties > Settings > Blend Mode > Opaque change to Alpha Blend

Opaque

Alpha Blend


How do I stop vertex normals getting overwritten when I enter edit mode? I'm trying to make a script to apply vertex normals based on selected faces. So far I have written the script and it works fine, but if I exit edit mode and then re-enter edit mode, the normals get automatically recalculated by blender and look wrong again. Is there some way to stop blender recalculating the normals when entering edit mode? I have set autosmooth on the model.

Here is the script:

import bpy
import bmesh
import mathutils

me = bpy.context.object.data
bm = bmesh.from_edit_mesh(me)

selected_verts = [v for v in bm.verts if v.select]
for v in selected_verts:
  # get all the selected faces linked to the vertex
  ls_faces = [f for f in v.link_faces if f.select]

  # set vertex normal to average of face normals
  if len(ls_faces) > 0:
    average_normal = mathutils.Vector()
    for f in ls_faces:
      average_normal += f.normal
    average_normal /= len(ls_faces)
    v.normal = average_normal

bmesh.update_edit_mesh(me, False, False)

Here are some images that show what the script is for (this kind of thing is very handy for game models, especially toon shaded models). The script appears to be working fine, but whenever I go back to edit mode after leaving it, the normals revert to how the object looks in the left image.

You want to use Mesh.normals_split_custom_set(normals).

Custom normals are always set per loop (i.e. face corners), but this utility set those per-vertex (it internally translates those 'vert normals' to loop ones).

Note that you have to set all normals for all vertices at once (basically because this is a rather heavy process, so setting it by vertex or loop would be inefficient), however you can set some normals to zero (0.0, 0.0, 0.0) vector to keep existing custom normals, or use default auto-computed ones.

Finally, you must be in Object mode currently, custom normals at BMesh level (Edit mode) are not yet supported really.

You can find some examples of that API in use in the new mesh_custom_normals_tools.py addon, as well as OBJ and FBX importers.


How to get a right click coordinates in 3d_view I'm listening to the right click in my model operator. I wish to get its 3D coordinates in the 3D_view. I've tried the following code from here:
from bpy_extras.view3d_utils import region_2d_to_vector_3d, region_2d_to_location_3d
def mouse_coo_to_3d_loc(event, context):
    coord = (event.mouse_region_x, event.mouse_region_y)
    region = context.region
    rv3d = context.space_data.region_3d
    vec = region_2d_to_vector_3d(region, rv3d, coord)
    return region_2d_to_location_3d(region, rv3d, coord, vec)

But I got different coordinates from bpy.context.scene.cursor_location. I thought that maybe the context is wrong, so I used this code instead:
def mouse_coo_to_3d_loc(event):
    area, region = get_3d_area_region()
    coord = (event.mouse_x - area.x, event.mouse_y - area.y)
    rv3d = area.spaces.active.region_3d
    vec = region_2d_to_vector_3d(region, rv3d, coord)
    return region_2d_to_location_3d(region, rv3d, coord, vec)

def get_3d_area_region():
    for screen in bpy.data.screens:
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                for region in area.regions:
                    if region.type == 'WINDOW':
                        return area, region

But still wrong results. Am I m missing something here?
**** EDIT ****
I should have mentioned that my addon is running in the graph_editor.

Get screen from context.screen or context.window.screen

Get the clicked area by looking at area coordinates, of each area, in the screen returned from context.screen or context.window.screen. Used the latter in example below, my tests suggest could use either.   The region can be obtained from the area.

    if event.type == 'RIGHTMOUSE' and event.value == 'PRESS':
        screen = context.window.screen # or context.screen
        def get_click_area():
            for a in screen.areas:
                if (a.x < event.mouse_x < a.x + a.width
                and a.y < event.mouse_y < a.y + a.height):
                    return a
        a = get_click_area()
        print("Right Clicked in %s area of screen %s" % (a.type, screen.name))

as mentioned in my comment, get_3d_area_region() above, will only return the first matching area it finds in the bpy.data.screens collection. For the default file will be bpy.data.screens["3D Full View"].areas[1] every time.


Unexplained and unintentional mirroring behaviour of vertices with various actions I think I might have messed up some setting. The latest example was when attempting to subdivide an extruded rectangle.
The first subdivision went okay.

Selection of the first edge for subdivision

Vertex selection after subdivision

Moved vertex without problem

Edge select for cut 2

Vertex selection after subdivision of second edge

As soon as I attempted to move this vertex, the first went flying
At this point any attempt at moving either vertex resulted in a type of mirrored movement of the unselected vertex. Even crazier examples happen when certain objects are moved. I have reloaded Blender.app, tried backups and was unsuccessful in finding the cause.
Thanks, TOM

Thanks for the nudge in the right direction. After much searching I found that X Mirror had been enabled in the options tab. Hope this goof can help others. TOM


Nothing showing in Camera View despite scaling camera and checking clipping I have a large model of a wheelchair and I put some materials on it. I set up a sun lap and a camera, after several attempts to see my work through the camera view, there was still nothing showing in the viewer (I can see it in the 3D viewer. I scaled the camera up so that it could see the whole model and checked the clipping, but still nothing. When it enters camera view, it does not zoom straight in and look through the lens, it makes a sort of orbit into the lens which is confusing the daylights out of me. Here is a link to the blend file:

https://drive.google.com/open?id=0BxZR-5RoJhhZNndqRG96ZzhpUVE

I am a Blender beginner, please pardon my rookie stupidity.

Thank you

The problem is that the clipping End limit is too small. I've changed it to 6000 and it's working fine. To be able to view the clipping range you can tick the limits checkbox in the Display panel and a beam will be shown in the camera showing its clipping range as shown below:

Camera view:


Create default scene with Screen cast keys addon enabled and turned on I always want to enable the Screencast keys addon when using Blender. I'm trying to avoid having to remember to turn it on for each new Blender project. I tried turning the checkbox for it on in the N-key side panel and then saving that scene as the default Blender scene. Unfortunately the checkbox doesn't stay turned on in new scenes regardless of that.
Is there perhaps a scripting solution that would allow having the checkbox (that turns Screencast keys display on) always activated in my default Blender scene?

I believe this will keep an addon enabled. You can paste and run it from the Script Editor. Just replace the string with the name of your addon. If it's not working then you're probably using the wrong addon name.
import addon_utils

addon_utils.enable('shortcut_VUr-master', default_set=True, persistent=True, handle_error=None)


Chopping excess bits off an imported stl :) quite a beginner to blender, have rendered a rough 3d model of a battery compartment for a '78 Triumph Bonneville and imported it, but it's got lots of bits I need to slice off and delete. Then I'll need to quarter it for printing. Dont understand how to chop stuff with Blender, please help guys! :)
The images shown are from the app where the stl was constructed

To chop off stuff, there is an option in Blender, I believe, to delete disconnected parts of a mesh. You can also use the removed doubles option to remove overlapping vertices. If you want to remove triangles as well, you can press Alt+J to remove them as well.


How to make particles of an object that is made of several arrayed objects? I made a lupine with an array of leaves and 3 different arrays of flowers(for different sizes of the buds). Now I want to make a particle system of this whole lupine. Is there any workaround to do it without connecting all those meshes as I really want to keep it procedural?

----edit----
So sorry I don't know why I typed array instead of particle, I mean I want to use the whole lupine in a PARTICLE system to make a bunch of them. I tried to make an instance of the collection, then put it in a collection then choose it in the particle system, but nothing comes out.

So I had a quick player around with a scene I just made.

You have to make sure that the object (in my case plane) is in a sperate collection to the the lupin objects.

In the "Particle Properties" tab in the outliner toggle "Advanced" in Hair to get the some more options you might need.

Under the "Render" tab, switch "Render As" to Collection (which I believe you did). In the same options toggle "Whole Collection" in order for it to emit the whole lupin/object as one and not random segments.

In my case (you may not have to) Under the "Rotation" settings I had to change the "Orientation Axis" to Global Y, but have a play around with it, it may be different in your case.

Note You should play around with the "Hair Length" under emission tab in conjuncture with the "Scale" under the "Render" tab in particle properties to get the size you want.


I want to turn a 3D mesh into a height map and then use the height map to create a new 3D mesh with no undercuts I basically have a 3D model of a man.  I want to cut this out on a CNC machine, but the undercuts are proving to cause problems during the toolpathing and confusing the computer.

I want to use Blender to create a height map of the 3D model that I currently have, while looking at it from the front.  I want to then use that height map to create a new 3D form which will be the man, but he will no longer have undercuts since the new model was created from the height map.

I have tried this already and it is possible, but the height map and models that I am getting are very low quality.  The final model needs to be a MUCH higher resolution/detailed model for our purposes, I want it to look as detailed as the original.

Is there a way to make this work?  I am NEW to blender, I have only used it for two days to try and figure this out, so any sort of detailed explanations if this is possible would be appreciated.

This is what my original 3D model looks like

Here are the material nodes used to created the properly shaded material to create the height map.

This is the height map image that was created from the original model.

This shows the new model that was created from the height map.

Close up version of the new model.  You can see how low resolution it is, the face lost all of its original detail.  The body is also very stepped.. not a smooth transition between parts like on the original model.

If you use the 'Mist' feature:

then enable it in the camera settings:

then adjust the start and end point that it gives you to the start and end of the model, in the world settings:

And finally, in the compositing editor, connect the mist pass to the render pass, to give you a high definition 'depth' pass:

Hope this helped!


Selecting an edge without vertices and deleting it I want to select an edge that is hanging in mid-air, but can’t do it. A problem occurred while deleting the extra vertices, and now only an edge is left. Is there a way to only select an edge and delete it? This edge is a part of an icing object. This edge has no vertices connected.

That edge can't be selected as a whole in edit mode, but it can be selected in object mode.
You can see a thin strip here. How do I select it and delete it?

You can also use the "Delete Loose" option in Edit Mode >  Mesh > Clean Up > Delete Loose.
It is easier than having to select every floating vertices !
I'm not an expert, but I hope this helps


Scale and stay at Z position I have a cube positioned at Z-axis = 0 like this

Now I scale the cube 3 times and then I get this

How to scale that the cube is enlarged 3 times along the Z axis and stays at Z = 0 ? Like this

You can choose "Pivot point" for manipulate with objects. Default is "Median Point", which is Origin in your case. You need switch Pivot point to "3D Cursor"


How to make an object emit light streaks I'm new to Blender and VFX/3D in general, I'd like to know to make an object emit streaks specifically like the Legendary Pictures (2010) VFX logo.

This can be done through compositing
you can do this in blender itself by adding glare node and switching to streaks and some few tweaks
another way is switching to any compositing software like after effects and add lens flare manually like in after effects optical flares is the perfect option.
Earlier there was a Add-on in Blender itself that was giving a facility to provide you a lens flare but after releasing 2.8 version of blender this add-on lost somewhere
I mean developers did not updated that add-on to 2.8


Controlling animation speed for different elements I encountered a problem animating a three section retractable roof on my stadium. I am trying to animate closing of the roof, but for some reason each section is moving in diefferent speed.

So let me try to explain my current situation:

I have a three section retractable roof. Each section is set 1,90 m in front of the other one because of the wheels. Lets call sections with A, B and C for better understanding. So first all three sections (A+B+C) are moving from frame 1 - 40 by 22 meters. Than section A stops, and other two sections (B+C) continue moving from frame 40 - 80 by 18 meters. And, at the end, sections A and B are staying in place and section C is moving from frame 80 - 120 by 18 meters. Everything looks great and so on but for some reason, during frames 1 - 80, sections of the roof are penetrating into each other. Its like if each sections wants to reach its final location faster than the others, and as a result I get one part of the roof going into the one in front it. So basicly they are not respecting thath initial distance of 1,90 meters they were set at.

I tried grouping them, joining them but nothing... Than it is only OK from frame 1 - 40, but as soon as I separate them to move other two sections, problem appears again. So what I want is to make them move in the same distances they were set initialy at, and just to lose each section at spacing of 40 frames.

So is it possible to edit speed of the objects somehow, parent / child them in some way or is there any other solution.

I would be very grateful for every suggestion or help.

Thanks in advance.

OK I found myself a solution to this problem!

Everything is OK, it is just necessary to edit some properties under Animation window (Screen Layout).

Steps:

Edit animation.
Under ''Dope Sheet'' press T and change ''Interpolation Mode'' to ''Linear''.
Under ''Dope Sheet'' press T again and change ''Easing (by strenght)'' to ''Sinusoidal''.
Select all objects that are participating in animation and under ''Graph editor'' press Ctrl+E and change ''Easing Type'' to ''Ease In and Out''.

It works perfectly for my need and I hope it helped someone get the answer of how to move objects with same speed, but that it still looks natural.

Cheers!


Blender 2.8 display a subdivided view of the mesh, but without applying subdivision to the object When I press 3 on Maya it shows me a subdivided version of the mesh without subdividing the mesh, how can I achieve the same result in Blender 2.8? also, I should mention I'm emulating Keyboard Numpad because I don't have a big traditional keyboard.

Ctrl + n where n = a number so  Ctrl+ 2 means a subdiv modifier with 2 subdivisions

Ctrl + 0 keeps the modifier but does not show the subdivisions.


How can the Bokeh Image node be used? From the wiki:

  With the Bokeh Image node you can generate a reference image for blurs.

What are some example uses for this node?

The bokeh Image controls the shape of the out-of-focus area for the Bokeh blur node.

Generally, octagonal and circular shapes are very common for most camera lenses. If no bokeh image is supplied, then a circular bokeh is assumed.


Blender closes/crashes everytime I open and close a window Since yesterday blender constantly closes/crashes everytime I open and close a window.
So far this happens on every window I have tried (e.g. file output path, file import, viewport windows, image textures)

Better image quality: https://imgur.com/a/P3HiQh1
So far I have:
Restarted the pc multiple times
Reinstalled Blender multiple times (via steam and manually)
Deleted all the Blender related files in Appdata and program files
Without any luck.
Hopefully one of you can help me.
Best wishes!

The guys over at blender told me what the issue was.
Turns out the problem is caused by my wacom drawing tablet. I uninstalled the drivers and now its working fine again!
Hope this helps someone!


Small moments when I can't seem to do anything I am using Blender version 2.79. There are moments when I can't move or do anything. Just small moments when I can't do anything.
-The best way I can describe it, is no matter where I click or what button I press I can't move or do anything. It's like everything stays still because it want's me to do or not do something.

What would be the correct button to push? Where do I click?
What am I supposed to do?

You could try a right click. For example, using circle select needs a right click to accept the selection and escape back to normal.


How to limit rotation on the last bone of an ik chain The last bone here, Bone7, has an ik constraint of chain length 3. As in the image, moving ikBone moves the bones all the way back to bone4. This makes me think that the length of a chain doesn't include the first bone, Bone7. Or that the counting starts at zero.
I want to limit the rotation of Bone4, the last bone in that chain.

I think that ik overrides Limit Rotation bone constraints and the way to achieve the result I want is via the Inverse Kinematics tab, found in the bone properties as described here
Those constraints work ok for Bone6 & Bone5, the 1st & 2nd bones in the chain. Here are the constraint fields for bone 5.

The problem comes with Bone4, the final bone in the chain. Looking at that same constraint panel for Bone4, the fields are greyed out.

Although greyed, values can be entered in the fields and the check boxes can still be checked. Setting up various test situations, for reasons unknown to me, sometimes the Bone4 ik constraints are enforced and othertimes not.
So my question is, what is the significance of the fields being greyed and in what circumstances are those constraints enforced?
Blender v2.83.0 on Linux

The Chain Length of the Inverse Kinematics constraint is including the bone that has that constraint. In your case the value is 3, so it applies to Bone7, Bone6 and Bone5. Therefor Bone4 is not part of the the IK setup and it's rotation behavior cannot be limited by the Inverse Kinematics settings in the Bone Properties.
You can increase the value of the Chain Length to include Bone4. (Or put a Limit Rotation bone constraint on it in the Bone Constraint Properties tab if you don't want it to be part of the chain.)
Also when Relationship Lines are active (which can be made visible by checking the box in the Overlays menu), you can see a line from the start to the end of the chain that can help determine the length in the 3D Viewport.
Edit:
Note that if the box next to Use Tail is not checked, the bone that has the Inverse Kinematics constraint, is not part of the chain. However in this case that bone (otherwise first in the chain) is not affected by inverse kinematics, and (more importantly) the last bone in the chain cannot be constrained in the Bone Properties > Inverse Kinematics menu.


What controls are there in the built in player? While using the F11 Play Rendered Animation window, I have noticed that when you click or press any keys it will pause automatic playback. This lead me to the question,  what controls are there? Is it possible to start automatic playback again?

A - toggle frame skipping.

P toggle ping-pong.

↵ Enter start playback (when paused).

Numpad 0 toggle looping.

Numpad . manual frame stepping.

← step back one frame.

→ step forward one frame.

↓ step back 10 frames.

↑ step forward 10 frames.

⇧ Shift+↓ use backward playback.

⇧ Shift+↑ use forward playback.

⇧ Shift hold to show frame numbers.

LMB scrub in time.

Ctrl++ zoom in

Ctrl+- zoom out

F flip image on the Y axis

Shift+F flip image on the X axis

I show frame indicator

Esc quit

Playback speed

1 NumPad 60 fps
2 NumPad 50 fps
3 NumPad 30 fps
4 NumPad 25 fps
⇧ Shift+4 NumPad 24 fps
5 NumPad 20 fps
6 NumPad 15 fps
7 NumPad 12 fps
8 NumPad 10 fps
9 NumPad 6 fps
/ NumPad 5 fps
- slow down playback.
+ speed up playback.

See also the Blender manual.


(Blender Internal) Render Layers keeps duplicating So I'm trying to have two smoke domains in one shot. I have a fire on the first layer and the explosion on the second. I add in the Render Layers tab another render layers. I want the second layer to be transparent, so I disable the sky option layer. I set under the layer tab the Scene and Layer the second one, and the first Render Layers is the first layer for both options. But now it's duplicating my settings to the other Render Layers. Anything I can do? Thanks!


How to specify Nurbs path vertices in python? I'm trying to write a script which creates a Nurbs path curve, bevels it, and then stores the location of each vertex/point in that curve. I've been writing it based on the code displayed in the info panel, but it doesn't show what the vertices are supposed to be called - so I can't refer to them in the script.

Update: After following Ratt's links, I modified ThomasL's code for Nurbs Path and am now stuck again, though it's still progress. Below is one version I tried out, but the error message says that Curve has no attribute path_points. Of course it doesn't, because I made that up because I don't know what the Nurbs Path equivalent for bezier_points is.

import bpy
import random

def pathPointLoc(cu, typ, points):

    for (n) in enumerate(points):
        nurb = cu.path_points[n]
        print(nurb.location)

    return

cu = bpy.data.curves.new("MyCurve", "CURVE")
ob = bpy.data.objects.new("MyCurveObject", cu)
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob

cu.bevel_object = bpy.data.objects["BezierCircle"]
cu.taper_object = bpy.data.objects["BezierCircle"]

pathPointLoc(cu, "NURBS", [(0,0,0,1), (0,0,1,random.randint(1,4)), (0,1,1,1), (1,4,1,1)] )

Based on your starting point script below. Added reference to spline types since bezier curve points are stored differently than nurbs curve points.

import bpy
import random

def pathPointLoc(cpath, points):

    if cpath.type in ['NURBS', 'POLY']:
        cpath.points.add(len(points)-1)
        for (index, point) in enumerate(points):
            cpath.points[index].co = point
            print(cpath.points[index].co)
        cpath.use_endpoint_u = True
    elif cpath.type in ['BEZIER']:
        cpath.bezier_points.add(len(points)-1)
        for (index, point) in enumerate(points):
            x, y, z, w = point
            cpath.bezier_points[index].co = x, y, z
            cpath.bezier_points[index].handle_left = x-1, y-1, z-1
            cpath.bezier_points[index].handle_right = x+1, y+1, z+1
            print(cpath.bezier_points[index].co)
    return

cu = bpy.data.curves.new("MyCurveData", "CURVE")
ob = bpy.data.objects.new("MyCurveObject", cu)
polyline = cu.splines.new('NURBS')  # 'POLY''BEZIER''BSPLINE''CARDINAL''NURBS'

scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob

cu.dimensions = '3D'
cu.bevel_object = bpy.data.objects["BezierCircle"]
cu.taper_object = bpy.data.objects["BezierCircle"]

pts = [(0, 0, 0, 1), (0, 0, random.randint(1,4), 1), (0, 1, 1, 1), (1, 4, 1, 1)]
pathPointLoc(polyline, pts)


How to unwrap properly this bevelled mesh (see pic) I've been trying to get a decent result with the unwrapping of a mesh representing a boardgame counter (top + bottom). I've bevelled it first, applied smooth surface and then unwrapped it in many different ways, but it seems to always get the edges wrong. As you can see in the reference picture, the camo texture should continue to the edge of the counter, instead, it stops showing a different part of the mesh. It shouldn't be that hard to do, but for some reason I always get the same result. Is there a way to have the top part of the mesh show exactly as it does in the reference pic?

Your problem is that the rounded corners of your tiles don't have the same radius as the rounded corners of the texture.  You can work around this by marking the edges of your tiles so you can unwrap each face separately, and then using Unwrap with 'conformal' set.  After you've done that, manually center the top and bottom faces, and shrink them slighly to fit.  You end up with something like this:


How to fix strange behavior of vertexes? (picture) I cant understand the reason why this two vertexes move like if they are linked.
If I move one, the other moves too in a different direction, if I change the weight of one, weight of the other changes to opposite.
Please, someone, help to fix this!

Your vertices are weighted on bad bones.

The selected vertex should have 1 for Bone1.035 and nothing else. This can be seen in Edit mode in the N panel. From there you can change the weight values (in this case, 1 for Bone1.035 and remove with X bone3.044).
The other vertex needs to have only bone3.044.
Once this is done, place your vertices where they should be and they'll do what you expect.

You're life would be easier with better bones names (Something like Arm1.bone1, arm1.bone2, Arm2.bone1 ...)


How do I set my camera rotation with Python? I'm working on an automatic renderer script, and I have some trouble setting the rotation of my camera. I suspect it has something to do with the need for me to convert the rotation values I want to quaternion values. The problem is that I am absolutely hopeless in maths and not very advanced in programming, I'm still learning. I have been looking on the internet but I have found very complex things such as this :

https://blenderartists.org/t/questions-about-python-controlled-camera-rotation-and-location-in-blender-2-59/520639

But I don't know where to start, I don't get what the code means and I don't know how to implement that to my case, so I figured it was best to ask from scratch.

SO basically I want my camera to have the same rotation I have created manually, that is to say :
x= 66.9
y= 0
z= 28.9

Here's the last thing I have tried:

import bpy
import os
import math
import shutil
import glob
import bmesh
import mathutils

    #Camera position
    Camera = bpy.data.objects["Camera"]

    pos= [24.408, -39.401, 33.853]
    rot= [66.9, -0.000115, 28.9]

    Camera.location.x = pos[0]
    Camera.location.y = pos[1]
    Camera.location.z = pos[2]

    Camera.rotation_mode = 'XYZ'
    Camera.rotation_euler[0] = rot[0]
    Camera.rotation_euler[1] = rot[1]
    Camera.rotation_euler[2] = rot[2]

    Camera.rotation_euler.to_quaternion()

And errr.... it doesn't work at all lol, it puts my camera at 3833° X, -0.00661° Y and 1656° Z...

Can someone help me ?

Thank you so much :)

def setupCamera(scene, c):
    pi = math.pi

    scene.camera.rotation_euler[0] = c[0] * (pi / 180.0)
    scene.camera.rotation_euler[1] = c[1] * (pi / 180.0)
    scene.camera.rotation_euler[2] = c[2] * (pi / 180.0)

    scene.camera.location.x = c[3]
    scene.camera.location.y = c[4]
    scene.camera.location.z = c[5]

    return

scene = bpy.data.scenes["Scene"]

config = list([67.1349, 0.779594, 148.858, 5.57961, 9.16202, 5.34536])

bpy.ops.object.camera_add()
cam = bpy.data.objects['Camera']
cam.rotation_mode = 'XYZ'

scene.camera = cam

setupCamera(scene=scene, c=config)


Blender 2.8 Custom Orientations I'd like to create a Custom Orientation and I'm looking for the little "+" sign in the Orientations dialogue box but it's not there.

I notice that if I click where it should be, Blender does create a new orientation.
Second question: How do I delete a Custom Orientations?

Kind Regards

Michael

Here is a screen capture that can help to localize the icons:

I think you should try to reinstall and report a bug if this does not fix the issue.


How do you use a multiple leaf texture file on a sapling curve tree? Textures.com offers leaf textures in a multiple-leaf-per file format. There are also six files for all the maps.

Is the expectation that I open these in gimp and make them into separate images (somehow keeping the edits identical across all six images/maps), or is there a way to use a file like this directly in Blender where you draw bounds around the individual leaves and it assigns one of the groups randomly to each leaf instance? This is for a sapling generated tree in 2.81a.

Multiple objects can use different parts of the same material using UV mapping. In this example, The original UVs of the image plane are cut automatically when using the Knife tool. Split the edges and separate the loose parts to create multiple objects. Note the single material used.

That same material can also use the same UVs for applying alpha, normals etc...

Note: the "Import Image as Plane" is an Addon.


Select all and delete in outliner search results Here's my problem...

I have many objects which I've duplicated but didn't notice myself duplicating the camera while I was in side view:

Now this is ok, because I've spotted a search box. I can find/delete...

Except deleting (while mouse is in 3D view) only deletes the one white-selected camera. The a key does toggle a form of selection, but instead of being an actual selection it's more of a doesn't do anything at all selection. The outliner is pretty unresponsive to what I would think of as typical user interaction.

How do I actually-select lots of things in the outliner?

I have just noticed that without search results I can make a doesn't-do-anything selection, right click and choose "select" to create an actual-selection. Either a all or b box select works to make a doesn't-do-anything selection. I can't however create typical shift-select between first and last so I think I need a bigger monitor to display more outliner for my box select. This right click "select" method doesn't work on doesn't-do-anything selections after filtering the outliner with the search box.

Selecting in the outliner would mark its list items as selected but does not select the objects you want to remove. To select more than one object in the outliner you can Shift-LMB each object.

Instead you could select them by name in Object Mode Menu:Select / Select pattern, Type Camera.* (this omits the default camera) and press X.


Shoe not moving with Leg when posing (armature) Im fairly new to blender. I have made a character with a pair of shoes.
I created a rig, sellected all (the whole character with shoes) then Alt + LMB to select the rig the rig and finally Ctrl + P.
Now when i bend the legs, the shoes stay on the ground.
I have tried joining the shoe with the leg before attaching them to the rig but then they both dont move at all when i pose the rig. Am i doing anything wrong?

You probably didn't weight paint the shoes.
First, name your feet bones something that you can remember. Then, parent the shoes to the bones again. Go into the properties panel > Object data (the green triangle) and then in the vertex groups look for your foot bone name. Select that, go into weight paint mode, and paint the shoe. That should cause your shoe to move.
Hope this works


How to automatically get a Add-on folder's path regardless of OS? In Blender, is there a command to query what's the current path to the Add-on folder - regardless of what system I'm using?

Ah, got it.

Paste this to the Python Console to get your add-ons path:

bpy.utils.user_resource('SCRIPTS', "addons")

Also see the wiki.


exporting blender ABC to 3DsMAX with working Material ID Well the question lives between blender and max community so I need to ask here just in case somebody also knows the answer.

When exporting objects ( a cube ) with different 3 materials assigned to the faces from Blender in Alembic, once I import in MAX the Material IDs goes nonsense.

I even tried with Vray proxy, and also happened the same.

Then I read the documentation of Alembic and also noticed that we had some troubles also from Houdini to Max.

Alembic won't write the Material IDs by default and we had to force it  in Houdini so MAX understands that.
We could find a workaround for Houdini. but I'm a bit stuck with the Blender 3DsMax connection.

By the way FBX works fine, but the implementation for references feels not so clean, and we were hoping to be able to use ABC for the neat reference upgrade.

Anyone knows something about it? is there another ABC exporter for Blender that speaks MAX better?

there is several steps to achieve that:

Export the material with OBJ format from Blender (this one using Blender version 2.92)

Warning: if there is an error "error in file: meshName = shapeName" when importing OBJ in 3dsmax, when export OBJ choose "Limit to selection only", if the mesh contain more than 1 object make duplicate then combine all these into 1 object, the aim here is to populate all material into 1 multimaterial

Import that OBJ in 3dsmax to get the material
turn on checkbox 'Import Materials'

now you will get all material ID in 3dsmax

Export alembic (ABC) file from blender
turn on checkbox 'Face Sets' when exporting

Import alembic (ABC) in 3dsmax

Apply that multi material to ABC in 3dsmax

Setup these materials based on your render engine in max


Geometry Nodes - How to procedurally subtract the unwanted part of a mesh after applying it with particles? This is how everything looks at the moment

This is what I expect the result to look like (partially instanced particles, partially original mesh)

The nodes setup

There are two ways to do that: 1) With Geometry Nodes (GN) itself or 2) with Geometry Nodes (GN) and Shader Nodes (SH).
Method 1:
First distribute the ponits/particles then generate volume mesh from those points. Next, boolean the input mesh mesh with volume mesh and combine it with the points/particles mesh.

Blend File:

Method 2:
In this case, we generate a Vertex Color based on the distance to the points/particles then use this as mask in the Shader Nodes to make that area of mesh transparent,

Blend File:


Blender 2.8x Save Add-on Class Instance To Scene In Blender 2.7x in the init.py file a generic class was instantiated for the purpose of holding data:
class HoldData():
    dat = None

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.my_data = HoldData()

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.my_data

In a subsequent file an outside python class is instantiated within the generic class, in this case a Pandas Dataframe:
import bpy
import pandas as pd

class OP_DoWork(bpy.types.Operator):
    bl_idname = "op.dowork"
    bl_label  = "Doing Work"

def execute(self, context):
    return{'FINISHED'}

def invoke(self, context, event):
    dat = bpy.context.scene.my_data
    dat.bh = pd.DataFrame()

Finally, the object (the Pandas Dataframe) is accessible to other classes within Blender:
class OP_DataCheck(bpy.types.Operator):
    bl_idname = "op.datacheck"
    bl_label = "Check Data"

    def __init__(self):
        self.dat = None

    def execute(self, context):
        dat = bpy.context.scene.my_data
        print(dat.bh.columns)

In 2.8x the registration of the original HoldData() class throws an error:
class HoldData(bpy.types.Anytype):
AttributeError: 'RNA_Types' object has no attribute 'Anytype'

How can I save a class instance to the scene in Blender 2.8x?

This is what is often referred to as a monkey patch.  Data will not be saved to blend file.
To monkey patch onto a scene type could simply
import bpy

class HoldData:
    dat = None

def register():
    bpy.types.Scene.my_data = HoldData()

def unregister():
    del bpy.types.Scene.my_data

if __name__ == "__main__":
    register()

Test in console
>>> C.scene.my_data.dat = "foo"
>>> C.scene.my_data.dat
'foo'

In as much as can do this, would favour simply
from foo import HoldData

my_data = HoldData()

and
from bah import my_data

To save some data to blender and use a third party for other recommend a PropertyGroup and PointerProperty set up.   Not all members of the defined property group need be annotated properties.
The other issue mentioned is a typo, the class is bpy.types.AnyType (CamelCase ie capital T for type)  Not sure where you're going with this either?


Groups not being converted to Collections When I open pre-2.8 files in 2.8 the layers are being converted to collections, but the groups are not.

Is there a way for 2.8 to convert groups from older files to Collections?

Background:

In Blender 2.80 both groups and layers have been merged into collections. Since they are technically two different things in Blender 2.79, it made sense to keep them still somehow apart or distinguishable from each other in Blender 2.80.

Layers are converted to collections, but groups are not going to be converted, since Blender 2.80 does not know, whether you want to create a collection for each group or if you want to use the groups from Blender 2.79 at all.

The latter is because Blender 2.7x's  group feature wasn't exactly intuitive to use and many people (including me) might have created random groups at one point without having any further use for them.

Enter Data Block IDs:

The three cubes in this screenshot of Blender 2.79 are in the same group named "cubes".

If you open the file in Blender 2.80, under "Properties - Object - Collection" you will find a new input/selection box named "Unique Data Block ID name", where you will find the name of your Blender 2.79 group.

If you click on the arrow to the right of the group name, a drop-down menu opens, where you can select "Select Objects in Collection". Now, all the objects that were assigned to the 2.79 group "cubes" will be selected. You can then assign them to a new collection by hand.


How to make objects not pass through each other when animating Is there some kind of way that I can make meshes not pass through each other when I'm animating them? Like maybe use rigid bodies or physics or something like that (sorry, i'm still new to Blender)? Like for example, if I want two people to handshake, how do I make it so that the hands don't go through each other? Or do I just have to animate it in such a way so that they don't?

You can use the Soft body modifier after you animated the general movement.

https://docs.blender.org/manual/en/dev/physics/soft_body/index.html

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

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


How to wait for bpy.ops.wm.alembic_import to finish? Quite a simple question I hope, I've been tearing my hair out with it for over a day now though. I'm trying to write a background python script that will import an alembic and then perform certain actions on it.

I can get the alembic to import by calling bpy.ops.wm.alembic_import with the filepath, however this import appears to occur in a separate thread which means that the code I immediately move on to still sees an empty scene.

Is there a way to make the python script execution wait until the import is finished, or insert a callback that will be called once the import is finished? I've tried the load_post and scene_update_post callbacks with no luck.

bpy.ops.wm.alembic_import operator provides a property called as_background_job which defaults to True. In that case the alembic import will happen asynchronously.

You can override the default behavior by passing a False value, in which case the import happens synchronously (blocking Blender)

bpy.ops.wm.alembic_import(filepath='....abc', as_background_job=False)