Why does my obj become transparent when I import When I do import my obj files it's become transparent in some part like in the picture
 I try to fix at here but all I can do is changing the subsurface color but I want the texture thing (I already have the texture but don't know how to put it in the transparent thing)

This looks like Backface Culling, i.e. when you see the backside of a face it is invisible. This helps for example if you want to see if some face normals are pointing in the wrong direction.
To disable Backface Culling, choose the material in the Material Tab and go to Viewport Display > Settings > Backface Culling and disable it (that's Cycles, in Eeevee it's in the overall Settings of the material).
But: if your material is invisible from the outside this presumably means that the normals on this object are turned inside out. In the Viewport Overlays you can enable "Face Orientation", the outside of faces are shwon in blue, the inside in red. I guess the faces of that object will show up in red.
To correct that go into Edit Mode, hit A to select all faces, then Shift+N to Recalculate Normals. You can tick Inside here if they are still red.
If only some faces are red and some are blue and recalculating normals doesn't make them uniformly red or blue, you can select the faces you want to change, hit Alt+N to bring up the Normals menu and choose "Flip".
EDIT: As I commented above, if the material has a texture which is supposedly not black, than you might have a combination of Backface Culling and Alpha Transparency.
Your screenshot shows that hat is transparent/invisible in front of the hair but all black behind the hair. Backface Culling and Alpha Transparency are shown differently in different Viewport Shading:

In Solid view, you only see the faces without any transparency.
In Material Preview, Backface culling makes faces transparent/invisible when seen from the backside/inside, while Alpha Transparency results in alpha values of 0 shown in black, not transparent. Alpha values > 0 have no effect and will make the material look opaque.
In Rendered view, backface culling is disabled and doesn't effect the material, while Alpha Transparency will make the material more or less transparent according to the alpha value.


Smart UV Project: the sequence of the faces is wrong and has inconsistent width I’m new to Blender, been using it less than a month. I created a small tower, and am now trying to apply a texture.

My issue is in the Unwrapping, I get the best result from Smart UV Project. When it unwraps however the sequence of the faces is wrong and the width of the face panels in the UV/Image Editor are incorrect. It makes my seamless texture not so seamless.

Scale is set to 1.000 for X,Y & Z. The doors and windows were created using a Boolean Modifier.

Seams Layout and Face selection order

Unwrapped Cylinder

So how do I go about unwrapping it in order and scaled correctly? Any help solving this would be greatly appreciated.

I think you can work a bit on this: I tried with your file and got some decent result, imho.

The first thing is: I isolated just the exterior walls.

then I set the front view and unwrapped cylindrical

I got an (extremely high) quite nice square unwrap

but helping with 2d cursor and the pivot choice, it's easy to scale it dow to make it a bit more manageable

then I loaded a brick wall image similar to yours

and aligned and scaled the uv map to the image

what about the face sequence? it seems ok, look them while I select (in top view) all faces...

Hth..


How come reflections are still visible using 0 bounces? After creating an animation, I decided to try and optimize my render settings so I could get the final result much faster. (I am using cycles) A lot of people advised me to lower the bounce count, so I did just that. In order to make sure I wasn't losing detail, I decided to run test renders with various bounce counts.
During this testing, I encountered something strange.
Inside my scene, I have a somewhat shiny object with low roughness (Principled BSDF, nothing else). I also have an object with an emission shader. When rendered, you can see the reflection of the emissive object in the shiny one. However, when I set the bounce count to 0, this reflection is still visible, even though it should not be because, well, its a reflection and 0 bounces should mean there are no reflections and the scene would just be shrouded in complete darkness unless the ray hits a light source.
Why is that so?
Unfortunately, I cannot share any images because I have saved them in OpenEXR format.

Light paths inherit the proprety after the first bounce
Short answer is that the bounces number is not referring to the occoured light bounces but only to the "diffuse/glossy/transparency reflection  bounces" as said in the tooltips:

The manual define the light paths as the following:

Reflection and transmission rays can further have these properties:

Diffuse: the ray is generated by a diffuse reflection or transmission
(translucency).
Glossy: the ray is generated by a glossy specular reflection or transmission.

Imagine the following situation (path tracing actually works the other way around, but let's forget that for a moment):
The photon is emitted by light source, notice that at this moment the ray associated with the photon is "neutral", it hasn't hit any surface so it can't be defined as "diffuse" or "glossy", it's just a ray.
Now the photon hits a surface. If the surface is diffusive it generate a Diffuse ray, if it's reflective it generate a Glossy ray. Now, if the Diffuse/Glossy ray is captured from the camera, how times the Diffuse/Glossy ray bounced?
None. It has just been generated. It is visible by the camera, but has bounced none.
The question those numbers are answering can be better phrased as:

How many times are the Diffuse rays allowed to bounce in my scene?

If you picture yourself that the Diffuse rays are the little arrows and not the long one, you'll have an easier time in understanding the values.

Disclaimer: I dunno if it's the whole truth, but it makes sense and I thought it whort sharing my point of view


Rigging a multi-object person I'm having an issue I've tried fixing for literal weeks now. I've exhausted all the resources I could, but in short, I created an ultra low poly character that just WON'T rig right. I've attempted doing separate bones, and not using rigify, but ultimately, I imagine this will be a major pain when it comes to trying to do a walk cycle. In the picture, I've circled some areas I'm assuming are an issue, as I'm going with an icosphere for much of the joints (ankle, shoulder, elbow etc).
Am I doing something wrong, for why rigify is ineffective? Is using single bone setups like this feasible for movement and rudimentary animation?

Using rigify will cause problems, especially if you have not cleared the scale. I would say as you have a character with many objects, go with making a rig and assigning each bone to each object. I have some very horrible experiences with rigify and going with bone by bone is much easier. As for if it is possible to do a walk cycle, yes it is highly possible.


Deleting an object part of a collection does not remove it from the collection Video to the question: https://youtu.be/kgvwxt84Rkg

After deleting an object which is part of a collection it seems the collection still contains the deleted object (which i did not expect). Especially problematic for me is that I can't find a way to fix this. I discovered the problem way to late to undo the deletion and I don't know how to modify the collection directly.

Please help

I fixed my problem by creating new collections (which obviously don't contain the deleted object), selecting an empty which shall receive the new collection as the instancing property and using a simple script

import bpy

bpy.ops.object.select_linked(type='DUPGROUP')
for obj in bpy.context.selected_objects:
    obj.instance_collection = bpy.data.collections["newCollection"]

Afterward I found out I could have done the same via Select Linked (Shift+L) \ Instanced Collection and editing the property while holding Alt (to apply it to all selected objects).

I still have the now unused collections in the blend-file and can't seem to get rid of them plus I was searching for a way to edit the original collections so I see this as a workaround and leave the question open for additional answers.


Symmetrize Bones / Mirror Bones I'm selecting necessary bones, go to the Names > AutoName Left/Right, and when I press Symmetrize it turns out like illustrated in the picture.

file:

Because you're expecting the symmetry to happen on the Y axis but the Symmetrize operation uses the X axis, so you need to rotate your armature 90° on the Z axis in Edit mode and symmetrize again. What we see is what is supposed to happen, your bones have been mirrored on the X axis.


Export obj with tga textures to obj with png textures using blender? I am new to Blender. Is there a way to export a model with tga textures to a model with png textures. I tried multiple times but to no avail. What I mean is that when I export the model to obj, the mtl file would direct the newly made png textures(from the tga textures) to the newly exported model. Is there a way for this to happen in Blender? Please help me.

When I loaded the obj file and the mtl file in Blender, I put the tga texture directly to it. The tga fits properly with the loaded obj. Now I want to export the obj with png textures. Is there a way?

There is a way to do this in blender... baking.  But it is the most complicated way to do what you want.

The more efficient method, would be to open the images in Photoshop, Gimp, inkscape, or whatever, and just save them as png files.

Then, in blender you can just swap the textures of the material. Or instead of placing the .tgas place the newly created .png files.

You should just be able to save the edits.


Applying Boolean Breaks Topology I'm trying to apply what I think is a fairly simple bool operation but I can't figure out what the problem is or what to do to remedy the situation.

When modling with the modifiers in place it looks perfect. Exactly what I want to see:

However, when i apply this to the object, the topology is entirely ruined:

The underlying topology looks like this:

I have absolutely no practical experience using booleon operations so far in my Blender journey and I have absolutely no idea what to even attempt to fix this situation.

What should I start looking into first?

Judging from the rounded surfaces and the post-application deformations, I'd wager that you have an unapplied Subdivision Surface modifier. Once you've applied the boolean operation without applying the subsurf, the subsurf operation is now operating on the circular cutouts as well as the original mesh.

Consider not applying the boolean operation if possible. One of the biggest advantages of the boolean workflow is the procedural aspect of it. If not, backup the model and apply all other modifiers before applying the boolean.


When Rendered In Cycles Lamps Seem To Disappear When I render there seems to be no lighting in the scene.

Here's a link to download the files

https://drive.google.com/open?id=0B4y9dqUn871TdnhGVzg3czFGY2s

An area lamp in your scene is restricted from rendering.

Open an outliner.
Select the lamp with the Render icon turned off and enable rendering.


View in weight paint mode is too dark I just switched from Blender 2.79b to 2.80 and I was playing around with 2.8, but when I got to weight painting, the object is so dark that I can't see the vertices of the object. I've set my monitor to the highest brightness as well, and it doesn't fix the issue. Also, is there a way to lock my screen to orthographic? Thank you for reading.

I guess you're using "Look Dev" Shading while using a dark Material/bad lighting. Press Z and switch to "Solid"


What's the best way to sculpt or texture without a drawing pad? I need to make custom sculpted or textured things, and I notice the restrictions of using just a mouse versus having a drawing pad or display tablet.

The workflow is very jotted, unnatural feeling, and just slower when sculpting or texturing with just a mouse.

For those who don't have a drawing pad, but are doing modeling tasks that would encourage one, what are some tips to make the work more efficient?

I think you need to get yourself a tablet if you feel you need one. There is nothing wrong with sculpting with a mouse only as well, it will be a different experience and it will tend to take longer because you cannot control the pressure, but you can draw a couple of weaker strokes on top of each other so it's kind of similar to one stoke that is stronger in some parts. If you practice more you will get more efficient at it. It is generally easier and faster to sculpt and draw with a tablet. If you just got one and it feels terribly uncomfortable to use it, don't worry, that is natural, you need time to get used to a tablet once you start using it. The unnatural feeling should go away in a few months of using it.


Exception Access Violation when trying to add face to new Facemap Beginner Python scripter here, upon running my operator Blender crashes, inspecting the crashlog just yields an EAV as described. The crash appears to happen at the
"facemaps[x-1].add(face)" line. I haven't been able to find much information about the new facemaps so have only been going off what I found on other similar properties.
I cannot use vertex groups as an alternative as during subdivisions they blend out into other vertices which is not ideal for my purposes.
   def execute(self, context):
        obj = bpy.context.edit_object
        me = obj.data
        bmsh = bmesh.from_edit_mesh(me)

        verts = []
        facemaps = []
        face = [0]

        x = 1

        for f in bmsh.faces:
            for v in f.verts:
                verts.append(v.co)

            face[0] = f.index
            facemaps.append(obj.face_maps.new( name = str(x)))
            bpy.ops.object.editmode_toggle()
            facemaps[x-1].add(face)
            bpy.ops.object.editmode_toggle()
            x = x + 1

Perhaps the cause of the crash was accessing an invalid reference.
>>> import bmesh
>>> obj = bpy.context.edit_object
>>> me = obj.data
>>> bmsh = bmesh.from_edit_mesh(me)
>>> bmsh.faces
<BMFaceSeq object at 0x000002686604A600>

>>> bpy.ops.object.editmode_toggle()
{'FINISHED'}

>>> bpy.ops.object.editmode_toggle()
{'FINISHED'}

>>> bmsh.faces
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ReferenceError: BMesh data of type BMesh has been removed

The following script is based on the examples in API documents.
def execute(self, context):
    obj = bpy.context.edit_object
    me = obj.data
    bmsh = bmesh.from_edit_mesh(me)
    fm_lay = bmsh.faces.layers.face_map.active

    for f in bmsh.faces:

        fm = obj.face_maps.new( name=str(f.inded+1) )
        f[fm_lay] = fm.index


Deform mesh along two curves I'm trying to modify a mesh so that one side gets modified along a curve, and one other side gets modified along another curve.

I tried with vertex groups but it only moves the vertexes in the group, without deforming/moving the rest.

Lattice would be an altenative, I guess, but using curves would make my task easier.

Graphic example as usual:

How do I get the mesh to go all wibbly-wobbly with the bottom face following the bottom curve and the top face following the top curve?

Update:

This is the desired effect

I got it to work in this real simple example by creating a lattice with u:20,v:1,w:2. Grouped top and bottom vertexes in two different groups. Added a a curve modifier to top group along the top curve and another one to the bottom group along the bottom curve. It works in this easy case, but it's not really versatile.

What if I wanted to do something like this? Where the inner edge loop of the torus follows the inner bezierCircle and the outer edge loop follows the outer bezierCircle, with all other edge loops arranging harmonically

You can achieve kind of that modeling manually.

Select 2 curves, join them, convert to mesh and use Bridge Edge Loops to fill space between them:

Add a loop cut, select it, P to separate selection, and delete new created loop. Enter Edit mode of that separated selection, and extrude it in one of horizontal (in my case) directions:

Join 2 meshes, in Edit mode select outer loops and use again Bridge Edge Loops tool to make faces between them.

I added 2 loopcuts to define another form of the mesh and scaled them by X axis with Pivot set to central loop so to make them not on the default position.
After deleting non-manifold geometry the mesh became like this:

And this is what is done with this technique as for torus:

On the left is the curve I used to define that shape, on the right - the resulting mesh.

It's not ideal and automated, but you may always refine loops' position so it to look in another way.

Advantages

The only one as for me (comparing to Lattice using) - is that you definitely use curves you create to define the shape of the resulting meshes.


how to test if there is a link to a specific node socket? Building a blender 2.8 helper addon to automatiz tasks, I need to test if a node is connected to Principled Alpha socket. If not, I will connect A RGB node.
I fail to check "if any node connected : do something" ...
following code works but I can't do anything if nothing connected found

for m in bpy.context.object.material_slots:
mat = m.material
nodes = mat.node_tree.nodes
for mat_node in mat.node_tree.nodes:
    if mat_node.type == 'BSDF_PRINCIPLED':
        print(mat.name + " "+ mat_node.name +" :" )
        alphasocket = mat_node.inputs[18]
        #print(alphasocket)
        node_in = mat_node.inputs
        #print(node_in)

        for n in alphasocket.links:
            print(n.from_node.name +" connected to Alpha")

OK I've found out

for m in bpy.context.object.material_slots:
mat = m.material
if (mat.use_nodes):
    nodes = mat.node_tree.nodes
    links = mat.node_tree.links
    for n in nodes:
        if (n.type == 'BSDF_PRINCIPLED'):
            print(mat.name)
            alphasocket = n.inputs[18]
            if not(alphasocket.is_linked):
                print("No Alpha node!")
            else:
                print("Alpha node connected")


What What happened to the mesh display panel in blender 2.8? Although I was looking for the "Mesh display" panel in blender 2.8 and I can't find it anywhere, I don't know if they moved it or they still don't put it or even if they put it, help

It's now called Viewport Overlays and located next to the viewport shading options.


Is it possible to merge several vertices at once? I wanted to ask if it is possible to merge several vertices at once? like not having to select the two single vertices that I want to merge everytime and then merging them manually but rather select a bunch of vertices at one?

what I have:

what I want:

Make a selection including the vertices you want to merge, but not including other vertices which are close to one another that you don't want to merge, vertex menu CtrlV > 'Remove Doubles', adjust 'Merge Distance' in the toolbar.


Will EEVEE be able to do real time ray tracing? I heard about NVIDIA's announcement about real-time ray tracing - I want to know, will Blender support this in the future? That is, will you be able to see things real-time ray traced (that is to say, get pretty close to getting photo-realistic renderings) in the view port with EEVEE if you have a Titan V card?

I don't really know much about Blender, but I wanna know this - might encourage me to learn it :)

Not in a soon future. NVIDIA's GTX 20 series cards have the ability to do some real-time ray tracing but it's not enough for doing seamless rendering for any scene with high FPS (frames per second). Although, as mentioned here people can use these new graphics cards for renderings using EEVEE or Cycles but Blender is not able to take the advantage of the ray-tracing capabilities of these cards. However, based on some discussions I've had with Blender developers I know that they are considering using NVIDIA's APIs such as OptiX in the future. OptiX is backed by some advancements in AI that allows extremely fast denoising/approximation of ray-traced scenes with only 1 or 2 ray bounces instead of couple of hundreds or more. This way, you can get to pretty high FPSes (e.g. 60 or more) without the need to perfectly track rays for many bounces in the scene. Keep in mind that this is the first series of GPUs being able to perform many ray-tracing operations per second. This will only get better in the future with newer GPUs that will be capable of doing orders of magnitude more ray-tracing operations so that you won't need to do that much of approximation for the final scene rendering.


How do I hide an object from the camera but keep the shadow in Blender Internal? I can do it in Cycles but I don't know how to do it in Blender Internal. I'm using Blender 2.79 btw.

Well, there seems to be this 'Cast Only' in the object's material settings, which seems to do the trick:

But why use internal, I just wonder...


How to make fog in Blender I want to create a scene with some fog. I need the fog to get stronger the further form the camera it is. I already have volumetric lights in the scene, but thats not good enough.

The result should look like that (just... not so... strong?)

THANKS IN ADVANCE!!!!!!!!

So lets go on buddy...

...as You could see on the picture above, we have a few steps ahead.

1) Activate MIST in the Render Layers / Passes as could bee seen in the center of the image.

2) Choose the camera and activate MIST in the Camera / Display section. Now You are able to see the yellow line near the camera which shows start and end of the mist.

3) Now select the values for START and DEPTH in the World / Mist Pass. The line of the camera will follow accordingly.

4) Render your image.

5) Finally, open Compositor in Node Editor and build the nodes like me - the important changes are in the RED rectangle. The Node I added is the Add / Color / MIX.

6) Render your image AGAIN.

Hope it helps, buddy - sincerely, Jan


How to join two separate armatures? Does anybody know how to join two different armatures into one armature and blend multiple animations in it?

highlighting both armature and using Ctrl+J would work


Make multiple Bezier curves manifold and free of intersections, for 3D printing I'm trying to model a character to 3D print it. I'm having some trouble with bezier curves: as they are not manifold (and glitches through my mesh) my slicer can't do anything even remotely printable. The character's eye (a UV sphere) had the same effect and after some stitching it was good as new but I use around 40 bezier curves (used as hair, see below) and even after trying for 5h or so I really don't know how to stitch that !

I've already tried a lot of boolean-based solutions, didn't really work that well, mostly because the part that glitches through the mesh is copied when using a union boolean. I also tried using a union boolean and then a difference boolean using the skull of my mesh with some solidify, didn't work out that well either...

Any idea how to make this printable ? I'm on a kinda short schedule, any help is appreciated !

I think there's a better way to give you the .blend file but maybe that will do ?

I don't know what kind of mesh is needed for 3d printing, but I assume you want to remove the protruding faces from inside the face mesh. This should be possible with a script that would select the vertices of a mesh lying on one side of another mesh. Maybe someone can suggest a way to write such a script.

Here is a (rather tedious) workaround.

In side view you do a cross section select by alt-b to select the upper part of the skull
you then box (or circle) select the vertices from inside
Turn the part round and deselect any vertices that might have got selected
Do a delete face on all the selected vertices
Repeat this process to remove all the protruding faces of the hair mesh
Apply union modifier to create a single mesh out of the two parts

I guess (and I may be wrong), the hair part is already manifold, since the curve is converted to a surface.

Not sure if this would help you. But I am hoping to learn something myself by sharing my thoughts :)


How do I fix a boolean/bisected surface edge? I am trying to slice up my models using the Boolean modifier.

After applying the modifier on my smooth mesh, I get the expected result, a flat dissection to separate my mesh into two.

The problem lies in how I can resolve the visual "jaggered" edge that separates my (smooth) mesh exterior from the flat dissection face.

Is it possible to achieve a smooth-to-flat variation without this artifact?

I tried to alter a mixture of the two but end up with artifacts, or unwanted blocky flat mesh faces around the dissection edge of my mesh.

Add an Edge Split modifier to your mesh, or turn on Auto Smooth in the Object Data tab of the Properties Window

Also check for duplicate geometry in edit mode with the Remove Doubles operator.


To create bottle neck by extruding outwards all faces normally? I want the portion of the bottle as shown by red arrows in the image.
So I need to do something like extrusion but how to extrude it towards the center and away from the center?

You can extrude along vertex normals to do that. AltE then 'Region (vertex normals)'

edit if previous version does not has this extrusion mode:

Remove the ring, for instance CtrlR then X
Extrude and scale and only on X and Y: E (extrude) s (scale) and ShiftZ (only along X and Y)
Then CtrlE, bridge the loop


How to switch object in sculpt mode? I've search it in the internet. Some of the answer said you can use alt + left mouse to do so. But mine dosen't work... I wonder whether is beacuse I changed my hotkey to left select and some action to alt+ mouse click action or not.
If so , how do I get it back while not changing my own hotkey setting. Or what is the name of that alt + left mouse action call in keymap so I can change it to other hotkeys.
Thank you

Go to the Edit menu, untick the box next to 'Lock Object Modes' so it is off.
This will allow switching to another object (and whatever mode its in). So, you'll have to switch the other objects mode to Sculpt. Once the objects individual modes are set to sculpt, you can switch between them and still be in sculpt mode.
I think the hotkey name is "view3d.select" you can search for it by name in the keymap editor.


Find fracture in a long loop I have an object which is really long and contains a nice shape of loop. It has a fracture somewhere in it, but I have no idea where(I didn't see it when applying modifiers). I want to find out where the point is where loop is cut so that I can remove that point. Who's got an idea how to do it?

You can use the loop cut tool ⎈ CtrlR to find where an edge loop is broken. When using the loop cut tool, the location of the new edge loop is highlighted on top of your model and you can see faces that the new loop does not go through, to increase clarity you can use the  Mouse Wheel or the numpad + to increase the number of cuts.


Editing a Real Dog to Talk Is there any way I could use motion tracking to make my dog look like she's talking? I've seen people use After Effects to animate a dog's mouth and facial expressions, but I couldn't find any tutorials or questions similar on Blender. Has anybody tried this or know of a way to create that illusion?

I guess this largely depends on the amount of realism you're going for...

If you're going for something hyper-realistic like what you see in movies like Cats&Dogs, then you will probably have to model part of your dog's face in Blender and try to match materials and lighting to the footage. That model can then be parented to motion trackers so it matches the movements of your dog (and possibly the camera).

Another, more lo-tech approach would be to take existing footage of your dog opening and closing her mouth and then simply retiming/reediting that footage to match a voice track using Blender's VSE.

Yet another approach might be to distort/morph/warp the footage to give the appearance of your dog opening and closing her mouth in sync to the voice track but: A. I wouldn't know off the top of my head how to do that in Blender (or if it is possible at all - though I suspect it is) and B. the end result would probably look nowhere near as convincing as the first two approaches.


Pixels artifacts when rendering glass BSDF with Cycles I was trying different types of materials with Blender, and I tried to play with the glass with Cycles, but in the render, it makes weird blue pixels on my blue table.

Even in the preview tab it makes those :

And in the render, it is horrible :

This is a simple form ! How could this already fail ?

Thanks in advance for your time !

EDIT 15/11/2018 : A similar question has already been asked at this address, here is the link if you wanted some more intel : Link to the similar question. I would not mark this question as a duplicate because of the "pixels artifacts" keyword, that would guide people like me which search on Google : "dead pixels artifacts". Thanks for sharing this question. Didn't knew these were "fireflies"

Those bright pixels you are seeing are Caustics - the stray rays of light that pass through or reflect from a refractive or reflective surface. Given enough samples they will form a meaningful image of the light that passes through your mesh - but they typically require a lot of samples for this - see @bertmoog's answer to Will increasing samples reduce fireflies? for a really good example of different numbers of samples and the effect on the quality of caustics.

An easy way to avoid them is to disable caustics in the Render Light Path settings :

Another option is to increase the Filter Glossy value on the same panel. This will effectively 'smear out' the single bright dots of caustic to produce more pleasing results with considerably fewer samples - at the expense of the accuracy of the caustics. Interestingly, at Blender version 2.79 this value defaulted to 0.0 (pinpoint caustics) whereas at 2.79.5+ (and 2.8) it defaults to 1.0 which produces a more generally acceptable rendering of caustics 'out of the box'. Adjust the value lower for sharper caustics and higher for rendering with fewer samples.


How to calculate a difference between current and previous location vectors using animation nodes? In my node tree I have a location vector that is streamed from a sensor, how would I calculate a difference between current and previous location vectors using animation nodes?

This answer is based on my other answer about passing data between executions in Animation Nodes.

We store the vector list received from the sensor in memory by storing it in an attribute in the AN python module using this command:

AN.sensorLocations = sensorLocations

At the next execution, if we get the data at AN.sensorLocations it will be that of the last execution. And thus, if we subtract it from the data received from the sensor we will get the information we want. So, the node tree is as follows.

Where the output of the subtract node is the output we require. To avoid any confusion due to order of execution of nodes, we use the output of the subtract node as a dummy variable (A non used variable) _ in the expression node that stores the data. This ensures the subtract node executes before the expression node.

The initial execution will face an error due to the fact that there is no data in AN.sensorLocations, but this error disappear at later executions which is fine in our case because the sensor provide an up-to-date information about the location.


Is it possile to create a flat-color (shadeless) shader in Blender 2.83 that is also flat when in a reflection? Toon BSDF and Shader to RGB not fit for me, and I trying to create flat color shader in cycles. I decided to use this shader, and it works well, until the metallic roughness not "0", then it is reflect like diffuse. I was looking for it on other questions, but there shaders not completely flat. And I want just shadeless material, and this should be reflect like flat. This s blender file, if you want to test shader quickly
Edited:
Diffuse shader added to not to illuminate objects around
Edited 2:
Partially resolved with adding "Is Glossy ray" output to "Fac", but some part of rays still illumnate objects around. Not final resolve

Flat Color

plug RGB node directly, there is no need to use Emission shader

Flat Color in Reflection with Roughness

math Light Path of Camera Ray with Glossy Ray** and use as factor in Mix Shader node

Shadow

current setup generates shadow, if you dont want that plug Transparent shader into top Shader socket of Mix Shader node.

For your Edit2: Delete your Diffuse Shader that generates indirect light on surrounding objects.

Great article to check How the light path node works


how to orient of Z-local-axis through a given Point I have a object 'A' with it's local-axis. And I have a Point 'B' with it's location (x,y,z)

Now I want to the Z-local axis (or X or Y-local axis) of 'A' toward to 'B' (the virtual straight line that Z-local axis be in goes through 'B'). of course the object 'A' not moving, only rotate.

is there a simple way to do it?

You could just assign a Damped Track constraint to object 'A'. (You can set any axis to track the target)..

If at some stage you want to remove the constraint but leave 'A' in place, you can CtrlA > 'Apply Visual Transforms'


How can I stretch portion of a model along a plane/axis? Please see image here for what I'd like to do:

I want to add stretch a portion of the part by 1mm-2mm right at the location of the plane in the image, along the Y (green) axis. This will increase the distance between the screw hole and the cylindrical portion of the part.

What is the easiest way to go about this? I've used a lot of CAD software in my time but learning Blender seems a bit more challenging. I've messed with a few things but the operation I want doesn't seem to be called what I think it'd be, or I'm just doing it wrong.

Help would be appreciated! :)

First you have to configure Blender to work with measurements, enable snap, select increment option (if I am not mistaken enable snap is not needed but do it just in case) then select the part that you want and press G, Y, - (if you want to move it to the right, don't add a - symbol, + means right, but you don't need to place + because it's implicit - blender assumes that) then the value that you want to add (1 or 2 for example). For a more thorough explanation, see this tutorial: https://www.youtube.com/watch?v=kOxN4CHeBPQ


Unable to properly Import OBJ file in Blender 2.8 How does it happen and a solution for this?
I'm learning how to animate in blender and I'm using 3d files i found only for free because i can't draw to create a mesh.
So i found this at https://grabcad.com/library/jeepney-1
When i imported it in blender it became like this

But i open it in meshlab it look like this

In mesh lab i tried to save as obj again to check if it solve the problem but the problem is still there. Blender doesn't properly Import the file.
What is the solution for this? Thank you

For me, it imported into Blender HUGE.  Took me a minute playing with the View clipping to see it.
You can try Clamping the bounds (in the import window) to set a maximum X dimension, for example.
But once I brought it in, it looks fine.  Good luck!


how do I change the settings of an actuator(python) I want to change the time of a object that is added but I am new to python and don't know how to. I am trying to create randomly lasting smoke trails.

Since you seem to be familiar with Python already, you might wanna look into the time property for the actuator in the API. Alternatively, you could just use the addObject method. If I am right it does the same thing but saves you one element in the Logic Bricks.


How to make edges of adjacent objects be visible? On the picture below I have planes inside of the other plane, but borders of all these planes disappear visually in Look Dev mode. But I need separate planes to be distinct.
I'm not talking about Blender view settings, but about shaders, materials...
I need borders of planes be darker. Like they were in Solid mode.

Your question is very imprecise, but if you want to see the grooves on the hull you could do it this way:

Join all your objects into one, merge the vertices by distance.
Select the edges that are supposed to become grooves.
Bevel them.
Give some correction in order to have nice grooves (my version needs to be re-worked in order to have a proper topology because it will mess up once you'll give it a Subdivision Surface modifier.
Extrude.


How to apply transformations to an object using the world matrix? I'm taking a computer graphics course. In one assignment I had to check if a matrix transformation maps points to another set of points

I thought that the best way to learn how this was to use Blender's Python API and try doing this.

These are my set of points

t0 = (−1, −1, −1)

t1 = (1, 1, −1)

t2 = (−1, 1, 1)

t3 = (1, −1, 1)

The set of points I want to get mapped to are

u0 = (2, 2, −1)

u1 = (2, 2, 3)

u2 = (0, 0, 1)

u3 = (4, 0, 1)

and the transformation:

Rotation about the z-axis by 45°, then scaling with sx =√2, sy =√2, sz = 1, then translation by (2, 1, −1), and then rotation about the x-axis by 90 degree.

I created the two objects for the two set of objects. And I want to move the object t (with vertices t0,t1 ...) to the object u (with vertices u0, u1 ...)

#rotation around Z axis
rot_mat = Matrix.Rotation(radians(90), 4, 'Z')

# decompose world_matrix's components
orig_loc, orig_rot, orig_scale = obj.matrix_world.decompose()
#create the translation vector
translation =  mathutils.Vector((2,1,-1))
new_loc = orig_loc + translation
orig_loc_mat = Matrix.Translation(new_loc)
orig_rot_mat = orig_rot.to_matrix().to_4x4()
orig_scale_mat = Matrix.Scale(orig_scale[0],4,(sqrt(2),0,0)) *
Matrix.Scale(orig_scale[1],4,(0,1,0)) *
Matrix.Scale(orig_scale[2],4(0,0,sqrt(2)))

obj.matrix_world = orig_loc_mat * rot_mat * orig_rot_mat *
orig_scale_mat

This is not working, the object gets mapped to a wrong position.
The blue object is the object from t coordinates, the red from the u coordinates, the green one should be overlapping the red one.

What am I missing?

You need to apply the matrices in reverse order.

The code is given below. You can comment the last call (and the createObjs call if the objects are already created) and uncomment the commented applyMatToVerts calls one by one to see the effect of each matrix transformation (see gif above).
The last applyMatToVerts call is equivalent of all the commented calls. It creates a single matrix and applies it to all the coordinates of the object. I am not using matrix world since the objects are at the origin. If they are not, the matrices need to be multiplied with obj.matrix_world.

import bpy
import bmesh
from math import radians, sqrt
from mathutils import Matrix

def getMat(name, color):
    oldMat = bpy.data.materials.get(name)
    if(oldMat != None):
        bpy.data.materials.remove(oldMat)
    mat = bpy.data.materials.new(name)
    mat.diffuse_color = color
    return mat

def createObjFromCo(meshName, objName, coList, matName, matColor):
    bm = bmesh.new()
    verts = []
    for co in coList:
        verts.append(bm.verts.new(co))
    bm.faces.new(verts)
    mesh = bpy.data.meshes.new(meshName)
    obj = bpy.data.objects.new(objName, mesh)
    bpy.context.scene.objects.link(obj)
    bm.to_mesh(mesh)
    mat = getMat(matName, matColor)
    obj.data.materials.append(mat)
    return obj

def applyMatToVerts(obj, mat):
    for vert in obj.data.vertices:
        vert.co = mat * vert.co

origObjName = 'origObj'
origCopyName = 'origCopyObj'
toMapObjName = 'toMapObj'

def createObjs():
    t = [(-1, -1, -1), (1, 1, -1), (-1, 1, 1), (1, -1, 1)]
    u = [(2, 2, -1), (2, 2, 3), (0, 0, 1), (4, 0, 1)]
    orange = (0.8, 0.2, 0.1)
    green = (0.2, 0.8, 0.2)
    blue = (0.2, 0.2, 0.8)
    origObj = createObjFromCo(origObjName+'_data', origObjName, t, '__obj1Mat__', orange)
    origCopy = createObjFromCo(origCopyName+'_data', origCopyName, t, '__objCopyMat__', blue)
    toMapObj = createObjFromCo(toMapObjName+'_data', toMapObjName, u, '__obj2Mat__',green)

createObjs()

origObj = bpy.data.objects['origObj']
origCopy = bpy.data.objects['origCopyObj']
toMapObj = bpy.data.objects['toMapObj']

rot_mat1 = Matrix.Rotation(radians(45), 4, 'Z')
scale_mat1 = Matrix.Scale(sqrt(2), 4, (1,0,0))
scale_mat2 = Matrix.Scale(sqrt(2), 4, (0,1,0))
trans_mat = Matrix.Translation((2, 1, -1))
rot_mat2 = Matrix.Rotation(radians(90), 4, 'X')

# ~ applyMatToVerts(origCopy, rot_mat1)
# ~ applyMatToVerts(origCopy, scale_mat1)
# ~ applyMatToVerts(origCopy, scale_mat2)
# ~ applyMatToVerts(origCopy, trans_mat)
# ~ applyMatToVerts(origCopy, rot_mat2)

applyMatToVerts(origCopy, rot_mat2 * trans_mat * scale_mat1 * scale_mat2 * rot_mat1)


Action Editor keyframes only showing when I have bone selected In the action editor, my keyframes only show when I have the corresponding bone selected. Before, they were showing regardless if I had the bone selected or not. So how can I switch it back so the keyframes show at all times? Any help is appreciated.

In the Dopesheet you may have the Only Show Selected option (former Only Include Channels Relating To Selected Objects) enabled, just disable it.


Render specific layers with python scripts in BGE I have a game I'm making in the BGE that has one scene with a level on each layer and a main menu in another scene where the player can choose the level to play.  What I want is to have a script that will display only the layers needed for the level chosen.

Example: Player chooses level 1 from the menu scene.  Layer 1 of the levels scene contains level one and layer 5 of that same scene contains the character.  Load only the layers needed for the selection and none else.

The game engine has no concept of layers beyond the active one and all the inactive ones.
So the simplest solution is to put the levels on different scenes and use the set-scene actuator.


How do I fix a scene with zero users? I'm using blender 2.83 beta and I'm in the middle of a nightmare with a blender project that is randomly considering my scenes as 0 users datablocks.

It gives a red background on the scene name and a 0 on the left if I open the scenes list.

I didn't even know a scene can have 0 users, but I don't even see a fake user option so...

I'm using the 2.83 beta (updating to the today's version didn't help) on windows 10. I temporarily solved the problem by creating a full copy of every scene (all the scene were actually full copies of the master one) as backup.

Is this a feature? Is this a bug?

Edit 2: the bug has been fixed on Blender side - so if you try the latest 2.83 beta build, you shouldn't have this issue anymore.

Having the same issue and from my tests it seems related to the new undo system introduced in 2.83 beta. Scenes can (randomly?) see their user count drop to 0 after an undo operation. Saving and re-opening the file temporarily fix that, but next undo may have the same effect.
It can become harmful if you use the "Purge All" action to clean orphan data, because those 0-user scenes will be considered as such and therefore deleted.

Edit: I've reported this issue here.

It does not happen (at least in my tests) when using "Undo Legacy".

Preferences > Interface > Developer Extras
Preferences > Experimental > Undo Legacy


Model great, but mesh is very weird! I do not know how to explain what is happening, I imported a model that I had saved some time ago. But it is with the mesh in a very strange way.

I already checked play for a new project, normals, remove doubles, decimate, merge vertex loose, but nothing solves!

Changing Clip value solved my problem!

The models were very large, I needed to increase the clips to view the models without limitations of view, but soon after I diminish them and that's where it began to cause problems.


How to split a Mesh with random_selection I want to split a mesh with random_selection.

My question is: How do I make sure that the "random_selection", selects the faces in a mesh to exact no. as specified by percentage. for example: A 10*10 Mesh contains 100 faces, so 50% of random selection should select exactly 50 faces, but in reality it selects sometime 48, 51, and so on.
here is my noob Code:

import bpy
import bmesh

myob = bpy.ops.mesh
m = bpy.context.object
me = m.data

bpy.ops.mesh.select_all(action='TOGGLE')
bm = bmesh.from_edit_mesh(m.data)
face = bm.faces
myob.select_random(percent=50.0)
if len(bm.faces.select) == 100*50/100:
    bpy.ops.mesh.split
else:
    Pass

I am newbei in Python scripting and blender APIs does not helping me in understanding it clearly on 'How to get access the face information in a mesh'

len(bm.faces) # Will tell the total faces in a mesh
bm.faces[i].select = true # Will select one face at a time

but, how do I know, How much faces are exactly been selected. Any suggestion:

Here is some code I tried:

for i in range(100):
    if bm.faces[i].select:
        fac.append(bm.faces[i])
        count += 1
if len(fac) < 50:
    for i in range(50):
        if bm.faces[i].select == False:
            bm.faces[i].select = True
            fac.append(bm.faces[i])
        continue
    bmesh.update_edit_mesh(m.data, True)
elif len(fac) > 50:
    print (count - 50, "are extra faces." )
    for j in range(100):
        if bm.faces[j].select == True:
            bm.faces[j].select = False
            if bm.faces[j] in fac:
                del fac[j] #problem here
        continue
    bmesh.update_edit_mesh(m.data, True)
else:
    print ("Exactly 50 faces are selected")

I somehow manage to select missing faces to make them 50 faces, but how do I deselect and remove them from list of selected faces.

Here is another take, that randomly selects from all faces using randint(0, len(faces)) pops the selected face from faces list and adds to selected until the desired length is achieved.

import bpy
from random import randint

context = bpy.context
obj = context.edit_object
mesh = obj.data
# check that percent is between 0 and 100.
percent = 40
# test code to run in edit mode
import bmesh
bm = bmesh.from_edit_mesh(mesh)
# deselect all
for f in bm.faces:
    f.select = False
# amount that need to be selected (to nearest int)
select_count = int(percent * len(bm.faces) / 100)
# unselected
faces = [f for f in bm.faces] # could use f.index
# selected
selected = []

while len(selected) < select_count:
    # choose randomly from faces
    i = randint(0, len(faces) - 1)

    # pop and select
    f = faces.pop(i)
    f.select = True
    selected.append(f) # or use f.index
bmesh.update_edit_mesh(mesh)

print("Selected %d of %d" % (len(selected), len(bm.faces)))


How do I make a grunge texture appear only on specific parts of a model? I'm trying to make a cog with scratches on it. However, when I apply the texture, the scratches appear all over the model.
I'd like to only have it appear in a few areas through a procedural texture, such as a noise texture, where the black parts of the noise will show the grunge texture and the white will not (or vice versa). I am using Cycles Render.

EDIT

I forgot to mention that this is for a bump map, if that makes any difference.

To control where a bump map affects a object, all you have to do is is multiply the mask by the bump map. Let me explain.

See a bump map is 1-0, white to black. White is up, black is down and 0.5 is no change.
So when you have a bump map, like this scratches image its values are affecting the perceived height of the surface, if you make more of that image 0.5 (gray) then there will be no change in the bumps.

This is where the mask comes in to play, it too is just a 0-1, black and white image (or procedural texture) in this case. So multiplying the two makes all the places where the mask is black, black; and where the mask is white the bump map stays unchanged.
This goes back to basic math 0*x = 0 and 1*x = x.
Last thing needed is to add 0.5 to everything, so the black (0) is neutral in the bump map.

Here are the cycles nodes. The two nodes outlined in red are the two math nodes used to multiply the mask and the bump map and then add 0.5 to neutralize it. The image texture is just the bump map, and the Voronoi Texture and color ramp define the black and white parts which act as a mask.

(old answer below, is about mixing shaders)

This is pretty easy to do in cycles. The procedural texture acts as a mask, that mask controls the Mix Factor between your base material, and the scratches.

In this picture I have my scratches image in a diffuse node plugged in the top Shader socket of the Mix node, and my base color in the bottom socket.
The procedural texture is the mix factor, after running through the ColorRamp node it get plugged in to the Fac socket of the mix node.

Instead of the normal value slider on the mix node here I am using the Voronoi Texture to define the black and white parts which act as a mask.


Force each new render into sequential render slot Is it possible to require each new F12 render to appear in a new render slot thereby not overwriting the one I wanted to compare it against?

here is a script that switch the render slot automatically after each render
-This is for blender 2.72 and earlier versions :

import bpy
from bpy.app.handlers import persistent

@persistent
def PostRender(self):
        bpy.data.images['Render Result'].render_slot += 1
        bpy.data.images['Render Result'].render_slot %= 7

bpy.app.handlers.render_complete.append(PostRender)

paste and run inside blender

as Ray Mairlot noted the changes in blender 2.73 and later versions require replacing render_slot with render_slots.active_index as follows :

import bpy
from bpy.app.handlers import persistent

@persistent
def PostRender(self):
        bpy.data.images['Render Result'].render_slots.active_index += 1
        bpy.data.images['Render Result'].render_slots.active_index %= 7

bpy.app.handlers.render_complete.append(PostRender)


How do I 'pan' the camera around an axis for an animation? I want to be able to have the camera rotate around an axis, while still remaining pointed at the center of said axis. The camera should pan around the model in a circular motion with the model always in the center of the view. How do I do this?

Another trick that might help is to track the camera to a target.

If you have a specific object you want to orbit around and the motion doesn't have to be absolutely circular then you can add a Track To constraint to the camera with the object in question as your target. If you keep Space as World Space <-> World Space, you'll want to switch the Up: to Y and the To: to -Z.

Instead of directly tracking to the object in question you could add an empty of course, and make sure the empty is where it should be. You then can move the camera freely around, it will keep tracking its target. Set your key frames for camera location where you need them, rotation is handled by the Track To constraint, keeping the camera trained on its target.

The quick way to do this is to first select your target, then Shift + select your camera. Shift + Ctrl + C will give you a constraint popup, select Track To. The first selected target will be automatically assigned the target for your constraint.


Flask crashes blender when ran in command line I'm trying to get a flask server to run in blender with blender -P app.py template.blend, however whenever I do that, it opens up two black windows and the crashes shortly after. I'm getting the error
Error: Cannot read file '/PROJECT_DIR/blender': No such file or directory

Blender quit

Full log can be found here


How to set a background using the cycles render engine with the API I'm just getting started with the Blender API, and I'm trying to set the background texture using the API.

In the GUI, I do the following:

Choose the Cycles render engine bpy.context.scene.render.engine = 'CYCLES'
Press the World context button,
In the Surface menu, press Use nodes,
In the Surface box, Background,
In the Color box select Gradient Texture,
In the box below that select Easing,

I tried to reproduce this in the console, with:

bpy.context.space_data.context = 'WORLD'
bpy.data.node_groups["Shader Nodetree"].nodes["Gradient Texture"].gradient_type = 'EASING'

and I got the following error:

  Traceback (most recent call last):
  File "", line 1, in  KeyError: 'bpy_prop_collection[key]: key "Shader Nodetree" not found'

I spent over an hour reading the doc and Googling, but I still can't do this in my script? Really appreciate any advice how to do this programatically/in a headless script?

Thanks

When you select the Gradient option for the Color item in the World Panel, it runs a number of calls to create the Gradient node and route its socket to the color input of the Background node.

To replicate that process, you can't just call the panel tool that you clicked on. I believe you have to manually add the gradient node to the World nodetree and connect the node to the background node via python.

import bpy

scn = bpy.context.scene
scn.render.engine = 'CYCLES'
scn.world.use_nodes = True

#select world node tree
wd = scn.world
nt = bpy.data.worlds[wd.name].node_tree

#create new gradient texture node
gradNode = nt.nodes.new(type="ShaderNodeTexGradient")

#find location of Background node and position Grad node to the left
backNode = nt.nodes['Background']
gradNode.location.x = backNode.location.x-300
gradNode.location.y = backNode.location.y

#Connect color out of Grad node to Color in of Background node
gradColOut = gradNode.outputs['Color']
backColIn = backNode.inputs['Color']
nt.links.new(gradColOut, backColIn)

#set gradient type to easing
gradNode.gradient_type = 'EASING'


Blender 2.8 Beta (Linux Mint 19.1): No compatible GPUs found - Vega 64 Nitro+ I can't find any working information, how to fix this, and before I was trying to install some other drivers for my Vega, but i accidentally broke my previous installation.

You most probably have installed the open source driver stack that comes with Mint.

On any GNU/Linux distribution, Blender only supports the official AMD proprietary drivers for rendering with OpenCL, meaning you will need to install one of the following AMD OpenCL drivers:

AMDGPU
AMDGPU-PRO

For Linux Mint, this might be a good start

There might be another method to just install the OpenCL part of the AMMDGPU-PRO driver, which is described here, but I don't have the  means to test it.


Is it possible to use vertex paint with symmetry? Mirror modifier not an option Model is rigged, UV-mapped, shape keys made, etc., so I can't cut the model in half and use the mirror modifier to "cheat". Help appreciated.

Spoiler alert, this is only a workaround, there's no native way to paint with symmetry on vertex paint mode, :'(

1) Make a vertex group assigned to one half of the symmetrical model

2) Duplicate-link(pressing "alt-D") the object and mirror the duplicate with "Ctrl + m" and then press "x"

3) Add a "Data Transfer" modifier to the original object

4) Set the source object as the duplicated object

5) Tick "Face Corner Data" and select Vcol, tick on Generate Data Layer at the bottom of the modifier

6) Set the vertex group to the previous vertex group created in 1)

7) You must see the original model with the vertex colors symmetrical and live painting with symmetry, you could apply the modifier when you have finished painting.

8) If the results are not as expected you can play with the method of mapping the source, the default method is "Nearest Corner And Best Matching Normal"

Modifier not viewport seen

Modifier viewport seen, live painting symmetrical vertex colors

PD = I have heard that is pretty hard to implement a x-mirror option for vertex paint mode because vertex color is face-corner data, but I don't believe that, :(


How to draw very thin line on cube? I want to draw black and thin line on cube like this building.

I tryed loop cut, but I don't know how to add color on loop cut line.

How should I do?

If you want that with geometry you could do several things.
If you don't need it to be a continuous mesh you can
duplicate the object, and apply a Skin modifier to the new object, or a Wireframe modifier.

With the skin modifier you need to adjust the thickness in Edit Mode, on the N panel, Mean Radius, X and Y.

With the Wireframe modifier you can just adjust it globally on the modifier.

The results are visually different so you have to see what works best for you.
You can delete some of the unwanted edges on the new object too. if you don't need all the edges.

If it needs to be a continuous mesh, then you have to go by hand making all the loops and extrudes, but unless that is really necessary, I would go with the other options.

If you don't want geometry, just UVmap it and apply a texture, an image or some nodes, like Bricks or even a Colorramp.


Camera follow object and wont allow to move with 3d cursor Ok, so when i am doing my thing, modeling a gun, all the sudden, I cant move my part by the arrows! when i move my object by pressing G or clicking it, the 3D View Camera follows it to! I dont know why all the sudden this occured to me. I might of pressed something on accident.

I dont want this to happen. I tried Reseting the settings, but it looks like its just my project. I am new to blender and I know some advanced things, but i dont know how to fix this. Is this a bug? Can this be fixed? It is very annoying.

Check if you have Lock To Object enabled. In that case, the Blender Camera will always keep a certain object - which is chosen in the list - centered in the Viewport. Lock To Object is enabled if there's an object selected in the field, see screenshot below where it says "Cube". Click the little X next to the object name on the right to disable the locking:


What is the purpose of 3ds Max mode? 3ds Max mode doesn't seem to do what the name implies.  Could someone explain what exactly does it do?

In blender 2.79 in the splash screen and the input preferences you can find a choice between blender, Max3D and Maya. These are not "modes" but collections of keyboard shortcuts setup to mimic other 3D applications. They are to help users who are familiar with other software to start using blender without having to learn new shortcuts.


2 bones, 3 leg pieces. Middle piece is deforming. Why? I'm trying to rig a robot leg that has 3 different pieces (thigh, knee & shin), but I would like to use the standard biped armature, so the leg has only 2 bones.

All fine, it moves nicely, but the knee piece is deforming when I move the bones, it gets squished the nearer the bones are:

The middle piece is 0.5 weight for each bone, maybe I shouldn't do like that, but I'm not sure how would be the best way to do that. I tried adding constrains instead of using the armature deform, but it is very mad lol.

Any tips?
Thanks

Could be sufficient to add a small knee-bone between the others, which is the only one to move the knee?


How to copy Posable Models With textures How can i copy a posable model with Actual image textures (A Robot, Clothed human,
Wizard, The character in the picture below, ECT.) from a running instance of blender, Over to another instance with CTRL C CRTL P?. (An enviroment, Room, ShowStage, ECT.)

You can save the .blend file, then in the new instance of Blender go to File -> Append and select the object.


All cameras looking the same way despite being directed another way I have a simple scene with two starships organized into two collections, and two cameras, each camera looking at one of the ships.

In the course of creating this scene, I must have done something that results in this: all the cameras are now looking at this single ship, even though they are really directed another way, as you can see on the GIF below. In the GIF, I am hitting the 0 key to switch to the view of the selected camera.

There is no constraint (like Track To, for example) applied to the camera. The camera that should be looking at this ship is animated and has a noise modifier applied to it to make it shake. This is also affecting the second camera that should be looking at the other ship, which is also shaking.

What could be causing this?

The camera you refer to, isn't the active one. Press Ctrl+0 to set the selected camera in the viewport as 'active' or make it the actual scene camera under Properties > Scene > Camera, which is basically the same.

Tip: The triangle on top of the 'active camera' is filled up with a solid color.

Manual: https://docs.blender.org/manual/en/latest/editors/3dview/navigate/camera_view.html


Use modern features like SURF in camera tracking? There are plenty of modern and effective features, which are suitable for camera tracking, like SURF. Does blender use them? Apparently not, because it's camera tracking feature requires a lot of by-hand operations.

Is it possible to use that modern features in blender? Probably licensing prevents this, but may be there is some workaround for the problem?

Blender currently uses a KLT-Tracker (Kanade–Lucas–Tomasi) which is documented here .

While algorithms like SIFT and SURF are patented, ORB (Oriented Brief) could be an alternative (BSD licensed) it was developed in 2011 and is already implemented in openCV

ORB

I have no idea whether there are plans to use other algorithms in Blender.


unexpected result from boolean difference Source object is solid

Why???? v2.92.0

This is one of the most common mistakes new users of Boolean modifiers make, so I'll give a detailed example.
Add a cylinder to a scene with the default cube.  Scale the cylinder by .5 and move it +1 on the Z axis.  The result looks like this:

Select the cube. Add a Boolean modifier and set the modifier object to the cylinder.

Nothing seems to have changed in the scene:

The Boolean modifier has worked, as you can see from the wire frame below, but the cylinder is still in the scene, so in solid mode it doesn't look like it worked:

By convention, when a object is used like the cylinder, it's referred to as a cutter.  The workflow for cutters has a few more steps usually:

Parent the cutter to the object it cuts.  This allows you to move the cutter around, but if you move the object the cutter moves with it.

Remove the cutter from the render.  If you leave the cutter in the render, then it will show up.  One way to remove it from the render is to put it into a separate collection and disable that collection.

Change the way the cutter looks in the viewport.  You can go the the cutter's object properties; open the Viewport Display panel and change Display As to Wire Frame


Light an object with an inner light and volumetric world I have a set up where there's a box with holes (dice) with a point light inside it, with volumetric settings, so that the rays coming out of the cube are visible.

The problem is, you can't barely see the cube itself.

Is there a way to add another light that faces the cube which is not affected by the volumetric settings?

I thought of doing it in [two different passes][1], but I was curious if this is achievable, by say, setting that new light to ignore any volumetric effects.

Similar question:
Lighting specific objects in cycles with volumetric atmosphere

I'm not using a volumetric world here, so in essence this doesn't answer your specific question, but it does make the light rays coming out of the die visible, while preventing the volumetrics from affecting any other objects. I hope it does solve your problem.
I won't go into modelling the die, because I assume from your question that you already figured that out. However, once you've placed your holes, don't delete the faces. Instead make sure the faces of all the holes are selected, then press AltE to bring up the Extrude options followed by V to extrude along vertex normals. Then drag your mouse or type in how far you want to extrude, confirm with Enter or LMB, and hit CtrlNumpad+ once to expand the selection, to get something like this.

Create two materials, and assign one of them to the now selected faces. This will be the volumetric material. Here's the node setup.

The Position socket of the Geometry node gives the coordinates of the shading point.
The mapping node here really does nothing, but I included it for completeness. Use its location values if the die is not located at the world origin (0,0,0) and its scale values if you want the falloff to be different along the X, Y and Z axes.
The Separate XYZ separates the location vector into three values.
The following math nodes upto and including the last Power node, calculates the distance from the centre of the die, by use of the The Distance Formula in 3 Dimensions.
The Divide node set the outher threshold. Enable Clamp on this one.
The ColorRamp lets you finetune the falloff. Make sure you flip it, by clicking the double arrow, to get the black at the right end and white at the left end. By adding more control points in the ramp and changing each point and/or changing from linear to something else, you can get very precise control over the falloff.
The Multiply node following the ramp sets the maximum density. I've input it into a Volume Scatter, but you can use Volume Absorption or emission, or any combination of two of them or even all three, by use of Mix and/or Add shaders.

Here is the result.

I've used a cube and square holes. The cube is placed at the world origin, where there is also a point lamp with default settings. Environment light is turned off, and the external light comes from a sun lamp.


Armor on model doing weird stretching I was following the tutorial for making a basic rpg character and armor for that character (video for reference: https://www.youtube.com/watch?v=rzau6SFcNOk&t=665s). As I was going through it, I saw that my armor on the model was doing some weird stretching and I thought it might have something to do with weight painting and that helped a little bit but I am still having the stretching issue. Please let me know if you have any ideas to correct this issue.

SEE THE FILE BELOW THE IMAGE FOR THE FILE THAT CONTAINS THE MODEL

First of all apply the Mirror modifier, otherwise every change you make on a side will be mirrored on the other side.
Try to correct the weight painting: Let your armature in Pose mode, in the Properties panel > Data > Skeleton > put it in Rest pose.
Switch your coat mesh to Weight Paint mode, select a bone and try to correct its influence with a brush, move and rotate the bone to test the influence. Do the same thing for the body.
To give some more precise corrections use the Vertex Groups assignments in the Properties panel > Data > Vertex Groups.
If you still see skin through the coat you can either: Use a Mask modifier to mask this part of the skin / delete this part of the skin mesh / use a Mesh Deform modifier as explained in these videos: https://www.youtube.com/watch?v=imhTnlKrTOY or https://www.youtube.com/watch?v=P6s9H8xX7YA


How to get the UV corresponding to a vertex via the Python API? How do I get a selected vertex and it's corresponding uv vertex?

A vertex I can get with

bpy.context.active_object.data.vertices[0]

A uv vertex I can get with

bpy.context.active_object.data.uv_layers['UVMap'].data[0]

But the index is not the same for uv and mesh vertex.

As madlaina says, A vertex doesn't have a 1:1 corraspondance with UV coordinates.

However using BMesh you can loop over a vertices connected face corners (loops), and find the UV's used by a vertex.

Heres a script that prints all vertices UV's in editmode.

Both the first-uv found (which is OK if you assume all UV's attached to a vertex will be the same).
And the mean average.

import bpy
import bmesh
from mathutils import Vector

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

def uv_from_vert_first(uv_layer, v):
    for l in v.link_loops:
        uv_data = l[uv_layer]
        return uv_data.uv
    return None

def uv_from_vert_average(uv_layer, v):
    uv_average = Vector((0.0, 0.0))
    total = 0.0
    for loop in v.link_loops:
        uv_average += loop[uv_layer].uv
        total += 1.0

    if total != 0.0:
        return uv_average * (1.0 / total)
    else:
        return None

# Example using the functions above
uv_layer = bm.loops.layers.uv.active

for v in bm.verts:
    uv_first = uv_from_vert_first(uv_layer, v)
    uv_average = uv_from_vert_average(uv_layer, v)
    print("Vertex: %r, uv_first=%r, uv_average=%r" % (v, uv_first, uv_average))


How to just disable a fluid domain? I have a fluid domain that I might need to use again. As a result I wish not to delete it from the scene but I need to make another simulation. Is there a way to disable a fluid simulation - besides applying it to a mesh? So I can keep scrolling between the frames on it?

You can only bake a fluid sim if it is the only domain object in the scene.

Multiple fluid sims can exist in the same scene, to bake a fluid sim you have to change the fluid type of the other domains while you bake. After the bake is finished you can change all of the fluid types back to domain and play then at the same time.

Be careful that you set different cache paths for each domain otherwise they will overwrite each other.


Why the mesh is not inset good way? I have this small triangular mesh. Extracted from the main mesh. The scale rotation are set to 1 and 0. yet to the inset not working good way. I want to have a triangular inset which its not making with my mesh. Its created some ngons and extra edges.

Any help or suggestion to inset the face. Thanks

Why is it overlapping?
Your polygon is not a traingle, there is very small edge (top corner) which overlaps quite easily with default inset tool, due to its relative shortness to adjacent edges.
How to prevent overlapping?
Either merge overlapped geometry after inseting or use shipped add-on called Inset Straight Skeleton (Blender 2.8x) or Inset Polygon (Blender 2.7x), which insets without overlapping. Actually, add-on automatically merges overlapped geometry on every appearance, creating extra loops.
SE: Inset Straight Skeleton enabling and usage info
Sometimes skeleton inset produces bad geometry (wavy and not even) due to precision issues with merging distance. There is a trick to obtain beter results, it involves scaling:

Scale a polygon in edit mode n times (used n=10 factor for pic example)
Inset with amount * n (inset should be relatively bigger)
Scale 1/n times (everything goes back to initial size)

"Scale trick" pic example: (it is a long polygon, but in perpective view for better visibility)


Blender Source File Path How can I define path of source files such as video, image, etc relative to blend file instead of absolute path in Windows?

In blender, when I want to define path of source files I use their absolute path.

When I change blender file location, connection between blender file and the videos, images, ... linked to it get broken.

As I asked how can I define path of sources used in blender file, relative to blender file, instead of using absolute path in Windows?

Just to illustrate cegaton's comment.

Filepaths in Blender are saved as relative by default.

You can still change them to absolute/relative though.
File > External Data > Make all paths relative/absolute.

You can also change this default behavior in preferences:
Edit > Preferences > Save & Load

On top of that, you can set default relative/absolute paths for some types of data (scripts, textures, etc...)
Just go to Edit > Preferences > File Paths


Using knife project method to make a shape into the mesh I’m practising some modelling methods, although I know knife project method is not the best because it can make a mess of the topology, I couldn’t figure out another approach to achieve this particular shape modelled in the middle of the main mesh. I’d like some feedback what other way could I had approached to get that shape made within the main mesh.

Try to start with more simplified geometry connected without n-gons.

Start with 10 sided Circle and continue extrude, scale, as needed)
Use Subdivision Surface modifier to round curved parts
and Edge Crease Shift+E 1 to keep corners sharp.

Similar to this.

Note: I probably used too low topology, when I would like to bevel edges now, I would have to add another loops (alternatively use bevelling on shader level).


How to create light beam effect? (Alone in the Dark opening) How to make this light beam effect on any object, be it text, a cube, one or a single beam from which the beams of light emanates, and give it the movement similar to that in the image?

I add this image, I had an idea of how it was, but I have no experience with this area of FX, or light games

in this video everything is made with blender, in this part in particular it shows a beam of light similar to the effect of the letters, so if it can be achieved, I just don't know how to do it

You could try with a cube encompassing your scene, and you plug a Volume Scatter node into its Volume Output to create a mist. I'm personally struggling with this solution so here is a solution with compositing that comes not too far.

It must be much easier with Eevee and the Principled Volume, but your question is for Cycles and I can't make Eevee work on my computer.

I guess it can be improved:

Create your title. Give it a black Diffuse node, put in front of your camera. Duplicate the title, put it behind the black version and on another layer, in Edit mode extrude a bit and scale it a bit with Shrink/Fatten, give it a white Emission node, with a Strength of 2.

In the Render panel > Film, enable Transparent so that you layers are transparent. In the Node Editor / Compositing, organize your nodes: Basically you need to mix (Alpha Over) the render layer with the black title with the render layer with the white title. I put some blur here and there, but the important things are to put a Sun Beams effect after the white title and a Glare effect just before the Output. The Sun Beam will create the beams behind, the Glare will fake a bit of glow in front of the black title. And you can move the Sun Beam X and Y value as if the spot was moving behind.

Here is what it gives:


Macro in blender? Quick way to set 1 hotkey for "Rotate 90 degrees" in UV editor? Anyone knows how to set a single hotkey for "rotate 90 degrees" in UV editor?

I don't think there's a built in way to do this, so a while ago I created an add-on called UV Rotate Shortcuts.

This adds Shift+R and Ctrl+Shift+R to rotate the selected UVs by 90 degrees or -90 degrees respectively.

The rotation amount can be customised in the add-on's user preferences.


Cycles toon shading and regular shading in same image I am new to Blender and I want to use cycles to render a scene that has both diffuse and glossy textures that have smooth lighting, and a toon shaded object that only has bands of solid color but is affected by the same light sources.

Is there a way to do this? I tried using the Toon BSDF shader but that doesn't provide solid blocks of color.

I am trying to render an indoor dimly lit scene, which seems to be giving me extra problems.

Combining multiple toon shaders with different size results in a banding effect for sharp light sources. However it will still look smoother when more indirect lighting occurs.


Blender Boolean modifier: Difference behaves like union Attached is an example in which difference modifier behaves like union.
Is this is a bug (I think so)?
See this .blender example in which I tried to use boolean modifier difference (Child is subtracted from Parent so modifier is on Parent)
Behavior
In both, the expected behavior is difference, but actual behavior is union
Failed attempts
Before posting here I:

Checked that my objects were manifolds
Checked that normals are pointing outwards (Edit Mode -> Select All -> Ctrl N)
No shared faces between any two objects
Removing doubles (double vertices)
Converting to triangles

I have read extensively on StackExchange and other forums, and watched guides, including this very relevant guide.
Any advice would be much appreciated.

You are trying to use a simple plane as boolean operand here - which is by definition not manifold (a manifold surface must be closed, since all its edges have to have two and only two faces). Behavior of booleans in this case is never really ensured…

Also, your 3DView only shows objects enabled for rendering, and your 'ObjA' object is disabled for rendering, so it's completely hidden from 3DView.

Other than that, I see no issue with this .blend, if there are please be more specific.


How to do what this person did in this video tutorial? https://www.youtube.com/watch?v=ZshtugUVY3A

At around the 21 minute mark he seems to play with the lighting and material colour, but I can't find that in my blender settings! He seems like he has a different control panel, here's mine:

How can I do what he did?

He selected the Lamp Object, and then went to the data panel.

As for your materials, one of your swatches is completely alpha (The current one in your screenshot).
Select it, click the Color swatch, and take the "A:" value all the way to 1.

Then match the positions on the ramp that the video has.


How to render a equirectangular non distorted panorama in Blender cycles? Hi I would like to render my scene as 360x20 degrees (or 360x30) panorama, but without the fisheye effect.

I'm looking for a way to render it so it'd look like that: Example@Wikipedia

I've been trying with panorama - equirectangular, but It seems like I can't get the parameters right.

How would I go about doing this?.

I've tried a couple more times and here are my conclusions:

Equirectangular panorama renders always 360x180 degrees image, so to ensure that our render is not "squished", render aspect ratio must always be 2x1 (width, height)
Right now there's no way to make it 360x20 degrees (Blender 2.71)
If you are desperate for 360x20 (like me), you'll have to use Gimp or other tool to cut 1/9 of your rendered image.
It is very inefficient, so be prepared (1080px high panorama requires rendering of 19440x9720px image, which you'll have to cut to 19440x1080px)

If someone has a more efficient way of dealing with this problem (or I've made a mistake at some point), I'd be happy to hear about it.


How do I bend a Model with an Armature? (Worm, Caterpillar, Tentacle...) I have created a model and added armature to it. I want to bend the center mesh in ^ shape. I tried to solve this with weight painting but it didn't work as expected. Is there a way to bend the model, so it looks like a walking caterpillar?

Any suggestions or help? Thanks.

I'm not sure it will fit your need because it looks like your object is stiff and my solution is rather for a flexible caterpillar/tentacle kind of object. Anyway here is a solution with the Spline IK constraint. Contrary to other methods, you can easily stretch and twist your object in all the directions. Nota Bene: You should use several layers to make it easier to prepare:

Create a 5 bone armature (2 short, 2 long, one short), the first one will be the root, make the 4 other bones as long as the mesh.

Disable the Deform option of the root bone, it won't have any weight on the mesh.

Create a curve as long as the 4 front bones, subdivide it and make the vertices overlay the bones head.

Give the front bone a Spline IK constraint, choose the curve as Target, give it a Chain Length of 4.

As you can see, your curve vertices now control the bones head.

Switch your armature to Pose mode, select the root bone, then select the curve, shift select the bone, and parent with a ctrlP > Bone.

Now to make the control much easier and to be able to come back to a basic rest pose, you're going to create a second armature that will control the curve vertices: First create a bone for each head.

Switch this new armature to Pose mode, select a bone, now shift select the curve, go in Edit mode, select the corresponding vertices, and press ctrlH > Hook To Selected Object Bone. Same for all the other bones.

Now as you can see, the new armature control the curve vertices.

Switch the first armature to Pose mode, select the root bone, then select the second armature, select again the root bone and ctrlP > Bone. Now when you'll move the first armature it will move the whole thing.

Change the display of the first armature from Octohedral to B-Bone, Segment the 4 front bones (2 or 3 segments) to have a more flexible armature. Don't do it if you want to keep a stiff object.

Parent the mesh to the first armature with a ctrlP > With Automatic Weight.

Make sure that the Armature modifier is above the Subsurf. Enable the Preserve Volume option.

It should work.


Creating primitive changes selection I am writing a blender addon that shows a panel with an enum property in the object properties. In some cases if the user changes the enum value, the addon needs to create a new object. I managed to get this working using the update callback of the enum property and bpy.ops.mesh.primitive_cube_add(). Unfortunately, this changes the object selection so that the right column of the blender UI suddenly displays the properties of the new object. Is it possible that the original object stays selected and that the UI keeps displaying my addon panel with the properties of the original object?

I tried to restore the original selection by calling bpy.ops.object.select_all(action="DESELECT") followed by obj.select = True. This does select the original object, but the right column of the blender UI still displays the properties of the new object.

I think I need a python command that performs the same action as clicking an object in the scene graph panel, but I could not find any in the blender documentation.

From https://blender.stackexchange.com/a/38626/58482 I found out that I need to set the active object in addition to selecting it. So using bpy.context.scene.objects.active = obj after creating the new object seems to solve the problem.


Compositing node not showing up in render I created a simple render with a compositing node: the "fog glow". I want to make one object give off this glow. However, not only can I not find a way to affect only that object, it doesn't even show up in the rendered result.

These are the nodes I've used. Am I missing something?

I am using Cycles Render, not Blender Render!

 Here's the render (I was fiddling around with it after a few responses and have come up with nothing, clearly.)

One way is to create two render layers and then mix them in the compositor. For instance

Here is how I made my example

Create the entire scene on layer 1 as usual. For the example I placed a sphere in front of a cube.
Move the object that you want the glow on to another layer.  For the example I moved the cube to layer 2.
In properties -> Scene modify the 'Scene' layers to contain both layers and 'Layer' layers to contain only layer 1

Add a new Render Layer.  Being lazy I left its name as "RenderLayer.001". Adjust its 'Layer' layers to contain only layer 2 and disable 'Use Environment'


Only show colour and NOT transparency? I have a hair texture , and i took away the white background , but the white hasn't gone away yet!? I want it so all the white is gone and it only shows the colours on the texture .

![Added][3]

There are generally four steps to make sure the viewport alpha display:

Set Transparency Alpha value to 0.000 in Material setting;
Toggle Alpha influence in Texture setting;
Switch to GLSL shading mode in 3D View Property panel;
Use Texture as viewport shading type.

Besides, make sure Using Alpha is toggled in Texture panel, although it's set as default. And you may want to use UV as the coordinate type of texture mapping for most of the case.

However, it is interesting that you can even preview it without assigning any material, even in the default Multitexture shading mode (just like when you drag and drop an local image onto a object in the scene). And of course, it cannot be rendered, since no material assigned.


Making a Video using only text, correct way to do this? I'm Trying to make a video using just Text, but I don't know the best way to do this.
I just want some kind of simple 2D edition also on my computer blenders take too long to render 3D scenes, what would be the best way to do this?

I have to create scenes for each group of text I want to show?
Or maybe it's better to just use images with text?
Or just use one Scene and use keyframes to get text inside and out of a the scene?

Since Blender 2.76 (or more exactly since the Gooseberry Branch) there is a new Text Effect strip that you can add in the VSE which should help you do what you want to. There are already enough tutorials out there if you need some help.

Just Add Shift+A an E̲ffect Strip... T̲ext. You can animate it's opacity if needed and change it's size and position.


How can you join objects without merging vertex groups? (2.79b) everyone. I am using Blender 2.79b, and I am running into trouble. I have a character mesh that I created, and then selectively separated into multiple objects for easy editing (outer skin, teeth, claws, mouth, etc). I created a vertex group for each object, with the same name as the object. Now that I have finished tweaking things, I am attempting to recombine all of the objects as one using Ctrl+J. However, when I do this, all of my vertex groups seem to merge into one, which is screwing with my textures, my UVs, all of it. Is there a way to join objects without actually merging vertex groups? I have searched on Google, asked in FB groups, and looked at the suggested posts on this site for my question title (didn't find anything that actually matched there). Any help at all would be appreciated.

You need to give them different names. If you have two objects with the same vertex group's names they will merge into one vertex group. If you have objects with different vertex group's names they will stay separated as before.
I hope it helps.


Dual functionality for a single hotkey (S for Scale) - similar to the G hotkey for Move and Slide Move If you press "S" you activate the scale tool, but I'm trying to create a script where if you press "S" again while the tool is already active... you start to cycle between pivot point modes (median and individual specifically). It's similar to pressing the G key; press it once and you get the Move operator, press it again and it switches to Slide Move.

What command can I use to check if Scale is already running and ONLY THEN switch pivot modes?

I know it's easier to just do the cycling with a separate hotkey, but the point is to re-use the "S" key to both activate the tool and then start switching pivot modes if you keep tapping it.

My script already switches between two Pivot Modes, but I'm missing the "IF SCALE IS RUNNING" check. How can I go about doing that?

#OPERATOR WILL RUN WHEN "S" IS PRESSED

import bpy

#Using this in case I want to add more modes later
pivot_modes = ['MEDIAN_POINT', 'INDIVIDUAL_ORIGINS']
i = 0

#IF SCALE IS ALREADY ACTIVE:

#Store the original Pivot Point
pivot_point = bpy.context.tool_settings.transform_pivot_point[:]

#Change Pivot Modes
if pivot_point == pivot_modes[i]:
    bpy.context.tool_settings.transform_pivot_point = pivot_modes[i+1]

elif pivot_point == pivot_modes[i+1]:
    bpy.context.tool_settings.transform_pivot_point = pivot_modes[i]

#ELSE:

    #Make sure we always start with Mediant Point Mode
    #bpy.context.tool_settings.transform_pivot_point = 'MEDIAN_POINT'

    #bpy.ops.transform.resize('INVOKE_DEFAULT')

Edit 1

I found out I can do this:

#If tool is already running
if bpy.ops.transform.resize('INVOKE_DEFAULT'):
    #Toggle Pivot Modes
else:
    #Turn it on
    bpy.ops.transform.resize('INVOKE_DEFAULT')

... which I feel is a step forward but doesn't work because the IF statement also activates the Scale operator, so it's always going to be True.

Plus, the script doesn't seem to run again while the Scale operator is active so there's a deeper issue I haven't solved.

I found the answer in a different post which goes into more detail on how to get it to work.

I don't know if this is allowed but I will link to the original post for a more detailed answer:

Link: How to define double shortcut like GG

Here is the code I used. The explanation on how to set up the keymap so this works is in the post I linked. Once everything is set up, I can tap the S key multiple times, first to activate the scale operator and any subsequent presses toggle between two Pivot Modes I specified.

import bpy
from bpy.props import IntProperty, FloatProperty

class ARC_CustomScale(bpy.types.Operator):
    """Allow SS with the Scale operator, similar to pressing GG to toggle functionality
       of the move tool while the operator is still active"""

    bl_idname = "arc.scale"
    bl_label = "Scale (ARC)"
    bl_options = {'REGISTER', 'UNDO'}

    count=0

    def modal(self, context, event):
        self.count +=1
        if self.count ==1:
            bpy.context.tool_settings.transform_pivot_point = 'MEDIAN_POINT'
            bpy.ops.transform.resize('INVOKE_DEFAULT')
            print("First Press")

        elif event.type == 'S':
            bpy.context.tool_settings.transform_pivot_point = 'INDIVIDUAL_ORIGINS'
            bpy.ops.transform.resize('INVOKE_DEFAULT')
            bpy.context.tool_settings.transform_pivot_point = 'MEDIAN_POINT'
            print("Second Press")
            self.count = 0
            #return {'CANCELLED'}

        elif event.type == 'LEFTMOUSE':
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.object:

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "No active object, could not finish")
            return {'CANCELLED'}

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

def unregister():
    bpy.utils.unregister_class(ModalOperator)
ARC_CustomScale

if __name__ == "__main__":
    register()


Some parents of a hair particle system go underneath faces I've got a problem where some particles of my hair particle system go underneath certain faces.

The normals of those faces are faced correctly and the same way as all other faces.
Vertex paint is relatively smooth and does not have random faces not selected.
Changing the seed number does not make the problem go away/change to different faces.

Image description:
1 Showing (poorly drawn) faces with missing particles
2 Wireframe of image 1, showing me that there are indeed instances of the particle system there, just underneath the surface
3 Render of image 1
4 Shaded mode of different part of the image with the same issue, faces with the problem are indicated by green arrows
5 Vertex weight paint of the same part of the image as 4

Added a subdivision modifier to change the geometry of the surface on which the particles are being placed on (not the particle itself), which fixed the issue. Not ideal, but it works.


How can I add a material to a curve like a regular mesh? How can I add a material to a Bezier curve like you would in a regular mesh,  in Cycles?

Adding a material to a curve is actually very simple :).

Adding the Image Texture, which is correctly UV mapped is much harder. If it is an object which won't be visible well in render (a background element for example) you may use this kind of node setup. The texture distortion wouldn't be much visible...

But the seams would.

You may try to blur them a little increasing the Blend factor in Image Texture Node.

If you don't want to have the seams visible, the only way is to use Convert to mesh from Curve option (ALT+C), then unwrap the mesh and use the UV Coordinates in Texture Coordinate Node. Next paint over the seams in Texture Paint Mode.

As @NoviceInDisguise said, you may always try to use Procedural Texture and use the Generated Coordinates.


How to texture-paint individual pixels In 2.79 I can draw individual pixels by setting the brush size to 1px, like in this example (16x16px image):

Starting from 2.80 the drawing produces extra pixels:

As you can see the antialiasing is disabled, I also tried to tweak all the other settings, but wasn't able to achieve 2.79 behavior.

Starting from 2.80 to NOT produce extra pixels, you can change brush falloff graph in way shown on the gif above.
Make a sharp transition from brush center to it edges.
As you can see radius is setted to 1px, Anti-Aliasing is disabled, 4x4px texture size.


How can I manage to bake this out? So the objective is to get it to look like this:

Blend file http://pasteall.org/blend/34831

I'm using cycles render for the material and I want to bake it out so it looks like it does in the render above. The black material bakes out fine with combined as a setting; however, the metal material will not seem to bake out properly no matter the setting.

Thanks in advance.

This is because the glossy metal material will appear different from different camera angles. So it's impossible to bake it to a single static image and have it look like it should from any given camera angle.

There was a patch which allowed for glossy materials to be baked as if they were being viewed from a single pre-defined point, however it was removed from master shortly after it was added.


Attaching a curve by its endpoints to two spheres Is it possible to attach the endpoints of a curve to two spheres, so that the endpoints would always move with the spheres even when moving the spheres independently of each other? Optimally it should also stretch and compress as the spheres move further apart and closer to each other. I'm doing animations of chemical reactions where I'm depicting the bonds between atoms with a curve which should stay attached to the animated atoms and I'd rather not calculate the transformations for the bonds separately.

This is a great case for hooks.

Position your two spheres where you want. Then add the curve between then with the two ends where you want them to touch on the spheres.

In object mode select one of the spheres then select the curve; hit Tab to go in to edit mode. In the curve's edit mode select the end point of the curve on the same end as the selected sphere, then press ctrl H. Choose hook to selected object.
Repeat for the other end of the curve on the other sphere.


How to find anything by query in blender (not F3) How do I find the checkbox for denoising (cycles) by searching for denois.
The manual [0] is no help, I can't see
Render Layers ‣ Denoising

[0] https://docs.blender.org/manual/en/latest/render/layers/denoising.html

new feature in 2.91 Display Filter or Property Search allows you to ctrl+f to find things and alt+f to clear search field
link


move object without changing origin I have an armature which has its origin at 0,0,0. I want to move the armature so that the lowest zvalue of it's bounding box is placed at 0,0,0 using python as shown below without changing the origin, as I want the origin to stay at 0,0,0.

This is my armature with origin at 0,0,0

Result I want:

This is probably more akin to "moving the object origin without changing the location".  The object's origin is the location of (0, 0, 0) in local coordinates.

Basically, find the minimum z location (minz) of all bones' heads and tails, then translate all such that the lowest local z is now 0.

With operators, select all bones, translate.

import bpy

context = bpy.context
arm_obj = context.object
arm = arm_obj.data
bpy.ops.object.mode_set(mode='EDIT')
# get min z
minz = min(min(b.tail.z, b.head.z) for b in arm.edit_bones)

bpy.ops.armature.select_all(action='SELECT')
bpy.ops.transform.translate(
                       value=(0, 0, -minz),
                       constraint_orientation='LOCAL')

bpy.ops.object.mode_set(mode='OBJECT')

Without operators (except edit toggle), create a translation matrix (T = Matrix.Translation((0, 0, -minz))) and use it to translate the matrix of each bone.

import bpy
from mathutils import Matrix

context = bpy.context
arm_obj = context.object
arm = arm_obj.data
bpy.ops.object.mode_set(mode='EDIT')
# get min z
minz = min(min(b.tail.z, b.head.z) for b in arm.edit_bones)
# calculte the translation matrix
T = Matrix.Translation((0, 0, -minz))
# translate all bones.
for b in arm.edit_bones:
    b.matrix = T * b.matrix

bpy.ops.object.mode_set(mode='OBJECT')


Voronoi texture have different options I'm following this tutorial:
Ducky 3D - Hard Surface landscape in Blender 2.8
But I have different options in Voronoi Texture node.
How can i get this result?

The most likely reason is the blender version. Make sure you are using the same version. Ducky is using version 2.80.75. I, personally, use 2.90 and I have the same settings as Ducky has.


Mechanical roller animation I am making animations with rollers that move cubes. Here is a video I already made. I animated the cubes by hand...

link to youtube video

I am wondering it is possible to use physics to automate the cubes. I tried using rigid body world and forces like wind but it didn't really work. Is there a way to do this/is there an add-on I should look into for doing this?

Thanks for any help.

How about using gravity? If you put gravity as z=10 (i.e. pushing upwards) and y=10 (pushing against back of stacker), then that would do the stacking. If you then animate the Physics/RigidBody/Settings/Dynamic toggle, you can turn gravity off for each object until the stacker reaches it.

You might want to use an invisible plane or two as passive rigid bodies to control the movement, as the stacker geometry is relatively complicated so might not work well as a collision object.