text:
Help with UV Mapping Islands
I'm trying to export a Mercy UV Texture (for use in Tabletop Simulator :P) but I've been struggling a bit. As you can see here, the textures are positioned / look like they are working correctly before I begin the UV unwrap, however after unwrapping the texture begins to act a bit weird.

It seems that the UV Map is just overlaying one of the textures on top of the whole map, rather than assigning each texture to each island (I'm sorry if my terminology isn't quite right), as shown here.

So my question is how do I properly assign textures to each part of the UV map? I read online somewhere that placing each texture into the correct island manually is an option, however given the hundreds of islands this isn't practicable at all for me. Considering that the model and textures look fine before UV Mapping, I'm assuming that there is a much easier way to do this, and that I am missing a setting somewhere?
Any help would be greatly appreciated, thanks!

you need to make sure you have the correct uv map selected under the vertex properties ( right panel )

I am really sorry but I am unsure what you mean, is this something I have to do before or after using the Smart Unwrap function?

I'm not sure what you're trying to do. Why are you uv mapping, when it's already unwrapped?

I want to create a texture file of the complete model, which will be used by the game Tabletop Simulator since it reads the geometry and textures separately (I have no idea how this is done for any other games / software etc).
I am starting with the model I posted in the first picture, with the character textured correctly. I want to get the all textures and islands into a single jpg so that when the game reads the geometry and jpg together the object will appear in game textured properly - sorry if my terminology is all messed up - I thought this process was called UV mapping

It's a bit cryptic. So to be clear you want to create a custom texture for the model, right? Or you want to pack multiple uv maps into one?  What is causing the uv map to go broke?

I want to pack multiple UV maps into one, since after joining all the parts of the model together the UVs were all overlapping one another. I followed instructions elsewhere which told me to use the  Smart UV Project tool to fix the overlapping UVs but once I do this I get the result shown in image 2

What does the UV map look like when you click on the character and go into edit mode?

Many of the UVs are overlapping one another, as shown here
https://ibb.co/iYV9zo

You model is already unwrapped (the fact that the textures look good is a dead giveaway) if you blindly re unwrap it you will naturally break the current correct layout

As you can see here, I have several texture materials. I'll convert everything just to a single texture.

First you will have to create a new 'UV Map'.
Now enter edit mode. See how my mesh is blurred and overlapping, just like yours.

With the new 'UV Map' selected, unfold the mesh using 'Smart UV Project'

Now in UV image editing mode, create a new texture where you will receive all textures. Opt for a resolution of 2048 or higher for better texture quality.
Now go to Scene> Bake> Bake mode and select 'Textures'

Click on bake and you will get all the textures of your character in that single image.
Now go to the Materials tab and delete all existing materials there, and create a new material.

Go to the texture tab and create a new texture and select the image you just created.
Everything is ready. All textures are rendered correctly.

Note that if any texture has alpha, it will lose transparency and will not have the expected result, as you can see in the hair and mustache.
I hope I have helped you and other people who are looking into this.

Thank you very much, I did not know about the last few steps so this has solved my issue! Thanks to everyone else who chimed in too!

Glad to have helped!


text:
Is there a way to create "snap to surface" constraint?
https://i.imgur.com/K8rOWnm.mp4
Here's a visual example of what I want to make (I did it by using "snap during transform" on "face" mode)
basically I want to create a camera that's always offset X amount of distance from floor that's under it automatically, just Z axis to be constrained
I already tried using floor constraint but it never really works
please help me out

The Shrinkwrap Constraint will snap the camera to a surface.
Add the Shrinkwrap Constraint to your camera, select your floor shape as Target and adjust the distance.

I recommend adding a Copy Location Constraint to your Camera, with the x and y axis targeted to an Empty. It makes it easier to control the camera animation, see above.

Yeah this seems the most straight forward way to do that!  This is what my solution ended up looking like https://i.imgur.com/2oZN98G.mp4

Tell me if this is what you want:

Create a plane, go in Edit mode, W > Subdivide a bit and assign the whole mesh a Group name in Properties > Data > Vertex Groups.
Give your Camera a Copy Location constraint, choose the plane as the Target, then choose the Group. Click Offset and move the Camera until it is over the plane at the place you want.
Give your plane a Shrinkwrap modifier and choose the ground as your Target.
Move your plane, the Camera should follow the ground on the same Z distance all along.

Thanks for answer @moonboots!  But I didn't manage to make it work, because it appears to be that copy location constraint is calculated before shrink warp modifier, so camera isn't affected by plane being projected on ground
here's an example of what I mean https://i.imgur.com/JJszLuv.mp4

It should work, and Copy Location is for camera, Shrinkwrap for the plane, but anyway, Garulfo proposed a simpler solution, I didn't know camera had Shrinkwrap constraint   ;)

source: Stack Exchange

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

sort: votes


text:
How can I make tight clothes that squeezes the body?
Clothes like ripped leggings or similar will squeeze the legs and make some of the body poke out the holes. When she's no longer wearing the socks or whatever, I want the leg to return to normal. What's the best way to do this?
Here's an example with thigh-highs:

Use a mesh shape key - probably the best solution. Or animated material displacement map if the mesh geometry does not have good topology to support the deformation.

One possible solution would be to create a soft-body 'skin' around the base collision mesh - anything pressing close to the mesh can then be made to displace the soft body surface resulting in 'bulging out' where it isn't pressed. This would require a lot of detail for the soft body 'skin' and most likely this makes it impractical for virtually all uses (unless you're specifically wanting to simulate generic surface interactions). For clothing and known specific interactions (in specific fixed places, for example), @JaroslavJerrynoNovotny's solution would be a much better fit.

ok, lets imagine you want to make a tight boot.
cover the leg with a cube. use some loopcut and slide to give it a siluette of the boot. now use a boolean modifier at the cube - operation intersect and chose the skin of your char as object.
this will cut away anything from your simplyfied boot that doesnt look like a leg for example, but you will not have a closed surface.
after that, you put a shrinkwrap modifier on the boot. this will lift the surface of the boot above the  skin. target is skin, mode nearest surface and keep above surface yes. this is important! now, here is a little trick. with offset you tell, how far the surface is away from the leg. 0.01 does a pretty good job, but the trick is even though only two digits behind the  point are shown, values like 0.005 and 0.001 can be used which makes it realy tight.. now you only need a shapekey at the leg and tada. job done.
there are two problems.
1. i am not sure if you can use uv maps
2. whenever another part of your skin passes the area of the boot, it will be covered by the boot two. maybe you can solve this when you first copy and aply the boolean and than cop and aply the shrinkwrap with an offset of .03 or .04. this creates a tighter boot than your simplyfied version. parent it on the armature of your char if you want to move the legs and than let the copy of the boolean and the shrinkwrap do the job.
play around a little. first the boolean than the shrinkwrap.

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


text:
Making glowing orb with light rays?

Is there a way to make something like in the picture? I prefer using EEVEE and no compositing. Basically just a glowing orb with light rays.

Here are 2 ideas based on the same principle: create holes in an Icosphere, put a Point light inside and surround it with a Volumetric Scatter cube (density 0.04).
The first idea creates "transparent" holes using a voronoi texture node setup and uses the "Is Camera Ray?" Light path node to hide the holes to the camera. Quite versatile as it can be used on any object without modifying geometry.

Second idea: remove random faces in the back side of the icosphere. Allows to keep a simple material on the sphere but requires it to always face the camera to avoid seeing the holes.

Works fine, but if you look at the sphere from another view, you'll see the holes. Any fix for this?

I updated my answer


text:
See-through faces, but just in game and probably not because of normals?
I modelled and animated some low poly game characters with Blender and when I import them in Visual Studio MonoGame there are some parts of the modells see-through as you can see in the picture.
I read a lot about the normals for the faces and recalculating them or set them manually but it's not working for me. So please help.
Here are some pictures, sorry for the bad quality of the second.

As you can see the neck is see-through, but recalculating and manually flip the normals of the faces for the neck didn't helped.

From your first picture it looks like you have a hole in the neck area What is the big black spot?.

This was actually my question, I managed to solve it.
The problem was, that there were some vertices, which haven't got any weight in the animation and therefore the game engine couldn't render their faces right.
I fixed it by editing more weight to this vertices.
The black area was the real face of the ape, for some reason you weren't able to see it even from backside.


text:
Creating primitive changes selection
I am writing a blender addon that shows a panel with an enum property in the object properties. In some cases if the user changes the enum value, the addon needs to create a new object. I managed to get this working using the update callback of the enum property and bpy.ops.mesh.primitive_cube_add(). Unfortunately, this changes the object selection so that the right column of the blender UI suddenly displays the properties of the new object. Is it possible that the original object stays selected and that the UI keeps displaying my addon panel with the properties of the original object?
I tried to restore the original selection by calling bpy.ops.object.select_all(action="DESELECT") followed by obj.select = True. This does select the original object, but the right column of the blender UI still displays the properties of the new object.
I think I need a python command that performs the same action as clicking an object in the scene graph panel, but I could not find any in the blender documentation.

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


text:
Geometry Nodes Apply the material to instances after their realize 3.0.1
can I save the material on each individual object? I don't know if there can be a solution here.
GeoNode before applying realize instances

GeoNode after applying realize instances

Shader material

I'll explore this in a later. But does it change if you realize instances before set material?

I've told you that it will not work if instances are realized. After realizing, whose instances are converted from many objects inside the main object into one object which has one common object position.
The only way to make it work in 3.0 is to calculate distance inside GN and then pass this value using transfer attribute:

But this setup also have some limitations. Since you get an instance index by dividing the point index by the count of points in one instance, you should have instances with the same number of points.
The is also a "Scale-to-Zero" hack to make it works with instances with the different number of points:
https://blender.stackexchange.com/a/250698/32374
Or simply try Blender 3.1, where you can make it much easier:
https://blender.stackexchange.com/a/250694/32374

sorry, i am always working with 3.1...so here the update for 3.0:

you can use this node setup to get what you want:

with constant in colorramp it looks more like yours:

This should work only on 3.1, isn't it?

you are right!!

If they will be too close, they will get colors from each outer, see: https://blender.stackexchange.com/questions/250690/geometry-nodes-instance-grid-with-material-parameters-for-specific-instances/250698#250698

And I'm trying to get this to work for about an hour... it would always be nice to add the version, especially when using not yet officially released alpha or beta versions  ;)

@GordonBrinkmann : you should already know me and know that I always work with the newest unofficial alphas…

@Chris Yeah, I hope the people you're giving answers know that as well ;)


text:
Geometry nodes Can I paint every instant of the house with a clear division of color in a circle?
This thread is what I need Here, but here the blender version is lower than 3.0 and I don't quite know how to come to the same. (I tried throwing stuff on buildings (B1, B2..), but it didn't work out as expected.

My geoNodes

How do I just paint the city into zones ? I don't even need a lot of flexibility.

Object info is a suitable node. All you have to do is just calculate a distance between the node and center point.
For that, you can use a Vector Math node with a Distance mode:

Can you confirm that it works even if the instances are part of the same object ?

@Gorgious Yes, but only if they are not realized. In this case, they are objects inside the object

@Gorgious, Thanks works almost perfectly, except for this building, for some reason... but ok

I don't have access to the file

@Crantisz, edddited

Connection timeout this time :-)

@Crantisz, my goood uff  https://gifyu.com/image/Szmjr

@DeoneaseDistortions Nope

@Crantisz I can see the files... weird.

@Crantisz, JeSuS Chrizt  Enjoy :)
https://en.wmpics.pics/pm-GIOH.html
https://yapx.ru/v/QjSGz
https://tenor.com/bQntC.gif
https://en.wmpics.pics/pm-GIOH.html
https://tenor.com/bQntC.gif
https://yapx.ru/v/QjSGz
https://yapx.ru/v/QjSGz
https://tenor.com/bQntC.gif
https://tenor.com/bQntC.gif
https://yapx.ru/v/QjSGz

Yes, it's looks like that the center of tall building is high, so distance to them from world center also is big. So if you make your building with object origin on the bottom face it will not be an issue


text:
I can't make a boolean on Vertices?
Maybe there is some way? Unexpectedly, I could not find the answer to the question in Google

Boolean operators use Faces to determine what is intersecting and what isn't. Vertices can't intersect with a mesh, since they are technically volumeless

GODDAMN! It doesn't look hard to implement

What is your intended end result? Are you wanting to cut a tube-shaped hole out of the cube? If so, you can just add a Skin modifer to the vertices, apply it, and then the Boolean will work

Round off the ends of the road if you are interested, I had to act destructively with my hands
https://imgur.com/a/L0qgYDQ


text:
How can I create a reloading animation for a shotgun?
I am making a game and I want to create a shotgun animation, in the animation the player will push the bullets to the gun but my problem is that in games the player need to push number of bullets that is equal the number of bullets missing so how can I create this? Do I need to create animation for all the number of bullets that are missing(create animation that he push one and than creating an animaion he push two and so on..) or there is an option for creating one animation and use some feture that I dont know is exist?

No, you create one animation where he loads one bullet. The number of bullets has to be done in the game engine with game logic. Unless you want loading one bullet to look different from loading more bullets, then you have to use different animations.

So if I want him the pull up the gun on the first shell loaded and on the last one to pull down I need to create three? one for the first one for the last and one for the bullets between?
okey thank you so much!

I don't know how game designers usually do this... you want to create a game ;) I would say make one animation for pulling up the gun, one for loading the shell and one for putting the gun down. So then you also have animations for pulling up the gun and putting down the gun even if you don't load a shell.


text:
Should I do the fp animation separate from the character animation or do them together?
I'm creating a fps game and I dont know how to create the animations. I creating the fp animation which is only with the hands but I need also an animaitons of the character doing the same things such as reaload or shooting should I create one set of animtion for the fp and one for the character of just create one which include the character and the fp hands?
thanks for the answerers :)

Aren't the First Person's hands & arms the character's arms? Are they not parts of the same model? An animation can be stored as Action and it can be applied to different rigs. The rigs must be similar, e.g. the bone layout must be similar and names must be the same.

Yes they are I didnt know that u can copy from one to other that's nice thank you!, but I am asking about in the game engine do I need to create each one separately or just create only for the character(which include the arms) and just place the camera in a spasific spot?


text:
Can I use reference image for 3d modeling just from google or is it not legal?
I know this is a pretty silly question but I really got no clue if I can use reference images for 3d modeling from google or is it count copyright violation.
thanks for the answerers :)

I don't think there's any problem but could you tell what kind of object you want to model and for what usage?

staff for shooter game which I want to publish eventually things such as : weapons, vests, cars.

are you talking about real cars? I don't think a car manufacturer could claim a copyright if you use one of its models in your game. But if it's a fictitious car that you've found in another game, I guess there's a problem

I’m voting to close this question as off topic because it is about licensing and legal issues we are neither equipped nor legally authorized to answer, and any ill advice could unintentionally pose a liability to both the user and the network. For official info see the Blender Licensing Terms and Conditions and the FAQ about GNU GPL

If you are modelling a specific real-world item, such as a Lamborghini Huracán or .357 Smith & Wesson Magnum, you need to contact the company that owns the intellectual property (IP) or research their policies online. Typically these models fall under a Editorial License (see this example on Turbosquid), which means you can NOT use the model commercially (like in a game or movie) unless you have obtained permission from the rights holder.
Personally, I have a hard time with any non-original 3D model that is being sold on a marketplace even for Editorial Use, unless the creator of the model directly obtained permission from the IP holder.
Here is additional info on different model licenses on Turbosquid.
Your safest bet, if you plan on creating a model for selling or for use in a game, is to only use pictures of existing designs as inspiration, but create a model that is fully original and unique, so it does not infringe upon anyone else's copyright.
As a tip, a lot of items that would be used in a game can already be purchased online (for example in the Unity Asset Store or the Unreal Engine Marketplace). Epic Games also has a bunch of free content that they give away each month. You will save a lot of time using pre-made items unless you really need something specific that doesn't already exist. Just make sure the items you use are generic and not "branded" items, as discussed above. :-)

okey thanks but if I understand correctly if I want to model an M4 the gun or an AK I can't use it in my game? because its a realy world item?

Well, I'm not an expert in legal matters, you should check online for more info. However, I know companies like AM General tried suing Activision for using the Humvee in their Call of Duty game without permission. However, a judge actually ruled in Activision's favor, citing that they were using the Humvee's likeness for the purpose of  making a realistic depiction of warfare. But it's always safest to ask for permission! However, there's almost no need to model a real M4 or AK as there are plenty of great firearm models online already, including in the Unreal Marketplace. :-)

FWIW, there's actually a ton of free REAL-WORLD military vehicles available on the Unreal Engine Marketplace. Again, I don't know the legality of using them in games (other than actual military training simulations) so it's probably best to check: https://www.unrealengine.com/marketplace/en-US/profile/Vigilante?count=100&sortBy=effectiveDate&sortDir=DESC&start=0

I should also note that those military vehicles are "Licensed for Use Only with Unreal Engine-based Products", so the final game would have to be made with Unreal Engine.


text:
Huge difference between "cycle" and "eevee"
I rendered some of the objects in "eevee" mode and "cycle" mode, and find that there is a huge difference between them. When in "cycle" mode, there seem to be "z-fighting". I wonder how can I eliminate the "z-fighting" when rendering in "cycle" mode as it is in "eevee" mode.

so why don't you simply clean up your mesh so that you don't have Z fighting (overlapping faces)?

maybe also watch some tutorials about "clean topology" because your mesh has a chaotic topology....

@moonboots ShapeNetCore is huge, if I clean up them manually, it will take a lot of time. If there is a way to clean up them automatically in python?

@Chris I will have a look at it, thank you very much.

Z fight is present when there isn't enough distance between two coplanar faces in the direction of camera.
As Eevee is something like a rasterizer it has an internal (tweakable) resolution, which can differ from how Cycles reads the scene in its Raytracer way.
How much is this "enough"? It depends by your Clip Start and End values of the camera, as the internal resolution is distribuited into thoose values: so it's a good habit to set thoose values as close to the actual needs as possible.
Also modeling without coplanar faces is a good habit, of course.

I modified the camera's "clip" property, however, the problem still exist. Could you please download the .blend file I have uploaded and do some examination? I am really a newbie of blender

There are many issues in your file, I think you should search some tutorials about basics of 3D modeling and topology  good practices. Anyway It's an error to leave two identical meshes one on top of the other (and there's no need, nor advantages on such practices).


text:
Only render&simulate some of the objects in python
I have a question: Now I have a giant amount of objects as well as the materials, however, I only want to select some of them to participate in the simulation&rendering every time(which means the objects will be used multiple times), what should I do to speed up this process as fast as possible?(such as how to prevent other objects from slowing down the speed of simulation&rendering of the selected objects?)

I think I know what you mean but can you be a little more specific? Do you want the objects that are simulated to be visible in the render or only the ones during simulation to be visible?

@TheJeran, thanks for your attention. Well, I want the selected objects to be visible and rigid ones to participate in the physics simulation process.
After baking the physics simulations I will render each frame. And I only want the selected objects to be visible in the rendering results.

Okay so if I'm understanding correctly. You want to have something interact with a physics simulation. Then hide the simulated objects for the render?

No, maybe I should give an example: If there are 1000 objects in total, and I just want to select 10 of them out to do simulation and rendering, while the rest 990 objects should not participate in this process.

Edit: Oh I just re-read the title and saw you meant python. Sorry
In that case add your items to cooresponding collections and then
bpy.data.scenes["Scene"].rigidbody_world.collection = pointer

bpy.data.collections['Hidden'].hide_render = True

Alright, so the easiest way to partition and omit certain objects is through collections.
First select the objects you want either through random deselect or random select.

Here I've selected 10 random objects.
I then add those to a collections (Press M)

I then hide those (uncheck the box)

and select the others and add to a new collection.

Then you check accordingly

Then in your rigidbody world change the simulation to visible

Note: Everything you want to interact with the simulation needs to be in that collection.
For rendering, if a collection is unchecked it wont show in render.

Thank you so much for your patience and detailed explanations. I will have a try right now.

Thank you very much, I tried your method, it works! Such an elegant method!

Hi, recently I have met a new problem. There are two ways to turn one object into rigid one, the first one, as you have mentioned, link the object into the rigidbody collection, and the another one is by using commend: "bpy.ops.rigidbody.object_add({'object': blender_object})", however, the former one is much faster than the later, I wonder what causes this problem.   And it seems that, the former one will result in the problem of "the scale is not applied to the object", further affecting the result of simulation.

I'm not 100% certain what you are trying to accomplish. But I have to imagine it's because one is simply linking two data objects and the other is running an operation.
try the bpy.ops.rigidbody.objects_add (note the S at the end) if you are able to select multiple objects. Should be faster.

Thank you for your help, I will have a try!


text:
Wrong assignment of matrix_world
I try to transform the camera by changing its "matrix_world", however, as shown in the figure, when I assign a matrix to it, the rotation part is transposed and the translation part is changed to zero.

could you cut and paste as text the python statements you entered in the console?  They don't appear in your blend file.

FWIW, I think you need to use mathutils.Matrix in your assignment rather than np.array.  When I do that I get the correct result.

Thank you for your attention @MartyFouts. It is figured out that, we should not assign an np.array to matrix_word. By using mathutils.Matrix, it works fine.

It is figured out that, we should not assign an np.array to "matrix_world". By using mathutils.Matrix, it works fine.


text:
Strange centers
I have a mesh, when I set the center of the mesh to "ORIGIN_CENTER_OF_VOLUME", the center seems to be located out of the object.

However, when I set "ORIGIN_CENTER_OF_MASS", the object will ly down immediately and also behave strangely(clipping).

BTW, I use python script to operate the object, the comments are:
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS')    bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME')

It's a really messy geometry with lots of overlap, disconnected and unevenly distributed vertices. Probably that's the reason for the strange behavior. Do you perhaps have a simpler version of this mesh from before?

I mean, look at this: https://i.imgur.com/bG2vTcu.png Separated all those duplicate geometry and it still had 20.000+ vertices that got merged when I did "merge by distance". When you remove those main duplicate parts, "origin to volume" does get better, but I don't think this mesh is salvageable if I'm honest, It would be much easier to just model or download a new one.

Thank you for your help @Geri and Kuboå, I will double-check the model.

What the hell is this mesh? I went into Edit Mode to press P > Separate > By Loose Parts. This results in 7222(!) objects when there should be exactly 2: the mug and the liquid.


text:
How to free memory in python?
I am trying to traverse a list of .blend files to get the information inside them. However, I can not free the memory, causing the OOM error. The code is shown as below.
dir_path = "path"
materials = os.listdir(dir_path)
dict_mapping = {}
for mat_name in materials:
    path_material = os.path.join(dir_path , mat_name)
    material      = load_blend(path_material, data_blocks="materials")  # load a blend file, and extract the material inside it.
    name          = None
    for mat in material:
        if name is None:
            name = mat.name
        else:
            name += "_"
            name += mat.name
        delete_material(mat)
    del material
    gc.collect()
    clear_all_objs()
    dict_mapping[mat_name.split(".")[0]] = name
def clear_all_objs():
    bpy.ops.object.select_all(action="SELECT")
    bpy.ops.object.delete(use_global=False)
def delete_material(material):
    material.user_clear()
    bpy.data.materials.remove(material)

Yes, I have tried this, as shown in the code above:
gc.collect()

I believe your problem is that bpy.data.materials.remove (and other remove functions) and bpy.ops.object.delete (and other delete functions) don't delete/remove but rather move the data to a clean up list that is only cleared when blender writes the modified blend file.


text:
Transparent cube when stacked together face to face, the faces are darker
I have been working on a game in unity. Everything was going smoothly until i hit this problem. I wanted to give a water effect, so I made a  cube and set its alpha to 3.5 in material -> transparency.
When I stack them in Unity I do get transparent water like effect that i want but the faces gets so much darker that it ruins the effect.
Any method to make the faces of the same light colour too? because these cubes will spawn every second and if they give that dark look it ruins the effect i am going for.
Any help would be appreciated.

Computer software in general doesn't deal well overlapping geometry

@DuarteFarrajotaRamos but they arent overlapping. they are put side by side.

if they are 111 cubes, one is at 0,0,0 and other is at 1,0,0. still that dark face in between


text:
Is there a way to tell Blender NOT to load certain images during render?
So I have this problem, renders take too long because its loading unnecesary images.
I'm working on an animation and I'm using very large Images with all the character frames.
And I want to somehow tell Blender to skip loading certain images during render, until it becomes necessary for the shots
here's a more practical example of what I mean
(understand that I have like >50 materials in my project so manually adding and animating mix node like I did in example would be really tricky as well)

This can be achieved by enabling "Use Camera Cull" in the Simplify settings in the scene tab, though it will remove entire objects that are not in the camera's view instead of just textures and will affect reflections/shadows as a result.

An alternative solution to your problem is to enable "Persistent Images". Blender will keep these large textures in memory instead of reloading them on every frame, thus reducing your render time on subsequent frames without altering the final image (shadows/reflections) in any way.

If it is in the scene, it can affect the final render, such as shadows and reflections so will be required when rendering.
What your screenshot shows me is that the textured planes to the side can be placed on another layer as they are not intended to be part of the render.
The 3D view has twenty layers, you can place these items on a different layer and hide that layer when rendering. In 2.80 layers have been replaced with collections.


text:
My objects are invisible in blender 2.8, how to fix?
Until 3 weeks ago, blender 2.8 was normal. But now it is with these invisible objects, both in the viewport and in the render.
Already tried to switch to Eevee, Workbench and Cycles,
I also tried to load the factory options.
Blender 2.8,
Windows 10,
Intel core I3 6003U.
8Gb Ram

Mine are too. (and I have the same system as you) And I've gotten no help from anyone.I asked this question already, but some jerk closed my thread. You can check out this thread and maybe get a little more information. https://blenderartists.org/t/object-always-see-through/1115094

I'm voting to close this question as off-topic because this is about a version of Blender still in development.

@RayMairlot I would like to vote to open this up again as 2.8 is live and I am having the exact same issues at least with the Layout Screen.

Actually, found this question and it solved my issues. Might want to link the questions though as they are related I would imagine.


text:
Painting aligment and texture bleeding even with margin turned on
How can I avoid bleed like this? It's only appearing when I paint in 3D space, on 2D there's no such a problem. I used margin option with different sizes; UV island are separated with wide margin.
Also, is there in Blender an option like in Substance Painter, called "Aligment" with aligment like UV, Tangent, Camera?

It looks like you've been painting with a different color that crossed the seams.  What is adjacent to this in the 3D view?  If you want a hard border, use a hard brush and be careful, use masking, or separate islands to different objects temporarily.

In the Options Tab in Texture Paint mode you can set the bleed to 0; I do that here and get something like you might be looking for.


text:
Apply scale factor to gltf import in python api
So, I am using the python interface to import a very complex model from a different application that uses cm and not meters, and I would like to downscale everything by 0.01 (still using python) to make units correct in blender. I see the import commands sometimes have scale factors, but the gltf one incidentally doesn't, as far as I can tell.
Since the model is extremely complex, filled with empty objects that serve only to provide position relationships between many thousands of objects, I am not sure of the safest way of applying a scale factor to the entire newly imported set of objects. I am wondering if I am missing some obvious option?... If I do scale, note that I need both the size and the position to be all scaled by 0.01: it would of course be super ugly if the sizes changed by 100x but the relative origin for the scaling wasn't the origin of the global coordinate system :-D
Thanks a lot for any ideas or thoughts!! (And again, sorry if this is a stupid question. I am new to the blender python API, but I am loving it so far :-D )

It's kind of a hack, but you can do this by setting the scene's Unit Scale to 100 before you import the glTF file. Then reset it afterwards.
The Unit Scale is in the Properties Editor under the Scene tab.

This works because the unit scale is in meters/(blender unit). A glTF file stores lengths in meters, so the importer divides by the unit scale to convert lengths to blender units.
Note that

due to a bug, camera near/far distances are not scaled
unlike the importer, the glTF exporter does NOT take the unit scale into account


text:
best way of dealing with O(100K) exact positions
I need to render a particle system comprised of a few hundred thousand particles - but with X, Y, Z positions as given by a table (imported from outside blender in some way via the API). My question is: I've tried looping over the table and creating many small icospheres, but this becomes very slow. Can this be dealt with using a particle system in some way, but specifying the XYZs of the particles 'by hand'? This way, the objects are instances of the same exact object, and then the scene should be simpler to handle memory-wise as no explicit copies of the redundant information are required.
How can I achieve this using the API and the position list that I have? Thank you very much!

Why the downvote?

Point Clouds could be an option. They are still experimental. But you should be able to render them in Cycles and import them

Thanks @Blunder, I will take a look! And: I am also not sure about the downvote. IMHO this is a legitimate question, as the interface gets terribly slow...

Ah, it seems this is related: https://devtalk.blender.org/t/manipulating-particles-in-python/7552/14 -> and is what I am looking for. Somehow I had missed it. I am going to try :-D

I found it again. Here is an example video How to simulate SAND in Blender 3.1? It uses the new Point Cloud feature that came with 3.1 and a Manta Flow Liquid simulation to create the sand with a few million particles. Hope that helps.


text:
fixing odd geometry
I am dealing with geometry imported from a (very problematic) source and it is often such that I just want to keep the outer volume of a weird mesh. Here an example of something that is almost (but not quite) a box:

However, if you look at the corresponding mesh, it's a mess:

...because there are multiple faces inside (and even overlapping with the outer faces). Now, I don't care too much about the details - I just need to render this for a project - but rendering this leads to a lot of artifacts from Z-fighting from competing surfaces, and it ends up looking horrible in cycles compared to the trivial viewport render which is OK.
I am trying to find a way to deal with that, and one modifier that helped was "Solidify" - but it also changes the boundaries of the geometry itself. Solidify with zero skin size also doesn't help. The only other modifier that helped is remesh, but that's a bloody mess because there are slightly jagged edges unless I use the tiniest (and toughest, CPU-wise) voxel sizes. I would like to avoid that as it sounds a bit too much like brute force for a problem of removing mistakes in the "inner volume" of a mesh somehow...
I am now actually wondering if I cannot achieve something like the cleanup of the inner parts of this geometry via a python bmesh script or so. Would you have suggestions? If you want to look at the mess, here it is:
https://www.dropbox.com/s/a6tkyqwo7j0ucmd/geoToFix.blend?dl=0
Any hint or suggestion would be appreciated! I am not very experienced in bmesh manipulations. I hope this isn't too stupid of a question...

Okay, so I managed to solve this by really selecting the vertices that I wanted manually and to offset them, so that the rendering artifacts (z-fighting) disappeared. The geometry itself is a gigantic mess, but hey, I'm only after a reasonable render, so I'm happy :-D
If anyone knows of more civilized solutions, I would still love to hear them, as manually editing this is a bit annoying :-)


text:
Can't snap two objects without space between
I can't snap two objects. It's always make space between them. I found this answer, but these 4 steps taking me little long. So i am asking, if there is faster way to do this.
Snap is on vertex and closest.

Are you snapping in Object Mode?  If so, the only snap source will be the pivot point of the object you are moving.
If you snap in Edit (Vertex) Mode, switch the snap settings to target 'Vertices', with the source set to 'Active'. Select all the vertices in the moving object, and Shift right-click the vertex you would like to be the snap source twice to make it active. Now with snap switched on, move the active vertex over the vertex you would like it to match.. it will bring the other vertices along with it.


text:
Make hole with right topology
My question is simple, but I cant find solid answer for this.
I can make hole in face like this:

But it makes a lot of 3 polygons faces.
or make hole like this:

Is it better to make holes in few seconds like on first picture with a lot of 3-gons or is it right to take time and make it like on second picture with all 4-gons? and why?
I looked at some youtube videos or websites, but they make hole and dont really say anything about topology.

https://blender.stackexchange.com/questions/2931/why-should-triangle-meshes-be-avoided-for-character-animation

Related: Why do you need to have quads?; Why should triangle meshes be avoided for character animation?; How can Tris be used to an Advantage?

It depends.  The answer to what's the "right" way to do things depends on what you need.  Obviously, one of the components to determining what's right is how much time it takes to do-- and doing your top, triangulated mesh takes very little time.
But doing the bottom, quad only mesh is superior for several reasons, that may or may not matter for your actual use:

The base meshes, with autosmooth at 90 degrees, are fine.  There's nothing wrong with the lazier mesh.  It has a few more vertices than the quad mesh, but then, it has more detail than the quad mesh.  It's important to notice that all those triangles are planar with each other-- basically, we're using autosmooth to separate the questionable components of our triangulated mesh to a single, flat-shaded plane, so the way our normals interpolate across the triangles doesn't matter.
But with subdivision, we see that the triangles aren't subidividing in the way we probably want.  Our quad mesh is smoother than our mesh that uses triangles.
In a fully smooth shaded mesh, we can see that the normals don't change evenly.  Where we have the tightly packed triangles, the normals change rapidly.  We can see the triangles if we look for them.  Again, our quad mesh is smoother, even with fewer vertices.
In our mesh with vertex color, we can again see that the vertex color doesn't change as evenly across the triangle mesh.  Even with fewer vertices, our quad mesh interpolates these values more properly.  (Which shouldn't be surprising, given what we saw for the smooth shaded normals-- vertex color and smooth shaded normals are both interpolated the same way, as is UV or any custom vertex data.)
So if you're not subdividing, and you're not using vertex color, and you're not using smooth-shaded normals across non-planar elements, and you're not replacing your smooth shaded normals with a normal map, or maybe if you're using a material that doesn't even care about normals like emission-- then there's nothing wrong with the triangulated mesh.  So the fact that it's easier makes it better.  But if those things aren't true, then you're likely to run into rendering artifacts that you don't want with the triangulated mesh, and then the quad mesh is preferable.
Note that deformation can affect this, but it can affect this both ways-- sometimes, you'd rather have triangles for animation, and sometimes, you'd rather have quads for animation.


text:
Design of Pen holder with musical score
I’m again here to ask your support. I’d like to draw a 3d-print someting similar to “tower of pi” but instead of using numbers, I’d like to use a musical score, let’s say beethoven fifth symphony.
I have a picture (B/W image) of what I need:

I would “extrude” black portion of musical score, wrapped around a cilindrical shape.
Is there some way to use a displace modifier in order to use mi musical score to be wrapper around a spiral?
Thank you very much as usual!
Francesco

Related https://blender.stackexchange.com/questions/23411/make-a-png-into-a-mesh

Thank you for your suggestion, I used inkscape and vonverted, I'll update my post with result of my work.

I had a quick go.
Took the source image into GIMP and made it one long line.
Imported that image into Inkscape and used Path/Trace Bitmap to create the vector data, then saved as SVG. See notes at the end.
Used import from the File menu in Blender

Then extruded the curve. I also converted the curve to a Mesh and used the ReMesh Modifier to stop some bad geometry where vertices where connected from great distance.
From the User Preferences view I searched for Extra and selected the Curve: Extra Objects

Now I could add a new Curve and select the type Spiral and Logarithmic. Set the height and the number of turns to create the spring shape.
In the Curve panel ensure the Twisting is set to Tangent. This ensures the results do not twist as they are modified by the spiral. Without this you get an unpeeled orange effect.

Now you can add a Curve modifier and select the Spiral.

The final result.

Notes:
The image was not particularly high resolution and made the initial vector data quite messy.
I needed to remesh the curve to get the vertices density required to allow the curve to take place.
There are lots of disconnected pieces, not ideal for 3D printing.
My basic result has obvious sharp ends that would need additional work to create a clean cylinder.
Suggest you take a lot of time to create nice neat/clean vectors before trying to extrude/curve.


text:
clearing parents and keep transform in python for thousands of objects
I am currently using the "parent clear" operator with the 'CLEAR_KEEP_TRANSFORM' type to clear transformations when dealing with tens of thousands of objects (see below), but unfortunately, operators lead to a scene update and this loop is extremely slow for my use case. Is there any way to do this solely at the object level? After this, I delete all the empties, but deleting those without unparenting and keeping transforms will of course screw up their location... Thanks in advance!
print("Removing transforms")
listOfMeshes = [obj for obj in sceneCollection.objects if obj.type!='EMPTY']
for obj in listOfMeshes:
    objcounter+=1
    print("At "+str(objcounter)+"/"+str(len(listOfMeshes))+" Removing transforms: "+obj.name)
    bpy.context.view_layer.objects.active = obj
    bpy.ops.object.parent_clear(type='CLEAR_KEEP_TRANSFORM')

import bpy
from bpy import context as C, data as D

# make copies to not modify the iterator
# https://youtu.be/OSGv2VnC0go?t=1200
obs_matrices = [(o, o.matrix_world.copy()) for o in D.objects]

for ob, mat in obs_matrices:
    ob.parent = None
    ob.matrix_world = mat

More reading:
I want to unparent an object with python
Clear Parent and Keep Transformation
Possibly much faster¹
Consider that the operator you use accepts multiple objects, and so you can clear parents for them in one go, and hope the C implementation of the operator will turn out to be much faster than a Python loop:
for ob in sceneCollection.objects:
    ob.select_set(obj.type != 'EMPTY')

bpy.ops.object.parent_clear(type='CLEAR_KEEP_TRANSFORM')

Also, you can use a context override and avoid the loop with object selection:
import bpy
from bpy import context as C, data as D

listOfMeshes = [obj for obj in sceneCollection.objects if obj.type!='EMPTY']

with C.temp_override(selected_editable_objects=listOfMeshes):
    bpy.ops.object.parent_clear(type='CLEAR_KEEP_TRANSFORM')

¹ - The OP David Chinellato tested the 3 solutions in this answer and they're roughly equivalent speed-wise with 4.71, 4.88, 4.8 results in seconds for 1500 objects.

You could test the 3 solutions and comment on the speed of each, since you already have a setup ready to test.

Hi Markus, many thanks!!! I tried the three options. Here some numbers for a small 1500 object test: 1) Original: 69.2 seconds, 2) With matrix setting: 4.71s, 3) With operating on all objects: 4.88s, 3) context override: 4.80s. I have files with several thousand objects where this will make a huge difference. I kind of feel stupid that I didn't realize, though, that the operator could act on multiple objects at once!!! But I am super happy. Thanks!!!!


text:
Why can't vertex indices be sorted by Z_VIEW in blender python？
Run the following code:
import bpy
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.sort_elements(type='VIEW_ZAXIS', elements={'EDGE'})

python console prompt failed:
RuntimeError: Error: View not found, cannot sort by view axis

The problem is that when you launch the script from a text editor, Blender don't know about what 3D view it should use, so you should define it.
Here is the example, script gets the biggest 3D view area from current workspace:
Then this area overrides context, which is always the first value in ops functions:
import bpy

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

def get_biggest_area(workspace, type):
    max_size = 0
    nextArea = None
    for screen in workspace.screens:
        for area in screen.areas:
            if area.type == type:
                size = area.width * area.height
                if size > max_size:
                    nextArea = area
                    max_size = size
    return nextArea

override = {'area': get_biggest_area(bpy.context.workspace, 'VIEW_3D')}

bpy.ops.mesh.sort_elements(override, type='VIEW_ZAXIS', elements={'EDGE'})

The example for the first area in the list, without size measuring:
import bpy

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

def getArea(type):
    for screen in bpy.context.workspace.screens:
        for area in screen.areas:
            if area.type == type:
                return area

override = {'area': getArea('VIEW_3D')}

bpy.ops.mesh.sort_elements(override, type='VIEW_ZAXIS', elements={'EDGE'})

Thanks, the code is perfect. I'm new to blender python for the time being and this question is costing me a lot of time. Thanks, you solved the problem。


text:
Texture Paint Mode Paint on 3D Model
I'm starting to learn texture paint mode and I have the hang of it for the most part.  But I'm getting inconsistent results.
Before I was able to paint directly on the model (I know it isn't really doing so and is actually painting on the UV image).
But now when I click on the model with any brush it doesn't paint at all, which isn't a huge deal but I'd like to know why it stopped working.
It still works with the "Mask" brush, but none of the others will work.
Any idea why this could be happening?

The little cube in the header with one face that has red squares on it, is this enabled? With this on only verts selected in edit mode can be painted on.

could you please share your file?

@sambler yes that was it!  so simple, thanks.

When texture painting, there is an option to restrict painting to faces that have been selected in edit mode.

If this is something you want to use, you need to go into edit mode and alter your selection to adjust the areas you can paint on.


text:
Process to remove transparent background of an image plane automatically? (not alpha texture to transparency problem)
what I'm looking for is a way, after using "import image as plane" or camera plane
to have the transparent background removed and just keep the visible parts of the image plane, so I can transform them to a mesh. (I cannot used SVG files because I want to keep the transparent shading of the edges of the elements)
Do you know if such an addon exists? If not, can you think of another process to achieve it automatically, instead of tracing the image with vertices and curves?
It's for 2d animation work, not using the grease pencil but traditional elements such as in the picture below, (even when imported individually, each png element has a canvas frame generated).Having this would be very time-saving and allow me to uses mesh deformers such as lattice, weight paint+vertex group more accurately.

Thanks in advance for your help! and sorry if my English is no the best and a bit confusing haha
LaumeB

So in case somebody else is looking for the same thing, I've actually just found some useful addons for this knid of 2d animation workflow: (one of them is not free tho, but very convenient)
Leafig Addon (not free
Boundary align remesh addon
COA Tools Spine softaware free alternative
Also noticed it’s possible to use the “generate pencil grease” in the image editor which can do the trick of removing the transparent BG for some elements too.
Cheers!


text:
Weird lines on mesh after exiting sculpt mode

Hey there, does anyone know why i get these weird lines all over my mesh after exiting sculpt mode? Shading is set to smooth and normals are facing outwards. I also tried to put a subsurf modifier on top of it. Nothing helped. :/

Simply the multires modifier wasn't set high enough. Another level and an overall smooth fixed it. Still strange tho since i set preview and sculpt to the same level.


text:
2D animation, Line between meshes
I'm pretty new to blender so it might be a silly question to you. I try to create a 2D animated logo
I was able to animate two mesh objects, both move around. Now I want to connect both with a line. Each end of line should follow one object. As result, the line gets streched, compressed, rotates and so on.
I was able to do so with an additional pane mesh and manually set lots of keyframes (LocRotScale). This is a lot of work and I'm wondering if I could do it faster. Also by scaling the mesh with keyframes, it can become really thin so you can't see it anymore for a while.
I found out that it should be able by using either a curve mesh or a mesh containing just two points. I tried to create a curve, select one point and select the mesh I want to attach and press CTRL + H to hook this end of curve to the mesh. Now I did the same for the other end.
When running animation now, the curve stays unchanged while the meshes walk around. In outliner, I can see that the curve object has two hooks attached to the meshes, so the hooks seems to be ok.
It would be glad if someone could explain step-by-step what I have to do.
Thanks for your support.

I think this would benefit from some images of what you’ve already achieved to give more of an idea of your goal. Please edit your question to add useful images to illustrate. Also, this seems to be two questions (1 = a better way than using keyframes, 2 = hooked curve not working). This site wirks best with one issue per question. Please consider splitting into two seperate qyestions.

Im not sure if i understood you correctly, but I try it anyways.
I used a Path with a Circle as a Bevel Object. Watch in the Path settings. The Bevel Circle is on Layer 2.
The workflow for Hook 2 Objects:

Select your Mesh
Shift+Select your Path
Press TAB to switch to Edit Mode
Select the Point of the Path you want to Hook to
Ctrl+H > Hook to selected Object
Done

Here is an example File. I hope I could help.

Thank you for your help. I was now able to hook the ends of curve to my objects.


text:
How many layers can I make in Blender 2.8
Couldn't find any info on how many layers can Blender 2.8 handle. I need like 70-100 layers and need to know what is the limit of layers amount?

There are no more layers in Blender 2.80. Layers have been replaced by Collections
I have no idea, how many of them you can create (the limit might even be your hardware here), but it is basically as many, as you wish.
If you create a new text block in the Text editor, type:
import bpy

for i in range(1,1000):
    C = bpy.data.collections.new("Collection"+str(i) )
    bpy.context.scene.collection.children.link(C)

and then hit Run Script, it will create 1000 empty collections. If you need that many, or if you start to worry about collection amount limitations chances are you are doing something very wrong. Don't worry about them.

Ah, I was talking about View Layers (in top right corner in Blender)

It should be same with View Layers. As many as you wish.

But you should not normally have 100s of them - it might not be convenient to work with. Are you sure it's the best way to do what you want to do? It may be worthwhile for you to describe your situation, context and goals in more detail in a separate question and ask how it would be most efficient to achieve those goals. You might find some more convenient, easier, more efficient workflows for what you want to do.

Thanks! I'm doing a 2d animation and parts of some objects have to be hidden behind other objects. For example, iris of a character is a circle object and it has to be shown only partially when character narrows eyes. The best solution I tried is to make those objects on separate view layers and use Alpha Over node in compositor, so alpha of an eye object cuts some parts of an iris.

You can do 2D animation in 3D space as well so the 2D shapes cover each other. That sounds easier to me...

Yeah, that's pretty simple, but I'm doing it an Adobe AE style with lots of masking, so there is no need to change shape of an object each time.


text:
How can I extrude edges inwards so the offset distance is same for all edges?
How can I extrude edges inwards and keep same distance for all exuded edges?
When I try to extrude (see pic 1) and press "s" all extruded edges have different offset from original (see pic 2) and I need extruded edges to have same offset distance from original. How can I do so?

https://blender.stackexchange.com/questions/50242/proportional-individual-inset/

As far as I know inset works only with faces. UPD. Nevermind I found out how to do it. Select vertices, press F, press I and move mouse a little to fit edges.


text:
Can I render one layer with perspective camera and other layer with ortographic and compose both?
I have two layers: one has to be rendered with orthographic camera in order to not mess with proportions of objects and other layer has to be rendered with perspective camera. Any way to achieve this? Compositor maybe?

The compositor does indeed compose.  Can you be more specific in your question?

I kinda figured out how to do it. I created two scenes, one with orthographic camera, and other scene with perspective camera. Then composed rendered scenes. It works, but it feels like there is a faster solution to it.

It would be useful if you edited your question to reflect that, perhaps with some screenshots of your compositor nodes and some additional information.

As far as i know, the camera is specific for the entire scene. You cannot create two different cameras in one scene. Your solution is indeed the way to go.


text:
Does mesa driver works with EEVEE on Linux?
I know that Cycles uses GPU for rendering and you need to have amdgpu-pro proprietary drivers installed and I can see my GPU (RX580) in options for OpenCL settings. However, AMD driver has some nasty issues with other software I use, so I wonder is default Mesa driver enough for EEVEE to be able to use my GPU (RX580)?

I use the default AMDGPU drivers because I tried thrice and have still not been able to install AMDGPU Pro. Eevee works absolutely fine on Mesa with my RX 560. Even for Cycles, it's not essential to have OpenCL, you just have to use CPU render. I'm happily blendering on after I switched to Linux Mint.

Yesterday I started using an eGPU (Razer Core X) with an RX 580 on my laptop (XPS 9370) with elementary OS 5.1. I used the PPA below to install the latest mesa drivers (20.3.1):
https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa
client glx vendor string: Mesa Project and SGI
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.1 - kisak-mesa PPA
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.1 - kisak-mesa PPA
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.1 - kisak-mesa PPA

EEVEE works excellent. Of course, for me, it's a massive leap forward coming from an Intel UHD 620 :). But unfortunately, no Cycles GPU rendering.
I'm seriously considering buying an equivalent Nvidia card. I believe CUDA does work with my setup.
UPDATE:
In the meantime, I managed to make Cycles work using the proprietary drives from AMD. More about how to install them can be found here: https://elementaryos.stackexchange.com/questions/26197/can-i-use-an-egpu-with-elementary-os-and-if-so-how-do-i-set-it-up/26198


text:
Driver python expression doesn't work as intended (doesn't calculate if else properly)
I can't understand why it doesn't work. Driver value should be 0 according to my expression. Can't figure out what is wrong with it.

I wouldn't trust the value in a quaternion to exactly equal a whole number.
There are decimal numbers that a base two floating point number can't represent, for the same reason that you can't represent 1/3 exactly in base ten. While -1 isn't one of those numbers, it's conceivable and probably to be expected that some minute inaccuracy would have been introduced in producing the number that's used for that driver channel.
Try this:
0 if abs(-1-var) < 0.001 else 1
or
0 if var < -0.999 else

Thanks! That's interesting, didn't know those "value" numbers might be rounded!

math.isclose is also available 0 if isclose(var, -1) else 1

or since booleans convert to ints in drivers in this case could use 1 - isclose(var, -1) or  not isclose(var, -1)

It says "slow python expression" and refuses to execute it, so I guess no luck here

@Anna I assume you're referring to isclose()? That just means there's more latency/overhead to running it; it should still evaluate. If it's not working, you probably have to set a wider tolerance (link to documentation) to account for the imprecision. E.G. not isclose(var, -1, rel_tol=1e-3). Also, 1 - (abs(-1-var) < 0.001),  or not (var < -0.999), or var > -0.999 etc should work too.

@Anna Try to enable Auto Run Python Scripts in the Save & Load preferences

Nope, still have "slow expression"

@Anna "Slow expression" is more of a info note than an error message. It should still work, unless it also says "Invalid expression". Also, the abs() and < -0.999 ways shouldn't say "Slow expression".


text:
How assign different material to strokes in grease pencil mode
How can I assing different material to strokes? I was drawing strokes (see picture) using material named "face1" but want to change it to material "face", how can I do it? Or the only way is to to redraw entire image?

You can do this by selecting the stroke(s) you want to change in edit mode. After that, select your material "face" in the "Material" tab then click on assign just below.
Or go to the stroke menu -> assign Material.


text:
How can I make triangle using mapping nodes?
I have a custom texture and need it to appear in triangle shape I know that I can use few Mapper nodes to make triangle or circle or any other shape but I don't know what other nodes I need to use to make a formula for triangle. Can anyone help me?

I'm "math disabled" ;) so this is my dumb version of triangle.
You can change Rotation in Mapping nodes as well as values in math nodes to achieve different triangles.
What it does is basically creating 3 black&white planes and then rotating them and offsetting.

I was trying with precise values in Mapper node, but your solution is simpler and faster. Thanks!

@Anna I'm still trying to make it with proper math formula, but I don't know which should I use ;)


text:
How can I edit shapekey value without editing mesh?
I accidentally set shapekey value to 1 while editing mesh, but I actually wanted to it to be 0.5 How can I change shapekey value and keep it's mesh shape? I want to slide to 0.5 value to get my mesh shape, not to 1 to get it.

Under the "Value" slider adjust the Range's Max to 2 and increase the "Value" to 2. Then click on the little triangle under the minus button and select "new shape from mix". This will create a new shapekey what you expected. Delete the original and reset the settings.

@FFeller You should post that as an answer below

Under the Value slider adjust the Range's Max to 2 and increase the Value to 2. Every other Shape Key value must be 0.
Then click on the little triangle under the minus button and select New Shape From Mix. This will create a new shapekey with what you wanted. Delete the original and reset the settings.


text:
How do I swap Y and Z axis on bone?
For some reason Blender 2.8 creates bones with Y axis going vertical (up-down) and Z axis going horizontal (front-back). I need to align bone axis to global axis, where Z is up-down and Y is front-back (as seen at picture). How can I do so?

I'm trying to follow this guy's tutorial, but for some reason when he creates bones they have correct axis placement bu default, and my blender swaps Y and Z axis.

you can't align the bone axis on the global axis unless you rotate it of course: R x -90, but I guess it's not what you mean, but what moment in the video are you referring to?

at 3:10 he selects bone and you can clearly see bone's axis are facing same directions as global ones

these are not the bone axis, these are the global and they are displayed for any selected object, the bone axis are still the same, if he had chosen to display it you would see it

You can't change the bone local axis, for example the tail will always point to the local Y axis.
I think you are confusing the global axes and the local axes. Actually when you choose to display the bone axes (in the Properties panel > Data > Display) it will display the local axes of each selected bone. Same as if you switch the Transformation Ortientation dropdown menu from Global to Local and select a bone, as you can see in my screenshots.
It's useful to display all the bone axes as it allows to align the axes of several bones, for example.
You can change the bone (and not axis) orientation in Edit mode with ctrlR and align it with the global with ctrlN. When you'll create some bone poses in Pose mode, you'll use R to rotate and X for example to rotate on the global X axis, and double X to rotate on the local X axis.

This answer is correct as this is not currently possible in Blender. That being said I think there is a strong case to make this into a feature. I explain this in more detail on Right-Click Select.

ok I've upvoted your proposition  ;)


text:
How can I make object visible when it intersects with a view of another obect?
I have invisible circle in front of colored square. I need to make it that when circle intersects with a view of a square (not with a square itself) it becomes visible (only that part of circle which already intersected view, the other is still invisible). How can I do so?
Pic 1 is setup I have.
Pic 2 is what I need to achieve.

Is this your complete setup or is it very simplified.

You can use OSL to fire a ray forwards from the shading point, and return information about the next point hit. You can then use that information to control the response of a material at the shading point. To use OSL, you must set the render device to the CPU, and check 'OSL'.
This little OSL script fires a ray forwards continuing in the direction of the incident ray, and returns the Pass Index of the next object hit.
#include "stdosl.h"

shader NextObj(
  output float nextObjIdx  = 0.0
)
{
    if (trace(P,-I,"mindist",0.0001)){
        getmessage("trace", "object:index", nextObjIdx);
    }
}

It can be used, for example, in combination with these nodes to control the shading dependent on the next object:

With this sort of result.. the plane in the background has been given a Pass Index of 5:

.. and you can change the yellow Diffuse shader for a Transparent shader with color (1,1,1) to make the circle disappear when it's not between the camera and the plane. However, you'll find that then, it won't cast a shadow. That's because for a shadow ray, the incident ray I doesn't point towards the camera and so the forward ray points towards the environment, or a light-source, which doesn't have a Pass Index > 4, so as far as shadows are concerned, the object is always transparent.
That may be what you want .. if not, you can fix that as follows:
#include "stdosl.h"

shader NextObj(
  output float nextObjIdx  = 0.0
)

{

    point cam_pos = transform("camera","world",point(0,0,0));
    vector viewdir  = P - cam_pos;

    if (trace(P,viewdir,"mindist",0.0001)){
        getmessage("trace", "object:index", nextObjIdx);
    }
}

..which ensures the probing forward ray is cast onward in the camera viewing direction for all incoming rays, including shadow rays. That means the part of the circle that is between the eye and the plane casts a shadow. The rest doesn't, if it's transparent. There are quite a few more variations on the behavior you can achieve by tweaking the script and using a Light-Path node.. if these examples aren't right, perhaps you could specify more closely. You could, for example, use the material index rather than the object index; then all objects with that material would make the foreground circle appear.


text:
How to make a square out of a rectangular face?
I want this face to be a perfect square, I know about the addon looptools and Circle does make it square but also rotate the face which I don't wont. I know I could set my 3D cursor in the center of this face, add a plane, vertex snapping etc but is there an easier, faster method?

Please clarify the size of the square you do want.

You can use Set Length operator from Mesh Tools add-on.

Transcript of the GIF:
Select one edge, press N to enable Numbers panel, go to Edit tab > Mesh Tools > Edge Tools > Set Edge Length. Hover your mouse over Target Length and press Ctrl + C to copy the current length.
Select Two edges connected to the measured one, again click on Set Edge Length, hover over Target Length, but this time paste with Ctrl + V
and accept by clicking the OK button (out of frame here).

Wow, Exact and fast! Great! Looks like the easiest way ;)

You're telling me it's enough to hover over the field I want to copy? The click-click-clicks I could've saved :D

Thanks so much! That worked great! I discovered you can also use the "Existing Length" option in the Set Edge Length operator and choose "Shortest" or "Longest" so you don't have to copy and paste an exact edge length. :-)

@Copperplate yes, but it uses the longest selected edge, and it doesn't allow selected edges to share a vertex, so you would need to select the long edge, duplicate it and move out of the way, add short edges to selection, switch the mode to the one you're suggesting, and afterwards remove the temporary edge.

Yeah, I discovered the technique I mentioned worked sometimes, but failed in other scenarios. So your copy and paste method is the most accurate way at present. Too bad a simple "Quadify" shortcut didn't exist, like what we have for "To Sphere"... :-)

When you ask for a perfect square, you're asking to manipulate individual vertices to place them exactly, and the ways I know how to do this are tedious.  The easiest way to get a reasonable square is to
Inset the face so that one pair of opposite sides are the right length for the square.  For my example, I'm going to pick the pair that are parallel to the Y axis:

Switch to edge select and select the pair of edges that are the correct length:

Scale along the perpendicular axis, in my example, the X axis, until you have an approximate square:

If you turn on edge length in the overlays then you can see the value of the lengths of the square and improve your approximation:

If you need even more precision, you can do numerical input when you do the inset.  In this example, I entered 'i.25' to make the border .25 units, resulting in the y length being .5.

Now I can do a little arithmetic and learn what scale factor I need to bring the other two sides to the correct length.  Since .5 is 1/3 of 1.5, the length of the long side of the rectangle, I typed 'sx.333' to obtain this result:

Unfortunately, as far as I know, Blender doesn't offer an option for inset to make the sides square, so manipulation similar to this is required.
Of course, if your face isn't parallel to one of the axis, then you need to adjust the technique.  Often, working in normal space rather than global space works, and when all else fails you can create a custom space.

+1 from me, your screenshots make the answer seem longer and harder than it really is :)


text:
Texture paint mode poor brush strokes quality
When I draw in Texture paint mode in 3d editor my brush has poor quality strokes - no anti-aliasing, black artifacts around the stroke. But when draw in UV Image edit - everything is fine, strokes are nice and smooth. Is there anything I don't know about Texture paint mode? There is not anti-aliasing option in Texture paint mode, it's only available in UV Image edit. But drawing in 2d is so inaccurate compared to drawing right on a 3d model. No matter what I tweak in Texture paint mode I can't make the brush strokes to be clean and smooth. My texture has 4k resolution.

Hi Anna, hard to tell without your file. At least for me, I never had this problem and a quick test showed me my Texture Paint has smooth strokes. If nobody has a good idea for this issue from the screenshot, maybe you can upload your file here: https://blend-exchange.com and follow the instructions there to edit it into your question?

Was the painting smooth prior to this at any point in time? Is this the first time you are using the paint mode in Blender, or could it be related to a driver issue on the AMD side from an update there? You mentioned over on BA that you tried multiple versions of blender, so that means it isn't in the settings of the scene or the tool, and it isn't the model because you said you had the same result on the default cube. If you can upload a mesh object with the image painted this way packed in the file, we can try the same brush on our end to see.

Hi! I tried other software and installed Quixel Mixer just to be sure and the lines are also jagged in there. I guess the problem is that I used brush size 3-4px and I zoomed in onto the model too much to draw small details. When I zoom out, even 2px brush seems to work fine and it's very smooth. Kinda feels like there is a connection between zoom distance and how jagged the stroke is. More zoom = more stroke artifacts.


text:
My poor Vincent, weird knees make it look like robocop
I am practicing walk cycles and picked the poor Vincent because I am a bad puppeteer!
I made him walk as robocop does, this happens within the frames 30 and 50/60 and the knee movement is very weird and then it reflects on the leg.

I really cannot tell where I am doing this wrong, again I am a noob in the Blender world.
You can see how bad it looks on the gyazo gif of robotic Vincent GIF
I saw on the other thread someone say it was about hip movement, I did moved the hips but it may be that it wasn't enough.
Can someone teach me where am I failing?
Blender file of Vincent in zippyshare

providing blend file would help

There's a very detailed walk cycle tutorial here which is a bit long-winded but goes through all the steps to produce a realistic walk.

@Chris I am attaching on the original thread the blender file with the keyframes of Vincent at the moment I stopped. Thanks for reaching out to help

Download not working? Relaxed bipedal walking in the able-bodied is: repeatedly falling over. Maybe think about the relative forward position of the hips and the tilt of the torso in those terms: where are the weights, that help the drop onto the next foot-fall, and the momentum which will take you beyond it?

You should try the following things, still not perfect but a bit better I think:

Its lowest position (when the hip is at the lowest position) should be at frame 1 (and 40, the reverse pose), when its legs are spread the most, so you need to correct that:

Also lift a bit the hip on the next pose (frame 10 and 50), to make the transition to its highest position (which happens at frame 20 and 60):

Maybe he should not bend forward but stay straight? Give it a try:

At the intermediate position, put the up foot here:

When he's about to put his front feet, it should be a bit lifted like that, also lower the knee a bit down:

At last, you need to make the feet slide linearly on the ground, otherwise the feet will slide when you'll animate your character through the 3D space, see some tutorials on how to create a walk cycle with no sliding, here I've used an empty to help me make the foot slide nilearly:


text:
Simple Deform "Bend" Option Wont Work
I'm trying to follow a CGGeek tutorial on making the earth. I can't follow along because right away the Bend modifier won't work.
Things I've tried:

Ctrl +  A for rotation
Changing the axis

did you subdivide the plane? you should subdivide it a few times....until it looks smooth. If this doesn't help, please provide blend file

@vklidu: oooops, yes he has

Ok, please provide blend file so we can check it out

Are you referring to this tut?
It didn't work for me too, but if I set Plane along X axis with Rotation applied Ctrl+A ...
it works for me.


text:
2.83 - Cycles - CUDA error: Out of memory in mem_alloc_result, line 815
When rendering in Cycles at 1080p, everything went fine until it started denoising. I then suddenly got the error: CUDA error: Out of memory in mem_alloc_result, line 815.
My GPU has 6GB VRAM and my computer has 24GB RAM, yet neither showed any signs of approaching the max.

The denoiser uses a lot of memory. Why does denoising take up so much memory?

I had to switch my viewport shading from rendered to solid to fix this.

Denoising the entire 1920x1080 image at once caused the out-of-memory issue. Disabling Progressive Refine and making the tile size reduced the number of pixels denoised at once, eliminating the issue.


text:
Rifle Grip and Hold
I am working on an animation in which the character grabs onto a rifle and fires.
Essentially, I would like to know how to have the FK controller move along with the rifle when it fires from recoil, then stopping moving with the rifle when he lets go at the end of the animation.
I believe there is a process involving locators, but I cannot find it. The rifle is parented via object constraint to the right firing hand FK.

Hello, if it's the rifle that moves, maybe parent the IK controller to the rifle with a Child Of constraint?

Yep, that did it. Could've sworn I had already tried that. Thanks for the help friend.

Parent the IK controller to the rifle with a Child Of constraint


text:
problem with cycle render

This is what happens. I don't understand why. Could anyone help me please?

Go to render settings, find metadata panel and uncheck Stamp output


text:
Is it possible to update link to a renamed armature?
I was curious to know if it's possible to update a link to an armature after you renamed it in the original .blend file. I had to change its name for the sake of organization, but I haven't been able to discover a solution, and all the animation channels that hold my animation keyframes are naturally not connecting and updating. I was not able to find the answer to this specific question online, let alone discover a solution. I know Blender has a few quirks with linking libraries so please advise and thank you.

So the best solution I discovered was to copy the animation data from one object to another. Since the missing armature proxy still held all the frames (and all the bones had the same name), it was a simple process. Just had to select both objects in the correct order for data transfer, then hit object > make links > animation data.


text:
How would I go about turning this object into a 3D model with the same colours?

I've been using Blender for educational purposes for the past few years making some general models like figurines and furniture but for my next project I want to make a 3D model of this image and I don't know where to start.
I've tried searching up tutorials but they all are too vague or just do not work.
What I am trying to do is convert this image to a 3D model while keeping all the colours and shapes within the picture. Could anyone lead me down the right path?

It's not easy to turn a 2d image into a 3d object.  What I would recommend is to create a "turnaround" as a first step.  Basically this involves sketching a front, side, top, and/or back view of the character.  An example is here.
This is very important to figure out the shapes of the model from multiple angles.
Once you have the turnaround, you can import it as Background Images in blender and assign it to the front and side views to use as a guide.  From there model on top of the images.  There are many tutorials for that kind of modeling, like the famous Joan of Arc Tutorial.
Good luck!  The turnaround sheet is likely the hardest part.


text:
Problems with lighting in render
could anyone give some advice as to why my cycles rendered image is way darker than my render preview? It seems that the light refuses to shine on the walls of the little house I constructed in the final render, but it shines on the other objects in the image.
Thankyou for reading + your help!

Have you doublechecked, that no objects have restrict rendering turned on?

That is next to the visibility icon right? Its the little camera next to an objects name? I have some objects in the scene that have rendering restricted, but the walls that I'm having the problem with do have rendering on they just refuse to show the light shining on them in the render.

There could be another object with a darker Material in front of the wall. Have you possibly changed the cycles settings of some objects (e.g. removed camera rays)

I have only restricted camera rays on the lighting cubes that are in the image but my problem is also that they don't seem to be effecting the walls.

I guess your best bet is to upload a condensed version of your file, (with only the back wall and other neccessary objects) for an answerer to examine.


text:
How to remove a part of edge loop which deforms my object?
I have just started off with blender, so please forgive me if I misuse the terminologies.
I have created an object by merging together a cylinder and a cube as shown in the screenshots below.
I created edge loops to sharpen the corners, which worked fine. It caused some deformities at the top face of the cylinder which I fixed by creating an inset.

But on the sides of the cylinder, it creates a pinched effect.

I tried for really long to remove the extra edge, but could not do so without introducing more complexities and deformations.
Is there a way to deal with this?
It seems that this must be a very common scenario.

This sort of topology behaves well under subdivision, despite the large number of edges meeting where the circular and straight boundaries meet. I would start with a lower number of edges on the cylinder, myself, it's easier to work with. Let a subdivision modifier do the work.

I can see what you have done there with the edges, but I am hardly able to follow it through. I just recreated and ruined the entire object thrice now. Is there any tutorial out there which can explain the general thought process to reorient vertices. I had been running away from getting into this, but looks like I can't ignore this for long.
edit:
For example, I can see that the faces need to always have 4 vertices, but how do I arrive at those? I delete one of the vertex and always end up with 5 remaining.

This blog is often recommended here on SE, and I found going through these exercises to be a pretty good start. There is actually quite a limited range of patterns to become familiar with.

Thank you so much for those links! These look like blender jackpots. I really appreciate it.

Select the edge loop by pressing Ctrl+Shift+RMB
Then pressX or Delete button, right on the bottom you will find an Edge Loop option. That should do the trick.
Edit : Make sure you are on edge select mode.

Thanks. This does not help though. It deletes the edge loop but disturbs the shape in other ways.


text:
How to wrap tape around a object?
So via the use of Curves > Curve spirals > Archimedian I've made the following:

Now I want to wrap the tape around the handle to fit the baseball bat mesh perfectly... problem is I can't seem to figure it out. I tried using Shrinkwrap but I only get the following:

It seems to join with my mess to mess it up. Anyway on how to do this but not manually scaling?

With pivot set to '3D Cursor', assuming the length of your baseball bat is in Z, and with the 'Loop Tools' built-in Add On enabled ...

Select a transverse edge loop near the bottom of your tape winding
ShiftS 'Cursor to Selected'
Select a vertical set of vertices spanning the height you will want your spiral

ShiftD duplicate that span (in real life,
right-click to leave it where it is, on the surface of your object)
W > Subdivide the selection. In the tool region, adjust the count to create as many vertices as you will eventually want on your spiral... (total turns * vertices per turn).

With the vertices in the profile selected, use W > Loop Tools > Space to distribute them evenly along your profile.
O .. switch on Proportional Editing. Set the Falloff Type to 'Linear'... Select the bottom vertex of your profile alone ... hit RZ.  Using the scroll-wheel, adjust the range of your proportional edit to include the top vertex of your profile.

With each wind of your mouse around the 3D cursor, you will introduce a new turn on your spiral, conforming to the surface of the bat.

Instead of doing this interactively, you could assign a Simple Deform > Twist modifier to the profile, which does the exact same thing. Set Axis to Z, and  Angle set to 360 * your number of turns. That way you can go back and adjust it later, if you need to.


text:
Does Blender support texture with straight alpha
My question is simple: does Blender support texture where RGB is color, and A is a grayscale texture (not transparency)?
The image file can be PNG or TGA, both with straight (aka unassociated) alpha, and all I want is to extract that alpha, without affecting the color channels.
So far, I have tried every "color space" + "use alpha" setting combination, and none can give me both a straight alpha and correct RGB color:

I can pick sRGB/Linear without alpha, then I got RGB channel right, but A channel is all white.
I can pick sRGB/Linear/Non-color/Raw with alpha, then I got A channel right, but all black in RGB channel.

And this only affects Render view. Material view is somehow happy either way.
Any clues?

similar question was asked here, in 2015, but I should note that I already know this workaround: it basically require you to duplicate the texture file, as color-space and use-alpha setting are per texture, not per image node. https://blender.stackexchange.com/questions/32450/how-to-separate-texture-alpha-without-premultiplying-the-color

other workaround (such as dividing alpha) is not possible here because alpha is 0. and so far I research suggest texture with non-transparency alpha are still unsupported as of blender 2.79 releases

my case is also the opposite of this question: where OP wants to apply the alpha mask, which is do-able in Blender. https://blender.stackexchange.com/questions/104642/partly-ignored-png-alpha

This behaviour seems to be internal, so no easy way to modify it.
But a way to facilitate that duplication process is to instead of duplicating the texture file itself, duplicating the Image datablock that references the file inside Blender.

Create the Image Texture node as usual and duplicate it, and then click the user number to make a new copy of the Image datablock -- they will both reference the same file but have separate Use Alpha settings.

Cheers, I am aware of this though: see my comment in OP :)

You wrote "duplicate the texture file" in the comment, to me that means a file in your HDD. To clarify: image file = file.png | image datablock = image object as seen in the UV\Image Editor | image texture node = cycles node in the node editor.
You duplicate the image datablock ("make single-user copy"), not the file.

@RN thx for clarifying, I should have edited that comment, I am aware of both approaches.

(for future users: this is what we are talking about, select image texture node, press N in node editor to view properties panel and find this: https://i.sstatic.net/zPKfA.png ), one thing I don't quite like about this workaround: it's quite easy to have used an incorrect source image file as there is no way to view them without expanding properties view.


text:
How do you set bevel profile to less than 0.15
Just wondering is it possible to set bevel profile to less than 0.15?
I need it for this particular case: I want to match this bevel's "profile" to the other bevels. But can't.

If setting it to less than 0.15 is not possible in GUI, then perhaps there are other workaround?
So far I think boolean op (subtract by a cylinder) might be a best idea.


text:
Geometry nodes - Extract objects within a collection instance

As far as I can tell, in Blender 3.1, it is not currently possible to extract objects from a child collection within another collection.

As in, if I put the Import collection into a Collection Info node, check Separate Children, there will be 2 instances, BagA and BagB, but I wouldn't be able to extract the individual objects from these 2 instances.

So far the best option I have found is to assign different materials and use Material Selection, but this is a per-face filter, not per-object; and we cannot use Instance mode for obvious reasons.
Is there a good workaround and efficient workaround for this case?

maybe have two GN modifiers, first one would flatten the list... just an idea


text:
Why doesn't my union Boolean modifier work using Python script?
I am new to Blender. I tried to do a union operation on all beams using the python script. As shown in the following image, the model looks like:

However, after the union operation, one of the beams disappears:

I attached my code here:
import bpy;
import numpy as np
import bmesh;
import math;

# Connectivity
Point1List = [[0.0,0.0,0.0],[3.0,0.0,0.0],[2.0,2.0,0.0]]
Point2List = [[3.0,0.0,0.0],[2.0,2.0,0.0],[0.0,0.0,0.0]]

mylayers = [False] * 20;
mylayers[0] = True;

bpy.ops.mesh.primitive_uv_sphere_add(
            location = (0.0, 0.0, 0.0),
            size = 0.4,
            layers=mylayers);

bpy.context.active_object.name = "Point1ListSphere1";

bpy.ops.mesh.primitive_uv_sphere_add(
            location = (3.0, 0.0, 0.0),
            size = 0.4,
            layers=mylayers);

bpy.context.active_object.name = "Point2ListSphere1";

bpy.ops.mesh.primitive_uv_sphere_add(
            location = (2.0, 2.0, 0.0),
            size = 0.4,
            layers=mylayers);

bpy.context.active_object.name = "Point2ListSphere2";

def poly(z,L):
    return   (1.2/(L*L)) * z * z - (1.2/L)*z + 0.4

def rotation_matrix(axis, theta):
    axis = np.asarray(axis)
    axis = axis/math.sqrt(np.dot(axis, axis))
    a = math.cos(theta/2.0)
    b, c, d = -axis*math.sin(theta/2.0)
    aa, bb, cc, dd = a*a, b*b, c*c, d*d
    bc, ad, ac, ab, bd, cd = b*c, a*d, a*c, a*b, b*d, c*d
    return np.array([[aa+bb-cc-dd, 2*(bc+ad), 2*(bd-ac)],
                     [2*(bc-ad), aa+cc-bb-dd, 2*(cd+ab)],
                     [2*(bd+ac), 2*(cd-ab), aa+dd-bb-cc]])

for i in range(len(Point1List)):
    if Point1List[i] != Point2List[i]:
        Dist = 0.0
        for j in range(3):
            Dist+=(Point1List[i][j]-Point2List[i][j])**2

        Dist=math.sqrt(Dist)

        # Calculate ratational axis
        u = [0.0,0.0,Dist]
        v = [Point2List[i][0]-Point1List[i][0],Point2List[i][1]-
            Point1List[i][1],Point2List[i][2]-Point1List[i][2]]
        R_axis = np.cross(u,v)
        R_axis = R_axis/np.linalg.norm(R_axis)

        # Calculate theta radians
        theta = math.acos(np.dot(u,v)/(np.linalg.norm(u)*np.linalg.norm(v)));

        # Create a new object with name
        mesh = bpy.data.meshes.new("Branch"+str(i+1))
        object = bpy.data.objects.new("Branch"+str(i+1), mesh)

        # Show the object in the scene
        scene = bpy.context.scene
        scene.objects.link(object)  # put the object into the scene (link)
        scene.objects.active = object  # set as the active object in the scene

        # Set the layer
        object.layers[0] = True
        for j in range(1,20):
            object.layers[j] = False

        object.select = True  # select object
        mesh = bpy.context.object.data
        bm = bmesh.new()

        # Translate and rotate the created column to the correct position

        v_coord=[poly(0,Dist), 0, 0]
        R_matrix = rotation_matrix(R_axis,theta)
        v_coord = np.dot(R_matrix,v_coord)
        # Point translation
        v_coord = v_coord + Point1List[i]

        v0 = bm.verts.new((v_coord[0], v_coord[1], v_coord[2]))

        for dz in range(1, 1000):
            z = dz / (1000/Dist)
            if z>=Dist:
                break
            v_coord=[poly(z,Dist), 0, z]

            v_coord = np.dot(R_matrix,v_coord)
            v_coord = v_coord + Point1List[i]
            v_new = bm.verts.new((v_coord[0], v_coord[1], v_coord[2]))

            edge = bm.edges.new((v0, v_new))
            v0 = v_new

        bmesh.ops.spin(bm, geom=bm.edges, axis=(v[0], v[1], v[2]), angle=math.radians(360), steps=20, cent=(Point1List[i][0],Point1List[i][1],Point1List[i][2]))
        # Remove the duplicate vertices
        bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=0.001)

        bm.to_mesh(mesh)
        mesh.update()

# Boolean operation
def UnionBoolean(target, opObj, i):

    bpy.ops.object.select_all(action='DESELECT')
    target.select = True

    bpy.context.scene.objects.active = target
    bpy.ops.object.modifier_add(type='BOOLEAN')

    mod = target.modifiers
    mod[0].name = "Boon"+str(i)
    mod[0].object = opObj
    mod[0].operation = 'UNION'

    bpy.ops.object.modifier_apply(apply_as='DATA', modifier=mod[0].name)

for i in range (1,len(Point1List)):
    target = bpy.data.objects['Branch1']
    opObj = bpy.data.objects['Branch'+str(i+1)]

    UnionBoolean(target,opObj, i)

Is there any problem in my code that makes the boolean not working? I used remove double. Normals not pointing outward could be the issue but I don't know how to change normals using python script. Thank you.

Can make life a lot simpler by adding modifiers via the API Example  Not sure if numpy is overly required here since you are basically re-writing  the blender vector and matrix math utilities, which  have usual vector method suspects  like v1.dot(v2) and v1.cross(v2) : rotation_matrix = Matrix.Rotation(theta, 3, axis), the vector between two points(vectors) direction_vector = p2 - p1 its length direction_vector.length to use as axis axis = direction_vector.normalized().  Reverse the bmesh spin to flip normals on bond.

@batFINGER Thanks. I haven't taken care of those numpy things yet as they are something left in my script when I used spyder to test my code. For the modifiers.new(), do I have to use a command to apply the operation? In my case, if I want to union everything, I have to select all objects and make one of the object active, am I right?


text:
How to Render with Frontface Culling
I flipped the normals, so that I could see the meshes layered within the outer mesh by using blackface culling. Reversing the normals made it so that instead of culling the backfaces, it culls the frontfaces. I did this, following this tutorial: https://www.youtube.com/watch?v=H5edojx6DFI
[I modified the center to suit the aesthetic style I was going for. However, he doesn't go over rendering in the video. I'm using Blender Render.
I want my render to look something like this.

But I can only render it to look like this.

Is there anything I can do to salvage this?
Below is the Blender file for download:

Possible duplicate of Striped Sphere - hide backfaces

@DuarteFarrajotaRamos Unless I missed something, that node set up did not work for me. I reversed the normals back to the original normals to ensure that it is culling the backface and not the frontface as well.

Make sure transparency is turned on in the Render Pipeline options

Is that in the render tab in the properties window or somewhere else?

I figured it out.... I found a means to make it work with the node editor. I'll post the answer after I'm done rendering.

Applying this node set up (in Blender Render) will cull frontfaces. Apply your texture in the texture box onto the material you want to use. Linking it with color. Set the material to color output. Add a geometry node and set that to alpha. You need to set this to anything that has a mesh within it. But you will not need this setup for the most center mesh. For the most center mesh you can just apply whatever material/texture you want as typical with or without the nodes.