text:
"Inset" and maybe "snap" to edge or something else than "snap"?
My question is about inset and probably snap.
I would like to inset the face of a cylinder to the size of the face of another cylinder which is behind. I thought it will work by snapping but inset-tool is not snapping at all. Is the snap-tool the right way or is there another option to do so?
I have read the Blender documentation about the inset-tool, searched the internet and forum here for my question without success.
The red arrow is showing the face of the cylinder behind and I want this size of my inset:

Here is my project to see what I need it for or why I ask this question:

(Green shows the cylinder behind and red the size of the inset which I would like to get)

Hi. Couldn't you just inset the face 1/2 the amount of the difference between the diameters of the two objects?

Thank you for the quick answer, but it won't really help me. I thought it would be easy to give an example, but it looks like it just leads in the wrong direction. I'm sorry for that. I'll send another screenshot to hopefully make it clearer.

Yes, Snap is the way to go. Enable Scale in the Snap settings.

I still think curious_1's method applies. The way I would do it is first scale so the radius or diamater is 1 (e.g. if the diameter is $1.3$, then you hit S/1.3 keys), then I scale to get the radius/diameter I want. If precision is important, scale by any amount, hit F9 key and paste an exact value.

Thanks to all of you: I don't think I fully understood your answers - maybe it's just because I'm quite a beginner when it comes to Blender. But your answers still inspired me to find the following solution: I duplicated the target face of my cylinder, checked the diameter of the cylinder behind it and scaled it precisely by entering values directly into the dimensions. Then I used the Inset-Tool and scaled the result exactly like the duplicated face - voilà.

"curios_1" and "Markus von Broady":
Did you even want to tell me something like that or have I completely misunderstood both of you?
"MarkusvonBroady":
The “F9-Key” gave me no option to enter values at all. Have I probably accidentally changed the keyboard layout or is there something else wrong/should I pay attention to something else?

@RumenBelev Snapping instead of scaling would of course also be possible - thank you very much for this advice.


text:
Geometry node paved path
I need to make a paved path. For that I need to offset a bezier curve multiple time and for each curve I want to instance paving stone on it but the shortest curve need to have less paving stone on it and longest curve need to have more paving stone on it.

So I manage to repeat the operation but then I want to get more point on exterior curves

also reuse your setup but only work on one curve

Thank you so much for the help it works exactly like I wanted. I just want the high part to not rotate when I lower the other tangent.
And do you know how I could offset the paving stone every 2 so its not perfectly aligned ?

Once you offset your curves (using their normals for example), resample them by length.

Here's a simplified setup to fill a path with bricks, you could improve it in multiple ways, for example by resampling the curves by length (just one node), or deal with possible pinching (much more than one node)...

yes perfect this works perfectly and much more optimized and simpler node setup

how could I keep the upper part horizontally aligned when I low the end point of the curve   https://imgur.com/a/n5LmNHg

@croustib4t set z-up twist method, or multiply the normal by <1, 1, 0> and normalize.

ok I set a z-up twist method and now works perfectly fine

Nearly the same as this question. And still a not perfect answer, but that could do the job (?)...

Get the pavement tile size in its X axis, add a delta because of the rounded part (if not they will overlap).
Resample the curve with this previous size, but equidistant (see below).
Make a curve from the result, subdivide it as the tiles will go on these subdivisions.
Get points from the curve in order to have its tangent.
Instantiate the tiles for each odd index (the subdivisions above) and rotate their X axis along the curve tangent.
"Resample equidistant": uses a dichotomie along the curve factor so that all points are on the curve but equidistant (native resampling does not guaranty this distance). Please see the question mentioned above for more details.
Blender V4.0 (needs repeat zone)

Edit:
I've add a loop around the solution above, so that you can do it with one single curve.

This loop resamples and shift the initial curve along its normal, so that we have the successive curves forming the path width.

yes that what I wanna do but there you duplicated the curve but I want to do it procedural, I just want one principal curve for the control

you should describe how the curve guides will be. How to define the path width, for instance.

How can I do if I doest want the high part to rotate when I lower the other tangent. And do you know how I could offset the paving stone every 2 so its not perfectly aligned ?

for a irregular tiling, try this: calculate the tile to curve length ratio, and use it to cap the curve alternatively. For the end part, use a boolean to cut exedent tile parts.

source: Stack Exchange

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

sort: votes


text:
Render vs Viewport render discrepancy
I tried following this tutorial , but my render on the left isn't as whispy as the viewport render.  Is there a setting I'm missing?
https://youtu.be/EVj1fETtuN8

In your render the hair particles are not subdivided enough, check if these 2 settings match - first is for render, 2nd is for viewport:

Also in your render it seems there are more hairs rendered, that may be due to children particles and that only a percentage of them is displayed in viewport:

Lastly if you set the same amount of samples for viewport and render, you should get the same outcome:

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


text:
Python check if the texture is enabled

I'm not sure if this question is already answered. In the python, how can i know if that texture in a material is enabled or disabled?
I was planning to get all enabled textures not the disable ones.
Thank you.

If you don't know any name in python properties, you can find it in data-blocks outliner:

In your case the value named use
For example, this points to first texture slot of first material of selected object:
bpy.context.object.data.materials[0].texture_slots[0].use

Darn. I'm new to python but still i didn't know there's something like that. Thank you @Crantisz.


text:
How to fit "n" identical objects in a circle?
I have to fit some n identical cylinders in a circular cross-section of diameter D. I was trying to use the array modifier but that seems to work for duplicating on the curve and not inside the curve. Is there any way to achieve it from the GUI or any other alternative way using python?

Related https://blender.stackexchange.com/questions/80690/random-sized-cylinders-with-no-intersection-gaps

@DuarteFarrajotaRamos I need to arrange the cylinders in a definite order. A definite number of cylinders arranged linearly along the diameter, then decreasing continuously to complete the circle.

Circle Packing I recall a question about it here, can't find it.  Have a look at the wonderful sverchok addon

By a 'Definite Order', do you mean in a definite sequence, or just a definite arrangement? Do you want, for example, triangular packing on a hexagonal lattice?

@RobinBetts I am looking for triangular packing on a hexagonal lattice only. By definite order I mean the arrangement is fixed.

As @batFINGER points out with his link, while you can pack a hexagon easily enough with a triangular grid, optimally packing a circle with circles is a mathematically hard problem to which there is no regular solution. Maybe there's a regular (rule-based) sub-optimal solution you are looking for?

I am completely new to blender, considering that can you help me in this? What I am thinking of is, if possible I can fit hexagons in the circle and then at each vertex as the center, I can place the circle.@RobinBetts

not sure what you mean, can help only with sverchok addon

http://pasteall.org/blend/index.php?id=49632
HERE is solution with maybe many of circles

Please use here for blend files. The paste all file will be automatically removed after a certain time, making the answer less useful in future.

I am not able to understand your logic, can you elaborate a bit, considering I am new to the software.

There is monad (group) of sverchok that contain nodes (select and press tab or alt+G to ungroup) and see what inside. i just filter vertices incoming


text:
Script to save depth images using numpy.save instantly crashes Blender, no debug message in console
I am attempting to save the depth image generated by the 'Z-Pass' as a .npy file to be used outside of Blender.  The following script seems to work perfectly until reaching the line that actually saves the file:
import bpy
import numpy as np

bpy.ops.render.render()

# get viewer pixels
pixels = bpy.data.images['Viewer Node'].pixels
# size is always width * height * 4 (rgba)
pixels = np.array(pixels)[::4]
print (pixels.shape)

ix = bpy.context.scene.render.resolution_x
iy = bpy.context.scene.render.resolution_y
print (str(ix) + ', ' + str(iy))
depth = np.reshape(pixels, (ix,iy,1))
print(depth.shape)

np.save('C:/tmp/depth.npy', depth)

The script succesfully obtains and reshapes the depth image from the Viewer node, but when executing the final line, Blender instantly closes.
I have tried running blender --debug-all and there is no information displayed after the script's print statements.

Any help is appreciated.  I suspect it has to do with Blender running out of memory or perhaps a segmentation fault but I do not know how to  debug it.  Changing the image resolution to use less memory does not seem to fix anything.
Here's the .blend file if anyone wants to try to replicate the issue: Blender file

Blender will only report its own issues, you would want numpy to output some debug info from its save function. The path looks wrong to me - windows use backslash which would be C:\tmp\depth.npy you may also want to try os.path.join('C:', 'tmp', 'depth.npy') or use only a filename to save in the current dir.

Thanks but the path is correct.  The file is created in the directory but does not contain any data.

Runs fine for me (2.79.4 ubuntu 18) after changing path to /tmp/file.npy (/tmp is standard temp folder on linux)  Is C:/tmp your windows temp folder with permissions to write?  Does it not crash if you comment out the numpy save?

Works fine without the save line.  Changing directories doesn't help either.

Try creating the file rather than letting numpy create it - outfile=open('depth.npy', 'w') np.save(outfile, depth) even try writing something to the file to see if it is numpy or system blocking the write.

Does wrapping with  exception handling shed any light.  Have you tried the numpy save command in system console or idle?

A clean install of Blender 2.79 has seemed to fix the issue.  Thank you both for your suggestions.


text:
Why does my boolean keep flickering?
I'm using multiple modifiers and my boolean keeps flickering - sometimes it can't make the boolean work.

Perhaps if you were more specific about what the flickering looks like (screenshots, video, blend...) it would be easier to help

Flickering of surfaces within the 3DView is caused by overlapping faces. With a boolean modifier you get the new generated faces in the same location as the mesh used to perform the cut, leading to flickering.
Having a mirror modifier on a mesh that has faces on both sides of the mirrored centre line can also lead to flickering.
If you want to keep the boolean modifier and not apply it, you can place the cutting object onto another layer (M and select a layer) that is not active or you can hide the object from view (H)

You can also use the outliner to hide/unhide objects.

The eye for each item specifies whether it is visible in the 3DView, the cursor allows you to select the item in the 3DView and the camera is whether it shows up in the final render. Click any of these icons to turn them on/off.
If you have overlapping faces from a mirror modifier then you need to remove the duplicate faces. This may involve deleting everything on one side of the mesh or just the few faces that have overlapped. The mirror modifier has a clipping option that can help line up vertices on the centre line of your mesh.

Sorry, for getting into this old discussion but I am using Blender 2.90.1 and I still don't understand how to avoid having this problem! Please help.

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


text:
How to view value of node output?
My current situation with Cycles nodes:
I'm trying to make particles turn from dark to bright in time. So the Particle Info node has output "Age". But Sticking that value into Mix node produces no or complete change in the mix. So I start trying to math-fix it. I found out I can divide the value and that makes it work, but the particles turn from one to the other too fast, I can only control how far off they suddenly change.
How am I supposed to understand the values? Is trial and error the only way?

possible duplicate of "Map Range" node equivalent for Material nodes?

I realize the wording you use is different, but the answer I gave to this question answers this question directly. (ie, How to make particles turn from dark to bright in time.)

@zeffii, yes your answer does the trick, but I think he asked more about how to "visualize" the values of a node's output (and understand it). I can't figure out how to, though...

could you visualize it with a combiner node to produce a color?

Just connect it to an emission shader. This acts as a sort of viewer node - it has no shading on it and is quick to render.
Possible duplicate of http://blender.stackexchange.com/questions/1691/way-of-seeing-data-as-image-anywhere-in-a-cycles-nodes-setup/1693#1693

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


text:
Dirty UV Map after reset
I have a UV Map and I created another one. I saw that all UV coords from first map remains in second UV Map and I have searched how to clean these coordinates. I found reset option but after applying this option, the UV Map it is not clear, it has some strange lines on background. It looks like in image below:

How do I delete the second map to look like in the image below?(without backround and without any coordinates on it as initially looks)

Upd: I tried reset, this is first image.
I tried to remove UV Map and create another one, it copy existent UV coordinates from first UV Map

Did you try: https://www.google.com/search?q=delete+uv+map+blender ?

Possible duplicate of How can I delete a UV unwrapping to start again?

Updated answer. In that question is talking about Reset: result in first image.

If I will delete all UV Maps then result is what I want, but I have a UV Map that I worked so much...

"I have a UV Map that I worked so much..." - please clarify this. What you originally wanted was to delete the UV map to look like on 2nd picture, which removing UV map does.

I want to clear UV Map to look like in second picture, but I have another one map that I don't want to remove. Problem is how can I clear second map without remove first map.

Thanks for clarifying, I see now. Sadly it's not possible to do what you want, because the result you see on 2nd picture occurs only when there are no UV maps assigned to the mesh. Vise-versa if you see empty UV editor, you know there are no UV maps.


text:
Loop Slide and Cut not working as intended. Any suggestions?
I am working through Andrew Price's (Blender Guru) tutorials on YouTube. I am following his tutorial titled "How to Make Towels - Blender Tutorial". In the beginning of this tutorial, he instructs watchers to create a plane and then use Loop Slide and Cut on that plane by clicking CTRL + R and then simply left clicking with the mouse twice to complete the action. He wants watchers to do this because part of the tutorial requires us to subdivide the plane into 50 cuts, but we have scaled the plane along the x-axis and so when we subdivide, those subdivisions are rectangular and we want them to be square. When I use Loop Slide and Cut and then subdivide, I get the following result:

If you can see it, there are little dots along the center of the plane. The result should look something like the following (but instead of rectangular faces, there should be square faces):

Has anyone seen this problem before? Can you help me get back on track? Thanks for any help you can offer. :)
EDIT: link to part of tutorial when asked to do Loop Slide and Cut: https://youtu.be/PEpsN1-W-Qw?t=89

@RayMairlot Thanks. Just edited the post. See the edit for the link to that part of the video.

After the loopcut he deselect everything, then selects everything by pressing A twice. Then the subdivision operation will affect all of your geometry not just the two vertices you selected.

@Leander that worked. Thanks for the explanation!


text:
How can I fix Black Patches in my render?
I am working on a project that is supposed to have an older game kinda feel. Things were going well. However, when I finally decided on my texturing method, which was using nodes in cycles, I ended up with an ugly black patch on the render.
The normals are all "normal". I played with them for quite some time regardless. This did not work.
I thought, based on its appearance, there may be additional mesh inside the model that I did not originally intend to be there. I turned on wireframe and looked at all angles. NO ADDITIONAL MESH!
Its not on the image texture either.
I tried removing duplicates as well but still nothing.
I've even tried adjusting the original mesh for possible distortion with the unwrap.
I'm stumped. The black patch overlaps two faces awkwardly. This patch showed up as slightly discolored when I tried texturing it in other methods.
Can anyone help with a solution? Are there any other possibilities than normals, duplicates, additional mesh (mesh hiding inside the model causing distortion), or mishaps with the texture that could be causing this???


text:
How to make Holes in Walls, connect Joints and make it symmetric / equal sides?
I started using Blender 4 days ago because I want to try and make games using Unity and Blender. I have 0 experience with code, Blender or Unity but I am eager to learn. So, to get me started I wanted to make some very simple buildings in blender and try and import them into Unity and make a cube run around in it (just to get a hold of the basics). Problem is that I have already run into my first problem major problems!
It took me two days to learn how to make this "hexagon labyrinth"-house", but now I have been stock 2 days without any progress, because I can't figure out how to do the next steps I need, and I have tried all kinds of things and watched A LOT of YouTube and read internet tutorials.

I have made this mesh model the following way:
step 1 (floor): added a cylinder-mesh with 6 vertices
step 2 (center/outer walls): added a tonus with 6 major segments and 6 minor segments and then used "dissolve edges" on the inner and outer edges to make it a "square" hexagon instead of "round" hexagon. Afterwards I made the same steps to make the outer wall as well, but just increased the major radius until it reached the “edge” of the floor
step 3 (Halls/Corridors): I made a tonus with 4 major segments and 6 minor segments and then used "dissolve edges" on the inner and outer edges to make it a "square" square instead of "round" square. Then I went into "edit mode" -> chose "face select", selected all the faces on one side and pulled the "faces" into the inner and outer hexagon walls so they overlapped with the "axis-arrows, green, blue, red (I don’t know what they are called)"
step 4 (All halls): Duplicated the mesh square tonus mesh from step 3 six times and rotated them along the Z-axis so they overlapped the inner and outer hexagon walls as the 1st one to create the results you can see above
What I need to get done is the following:

1st problem: I need to clear a hole in the part of the outer and inner wall (1st and 2nd point as shown in the picture above)
2nd problem: I need to fill the "hole" between the corridors (3rd point as shown in the picture above)
3rd problem: I have tried to figure out how to delete/connect edges that overlap so they "become one". As you can see in the wire-mode the outer wall and floor is supposed to be connected (basicly work as 1 mesh), and yet I can't seem to have the top edge of the floor connect with the bottom edge of the hexagon wall and then have it merge into one. As for now I have made it "appear" as though the 2 meshes are 1 and the same, by sinking down the meshes 0.01 BU down on the Z-axis into the floor.
4th problem: I need everything to be 100% precise. Since I have "pulled" on the walls faces and rotated them I need to know the walls on each side of the inner hexagon are parallel with the wall on the opposite side, and that the space between each side of the halls/corridors are the same (4th and 5th point as shown in the picture above) and that all 6 halls are equally long.
5th problem: My thoughts about making a hole in a wall was to add edges to a part of the wall and then dissolve the 4 edges to “split” the wall, much like you can add points in a drawing programs, but I can’t seem to find a way to add edges to a mesh, making me wonder if it is even possible?
6th problem: I also thought about connecting 2 points/edges into 1 edge (like my overlapping walls). If I can overlap “lines” in blender, shouldn’t it be possible to make those “line” that overlap into an edge and the point where they overlap? Because if I could, it seems like a good way to solve almost all my other problems by connecting the lines into edges and then erase the surplus “line”
7th problem How to perfectly align sides and not just with (eye measure) seems to be an impossible job for me, I really can’t figure out how to do it, unless I got 2 mesh of exact same size, and use the coordinate system and even then I’m not always sure if they perfectly align because when I zoom in a lot it seems as they aren’t perfectly aligned (like how I wanted the outer faces of the floor hexagon, to perfectly align with the outer hexagon wall faces)
I know it’s a long list of problems, but I think it is better to ask now instead of wasting more days without getting anywhere and something tells me that my problems are probably easy to fix for veteran blender users, considering all I build is basically just walls and floor.
P.S I have tried to combine all the meshes into 1 with ctrl + J (which I kinda hoped would remove overlapping edges completely so it became 1 solid mesh) and doing stuff that way as well, but it didn’t really help, and even though I e.g. filled the gap between two walls (like in point 3) it looked, well, weird so and the color of the mesh became darker when I did it. I also tried to just use all kind of weird things to give the results I wanted, but the results are always weird.
I would like to have the lowest polycount at all, which is basicly what I am trying to achive.
If you need more pictures or anything just let me know!
Thanks a bunch in advance to all who tries to help me, because I REALLY need the help!

I think it's very hard to answer all your questions and anyway I would have used an array modifier with an empty as offset object to make this kind of object, but you say you've started Blender 4 days ago, why don't you follow some tutorials with simpler exercices?

Well I if this isn't easy, then I don't really see a future in Blender, I mean this is basicly just square object I want to put together and make with holes in them. How much simpler can it get? To be fair, THIS should be very very simple, so I can't see what else you suggest I make that should be simpler than this.

it is indeed very simple once you've found the right trick, it takes several minutes, but to learn the tools and to understand the logic that will make it simple is not simple, it takes months, and I don't think other 3D softwares are simpler

Which is why I ask for help to tell me the tricks. I don't need to learn a lot of features I won't need in blender. I need to learn the basic to make simple things in Blender. I don't plan to make complex figures, or sculp lifelike creatures. I only need to make low poly meshes and simple structures, which is something I (without knowing) think isn't really as complicated once you know which tools you need to use. I just need to know which tools. I don't need to learn the 10.000 other tools which I probably won't need or ever use :)

do you have a blueprint or a picture of the object?

I should have posted 3 pictures of model I have made in the post where I have drawn upon one of them

I could make what I wanted with just using A LOT of plane meshes, but that would just be an insane amount of time, when I know want I wanted could probably be made A lot after similarly to what I have done already, by using other meshes that just need some editing and removing some parts.

I may not have put the walls and openings in the right place for you in this example, but as a general approach it might be useful... working in the flat on the floor-plan, before raising the walls.

Make a 6-sided circle, with all selected in edge mode. WS subdivide to put a new vertex in the center of each edge, then AltP poke the face.
I inset the faces twice. The first inset is to allow us to bevel the outside edges, eventually, and the second inset marks the route of chamber-to chamber openings.
Select all the edges which may be corridors or openings, and CtrlB bevel them to the width of your corridors.
Select all the edges which may become walls, (or define the width of the openings) and again, CtrlB those edges to the width of your walls.
We can Alt-select the outer edge-loop, and X delete those vertices. Now select the faces you will want to raise to become walls
E extrude the walls out of your floor-plan.

Note you will have to do the extrusions of connected regions simultaneously, otherwise you will have internal faces.
To make a solid floor, Alt-select the outer edge-loop at floor level, and EZ extrude it downwards. With the edges still selected, hit F to fill with an n-gon.

Mate I love you! thanks for the help, I will try and follow you guide! The model you made is EXACTLY as I wanted (except the placement of the holes). Quick question though, I can see you made a closed rectangle at the top part of the model. If selected the 4 edges and press "f" would it then fill up the hole inside, since it is closed? that is basicly the only part that is missing of my problems

If you wanted th kite-shaped area at the top to have a solid roof.. instead of extruding just the walls on its outer edges, select its whole region, and extrude as one piece.

Ahh okay :) fair enough
However, I think I fail to understand your very first step. I make a circle mesh with 6 side, but it's empty inside. So, I tried both "f" inside edit mode, but I also tried with all fill types ('triangle fan' and 'ngon') and then WS but then I don't get those triangles you have in the first picture.
the "edge mode" you talk about in the 1st step. I think I fail to figure out what it is exactly

It's Ngon.. or, if you like, Empty, followed by F with all the edges selected. To get that set of edges with alt-P, you need to select all the edges first, and W>S subdivide them all  once (step 1). (Each edge needs an extra vertex in the middle of it)

Alrighty, so I got this far; https://imgur.com/bYOKYvm
However, the "I" botton confuse me a little, because sometimes it goes into this (where it makes another color and make weird shapes if I extrude it, where it have darker colours). What tool is this "I" ?
Secondly is there a way I can make sure everything is equal in side? While I can make walls now, how can I make sure the values are equal in size? like if all the walls are 1 unit thick?

the reason I ask is because I need the inner hexagon to be exactly one sixth of the outer hexagon :)

Your image shows overlapping faces, as if you have not selected the right edges to bevel before extruding. Have a play with the bevel tool on edges, and inset & extrude  tools on faces, using junk pieces of flat subdivided planes, etc. until you get the feel of what they do.. note the difference between extruding faces and edges.. The best way to get the inner hex exact would be to scale it  in edit mode before the bevel stage, while it is still bounded by a single line. I won't be able to get back until the morning now.. if you're still stuck, we'll move to chat.

I got it done thanks to you mate! It took a lot of fiddeling around, but it was only possible because of you introduction to all those functions you did in your guide!
one problem though, is I can't figure out how I find out the dimesions of each of the parts on the complete mesh (to make sure they are equal in sizes)

In the 3D view >  N property region, while in Edit mode, there's a 'Mesh Display' panel, with an edge > length option, which can show you. If you made all your bevels  of any particular width simultaneously they should be as close as floating-point allows.

I got exactly the result I wanted thanks to the instructions I wanted by following Robin Betts' advice. It took some time and practice, but got want I wanted to create after a lot of different attempt and restarts of the program and fiddling around :)
(So, for anyone in the future who might fall over this post, just follow the steps posted by Robin

This post is very sweet of you, thank you, but it may get clobbered by the SE community for not strictly being an answer to the question. (SE is not a chat forum, it's strictly Q&A, part of whose function is to be an archive of useful answers). If an answer has worked for you on SE, the way to say that is to approve it


text:
Missing Objects after Rendering
What did I do wrong, that Blender do not renders all objects?
I can see everything in the 3D rendering viewport, but when I render my scene, the closest objects are missing. In the camera settings I toggled clipping back and forward, but it doesn't matter.
Does somebody have a clue?

Found the solution. Had to select objects and in Edit mode > W > Clear all restrict render. And now it renders properly! Don't know why and how. ha

You could write this as an answer and mark it as accepted so that this question is answered and closed. Keeps things cleaner than having a bunch of unsanswered questions that are in fact solved.

Found the solution. Had to select objects and in Edit mode > W > Clear all restrict render.


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

After:

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

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

I would like to clarify that selecting all bones, then copying and x-flip pasting them, will not symmetrize the pose, but rather, will invert the pose. So if the right arm was up and the left down before the paste, the left arm will be up and the right will be down after the paste. Symmetrized would mean that either both arms would be up, or both arms would be down.

ok, corrected  ;)


text:
How to color areas corresponding to a bump map?

Hi, I have got a problem here, the engraving on the right side was created using a bump map, but how do I color it? On the left side are the nodes that I am using.
Thanks.

Use a mix node to choose between the two colours you want, connect the bump image to the Fac input of the mix node.

thanks, already solved
| node used : https://i.imgur.com/m1f2NGB.png
| result : https://i.imgur.com/PnB6TDh.png


text:
How do I animate two objects together with different textures
I have got an object (a mouse cursor) and I want to animate it.
But, since my scene is pretty dark, I would like to add a small ball of light, which would also give the cursor a nice sci-fi effect.
The thing is, how can I link to object and animated them as one, without transferring the texture from one to another.
Thank you very much for your help!

I'm not sure to understand, you can have several textures in one object, so you could join your cursor and your light ball and they would keep their own textures... but anyway, you could simply parent your light ball to your cursor so it follows its animation

You could parent the light to the pointer object? Or use a transform constraint on the light to follow the changes like position of the pointer.

Thank you folks, I will try that. I am pretty new to Blender & 3D.

You guys are genious! I've been learning 3D since... Monday and getting better everyday (actually spending 10-12 hours on blender per day) so I got a lot to learn but the community is really awesome and of great help! Thank you folks!


text:
Can blender export files for games, probably for mods?
I'm thinking of creating mods for games. I want to know whether or not I can use blender for exporting game models.

Hi and welcome to Blender Stackexchange. Please read How do I ask a good question?, then use the edit link below your question and add information to make your question more specific and less generic.

its done using the fbx file export from blender generally...you'll have to look at what the game engine your looking at wants for setting up stuff within the file in blender, like collision objects names(ends in _ucx for unreal etc.. since blender exports fbx files i know they will go into unreal 4 at least.
https://docs.blender.org/manual/en/dev/addons/io_fbx.html
for unity
https://answers.unity.com/questions/439807/blender-to-unity-which-export-format-is-best.html
for unreal 4
https://docs.unrealengine.com/en-us/Engine/Content/Types/StaticMeshes/HowTo/Importing
https://docs.unrealengine.com/en-us/Engine/Content/Types/SkeletalMeshes
https://docs.unrealengine.com/en-US/Engine/Content/FBX
https://docs.unrealengine.com/en-US/Engine/Content/QuickStart


text:
Can you view 2 or more layers simultaneously?
Is it possible in Blender to view 2 or more layers at once?
Thank You

Related? https://blender.stackexchange.com/questions/19243/how-to-display-different-layers-in-each-3d-view

Yes, to see more than one layer at a time shift-click on the other layers you want to view. It will make them visible without closing the others.

Yes you can if you hold shift and then click on the layers you want to be viewing they should highlight and you should see all the layers visible in the viewport.


text:
Python: How to select one 'BoolVectorProperty' value at a time unless 'shift' key is held
I am trying to overwrite the bpy.ops.object.move_to_layer operator in Blender so that I can move other objects when the selected objects are moved.
When I try to move the selected objects by pressing the 'm' key and clicking on the new layer in the invoked props popup (from the 'layers' BoolVectorProperty), though, the object still remains in the old layer as well as being added to the new layer because both layers are active, as if I was holding the shift key in the original operator.
The following is my code to overwrite and replicate the bpy.ops.object.move_to_layer operator (I omitted extra code run when the operator is executed for simplicity):
# Blender imports
import bpy
from bpy.types import Operator
from bpy.props import *

class move_to_layer_override(Operator):
    """Move to Layer"""
    bl_idname = "object.move_to_layer"
    bl_label = "Move to Layer"
    bl_options = {'REGISTER', 'INTERNAL', 'UNDO'}

    ################################################
    # Blender Operator methods

    @classmethod
    def poll(self, context):
        return True

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

    def invoke(self, context, event):
        # sets self.layers to active layers of selected objects
        idxs = [i for i in range(20)]
        for obj in context.selected_objects:
            for i in idxs:
                layer = obj.layers[i]
                if layer:
                    self.layers[i] = True
                    idxs.remove(i)
        # Run confirmation popup for delete action
        return context.window_manager.invoke_props_popup(self, event)

    ###################################################
    # class variables

    # This does not behave like scn.layers.
    # only one layer should be selected at a time unless shift is held
    layers = BoolVectorProperty(
        name="Layers",
        subtype="LAYER",
        description="Object Layers",
        size=20,
        )

    ################################################
    # class methods

    def runMove(self, context):
        scn = context.scene
        for obj in bpy.context.selected_objects:
            obj.layers = self.layers
            # insert extra code to run when objects are moved here

def register():
    bpy.utils.register_module(__name__)

def unregister():
    addon_updater_ops.unregister()

if __name__ == "__main__":
    register()

It should behave exactly like the original operator – when a new layer is selected in the invoked props popup, the old layer(s) should be deselected unless the shift key is held. Could someone help me figure out how to do this?

Related

That article doesn't really address my question (at least as far as I understand), though it's similar. I'm asking about whether the shift key event can change the behavior of the BoolVectorProperty in the invoked popup, not whether it can change the behavior of the operator itself.

Use the event from invoking the operator
Using the method from the related answer here, since we can address the event in the invoke,  can it be passed to the execute method of the popup as a class property.  On very limited testing it appears so..
Added some more class properties to keep tabs of selection.  Also copied the selected objects since if a non layer with non matching scene layer is selected context.selected_objects will vary those when op was invoked.  (Btw obj.layers is gone in 2.8)
The big issue is the popup not redrawing correctly. I thought the operator check(..)
method returning True would work, but not the case on my blender.  Perhaps using the layers collection of the context object. when invoked,  would be one way to solve this.
import bpy
from bpy.types import Operator
from bpy.props import BoolVectorProperty

class OBJECT_OT_move_to_layer2(Operator):
    """Move to Layer 2"""
    # class properties
    bl_idname = "object.move_to_layer2"
    bl_label = "Move to Layer [TESTING]"
    bl_options = {'REGISTER', 'UNDO'}

    event = None
    objects = []
    prev_sel = []

    # poll is a class method
    @classmethod
    def poll(self, context):
        return True

    def execute(self, context):
        ev = []
        event = self.event
        if event.ctrl:
            ev.append("Ctrl")
        if event.shift:
            ev.append("Shift")
        if event.alt:
            ev.append("Alt")
        if event.oskey:
            ev.append("OS")
        changed = [i for i, (l, s) in
                enumerate(zip(self.layers, self.prev_sel))
                if l != s]

        print("+".join(ev), event.type, event.value, changed)
        # pick only the changed one
        if not (event.ctrl or event.shift) and changed:
            self.layers = [i in changed for i in range(20)]
        self.prev_sel = self.layers[:]

        self.runMove(context)
        return {'FINISHED'}

    def check(self, context):
        return True # thought True updated.. not working

    def invoke(self, context, event):
        self.layers = [any(o.layers[i] for o in context.selected_objects)
                      for i in range(20)]
        self.event = event
        self.objects = [o.name for o in context.selected_objects]
        self.prev_sel = self.layers[:]
        return context.window_manager.invoke_props_popup(self, event)

    # properties

    layers = BoolVectorProperty(
        name="Layers",
        subtype="LAYER",
        description="Object Layers",
        size=20,
        )

    def runMove(self, context):
        for name in self.objects:
            obj = context.scene.objects.get(name)
            obj.layers = self.layers

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

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

if __name__ == "__main__":
    register()
    bpy.ops.object.move_to_layer2('INVOKE_DEFAULT')

Test print to console
 LEFTMOUSE PRESS [0]
Ctrl LEFTMOUSE PRESS [11]
Ctrl+Shift LEFTMOUSE PRESS [12]
Shift LEFTMOUSE PRESS [1]

Note if you want to call from a shortcut, and have the hacky event handling,  need to invoke from another operator. Edit made to simple operator to call op above (just like calling it from space menu)
class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    def invoke(self, context, event):
        return bpy.ops.object.move_to_layer2('INVOKE_DEFAULT')

Thank you for spelling this out for me; I understand better now. Sadly, though, this only works for me when the operator is called via the script (as you've done in the last line). When invoked with the "m" key, though, the operator does not work correctly as the event object seems to hold faulty information. The printout to the console was seemingly random... Ctrl+Alt NONE ANY [2] or NONE ANY [12] or Alt NONE PRESS [1]. I was not holding down ctrl or alt when clicking on the layers.

or the space bar search menu, .. in which case see edit above.


text:
How to check if mouse is in View3D Window from modal operator (2.80)
In the context of a modal operator, I would like to perform an operation when the left mouse button is clicked in the VIEW_3D area, WINDOW region. (similar to setting the cursor location with a mouse left click, assuming 'right click select' is enabled)
So far I have the following code:
import bpy
from mathutils import Vector

def mouse_in_view3d_window(event):
    regions = dict()
    for region in bpy.context.area.regions:
        regions[region.type] = region
    mouse_pos = Vector((event.mouse_x, event.mouse_y))
    window_dimensions = Vector((
        regions["WINDOW"].width - regions["UI"].width,
        regions["WINDOW"].height - regions["HEADER"].height
    ))
    return (
        regions["TOOLS"].width < mouse_pos.x < window_dimensions.x and
        mouse_pos.y < window_dimensions.y
    )

class SCENE_OT_set_cursor_in_view3d_window(bpy.types.Operator):
    """ Test operator for 'mouse_in_view3d_window' function """
    bl_idname = "scene.set_cursor_in_view3d_window"
    bl_label = "Set Cursor"
    bl_options = {"REGISTER", "UNDO"}

    def modal(self, context, event):
        if bpy.context.area is None:
            return {"PASS_THROUGH"}
        if mouse_in_view3d_window(event):
            bpy.context.window.cursor_set("PAINT_BRUSH")
        else:
            bpy.context.window.cursor_set("DEFAULT")

        return {"PASS_THROUGH"}

    def execute(self, context):
        # run modal operator
        context.window_manager.modal_handler_add(self)
        return {"RUNNING_MODAL"}

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

if __name__ == "__main__":
    register()

This gets me close, but still returns False when the mouse is in the dead space below the UI and Tools regions, as well as the dead space between header buttons:

Is there a way to improve my mouse_in_view3d_window function to account for these additional areas? Blender seems to accomplish this internally, as mouse clicks in these areas are passed through to the viewport (e.g. clicking in 3D space to set the cursor location).
Thanks for your help!


text:
How to avoid doing physics simulation and get the final rendering quickly?
I'm super new to Blender and I hope I'm not offending others asking this. I am baking physics using the method described here and then do the rendering using the code below. However, it takes a while for the simulation to take place and I only care about the final status of the system/simulation. So I was wondering, is there a way to shortcut the simulation and only get the final status/scene?
self.scene.render.filepath = output_name
logfile = '/dev/null'
open(logfile, 'a').close()
old = os.dup(1)
sys.stdout.flush()
os.close(1)
os.open(logfile, os.O_WRONLY)

# do the rendering
if simulate:
    bpy.ops.render.render(animation=True)
else:
    bpy.ops.render.render(write_still=True)

# disable output redirection
os.close(1)
os.dup(old)
os.close(old)

Thanks

No, it needs to calculate each step through the animation to make sure that the physics are correct.  There is no way to "cut in line."
Think about it in terms of a stream of marbles across a plane in Blender.  If (theoretically) you could calculate the end frame, you would image a line of marbles moving along.  But due to calculating the end frame, you missed the fact that a cube slid across the path, pushing marbles out of the way.
Blender needs to calculate every frame to make sure physics are correct.
If you already know the locations of the objects you want on the end frame, then I recommend just placing the objects there.

No and if you think about it, it really does make sense.
Blender does not "calculate" the result. The results are based on the events that are simulated by Blender's realtime physics engine and they can be different every time you run the simulation.


text:
UV stretching when subdividing - how to avoid
I made a mesh with a decent topology, gave it a subdivision before UVing and UVed it after. Even still, when I subdivide it again after UVing I get some very ugly distortions on my checker textures. How to avoid this sort of issue? Frankly the mesh hardly shifts shape when I smooth, and even still the distortion is disgusting.
Edit:

Which tool or operator are you using to subdivide?

Just added a subdivision surface mod, using catmull-clarke

Could you upload it here (or at least part of your mesh, but with textures packed)? http://blend-exchange.giantcowfilms.com/

Of course, hold on a sec...

Strange, when I export, the UVs become ugly af. I try setting the checker textures's tiling
EDIT: got it working, forgot to add the texture coordinate :D exporting now...

A simpler example to see what is happening here:

Now we add a loop cut on the conic part:

And if the loop cuts were on the cylinder part:

In both cases, the proportions are respected in the mesh point of view. But the vertices which are displaced by the subsurface modifier are not at the same position in the UV map. So, they are not kept in place (relatively) the same way.
... a bit hard to explain... but I hope this example is enough to get the point.
In your model, cuts are mainly on the equivalent of the cylinder part here, plus, some are in the cylinder part and others in the conic part (the seam is mixed). So you have distortions.

So at the end I just need some edge loops to minimize the distortion?

Yes... doing it, use 'correct UV' in the operator options

instead of adding additional loops, you can just go into edit mode, select the boundary between two materials, press shift + E and then press 1 to turn up crease weight for that edge.  It'll also cause a sharp edge though, so probably not ideal on a curved surface.  In that instance you'd probably need to apply the subdivision modifier and possibly do the uv unwrap again.


text:
Animate floating dust particles
I wish to create some floating dust particles for animation using a thread here but that doesn't go into the animation part, only the look dev. Could someone tell me how to animate those particles to just slowly float around and fade in and out?
Here is a .blend file:

Put a turbulent physics field into the scene and maybe turn the gravity down if it's needed - that will make the particles move. Spawn the particles inside some volume with no initial velocity.

Use brownian motion in the particles physics settings with some drag and turn off gravity. They'll just bob around in the volume of your mesh then. If you want them to swirl around a bit add a force field vortex

Thanks for the comments, great solutions both of them.
@Jerryno if I'm not mistaken, you are the one behind the thread I linked?
Could you tell me how to make the particles visible? I thought I will solve it easily but to no avail. I can add the scene file if that's more convenient to you.

Sure, comment under the linked answer and I'll try to fix or to expand the answer to make it better. You can share the link to your file in that comment, that will help.

scene_google_drive
@Jerryno Thanks. Here is what I have now.
Sorry, linked answer, just read. editing post now. The linked answer, I don't have a reputation of 50 yet, can't comment on someone else's post. So I put it here for now.

Jerryno I included the blender file correctly now, without messing with some google drive stuff.

The particles are visible to me, they are just tiny and hard to see which is good. You may only need more of them. The scatter density is too high for your scene size, you will also need to lower that (maybe something like 0.0001). I created the picture in my answer by shining a light through a slim rectangular slot in black cube filled both with particles and volumetric shader.

Thanks. And the out of focus stuff, shall I composite or shall I use a DOF object? I plan to move the particles in and out of focus as they move.

By the way I turned off the volumetric cube's camera visibility and I don't need godrays for this one. The light source - candle - is already rendered separately.

I personally prefer post processing dust,  for a still image you would normally just find some free dust particles online and add them in via the compositor. But as for animated particles, I would Google some free dust asset animation packs and add them in the compositor using an image sequence node.
If can't find any online, you can always make your own!

Build a cube and icosphere
Put icosphere on layer 2
Add a particle system to cube and

set emission from volume
change start and end values to 0
set it to emit the icosphere
disable emitter
mess with size and amount

add an emission shader to the icosphere
set the background to black
Set gravity to a really low value
Add a couple of weak turbulence forces to push the particles around
After you animate this, you will have generated your own image sequence that you can composite onto any animation

Side note: if you really want to get fancy, you can use a noise texture set to camera mapping to control the strength of the emission node shader, then animate the x and y values on the mapping node to animate light going thorough the dust.

Thanks, I'm trying that now, the movement is pretty much fine, but I don't get the same nice results as Jerryno got on his solution. I'm using an array of icspeheres that have a displacement modifier applied, this for the random shape. I increased their size but the image looks like it has fireflies. Note that I'm using a volume scatter box as well, this box is different from the emitter box.

Try use a noise texture to control both the density of the volume scatter and the strength of the particles emission. This might give a more dust like feeling instead of fireflies, and you could always try blurring the whole image in the compositor. Mess around and you might get a cool result:)


text:
Particle not showing up in Cycles
I wish to create some dust particles but my particles are not showing up.
I used some generated objects for the matter, put them in a group and use the group for the particles. The size is scaled up to 1.0 but still nothing. You see the particles in wireframe and the objects themselves shaded. I did set the particles to rendered but to no avail. I have them in a box that has a volume scatter material. The particles have a translucent shader and the scene is lit using a sun light.
The two images of the issue:

link to the file:

Could you post a blend?

just noticed there is an uploader. editing....

You have the camera ray visibility disabled for cycles on the "particleCube".

Blender has lots of settings that control such things. Until you know the ins and outs, you are likely to struggle with bugs like this. Glad I could help.


text:
Texture 'swimming' when moving mesh in edit mode
I inherited a file from someone else, and all the textures appear to 'swim' when i move the mesh in edit mode. This happens whether i use UV, generated, object, etc texture coordinates. I'm sure this is a real noob fix but its driving me mad!

Disable the Correct Face Attributes option:

oh my god thank you. its like finally getting a splinter out or freeing something stuck in your teeth. a single check box, so much frustration. thanks!

this option should not be activated by default so you could have just copied pasted or appended your object in a brand new file, but it's always better to understand why it doesn't work I guess


text:
Unexpected dark patch in Cycles render

Hello, could you help me please?
Do you have any idea what's this black spot? (It's extra low-res, just a test render. In viewport, everything looks normal. Thanks a lot!

Hello, maybe overlapping faces, either in the same object, or 2 objects overlapping?

Yes! This is certaily it. When I move the longer grass "layer" particles slightly up, the black spot dissapears. However, this is not the best solution, because this causes change of colors and weird blending.
Should I delete the top faces? But then my grass will be gone...

Yes, I did it. But experience problems anyways.
Nevermind, thank you. At least I am on the right path to solve the issue now :))

If for some reason you have another object that is the emitter and you don't want it to be visible you can disable its visibility in the Particle panel > Render > disable Show Emitter


text:
Does anyone know how to deform this geometry to this surface?
I'm trying these objects, shrinkwrap to this plane on the left but unfortunately my every try ends up with nothing happening or deforming the object.
I don't know what to do?

Do you have some reference of final result? Probably Surface Deform modifier?

Please share your file: https://blend-exchange.com/

Remove the vertex group that is selected in the Lattice modifier of the object Cube:

Also don't forget to recalculate the normals of Body_Guidemesh.001

??? just remove Group? ... Lattice object - Shrinkwrap > Projection > On Surface (Negative)

The vertex group of the object called Cube

@vklidu could you please elaborate? Am I wrong?

Sorry ... Just removing vertex group does nothing for me. I had to change Shrinkwrap method to Projection type (etc. mentioned in my first comment) to get Lattice object shrink.

The default option works for me, it may not be the best option, Project may be preferable as you say, but in both cases the problem is that the object called Cube doesn't deform, which seems to be his problem?


text:
Trying to calculate the dot product between two vectors, but result is always zero .What went wrong here?
I am trying to create a reveal animation by using a linear fallof.
To do so, I've instanced little cubes on the faces of my shoe model and have created two vectors : A-B between the empty A and empty B, and A-point between the empty A and any given instanced cube.
I am now trying to calculate the dot product between those two vectors to influence the scale of my instances, but the result of that dot product seems to be zero since the cubes disappear when I plug the multiply node into the scale.
Here are some pictures to illustrate my setup and the node tree.

I am grateful for your help,
Here is the .blend file:

Clément

to attract move (and lazy people like me) i would recommend including the blend file...so i would have checked it out with blend file - but sorry, i am too lazy to rebuild everything manually. It is not a must - it is my personal recommendation.

Thank you for your suggestion, I will be adding the blend file as an answer to my topic. It's my first time posting so I'm still learning :)

Hi, clemunchkin .. welcome! Thanks for the file. It would still help this question greatly if you could describe the final effect you are hoping to achieve with A,B, and the dot-product

please update you questions based on the answers that was given. the answer answers you problem, so you should change your question.

you should normalize the vector going into the bottom of the dot_product currently (which is the vector from A to B)

You should probably capture your attributes on the instance domain instead of the point domain.

Thank you for your answer! This definitely improved things as my instances are not scaled to zero anymore. However this generates a linear fallof on each side of AB rather than along AB. It's like it's taking the distance from AB rather than the distance from A to calculate the weight. What could be causing this in my node tree?

@clemunchkin this is because it gives a negative value in the opposite direction as the vector, so infact it isn't a falloff in both directions rather a falloff in the correct direction except it is also negative and your instances are being inverted in the opposite direction. to fix it clamp it not to be negative by adding a minimum math node set to 0 after the dot_product.


text:
Proportional edit with a given target position by script?
Is there a way to go from here:

to here:

...using a script?
Trying to be clear: I have a mesh (possibly very big) with some vertices selected. I want to write a script that brings all selected vertices up to the same level (Z = 0). The catch is that I want to do it with proportional edit so that nearby vertices are also raised a bit (not illustrated in the images).
Since the selected vertices are all on different Z at the start I can't just do a translation (with proportinal edit activated). On the other hand, if I just set the Z coordinate to 0 I wouldn't get proportional editing at all. If I translate them one by one with proportional edit I would still end up with some of them higher than 0 (since nearby vertices would mutually raise each other a bit extra).
Maybe I could solve it with cloth simulation or something but it would be tough to do on a big scale.
How can I solve this?

Have you tried the scale (resize) operator to 0 with proportional edit activated? https://docs.blender.org/api/current/bpy.ops.transform.html#bpy.ops.transform.resize

Thanks! Scale operator was the missing piece. Now it seems so obvious.

This is a simple operation that shouldn't require a script, but if you need a script for it, please let me know. The steps are as follows.

Activate proportional editing.
Switch the Transform Pivot Point to 3D Cursor.
Center the 3D cursor by pressing Shift+C.
Select the vertices you want to affect.
Scale to zero along the z-axis by pressing S > Z > 0.
Scroll the mouse wheel to increase or decrease the affected area around the selected vertices.

I attached two screenshots to help illustrate this.

Edit: The following is a script to achieve the same results as the steps above. It's simpler, because most of the setup can be achieved by passing parameters to the operator.
import bpy

# The parameters were exposed here to make it easier to customize the results.
# The scale components set to 1.0 will prevent the selected points from moving along the respective axes. Since we only want the z position of the selected points to move, we set the z-component of the scale to zero (in addition to customizing the center as shown below).
scale = (1.0, 1.0, 0.0)
# falloff and proportional_size determine how the neighboring vertices will move.
falloff = 'SMOOTH'
proportional_size = 3.0
# The center of scaling determines where the selected points will end up when scaled to zero. The x and y-components will not have any effect as we set the scale components along those axes to 1.0.
center = (0.0, 0.0, 0.0)

# Store current mode
mode = bpy.context.active_object.mode

# Switch to edit mode
bpy.ops.object.mode_set(mode='EDIT')

# Perform the scaling operation using the parameters
bpy.ops.transform.resize(value=scale,
                         orient_type='LOCAL',
                         use_proportional_edit=True,
                         proportional_edit_falloff=falloff,
                         proportional_size=proportional_size,
                         center_override=center)

# Restore mode
bpy.ops.object.mode_set(mode=mode)

Scale to Z 0. Of course. Why didn't I think of that? Yes, it has to be a script. Can all these steps be done via script? I guess they can.

I added the script to the answer.


text:
Aligning point’s normals to a curve
I’ve been working to simplify my project I’m having trouble with to smaller bite size chunks. I’ll describe my project briefly below in the hope that if I’m going down the wrong path I can focus in a new direction.
I’ve been successful in applying points to a plane and then adjusting them to my liking. Now I’m trying to do the same thing on a cylinder. I can apply the points and set new positions, but capturing the normal vectors from the source cylinder has been a challenge.

Any pointers on aligning these point’s normals?
The goal is to take a curved model I have a model and create a random wave-like pattern across the whole surface. I’ve done this before, manually, on “cubed” spheres.  This was easier because the underlying mesh was perfectly distributed. First I need to manipulate these points, then add these points to the original mesh, then smooth the transitions between all the mesh points.

Hi, welcome to BSE. First hint: you should add images directly into your question and not link them because the link might break in the future. You can easily copy/paste or drag/drop them into your question. Second one: you should always add a sketch/image of your end result how it should look like into your question so that it is clear what you mean. You can describe an image with 1000 words and  and still an image would you tell more details. Third: if you wanna make it easy for the people who help you for free, you should provide a blend file so we have less work. thx

Hi Chris,  Thanks for the welcome and the pointers. I'll be better!  Regarding point #3, is there a best practice for attaching the blender file?

Points don't have normals, so you have to 'remember' what the Face (or Vertex) Normals were, on the mesh, so those values can be interpolated onto the point-geometry, when it's instantiated. You can do this with 'Capture Attribute':

Edit
As @Markus von Broady has annoyingly pointed out... I'm as blind as a bat. The Distribute Points on Faces node already stashes Face Normals:

I'll try to wriggle out of that by saying if you want interpolated vertex (not face) normals, you'd still have to do something like the first suggestion.

Hmmm  https://i.imgur.com/YDxckKz.png :D

@MarkusvonBroady Grrrrrrr! :D. (see edit).

This is perfect.  I was able to recreate this and apply it to other more complex curves I'm working on.  I'm going to create a new post for my next challenge and include more pictures of the effect I am going for.

I was thinking my random value needed to be aligned to the normal.  The offset needs to be aligned and scaled by the random.  Seems obvious now.


text:
Using Geometry of second object for texture Fac value
Hello I want to use simple mix node and I want to know if there is a way (In Eevee) to use a second object's geometry as Fac value (so that the one color will only be inside of the second object's volume)

To be more specific I want a way to use the second object's volume as the threshold value between 2 colors so the one color will be only visible within its volume.

I've updated this answer to GN Fields.. it should do the job.


text:
Lamp Posts: correctly oriented instances on a 3D curve
I'm trying to create a row of street lights, both the lamp pole and a spot light. Since i can't simply join these two and use an array + curve modifier to set this up (using an array modifier + a curve modifier always deforms the mesh) so i came to the conclusion that working with collections and instances would be my best bet.
To get to my current result i parented the spot to the lamp mesh. Then i parented those two objects to a plane. after that i parented the plane (and so also the lamp mesh and the spot) to a curve that i converted to a mesh. I then activated Instancing for the curve with verts which resulted in something like this:

As you can see the lamps all face the same direction, while i want them to be rotated inwards. There's an option for 'aligning the objects to vertex normal'

but enabling this exposes a multitude of problems:

Problem 1: it turns out there's two instances of every object. (i have no idea why)
Problem 2: the street light meshes get deformed.

Problem 3: the actual lights all face toward the same place

 (I drew over the lamp directions with blue arrows for visibility)
If anyone knows how i can get this to work i'd really appreciate it, but other techniques are welcome too.

V3.1+
With Geometry Nodes and 3.1 version you can use the Curve to Points and Instance on Points nodes to instance lampposts along any 3D curve.
You'll have to do a bit of trigonometry to rotate the lampposts correctly but you don't have to understand any of it. Just plug the Tangent output from the Curve to Points node, multiply it by $(1, 1, 0)$ to ensure the posts are vertical, and plug it into the Vector input of a Align Euler to Vector node, and plug into the Rotation input of the Instance on Points node.
First place all your lamp post objects in a collection :

Here's the node tree :

Here's a quad view of the result :

V3.1-
You can do it by using an array + curve modifier, you just need to use the plane as an instancer.
Select the plane, add an array modifier and set the length to "fit curve", and set your curve.
Add a curve modifier, set it to your curve again.
Make sure to parent the lamp post to your plane, then go to the plane's object properties and select "Faces instancing". Here you go :

Note that this will not work well if you use a 3D curve.
How to tweak the workflow for a 3D curve :
Instead of using a simple plane for the array + curve combo, use an elongated plane in the Y axis.

Then after the Array and Curve modifiers, add a Weld modifier and tweak the distance until the vertices in the local X axis merge. You should now have a series of segments, with both vertices of each segment on the same XY plane. These segments follow the 2D curvature of the curve object.

Add a Screw modifier on the X axis, set the angle to 0°, the steps to 1 and the screw property to a small value.

Now enable instancing on faces.

Hello Gorgious; so do you have any idea how it would be possible to do it with a 3D curve in the latest versions? I was wondering if geometry nodes could solve the problem

@moonboots I don't think one can access curve control points in geometry nodes yet, I updated the answer for a workflow that might possibly work for 3D. It has its shortcomings though for extreme curvatures and when the curvature inverts...

Ok thaks, I'm going to study that, I hope they will come with a simpler solution  ;)

I hope so too ! I think this will get solved sooner rather than later, seeing at which pace they are adding new features for instancing :)

Haha Thanks Robin !! I sure hope there is an obvious solution we just keep missing ><

Looks like no takers... If there's a better way, I can't find it :) Recently, I had to go back to this answer of yours to do it at all . It seems ridiculous to have to twist yourself into a pretzel to do something so commonplace. Nonetheless, I'm very grateful for your ingenuity! And I'm sure others will be, too, until Everything Nodes or somesuch fixes it. I guess there must be an AN answer, but it should be native, really.

That was impressive!!

Gorgious, I've tried your method but with a simple edge and with Array + Curve + Screw (with curve having the Twist Method > Z-Up) and it seems to work, what about this method that seems simpler, does it have a drawback? Actually your Weld just makes an edge, isn't it? So why not beginning with an edge?

@moonboots Yes that's an oversight on my part :) it actually removes one step with your method

great I had a big doubt  ;)   I wanted to make a tutorial about the different methods of duplicating along a curve, I will cite you of course

@moonboots Good idea :) I didn't test it but I'm sure the new 3.0 GN toolset can help achieve it in a less clunky way. Love your channel btw great content ;)

Thanks! Can you use curves in the GN?

@moonboots Yes ! It's a bit dated now but you can watch https://www.youtube.com/watch?v=m_IHcJ1vwgE

well I think your method is pretty easy so I will stick with it  ;)  but yes one day I will need to learn GN

You lose me when you say "both vertices of each segment on the same XY plane" - none of my four vertices are in the same xy plane before I set my weld modifier.


text:
Hide vertices in a mesh
Blender 2.9
I'm working on a big mesh and I would like to hide the "big black dots" (vertices) of the mesh.
For the Edge for example I can do it in the viewport overlays

But for the vertices I didn't find an option to do somethig similar...
Visualy, what I would like to have is something like this (capture from another forum, another program):

in the selected region, the vertices are not marked as dots. That's what I would like to get.
Edit: I do not need to hide the vertices in an specific region. The image is only to show the diference between vertices as "big dots" VS vertices only "as interception of edges", which is what I want. Just hide them or make them really really small...
I hope this is posible to do.
Thanks for any help!

I might be wrong, but to make it short the answer is "no". You can hide vertices with H like edge or faces as well, but hiding the vertices means all edges and faces that are using these vertices will be hidden, too. And I guess that's not what you want.

By the way, the dots are showing the vertices themselves. The overlay settings for edges and faces to not hide them, they are still visible. You can only disable if they are highlighted when selected and if the crease/sharp/bevel/seam marked edges should be highlighted.

Thanks for all those explanations :)

Go to preferences -> Themes -> set vertex size to 1

This is the closer answer to what I was looking for... Which I see, after this discussion, can be synthetize to: "I want the vertices to be very small or dissapear"

Thus, it seems that what I wanted to do is simply not possible (as said by Gordon before). Then, if I don't get any other answer in the comming days, I will mark this one as the solution. Thanks

you are welcome

Do you still need to manipulate vertices? If not you could just use edge/face mode, keys 2 and 3?
Seems too simple to be the answer!

I might have gotten the question wrong, but I think the wish is to be able to keep working in Vertex Select mode and only remove the dots in certain regions.

Indeed, I need manipulate de vertices. However, I do not need to hide the "big black dots" for an specific region. I'm sorry if the image I put has made you think that.

Okay, then the answer @Chris gave is as good as it gets I guess, at least until there comes a Blender version where you can disable the dots.

One way, if it's not too painful, is to work in a Cycles rendered preview:

Then we can select any vertices we don't want to see and hide them-- Cycles will still draw all the faces.  Note that this has all of the other effects of hiding as well, the vertices are unselectable and won't be affected by proportional editing (maybe other stuff too.)
Of course, this is at the cost of a raytrace-speed preview.  Still, even though I generally work in Eevee, I sometimes break this out so that I can see how a proportional edit is going to affect an entire mesh, while having some vertices hidden to prevent them from being affected by the edit.  Shrink/fatten on knife-cut cloth wrinkles is where this comes up a lot.

Thanks. Very interesting. Maybe too complex for the purpose of my question, but very helpful for sure for further work.


text:
How to use dynamic paint with constrained objects
I need to apply dynamic paint to an object (say OB1) that is constrained to another (OB2)! The problem is that although OB1 is moving by changing OB2 location, its "real" position is fixed and thus, the waves do not appear (i.e. if I initialize OB1 location on my canvas plane the waves I want to achieve are in its fixed position). What am I doing wrong?
In the first image you can see that OB1 is attached to OB2 with a location contraint, but its location is (0,0,0). Note that OB1 is a brush, and a hole appears in location 0,0,0.

In the second image I displace OB2 and thus OB1. But nothing happens and the hole remains at location 0,0,0. As you can see "Plane" is the Canvas.

In this second image
I hope my explanation is clear :)

please provide screenshots and detailed explanation what you did...or your blend file

How can I attach the blend file?

You can use blend-exchange. Follow the instructions there. The file size limit is 30MB.


text:
How to import to substance painter?
When I use vertex paint I can Color some of my groupings of objects , but when I switch objects it does not show the Color of the original groupings of objects it only shows what is selected. This is the same for all of my objects. When I export it to fbx it merges all the colours together in a rainbow like pattern. How do I keep my objects colours?
I made a simple building and I coloured the walls different colours.
I imported the fbx into substance painter and baked it and that is when it looked like a rainbow pattern.
I made some cylinders and used them to make a wall. Then I made two cubes into walls for the sides and then I made another cube for the back of the building. I then went to uv editing in object mode and selected the cylinders and made them red in vertex paint mode. Then I selected the walls to the side and made them blue (the red went away). Then I selected the back wall and made it green (all others went back to normal grey Color). I then exported it to a fbx. In substance painter It showed a rainbow and all I could do was set the whole image as a certain Color not the different parts.
Is it the way I am exporting the fbx?  How do I export the fbx so that the different colours show properly on substance painter?

Here is what happens:

'Color Source' is set to 'Vertex Color' in substance painter (Bake Mesh Maps dialog)? https://i.sstatic.net/FoqOb.png BTW: You can also set it to 'Mesh ID' in this case and SP will bake an ID map based on that (without any vertex color painting in blender beforehand). Also, please don't ask the same question many times. If you are not getting answers, or the answers don’t help, then edit your original post with more information and detailing what you have tried that is not working.

It didn’t work the colours were merged together.
Sorry about that I thought my other post was closed, so I made a new one with pictures.  Thanks

Instead of taking photos of your monitor take actual screenshots. See How to take a screenshot, so we don't have to guess if we are looking at a physical issues like reflections or smudges, a hardware issue such as a malfunctioning display, a software level bug or driver, or an or actual artifact or issue with the model itself.

Looking good (technically). Remaining issue is that you've got overlapping UVs and one material for all objects. Either head over to the uv editing workspace, select all objects go into edit mode and pack all islands properly or create one material for each object and make sure you've got proper UV's. In general: substance painter is a material/texture authoring tool, there is no way around supplying good UVs: https://docs.blender.org/manual/en/latest/editors/uv/introduction.html/unwrapping/index.html


text:
When is it acceptable to use roughness without a map input in the Principled BDSF node?
For a PBR material setup, one usually have map inputs for the color, roughness, normal nodes. If a material has an undefined roughness, but it's not perfectly smooth either, is it okay to use the roughness slider as a substitute for a map input? Would such a technique have an impact on the photo realism of the object?

The title has a mistake in it - there is no such thing as 'roughness node'. You are talking about roughness input. It shouuld be something like 'When is it acceptable to use the roughness input without a map for it in Principled BDSF node?'

It is perfectly normal to use a single value for roughness in all the cases when roughness is uniform across the surface for example with smooth clean objects made of the same material.


text:
How to Set Selected Edge Bevel Weight in Blender 4.0
I have code that sets the bevel weight of selected edges in an object like this in Blender 3.3 LTS:
mesh = bpy.context.object.data
mesh.use_customdata_edge_bevel = True
for e in mesh.edges:
    e.bevel_weight = 0.0 if e.select else 1.0

According to the newest Blender 4.0 release notes, these edge weights are now set with the Attribute API. I've played around and searched for a while now and haven't been able to figure out how to set edge weight based on selected edges with the new attributes API. The documentation and examples of the attributes API seem fairly minimal at the moment.
What would the syntax be to accomplish the above goal (setting edge weight based on selection) in the Blender 4.0 attributes API (within an addon's Python code)?

Add a bevel and look in the attributes tab for the mesh

You can access it by:
bpy.context.active_object.data.attributes['bevel_weight_edge'].data[1].value
or write to it with:
bpy.context.active_object.data.attributes['bevel_weight_edge'].data[1].value = 1.0
Where .data[1] is the edge index and .value is its value.
This must be done in OBJECT mode
Sorry, I'd write a longer answer but I just don't have time now :)

Thank you, this was helpful!

Is there no way to set edge weights in edit mode any more? Seems like a downgrade in that case since it was very useful to be able to quickly toggle them while editing the mesh.

@CybranM This was purely a Python way to do it in code, setting OBJECT mode is a requirement in code world

Based on the helpful answer from Psyonic, I was able to implement this with a similarly simple bit of code to the original implementation. The missing puzzle piece I needed was that the attribute's data was referenced by edge index:
mesh = bpy.context.object.data
bevel_weight_attr = mesh.attributes.new("bevel_weight_edge", "FLOAT", "EDGE")
for idx, e in enumerate(mesh.edges):
    bevel_weight_attr.data[idx].value = 0.0 if e.select else 1.0

Yeah, that's the rest of it, but I'd check if it exists before blindly adding it


text:
Keying visibility of object collections with single property in 2.8?
I know this is a common issue, but I can't believe there isn't a better way to hide/reveal objects in an animation, besides moving them far into the distance from camera, scaling to 0 or keyframing the hide_render value, but all of these pertain to single objects, and require adding animation data to each object.
It also appears you can no longer keyframe the viewport hide property either in 2.8 but I need a solution that applies to render and viewport display.
All I want is to make a collection of objects invisible with a single property in 2.8 that can be animated/keyframed, but I cannot find an elegant solution.
I could parent all objects to an empty and apply 0 scale/move far away the empty, but this is hacky and inefficent with regards rendering.
Just wondering if there's a simpler, more elegant solution that I've missed.

Good question, indeed a basic feature for animation which should be implemented.

Again, this may be a hassle and probably a little inefficient for renders but could you add a mix node to your object and hook it to transparency node. Then when you want it to disappear, set the mix to only use transparency, and when you want to see it, the other way. Maybe a little pointless but there you go.

@BigfootBlondy only ideal for very specific scenarios where the objects all use the same material, but when  you just want to toggle visibility a load of different objects with different/multiple materials it's even more hassle.

Is it down to compositing and View Layers, in 2.8x?

You could make a link to object animation data.
First step: Keyframe single object visibility
Select one object and in Object Properties under Visibility keyframe property Show in Viewports. This can be done by hovering cursor over the checkbox and pressing i . Keyframe will be placed in your timeline to current frame. For example you can keyframe object visible at frame 0 by checking the checkbox and keyframing it and make it disappear at frame 100 by unchecking the checkbox and keyframing it.
Second step: Link other objects animation data
Select all the objects you want to keyframe and last select the object that was already keyframed. Press Ctrl + L  and select Animation Data. Now all selected objects will appear and disappear at the same frame.

and thus overwrite the pre-existing animation of all of those objects you want to copy this one keyframe to

One solution for this animation behavior with object collections is:

Instance to Scene the collection you want to animate.

Insert Keyframes to your new instance in Disable in Viewport or in Disable in Renders from the outliner.

Then you can repeat the last step in different frames (changing the visibility before add a new Keyframe)
Also note: you can not animate single objects that were in the original collection, the collection instance is treated as a single object.

This seems to work, but the limitation that you can no longer animate single objects seems really strange. Is there really no way to access the individual object's animation data after instancing the collection into the scene?

It's an old question, but I'd like to share my two cents. In my opinion the best solution is to use drivers. Visibility ("Disable in Viewport" and "Disable in Render") is drivenable. It's better than link the whole animation data because with driver on visibility, you can still animate other properties, e.g. location and rotation, independently.
The driver looks like:

I'm surprised that there is no easy solution. Here is my proposition, based on Geometry Nodes (tested on blender 3.1): the idea is just to use a Geometry node to display a collection, otherwise hidden. This way, you can still animate your objects in the hidden collection.
First, create a collection with all your objects, and hide it. Create a second object, make sure its position is (0,0,0) (here called visibility toggle, the object does not matters, but it can't be an empty because empty can't have geometry nodes attached).

Create then a geometry node for this "visibility toggle" (by opening the Geometry Node editor, and clicking New, then play with Add > search) outputting the hidden collection:

Now, you can animate the visibility of the visibility toggle node, and it will apply to the whole collection.

I stumbled upon this exact struggle, fortunately, we can copy animation data from one object to multiple objects. What you have to do is select one object from the objects that you want to animate appear/disappear, scale it down to zero, keyframe it, scale it back up to one, keyframe it, then select this very object that you just animate first then select the other objects that you want to animate (You can select them in outliner). Then go to Object > Link/Transfer data > Link Animation Data


text:
What is the fastest way to get pixel data out of the camera?
I'm trying to speed up a script that has to generate a black and transparent object (those are the only two RGBA colors), and use the pixel data coming from pictures of it shot from multiple angles. At the moment I'm using Blender Internal to render the whole scene for every position and then reload the saved images inside PIL to use the pixel data.
I would like to avoid having to save every image just to use said data.
I found out that:

rendering without write_still=True is not useful to me, since I can't access the rendered image or its data without saving it to a filepath;
using nodes set up a Viewer Node is currently useless, since the script will run in background mode (see this, this, and this I can't do);
baking doesn't seem to work either.

I think baking might be the way, but my code isn't outputting a different render for every camera position. What I'm doing is:
# setup image to bake to
bpy.data.images.new('test', 500, 500, alpha=True)

# uvm in my code is an existing uvm, but this works as an example
uvm = bpy.data.objects['Plane'].data.uv_textures['uvmPlane']

# unwrap test on the uv layer
for d in uvm.data:
    d.image = D.images['test']

# setup baking and bake
bpy.data.scenes['Scene'].render.bake_type = 'FULL'
bpy.ops.object.bake_image()

The output is the same transparent and black texture that exists on the Plane object, regardless of the camera position.

Hi, I'm trying to accomplish a similar thing, and so far I have it (kind of) working if you keep the resolution exactly at 512 by 256: https://blender.stackexchange.com/questions/128174/python-get-image-of-3d-view-for-streaming-realtime-eevee-rendering/128367#128367 but now I'm (and looking for people to try to help) optimize it to get it at any resolution

It seems like theres no info regarding this on here, although there are various questions about it


text:
How to create particle system with the original objects color values?
How to create particle system with the original objects color values?
bpy.data.objects['some_object'].color

Update:
as it seem like, it will work only if the object color
will be copy to all vertices vertex corner attribute.

Particle system does not support object color attribute.
Instead,
I copied the color value to all of the object face corners attributes.
obj.data.attributes.new(attribute_name, 'FLOAT_COLOR', 'CORNER')
data = color*loops_num
obj.data.attributes['color'].data.foreach_set('color', data)


text:
How to set active scene with bpy.context.window.scene thru headless mode
I`m try to set active scene thru python code that runs from cmd.
bpy.context.window is always None in this case.
Can someone please explain why and if there is other ways
to set active scene ?

In case someone gets None when using bpy.context.window
consider use this solution:
def get_context_window():
   for window in bpy.context.window_manager.windows:
      if window:
         return window

   return None

import bpy

window = get_context_window()
scene = bpy.data.scenes.get('some_scene')

window.scene = bpy.data.scenes.get(scene)

The way to set the active scene is
bpy.context.window.scene = bpy.data.scenes['Scene']

replacing the right hand side of the assignment with whatever scene you want to use for the new context.  See the Window page for details on the window type.

bpy.context.window is always None in this case.


text:
Why can't I use a loop-cut on this simple mesh?
I just tried making a person in blender from a tutorial (first time I use blender) and somehow I can't make a loop-cut in the last 'box' thing.
It is nor a triangle nor an N-gon, I checked for double sides/vertices but nothing seems to work.
How can I get a loop cut here?
The yellow is what blender does, and the red is what I want added
Here's the blend model: http://pasteall.org/blend/index.php?id=50184

Look into non-manifold geometry, in this case this might be inner face visible on your screenshot (just where your red line touches edge loop, 1 face above loopcut made by Blender). Possibility to add a loopcut isn't related to mesh complexity, rather to its geometry

The failure of Ctrl-R  to offer you a loop cut can be very useful for 'debugging' meshes which look OK, but have invisible faults, like internal faces. I sometimes use it with no intention of actually making a cut.

That's actually very useful! I'll probably use that in the future.

You have 2 problems that make Blender unable to know how it could build the edge loop, as it needs quads to create edge loops automatically with ctrl R, and it can't deal with ambiguity:

A face inside your mesh that is not visible in Object mode. You need to select it and delete it with X > Faces
An edge loop coming from the bottom which makes a ngon at its end. You need to select it and delete it with X > Edge Loops

Now you can create a new edge loop.


text:
My Cube is falling through my Plan
I changed the speed of my animation in the scene propertys/rigid body world from 1.000 to 10.000 and now my cube is falling through the plane even I set the plane on passive and the cube on active with collision enabled. What am I doing wrong?
Thx in advance!

select your rock
tap CTRL-A -> scale
then it works.
explanation: whenever you do something with physics, always(!) apply scale and rotation, else it won't work or works weird.

Unfortunately this does not change anything :( Event with the max setting of 32767. Whats the purpose of the Substeps? What do they do?

Ok, then please provide your blend files. Else we can just guess what it might be.

Okay thank you for your fast reply. How can I provide my blend file? I dont see the option if i edit my question.

open this https://blend-exchange.com/ and follow instructions

Done! :) Would be nice if you could check it

checked, answer updated. Happy blending!

Thank you very much mister :) and have a good day!

Please check the checkmark on the left side of my answer! Thank you and dito!

:( im sorry one more problem it works fine in edit mode but in the object mode when my elevation is applied it still goes through the plane

you must have done something else in between. Download your file from here again, select your rock, press CTRL-A (in object mode) and choose scale. Run your animation. it works. and what do you mean by "elevation applied"!? you should apply your scale.

what blender version are you using?

2.92. !   Okay sorry i forgot to tell you that I used the Blender GIS Plugin in between to get the elevation data from google maps. After this step the animation does not work anymore

i don't know this plugin and i don't know what it does. I just know...with my steps your animation works. Sorry.

U should try it its fantastic you can choose an area from google maps and blender creates automatically  a 3D model with elevation from it. Hm its seems to be an really complicated error if even you cant solve it. :O

Ok, then give me your blend file with plug-in and the „new“ problem

And the link to the plug-in please

https://github.com/domlysz/BlenderGIS

the blend file is the same as before because i just applied the elevation with the gis plugin

Okay, I'm sorry but I don't want to install that plugin... but have you generated real geometry with it or is it just a modifier or something similar so that the rigid body doesn't "know" that the elevation is there?

...and can it be that the displacement maps are missing in the file? The ones needed for the elevation?

hey sorry for the late respond. Yes but why are the displacement maps missing? and I think that it generates a plane with a google maps texture material on it and afterwarfs it takes the google elevation data to generate a 3D Model.


text:
Freestyle rendering in EEVEE show's up on top of other greace pencil objects, how do i fix it?
When I activate the Freestyle setting in the render tab for my 3D objects and render it, the render of the lines are on top of my other grease pencil objects and intersects them in an unwanted way. Is there a way to fix this? i've tried to change the origin point for all of the  3D and 2D objects but that did not fix it. Sorry if i'm not explaining the problem well, I'm happy to try and explain more.
I'm using Blender 2.93(beta) and the freestyle has a noise and a thickness modifier.
thank you for any suggestions.

https://blender.stackexchange.com/questions/158054/rendering-freestyle-along-with-grease-pencil?rq=1

I can imagine why this is happening: Grease Pencil is not considered by Freestyle at all. Thankfully, you can change freestyle to be “as render pass,” put the grease pencil objects on a separate view layer, and composite the Grease Pencil over the freestyle over the main view layer.

Thank you for the help!

@Hipple Your welcome. PTL!


text:
Set Instanced Triangles to certain positions on mesh
It should look like on picture bellow
Is there a way to set instanced triangles to fill mesh by putting them in positions as shown on image.

Sorry, to me it is not clear, how it should look like. Could you please provide an image with and another one without triangles in their target position?

Yes, I've published image to make things more clear.


text:
how to update the dependency graph after switching a scene
how to update the dpendency graph after switching a scene?
after i`m open the file I see the switching was successful
but during the code it does not change.
I think to change frame number as a hack,but.
there is any official non hackish way to do it ?
scene = bpy.data.scenes.get(self.data.scene_name)

result : <bpy_struct, Scene("Scene") at 0x0000023020016048>
dgutils.switch_to_scene(scene)
print(bpy.context.scene)

result: <bpy_struct, Scene("Night") at 0x000002302003C088>
depsgraph = bpy.context.evaluated_depsgraph_get()

bpy.context.view_layer.update()
depsgraph.update()
print(bpy.context.scene)

result: <bpy_struct, Scene("Night") at 0x000002302003C088>
Update:
Code works fine when using -background from cmd
otherwise the dependency graph not update.

I think you want bpy.context.view_layer.update() but see this answer and comments for an alternative that suggests your approach should work.  Are you getting any error messages?

Thanks Marty but I already mentioned bpy.context.view_layer.update()
I also mentioned when it does work.
Generally things are not consistent and its frustrating.
tried also all the other mambo jambo hacks.

In that case I suspect that you have hit a bug and might consider filing a bug report.


text:
Is there a way of having Blender reset the 'origin to geometery' automatically?
At the moment, when I resize or modify an object, I manually click Set Origin -> Origin to Geometry to recentre the manipulators in the object's bounds.
Like so:

My desire is to have the origin always centered to the object as it changes. Is there any way of just having Blender do this automatically?

@JudeDesir I'm doing a lot of blockout work for geometry. This involves lots of pieces that I'm constantly resizing, making longer, thinner...etc. My desire is to always have the manipulators positioned at the centre of the object for ease of use.
It would just save time. Any manual input that is required to reposition the origin is, exactly that, manual input. It extends the workflow. I want to know if there is a more automated way of having Blender help me out so its one less thing I have to constantly do.

Scripting

Test run, Shift select 3 objects, extends middle to "kiss" outer
Test script:
Select 3 objects, extends the active (middle) to the outer objects.  Click the "run script" button to run.
import bpy
import bmesh
context = bpy.context

def kiss_faces(ob, target):
    mw = ob.matrix_world
    mwi = ob.matrix_world.inverted()
    v = mwi @ target.matrix_world.translation
    if v.length < 1e-5:
        return
    f = sorted(ob.data.polygons, key=lambda p : (p.center - v).length)[0]

    pt = target.matrix_world.inverted() @ ob.matrix_world @ f.center
    hit, loc, norm, idx = target.closest_point_on_mesh(pt)

    if hit:

        d = (ob.matrix_world.inverted() @ target.matrix_world @ loc - f.center).length * f.normal
        for i in f.vertices:
            ob.data.vertices[i].co += d
        ob.data.update()

o = context.object
a, b = [o for o in context.selected_objects if o.type == 'MESH' and o is not context.object]
assert(o == context.object)

kiss_faces(o, a)
kiss_faces(o, b)
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')

Note script above for 2.8, for 2.7x, hit CtrlF in blender text editor and replace all occurrences of  ampersand @ with asterisk *


text:
How can I use mirror modifier type of clipping with an edited mode vertices object on to an object mode object
I don't want the vertices of the object with strings to pass over the heart object.
strong text