text:
Vertex color Animation from houdini to blender 2.8
i am trying to export a alembic from houdini to blender. This mesh has a Cd atribute with an animation.
I was able to export a still frame using the ROP alembic node in houdini. I can use the vertex color with no problem.
What i was not able is to export the frame range and viz de vertex color animation inside blender.

This is my render set up with the still frame. I want the same but with the animation.
How can i make this to work???

I don't quite understand your problem. I can import alembic animations with Cd>Vertex Colors without a problem. Care to share a short abc?

the problem is that the Cd attrribute inside houdini has an animation. But when i import the vertex color animation to blender i cant  see it

I understood that, it is clear from the question. How did you export the abc, can you share it?

I dont know if this is the correct solution.
But i solve it using this modifier and animating the frame value

Thats a valid solution. You should post it as a proper answer in the "Answer" field =)


text:
No vertex groups on vertices on evaluated object
I need to read the vertex groups in objects for an exporter I'm working on. I'm using evaluated_get to get the objects with modifiers applied in a non-destructive way. However doing this makes the object have no vertex groups on vertices. Basically any mesh I read is exported as if it was rigid instead of rigged. Is there a way around this?
https://github.com/Project-Cartographer/H2V-Blender-JMSv2-Exporter/blob/master/io_scene_jms/export_jms.py#L289
                    modifier_list = []
                    if triangulate_faces:
                        for modifier in obj.modifiers:
                            modifier.show_render = True
                            modifier.show_viewport = True
                            modifier.show_in_editmode = True
                            modifier_list.append(modifier.type)

                        if not 'TRIANGULATE' in modifier_list:
                            obj.modifiers.new("Triangulate", type='TRIANGULATE')

                        depsgraph = bpy.context.evaluated_depsgraph_get()
                        object_eval = obj.evaluated_get(depsgraph)
                        geometry_list.append(object_eval)

Preserve all layers
By default it preserve all layers is turned off when using to_mesh on the evaluated object, set it to True
Test in console, Default cube, default subsurf modifier, 3 vertex groups. (All verts in vgroup 0, a single in groups 1 and 2)
>>> dg = C.evaluated_depsgraph_get()
>>> me = C.object.data
>>> len(me.vertices)
8

>>> for v in me.vertices:
...     [g.group for g in v.groups]
...
[0]
[0]
[0]
[1, 0]
[0]
[0]
[0]
[2, 0]

Using Object.evaluated_get
>>> o = C.object.evaluated_get(dg)
>>> eme = o.to_mesh(preserve_all_data_layers=True, depsgraph=dg)
>>> for v in eme.vertices:
...     [g.group for g in v.groups]
...
[0]
[0]
[0]
[1, 0]
[0]
[0]
[0]
[2, 0]
[0]
[0]
[1, 0]
[0, 1]
[0]
[2, 0, 1]
[0, 2]
[0]
[0, 2]
[0]
[0]
[0]
[1, 0]
[2, 1, 0]
[2, 0]
[0]
[0]
[1, 0, 2]

Bmesh from object
The method outlined here also preserves the vertex groups.
get the evaluated bmesh, write to a mesh, count the verts and check for vert group assignments.. (prob should have put vert index and  weight test in too, but you get the gist)
>>> bm = bmesh.new()
>>> bm.from_object(C.object, dg)
>>> bm.to_mesh(D.meshes.new("Test"))
>>> len(D.meshes["Test"].vertices)
26

>>> for v in D.meshes["Test"].vertices:
...     [g.group for g in v.groups]
...
[0]
[0]
[0]
[1, 0]
[0]
[0]
[0]
[2, 0]
[0]
[0]
[1, 0]
[0, 1]
[0]
[2, 0, 1]
[0, 2]
[0]
[0, 2]
[0]
[0]
[0]
[1, 0]
[2, 1, 0]
[2, 0]
[0]
[0]
[1, 0, 2]

source: Stack Exchange

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

sort: votes


text:
Matrix not applying to pose bone correctly
I'm attempting to import animations from text files but I can't seem to figure out how to properly import it. If I make a list of positions in a text file like here
from mathutils import Vector, Quaternion, Matrix, Euler
bpy.context.scene.frame_set(1)
M1 = Matrix.Translation(Vector((0, 0, 0)))
bpy.data.objects['Armature'].pose.bones[0].matrix = M1
bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('location')
bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('rotation_quaternion')
M2 = Matrix.Translation(Vector((0, 0, 2)))
bpy.data.objects['Armature'].pose.bones[1].matrix = M2
bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('location')
bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('rotation_quaternion')
M3 = Matrix.Translation(Vector((0, 2, 4)))
bpy.data.objects['Armature'].pose.bones[2].matrix = M3
bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('location')
bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('rotation_quaternion')

https://pastebin.com/HRp8pbTn
Full code I type in to console in the pastebin. Typing that gets me the animation as I exported with no issues that I can see. If I write a loop for it however like so
    bpy.ops.object.mode_set(mode = 'POSE')
    for frame in range(transform_count):
        current_frame = frame + 1
        bpy.context.scene.frame_set(current_frame)
        for node in node_list:
            node_rotation = processed_file[frame_index + node_index + 7].split()
            node_translation = processed_file[frame_index + node_index + 8].split()
            node_scale = processed_file[frame_index + node_index + 9]
            matrix_translation = Matrix.Translation(Vector((float(node_translation[0]), float(node_translation[1]), float(node_translation[2]))))
            matrix_rotation = Quaternion((float(node_rotation[3]), float(node_rotation[0]), float(node_rotation[1]), float(node_rotation[2]))).inverted().to_matrix().to_4x4()
            full_matrix =  matrix_translation @ matrix_rotation
            armature.pose.bones[node].matrix = full_matrix
            armature.pose.bones[node].keyframe_insert('location')
            armature.pose.bones[node].keyframe_insert('rotation_quaternion')
            frame_index += 3

        frame_set += 1

The position of the bones are all wrong. It's almost like the matrix is either being ignored or it's taking the matrix I give it and adding it the the pose bones current position. I want it to be exactly at the matrix I give it which is a global matrix. What am I doing wrong here?

Added
bpy.context.view_layer.update()

right after setting the matrix. That fixed my issue.

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


text:
Animation Nodes extra nodes Morph between two objects with particles
What would the setup look like to morph or get particles to form the shape of a mesh from another. Is it possible with the extra nodes that 3D Singh VFX has created.

It is possible to morph particles from mesh to another mesh or meshes or curve objects with Extra Nodes. I'll answer your question as soon as possible :)

Thank you your Awesome, much appreciated!

@3DSinghVFX did you have any luck with this?

Sorry for the delay, I was really busy with my studies. I'll answer this today. I have done a few months back but I'm making a simple example/node-tree for your question.

@3DSinghVFX Thanks so very much for your detailed explanation, and taking time out of your busy study life to help, greatly appreciated. Sorry for the delay had a family health emergency.
What I'm trying to do is very similar to what is described here (https://www.youtube.com/watch?v=lPCs4XbGth8) but without using the keyed particle setup and its limitations.

Is there a setup that will allow the particles to go from one mesh volume (or a number of mesh volumes) to another while that mesh is also animated, and then come to a resting state  that is more or less evenly spaced , similar to what the key particles allow for. Keyed particles can allow the mesh to be animated however it does not allow for transitions with animated meshes as described in the video, which is to manipulate them with turbulence etc.

I'm not sure how to go about this, or if it is possible. Would you still need a particle system on each object to give the vector locations? I'm a bit lost and you r help guidance would be greatly appreciated. Thank you so very much for all your help and time, once again greatly appreciated.

First thing I want to mention that you do not need keyed particles and also you only need one emitter object, the morphing objects (can have many meshes) can be two or three, anything and/or the emitter object itself. The Node-Tree which I mentioned in my answer morph the particles from one object (can have many meshes) to another object. Do you want to morph the animated text as shown in that video (you mentioned) or something else? By the way, I'll update the my answer for the animated object which has more than one mesh.

@3DSinghVFX thanks so very much for taking the time to respond and your help.
What I'm struggling with is to find a way for the particles after arriving at the second(or third) mesh settle and come rest without velocity and be distributed so the particles describe the volume of that mesh even if the mesh is animated. Does this make sense? Appreciate your expertise.

Your welcome. Okay, I'll update my answer soon :)

I have updated the answer for the morphing of particles on animated objects with turbulence force.

@3DSinghVFX This is outstanding! Thank you so much, I will let you know if I have any issues.

@3DSinghVFX ,Is there a good way to have the particles blow away after the third mesh, so to have a final transition  the particles fly away from everything or react to gravity if it is activated again. Is that not possible with this setup? Sorry for so many question, really appreciate everything.

Yes, it is possible. I'll update the answer for the interaction gravity after the final transition but you can use any force, I have made several Forces-Group-Nodes which are easy to control https://youtu.be/bAQmewZSJQ4

I have updated the answer for the interaction of particles with gravity after the final morph transition. For easy understanding, I have used the existing Force field for gravity interaction.

@3DSinghVFX, Thanks so very much this is perfect. Thanks for all our help with understand this and creating these nodes.

if you satisfied with this answer, please press the green arrow.

Hey @3DSinghVFX, is it possible to have a mesh controlled by an armature and the particles be able to find the position of the animated mesh? Thanks again for your help greatly appreciated.

If I use a model of a complex structure, say a wind turbine in my case I can't get the particles to be evenly spread out on the model. I have adjusted the scale value, which helps but it can't get the beautify results unless I just use simple primitives as your example. What could be the issue?

If I use 50000 particles things become very strange is that something that is a baking issue? Do I need to play the animation prior to baking, I'm using Blender 2.81.

I have made addon to bake particles in Blender2.8x (I have also mentioned in the answer): https://github.com/3DSinghVFX/Bake_Cached_Particles. Select the Particle Data Output then a Bake button will appear in the Tools panel. However, you do not need addon to bake particles in the Blender2.79x.

Note- Please watch the tutorials of Animation Nodes based particle-system for Blender2.79x and Blender 2.8x and Forces and other Group Nodes.
I am using Blender 2.79x for the morphing particles but you can also use the same node-tree in Blender2.8x.

Edit:
Morphing particles between animated objects:
For morphing, we need random points on the mesh of the object that we will use for the locations of particles. So, I have made a AN-Random Points on Mesh group-node to scatter random points on the mesh using BVH nodes. You can adjust the seed, Amount (in this case is total particles) and scale,

I have also made a AN-Custom Delay Falloff group-node which has easy controls (similar to keyed particle-system) for morphing transition between objects,

Step-1: I have added the particle-emitter Object A (Cube, you can also use a separate object for particle-emitter) and Object B (Cylinder) with animation on xyz-rotation,

The Emitter has these settings:

Step-2: Then add the AN-Particle Input group node which gives the necessary outputs (particle-system, locations, etc) and Particles Output node then connect the particle-system input, and also disable the Always execution option in the N-panel,

(You can download extra Group Nodes if you need.)
Step-3: Now we have to find the points/locations on the mesh objects (Emitter and Target) using AN-Random Points on Mesh group-node and Amount is the total number of particles:

Step-4: For the morphing effect, we have to Mix points (on the mesh, mentioned in Step-3) using AN-Vector List Mixer with Falloff which works similar to Mix Vectors node. Now, we can control the transition with any Falloff node,

Step-5: We have the resultant locations (or Post-Locations, after doing Step-4) and Pre-Locations, so we can calculate the velocities of the particles using AN-Velocities From Locations group node then connect the Post-Locations and Velocities to the Particles Output node,

Step-6: This is the final step, add the Falloff node which will control the morph transition. I have used the AN-Custom Delay Falloff node and set the Start Frame = 1, End Frame = 200 and Delay = 0.01 (you can change accordingly, e.g., to add some frames stay on some object),

Step-7: We can easily extend this node-tree for three objects transitions, here the third object is Object C (Ico sphere),

Step-8: I have used the AN-3D Noise group-node to add turbulence effect to the particles, and using Interpolate-node I have limited the turbulence effect during the transition, (two objects),

For three objects,

Step-9: After the final transition, to make the interaction of particles with gravity, I have added the Force filed and enable the All field weights in the particle settings. Then connect the AN-Vector List Mixer with Falloff group-node after the final object (in this case is Object C) to off the effect of final transition object and its falloff parameter is controlled by AN-Custom Delay Falloff group-node:

Three objects morphing of particles and interaction with gravity, the final node-tree:

Blend File for Blender 2.79x:

Blend File For Blender 2.8x (required addon to bake Node-Based Particles):


text:
Dynamic Paint to select vertices in edit mode
Is there a way to use Dynamic Paint to make a selection of vertices to then be able to delete in edit mode. I would like to use a brush to accurately select a specific shape from a dense mesh. Thanks in advance for any help.

Did you trying pressing c on keyboard to select the vertices? You can change the selector size using the mouse wheel and press escape to come out of selection mode.

No. While it appears to be possible at first, the data is only there during the simulation, going into edit mode clears it out.
If it suits your needs, you could dynamic paint vertex weights and use that with a mask modifier to hide part of the mesh.
I expect you will have to use border, circle or lasso selection to get the verts you want in edit mode.

what I was really hoping for is in fact a custom selection brush in the form of geo to make exact complex selections  of another meshes vertices to then be able to delete them. I just thought Dynamics Paint might expose some way to do that. Be great to have this maybe a feature outside the existing selection methods.

@Bopstar you can use a boolean modifier to use a mesh to define the section to be removed from another, when you apply the modifier it becomes real mesh. If you think it can be a new feature, suggest it at rightclickselect.

Thanks for taking the time to respond. Boolean operations messes with the geo in a way that just a straight selection would not. I might suggest it as a feature then.


text:
Iris with Animation Nodes
I would like to know how to create an iris with animation nodes.
Specifically to be able to create one leaf so that it can be duplicated placed around a circle and aligned to the edge of circle and then be able to rotate inward, as an iris would do as in this example, https://www.youtube.com/watch?v=QINfesdpxVs.
I would like to be able to do this with animation nodes so that I could can just make and modify one leaf and also control the amount of leafs as needed without having to create and move things as I'm doing now outside of AN in Blender.

Yes, this is pretty straightforward with AN.
I created an object called "Vane01" which is the individual curved slice of the iris.  This is the individual object in the upper right of the gif.
Then I created a set of nodes which duplicates Vane01 around a circle, and rotates those duplicates in parallel to make the iris.

I started with a bezier circle, then used the AN "evaluate spline" node to select 16 points evenly spaced along that curve.
Using the Object Instancer, I made 16 copies of Vane01, then located them at each of the points provided by Evaluate Spline.
Evaluate Spline also provides the tangent angle at the selected point, which allows you to angle the Vane copies around the curve.
Then, by adding the rotation angle of the original object, I rotate each of the Vane copies.  This allows all of the iris elements to rotate smoothly in parallel, providing the Iris effect.  It is important that Vane1 (and thus every copy) has its origin at the pivot location of the base, so it can rotate there instead of the center of mass.
By editing Vane01, different shapes can be tried out.  Also, the node layout has an integer input variable which allows you to vary the number of vanes in the iris.
Here's the blend file for the simple iris model.  I made this in Blender 2.79, using Animation Nodes 2.0.4.

Complex version
As practice for myself, I also made a more complex version, which dynamically adds guides for the vanes.  I wanted to see what shape of frame would be required to make the Iris work correctly.
I've also attached that .blend as well if you're interested.

Here's the blend file for the complex iris model.  HTH.

Thanks for your effort this is a great help.


text:
Python - Script to Assign Materials based on Mesh Name
hoping someone may be able to help out with a script to automatically assign materials to meshes based on their names. I've not had any Python experience so it's all a bit beyond me.
I'm importing a series of car models (FBXs each consisting of around 25 mesh objects) into a scene to render (Cycles) and need to apply materials to the selected meshes (ideally more than one at once). The materials have already been created in the scene and applied to temp meshes (moved to layer 2). Each mesh object from the imported FBX has been named to match the material that needs to be applied (eg. "Car_Tyres" mesh needs "Car_Tyres" material applied).
Can someone help me out with a script or point me in the direction of a solution, I've had no luck searching previous questions on here. Thanks heaps for your time :)

Please try running this and let me know if there are any errors: (I just hope I understand your requirement correctly :)
import bpy

for obj in bpy.data.objects:
    objName = obj.name
    mat = bpy.data.materials.get(objName)
    if(mat != None):
        if(mat.name not in obj.data.materials):
            obj.data.materials.append(mat)
            obj.active_material_index = len(obj.data.materials)-1
        else:
            obj.active_material_index =  [*obj.data.materials].index(mat)
    else:
        print('No material available for', objName)

Thanks so much @BlenderDadaist, that works perfectly! I found I had to remove the default materials that the FBX imported with first (via another script), then your script applied the materials just as I'd hoped, thanks again, you've saved me a few thousand clicks! :)

You are welcome :)


text:
Enable shadows only for part of the object
Context
I'm trying to reproduce the kind of shaders we've seen in Project Gold, Puss In Boots 2, Spiderverse, ... based on brush strokes. I have a very simple basis with geometry nodes.
I know Blender Studio has released the extension they mainly used for Project Gold. I'm trying to do the same kind of shader for myself.
I have a set of brushes, which are planes with textures I made :

I generate instances of these brushes on the object surface with geometry nodes. For now, I have the following result, for a cube :

Issue
My problem is, I'd like the base object (cube) to cast shadows. But I don't want the brushes to cast shadows, especially on the base object it belongs to. This problem is highlighted on the next image with "not ok" label, the black spots on the cube.
How can I only enable shadows for the base object, if both the base object and the brush strokes are inside the same object ?

Conditions
Here is a list of the conditions I'd like to satisfy. If you think one of these is irrelevant or would prevent me to achieve the effect, let me know !

The effect shouldn't depend on render layers, I want it to be shader-only. Of course I could render the strokes on a separate layer and use compositing.
The brush strokes should be inside the same object as the base object it is applied to. I don't want to have to create a child object for every object in the scene.
The object have to cast shadows.
The strokes shouldn't cast shadows on their base object.
The strokes may cast shadows on the scene if there is no other way.
The strokes should stay as instances and not realized geometry, for performance sake.

To summarize, I'd like it to be shader-only, geometry-nodes-only and the brushes should be created in the base object, not as a separate object.
Is there any way to achieve that ? Am I missing some obvious settings ? Thank you for time :)

Could you add some images of the shaders you are talking about that would be the desired result? It's hard to understand what exactly you are talking about from 3 names of movies. I mean they have many scenes with many shaders and many types of shadows...

Nothing special for the shader, just diffuse with transparency. I'll add it. The shaders I mentionned don't matter, I just want the brush instances not to cast shadows on their base object.

OK, so why not just do it in the shader the most obvious way?

Because I'm bad at Blender ? Ahah I think you just answer my question, I'll take a look.

I am not sure I understand the situation completely, but sure, you can use Light Paths node's Is Shadow Ray. If you wanted only some objects to receive the shadows that might get awkward with various tricks that might not be that elegant.  There is also Transparent and Transmission Depth and it's possible to then use all sorts of transparent objects to mask stuff in the scene. That's a bit messy though - like here the lower monkey has duplicate geometry on top of it with transparent shader so it doesn't receive shadows of the higher one.

It might be possible to do these things with light linking, but I have never used that, so no idea how it works, if we are talking about being bad at Blender ;)

You solved my issue, thank you :) I'll wait a few days if you want to write a short answer, otherwise I'll write one for posterity.

I think it would be awesome if you found the time to put it into understandable manner for someone with similar problem. Sorry for not having the patience of writing an official answer.


text:
Search upwards within script
This has boggled my mind for a while now and I've searched everywhere. Whenever I have a long script, I use the [find/replace] tool on the sidebar to search for parts of my code

However, it only works downwards or so I think. So if I scrolled my script all the way down and have the cursor there to edit a part and want to go back up, I have to scroll all the way up again. place the cursor at the start of the file and run the search again. Surely I must be missing something?

You can't search upward as far as I know, but there's the Wrap option below which allows looping from the end back to the beginning

Enable wrap option, then it will search in all document

GREAT! Sadly, not the same as searching upwards in word documents but definitely a big help. Thank you so much.


text:
Smoothing groups issue
I'm using blender 3.1.0 and im trying to export an object via FBX to 3d max along with its smoothing groups. And this always USED to be possible from what I remember. Here is the usual process.

Create a cube

Set shading to smooth

In edit mode mark edges as sharp

In object dataproperties, turn on autosmoothing and set the angle to 60 degrees.

Looks good.

Export thru FBX (using normals only) I also tried edges

Import in max (check if smoothing-groups import is checked in FBX settings) and voila, no smoothing group assigned at all.

Did I miss anything?

If rely on setting a specific angle to get your split normals then marking the edges sharp is not entirely necessary. If you want only the edges you marked sharp to be split then you would set the autosmooth degrees to 180. If you set this setting in Max:

and this one in Blender:

to the same degree value, then it will have the same result as if they shared the same "smoothing groups".
AFAIK, the concept of smoothing groups is a Max-Specific concept, and can't be transferred between different programs in itself. But if you split the normals one way or another it should transfer to the model between softwares.
I might be wrong, but it seems to be the case.

Thank you for the comment and explanation. I could have sworn it used to work before but maybe in newer blender released it stopped working. Shame.


text:
Empty_add rotation not working when adding picture?
So im trying to write a simple script that adds a reference image and rotates it 90 degrees on the X axis.
When an image is added thru script it will not rotate the object.
import bpy
from math import pi

bpy.ops.object.empty_add(type='IMAGE', radius=0.1, location=(0, 0, 0), rotation=((pi * 90 / 180), 0, 0), scale=(1, 1, 1))
bpy.ops.object.load_reference_image(filepath="C:\\front.jpg")

However, If I remove the line of time image, it rotates. Why is that and how can I fix it?
import bpy
from math import pi

bpy.ops.object.empty_add(type='IMAGE', radius=0.1, location=(0, 0, 0), rotation=((pi * 90 / 180), 0, 0), scale=(1, 1, 1))

don't know why, scripting with operators is not always reliable, but you could rotate it after loading image, something like bpy.context.object.rotation_euler=((pi * 90 / 180), 0, 0)

@alambre yes thank you, I was aware just wanted to make the code more compact and add the rotation while it's added. But I guess that's impossible? Bug perhaps?


text:
Update script's file-name after saving
Is there a way to force blender to update the script's filename in the little name-field at the top after I save it under a different name? The filename remains the same after saving and its quite confusing. Or am I missing a setting somewhere?

One way is to change the "Text" name to what you want the file name to be and then Alt->S save the file.

Saving through the drop down menu or pressing ALT+S will not alter the name in the top of the screen, or maybe you are talking about something different?

For clarity I'll post this as an answer.
Enter the file name you want in the box at the top of the screen:

Then save the file. This is the bottom of the file save dialog:

I created a new Text file, but you can see that the saved filed is listed with the name it was saved with:

Thank you. Hmmm, a little bit cumbersome way to save. Also this works only for new files. If you open a file, then edit the name in the box and try to save it still has the old name. Either way thank you.

There may be a much better way of doing this. Unfortunately, this is what I have. What you can do in the case of editing the name in the box of an opened file is to use the Save As option and change the file name in the Save As dialog to match what you entered in the box.


text:
Is it possible to apply textures in Blender 2.8?
I'm following along with Blender's docs, trying to apply a texture to a object's surface. The docs for Applying Textures appear to show screenshots of an older version of Blender (perhaps 2.79?), and point to menu items which don't exist in 2.82, such as "Use Alpha in the Map Image panel", and "UV from the Coordinates menu". This other question points to the "node system" and indicates that "legacy textures" are no longer supported.
Can textures still be applied using Blender? Was this functionality removed in 2.82, or is it undocumented? Is there documentation available for 2.82, or a better user manual available somewhere?

https://blender.stackexchange.com/questions/139621/blender-2-8-do-materials-always-have-textures/139649#139649

Thanks, this looks like what was missing.

Does this answer your question? Blender 2.8 - do Materials always have Textures?

Thanks for your help! I wasn't familiar with the Shading context, so I was trying to apply textures to the wrong part of the application. Following more tutorials helped me understand how Blender does things.


text:
Image Texture Node Color Output Format
in the Node Editor what is the data format coming out of the Color output of an Image Texture Node?  Does the Color Space setting of the Image Texture Node change this at all?

The yellow color sockets output three scalar values, one for each of the color channels Red, Green and Blue. The output information is in a linear scale.
(see: Cycles - (Shader) Nodes - inputs outputs - What are the exact data types? and What is the meaning of the color of the node sockets in the node editor?)
The Color Space on the image texture node  will determine how the color values are interpreted. Images in display referred formats (like png, jpg. tiff and most video formats) are presumed to be in sRGB color space. Such images are encoded using a transfer function (sometimes called "gamma curve") that has to be linearized to to work properly in blender. Blender color and light operation need to be done using a linear scale, so using sRGB as Color Space is the correct choice. The linearization works by applying an inverse sRGB color transform to counteract the baked in curves.

(source)
For images used as maps, such as bump maps or normal maps, that are presumed to use linear values, with no transfer function (or "gamma curve") baked in, the correct setting is Non Color Color Space. When using this setting there will be no color transform applied to those elements on the render path.


text:
What is causing this issue? (Moving mesh vertices creates extra faces)
So, I've been having this issue. It has happened twice so far. I created a circle and then filled it. I tried moving some vertices, but kept seeing some faces moving along.
Then I created a curved and then filled it up. The same thing is happening. Only the vertices I'm moving should move. How can I fix this?
This is a flat mesh. I don't see why it's creating some faces on its sides when moving it.
Front view

Side view

Another angle

If you move the vertices on  a large ngon like that, you are creating non planar and overlapping geometry. Avoid faces that have more than 4 vertices. Don't fill a circle. use Grid fill so that you have more subdivisions. Watch a few more videos on how to model. It will save you a lot of time down the line.

Forgot to mentioned that I'm a beginner. Also, sorry I'm not sure what you mean with the first sentence.
I'm trying to move the top middle art of this mesh forward to make it kind of curve at the middle. I want to make a leaf.

non-planar means the face (n-gon) ist not in a plane. Thats what is clearly visible in your second and third image. Also @susu make an answer out of it. Maybe also link to the Blender Manual for non-planar, self-intersection and n-gon.


text:
Normal bump problem
I've started to learn Blender by myself with all tutos on the web. I really enjoy Blender.
First sorry for my english...
I have a problem to make a bump on the normal node.
So I try witha very simple cube. Il I put a checker on the normal node the cube become b&w and I don't "see" bump.

If I add a normal map node I see the cube grey and white but still no bump...

What have I missed? I have Blender 2.8 and filmic add-on.
Thank you very much for help.

To complete Riccardo's answer, with a completely b&w picture you won't fake much volume. But you can try is:

Create a b&w checker picture.
Use a software like CrazyBump to create a bump or a normal map, it will blur your picture, thus give more volume. You can also simply do it with an image editor, like picture below:

thank you for answer I will try this :)

Is that 2.8...? :D

yes   ;)   still have bugs though

After a lot of try, I've understand that what I wanted was a displacement map (with noise input in height) in the displacement node of the material output. And check that Cycles is active cause when it's Eevee I see no result... Thank you for your answers.

Answer:
Use your texture as Height Map into a bump node (shift+a > vector > bump) instead using it as color input in a Normal Map node.
Explanation:
The Bump Node's Height Map input works with B&W images where black is 0 and white is 1 (like your checker texture Fac output), Normal Maps are instead RGB images in which the intensity of every channel (R, G, B) is equal to the amount of bump on the corresponding axis (X, Y, Z).

Ok. Thank you very much. I tried and it's ok. But the bump effect is very limited even if I try to put the strength over 1.000. Can I try to play with an other value to boost the bump? Thank you.


text:
Prevent File Output to be used when F12 rendering
When rendering a single frame with F12, the compositing node File Output will always save the render on disk. Is there any way of disabling that, e.g. only save the render to file when rendering with Ctrl+F12.
A few more informations :

I'm using the default Output Path or not, depending on the project (sometimes useful to have a pre-comped video as example).
The rendered frames are saved with a File Output node in the compositor. Single or multi-layer depending on project.
Rendered as image sequences (mostly .png, in that case multiple image sequences are saved)

My workflow being as follow :

Use F12 to preview a single frame (never with saving on disk, expect manually in the render window Image > Save As)
Use Ctrl+F12 when the animation is ready to be rendered

So it's a bit painful to try previewing a frame with low passes, only to realize that frame has being updated on disk, in the beautiful and slow final render.
Any guidance or better workflow ? Thanks for your time !

You can only mute the file output node. It's possible to replace F12 render with a custom render operator scripted in Python to do that automatically, but other than that there is no functionality for this.

@MartynasŽiemys Thank you ! I've tried a bit of Python, I think this would be too advanced for me. I don't understand why the standard output path and the File Output behave differently about F12 and Ctrl+F12 (surely there is some good reason behind it). I'm opening a bounty, in the hope someone has a real and non-python solution.

There is no non-Python solution. I realise you need it to work the other way, but there are loads of people perfectly fine with it working the way it works. It does have logic to it. If I have an output node, I want it to work every time I render - why wouldn't it?..

@MartynasŽiemys Mh then my workflow is somehow wrong. I often need a low pass preview of the render (F12) before rendering in full quality (Ctrl+F12). I'm still hoping for a non-python solution even if I'm pretty sure you are correct. Thank you for your answers :)

No, I don't think so - nothing wrong with the workflow, it's just that the functionality for what you want does not exist. You would usually just mute the output nodes if you don't want them to work. I'll see how it goes with Python, maybe it's not that hard.

In a way, selecting the viewport shading selection of Render Preview is somewhat like what you want, and there are separate settings for your render engine on viewport vs. final F12 render.

You can save this from Blender's text editor(it saves in correct encoding) as a .py file and install this as an add-on:
bl_info = {
    "name": "Render Without Output",
    "author": "Martynas Žiemys",
    "version": (1, 0),
    "blender": (4, 1, 0),
    "location": "Render menu, F12",
    "description": "Renders still without output from compositing",
    "category": "Render",
}

import bpy

class RENDER_OT_no_output(bpy.types.Operator):
    """Render without any output including compositing"""
    bl_idname = "render.render_no_out"
    bl_label = "Render Without Output"

    def post(self, scene, context):
        tree = scene.node_tree
        for name in scene["node_states"].keys():
            tree.nodes[name].mute = scene["node_states"][name]
        del scene["node_states"]
        bpy.app.handlers.render_post.clear()

    def execute(self, context):
        if context.scene.use_nodes:
            tree = context.scene.node_tree
            states = {}
            for node in tree.nodes:
                if node.type == "OUTPUT_FILE":
                    states[node.name] = int(node.mute)
                    node.mute = True
            context.scene["node_states"]= states
            bpy.app.handlers.render_post.append(self.post)
        bpy.ops.render.render('INVOKE_DEFAULT')
        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator("render.render_no_out",icon = 'RENDER_STILL')

addon_keymaps = []

def register():
    bpy.utils.register_class(RENDER_OT_no_output)
    km =  bpy.context.window_manager.keyconfigs['Blender user'].keymaps['Screen']
    for kmi in km.keymap_items:
        if (kmi.idname == "render.render") and (not kmi.ctrl) and (kmi.type == 'F12'):
            kmi.active = False
    kcfg = bpy.context.window_manager.keyconfigs.addon
    km = kcfg.keymaps.new(name="Window", space_type='EMPTY', region_type='WINDOW')
    kmi = km.keymap_items.new(
        "render.render_no_out",
        'F12', 'PRESS',
        any=False, alt=False, ctrl=False, shift=False
        )
    addon_keymaps.append((km, kmi.idname))
    bpy.types.TOPBAR_MT_render.prepend(menu_func)

def unregister():
    for km, kmi_idname in addon_keymaps:
        for kmi in km.keymap_items:
            if kmi.idname == kmi_idname:
                km.keymap_items.remove(kmi)
    addon_keymaps.clear()
    km =  bpy.context.window_manager.keyconfigs['Blender user'].keymaps['Screen']
    for kmi in km.keymap_items:
            if (kmi.idname == "render.render") and (not kmi.ctrl) and (kmi.type == 'F12'):
                kmi.active = True
                km.keymap_items.update()
    bpy.utils.unregister_class(RENDER_OT_no_output)
    bpy.types.TOPBAR_MT_render.remove(menu_func)

This will add a new Render Without Output item in the Render menu and switch  F12   hotkey to it:

It mutes all output nodes in compositing and restores them after render.
Might have bugs though. :D

Thank you, really appreciate your answer ! If I'm understanding correctly : it switches off any File Output node during a F12 render, and switches back them on after ? What happens if I have File Output already off for some reason ? What happens to other non-File Output nodes (just to be sure) ?

It only affects File Output nodes. It saves the states(muted or not) of all of them, then mutes all File Output nodes, renders and after render restores the states of all File Output nodes so the ones that were muted before remain that way.

OK, so it's not very logical. :D Thinking about it now, I could have saved only the nodes that needed to be muted to restore them. Well, it works anyway.

Thanks for the precision. I'll try it soon. Thanks again :)

@Lutzi Did you try it? Did it work for you?

No new project on which to test your answer, for now. But it will soon !


text:
can't scale only at Z
I cant scale the Z
but at X and Y it still works fine
it made from extruding cylinder and try to scale down the Z from 3 edge
sorry for bad english, im also new

As InTheBeef explains, it's already flat on the Z axis, so what are you trying to do exactly? Maybe show with a drawing?

You can't scale Z when the selection is already scaled to Z = 0 (they are equal position and you are using Median point pivot). You'll have to manually create a different in Z between them to be able to scale, otherwise use a different pivot point.

ive tried another pivot point but nothing. how do i make the another different in Z, is it like make a loop cut near the selection?

No? It's the coordinates of the vertex. Z is up & down by default, the median point being the median of all those points.  If you move one vertex up, the median would be inbetween them with a gap that you could scale along Z


text:
Suspend object with ropes on two pivots
I want to manipulate an object on two pivots.
Think of it as a long piece of something that is suspended by two pieces of rope. And i I pull up the rope on one side, that end of the object goes up.

I know how to simulate the visual impression of that using rotation and movement. But as it is a simulation of an actual physical process I would like to solve it using only the two upper ends of my ropes.
So I was hanging long wiry objects as soft body or cloth from my manipulating Emties, connecting another Empty on each lower end, It's dangling just fine. But how do i now connect those two lower "knots" to my object so it will freely react to the hight of each rope's upper point?
I was also trying to go this direction. But that only lifted one side of the object with no rotation.
I feel like I don't really look in the right direction. Thank You guys for the help!

Do you need the actual physical simulation, or is the mechanical aspect enough? It might be easier to just use an armature and rig the contraption

I'm afraid it has to be a physical simulation. I need to know the position and rotation if I pull the upper end of one of the rope straight up. If I just rotate the object itself the changes in angle and the "pull" distance don't translate properly.

OK, since all the physical approaches didn't work out, I'm going with a highly inaccurate but fast and simple solution...
An Empty being the upper end of rope 1 for the #1reference hight, parent another empty as the lower end, parenting the actual object to that lower end and then using a "track to" constraint to the "lower end"-empty of rope 2 that is parented to an empty as the upper end of rope 2 and thuis presenting the reference hight for the second rope.
It will not regard gravity inn any way, but it's the only solution I came up with ... Unless one of You knows a more accurate way.

Te physical part I was asking about was just the dangling motion or any swinging you might get. If all you want is the mechanical aspect of it, since pulling a rope up or down as a linear correlation to the position of the bar then simple constraints might be more than enough.

https://blender.stackexchange.com/questions/7372/how-can-a-mechanical-linkage-with-a-closed-loop-be-rigged/7519#7519

So far it’s fine. But at some point I need to incorporate the extra vectors of gravity and the resulting horizontal movement.


text:
Why do edges and vertices seem to double and triple when modelling?
Why does this happen?  Edges and vertices seem to have tripled.

I was really happy with my end result which is this below.

But now my mesh is a mess of lines and I do not know what I did wrong and how to clean it up.  All I used was a mirror modifier on the pommel to build a good equal skeleton fo it which I added once the skeleton was finished.

Hello :). Don't worry. This usually happens because Mirror modifier creates double vertices, if your model isn't cut perfectly in half. Just go to mesh->clean up->merge by distance. And before you use Mirror modifier, make sure your model has only one half.

Thanks. I managed to obtain a very smooth Handel by separating the pommel from it and redoing it since it was simple but your answer helped me clean the pommel lines even if I am having trouble shade smoothing it now.  I asked another question on it to try and understand why.


text:
Smoke Simulation - Not visualized all over the wanted area
I am at my first experimenting with smoke simulations.  I managed to get the effect I wanted but when I start rendering smoke does not seem to be rendering all over the area I want.   Under all the arches of the building, you see below.  What is more strange is that if I zoom in at the angle you see in the screenshot the visualized area increases the more I zoom in.
I am suspecting that I have unwantedly clicked a world setting or something similar since I noticed the same problem with the plain I have as the ground of this scene I am trying to create.

Thanks in advance for any help given.

I believe you need to increase the volumetrics clipping end distance. It is in the rendering properties (where you choose between Eevee and Cycles) and then in the Volumetrics foldout :
Be aware that the precision of the particles in the simulation may be affected by that setting. If the simulation is taking place far away you can also increase the clip start distance to narrow down the clipping volume.


text:
Invisible scatter plane in final render, how?

As you can see in the screenshot I am trying to create an asteroid ring around this planet.
I tried to simply use an empty circle and scatter a set of asteroids around it but it did not work.  My idea is that the circle would not show in the final render.
Now I am trying to scatter around a plane circle.  The scatter worked but the circle shows in the final render and if I disable it in the render even the asteroids disappear.  Is there a way to make the plane circle only disappear?
Thanks in advance for the help.

Are you using particle system or geometry nodes to scatter?

If you're using particle system you can hide the emitter (Particle System panel > Render > Show Emitter)


text:
How do i add mist to a cube spelling something
I am working on a project and need help adding mist or smoke to a text made out of cubes i need hhelp i will post my blender project below

You could use something like this. The magic ingredient here is the volume scatter node. I used a Noise Texture and a ColorRamp to give the smoke a more realistic look, and connected the volume scatter to the volume input only (no surface input). You can see on the right, the quality of the fog is determined largely by the Tile Size and number of Samples, but the Start and End range have an effect as well (making the gap smaller will improve the quality) - just remember that this gap determines the viewable distance of the volume, so keep it in a range where your camera will be. I darkened the world background in the image to make it stand out more, and I had to brighten the light to make the volume stand out (it's visibility is affected by the light it receives). I also gave the light a purple glow just to add effect. As you can see, however, some shapes help to constrain the smoke more than others. Try it out for yourself:

Thank u very much for the answer it helped a lot but how do i fix the S in myst

I'm not exactly sure. Volumetrics can be a bit touchy. Maybe try separating the S into segments (separate pieces). You might need to scale them or move them apart a bit until it looks right.


text:
How do I decrease the amount of vertices
I am making a donut from a tutorial my the blender guru the ultimate beginner cause I have been using blender for only 2 weeks and i am making a coffee cup but I have too many vertices so I am stuck can anyone help me

(If you have already subdivided it) You could use the decimate modifier. Make sure you have it set to un-subdivide and use even values in the iterations bar. You use collapse if you are working with complicated sculpted geometry.
(If you have extruded incorrectly) you can always select the mesh and press w to remove doubles. Or if you are using 2.8+ it is found by pressing alt m in the merge by distance.
If you could give us an image of the problem, we could better understand what your problem is.

can I give you my file so you can check it out

If you could take a screenshot of the object in edit mode (to show the vertices and edges) That would help.

To take a screen shot on mac, press command + shift + 4

On windows, use snipping tool.


text:
How do i decrease my vertices
Hi am a beginner to blender and I am stuck at a tutorial can someone please I have a lot of vertices and i need to decrease them the video I am watching is
https://www.youtube.com/watch?v=7w-m13ykLN8
and I am stuck at 8:33 cause the blender guru has fewer vertices then me

Does this answer your question? How do I decrease the amount of vertices

@Wasay Please put some effort into your questions by explaining thoroughly what the problem is and what issues you have encountered. Add images illustrating your scene and settings and state what you have tried to solve the problem and why it didn't work. Also search the site before posting, the same beginner questions tend to be asked quite frequently

You select the area that you want to decrease the amount on and right click if using industry compatible keymap and click unsubdivide. Or you can dissolve the vertices of an area by hitting the delete button which brings up the option menu after they are selected.

https://blender.stackexchange.com/questions/162670/how-do-i-decrease-the-amount-of-vertices?rq=1

this is my file


text:
Blender for virtual surgery planning
I'm trying to see if I can use Blender for virtual surgery planning.
I have an STL model of the patient's skull. I would like to cut out pieces of the skull and manipulate them. Here's an example of the cuts I would like to make
What would be the easiest way to achieve this?
It seems to me that the easiest way would be if I could just draw the cut lines on the model. I think it would be enough if I could split just the outer surface with a curve.
So far I have tried using boolean operations to make the cuts. I can snap the vertices to the surface and then create a solid which I can use for the boolean operations. I'm just wondering if there's a more elegant solution to this problem.

I think your method is the easiest and more accurate way of doing it. I suggest Booltool addon.

Until STL's topology isn't a mess of self-intersecting triangles boolean is a most robust tool. You can draw curves on surface with grease pencil, but you still have to convert them to mesh and use booleans.

You could try subdividing, then using the knife project.

Thank you for the advice!
I used the grease pencil to mark the cut lines and booleans to split the skull into pieces.
At first I drew the outline of the cuts on the skull, then decimated the mesh so I could edit the boolean meshes in real time. It worked quite well. It would be really nice if I could just draw the cut lines on the model.
Here is the end result-->

Have 2 Times the same object from A original model set mesh view to outline only. Do Boolean union based upon A. You then might use sculpting tools to subtract from A and show only what they have in common.
Or maybe try to contact the sculpting developer to create a region paint split model. Currently blender is getting a lot sculpting updates. He might like to help you out on this I would if I could


text:
Object mirrors about component axis rather then main model axis
I'm trying to mirror a component object about the main model's X axis, however when I add a mirror modifier the object mirrors about it's own axis. I'm sure I'm missing something simple.

Yes, just use the "Mirror Object" field in the Mirror modifier:

Should give you the result you want:

If not, you might need to apply rotation on the object you want to mirror.

Thanks, I'd not defined the mirror object correctly!


text:
Extrude problem
I want to use face extrude to create a handle in a piece of pottery. I can only extrude a rectangular object with the face shape. I want to get a bulge rather than a block. What have I inadvertently switched off/ on?

Hello and welcome :). One solution would be to enable the Subdivision modifier. It will smooth out the rectangle, creating a bulge. 2 levels of subdivision should be enough.

Thanks! That's what I'd not done. Simple fix and helped me out!


text:
An object wouldn't render in cycles (all solutions on the topic I found don't work)
So I ran into a peculiar problem while rendering my scene in cycles. I am creating an animation demonstrating what a mental object cut is (when an object is cut by a plane). The pictures below show the sequence of my animation.
The setup is as follows:
(1) The initial object in picture 1 is the object I cut with an ambient occlusion material. The cross-section is a separate object hidden from scene view and render (same material applied). The cutting plane has a transparency node mixed with the diffuse node, and I regulate the level of transparency in Mix Shaders node.

(2) I gradually change the transparency level of the cutting plane to make it appear (by keyframing the Mix shaders node).

(3) At a certain point, I make the initial object invisible for the scene and render and toggle on the visibility of a pre-modeled cross-section object place right where the plane would actually cut the object.

(4) Finally, I toggle the visibility of the text object.

Now, in render mode my animation looks good. But when I actually render it, it the first frame looks like this (compare it to the first picture in my post):

The same thing actually happens in Blender Internal (which I desperately turned to having tries other things).
What I've tried so far:

Render visibility is keyframed on/off correctly for all objects(not only viewport visibility)
Duplication is set to none
Normals are set correctly on the initial object
changing normals on the cutting plane did not help
Blender Internal yields the same result
Starting a project from scratch did not help
After some manipulations with toggling the visibility on/off, I came
to the conclusion that the what happens is that the plane actually
visually cuts part of the initial object and what is shown in the
render is the second part behind the plane.

So what's happening here? I'd be very grateful if anyone could offer some insights into this situation. I am attaching the link to my blend file.
Thanks!

This one is not true:

Render visibility is keyframed on/off correctly for all objects(not only viewport visibility)

You have the Boolean modifier on "Initial" set to viewport-invisible, but it's set to render visible:

That means the Boolean is performed when you render for reals, but in Viewport "Rendered" mode you don't see the Boolean.
If you turn off Render visibility as well, I think you'll get what you want...but given the way this is set up, why not just delete the Boolean modifier from Initial?  You're hiding Initial once it gets cut anyway.

I'm an idiot! I modeled this scene a while ago and totally forgot about the Boolean modifier. Deleting it worked like a charm. Thank you so much!

You're welcome!  Sometimes you just need another set of eyes.

The cutting plane is somehow overlapping geometry and causing Z Fighting artifacts.
Your $Intitial$ object as a Boolean modifier invisible to viewport and visible to rendering leading to different results.
Your scene also as a multitude of unrelated issues like using Hemi lamps which aren't truly supported in Cycles and a Sun lamp which doesn't really seem to be doing much besides illuminating the background, since you are using an ambient occlusion shader on your objects which doesn't interact with scene lighting.

Thank you for your comments about the lighting and material interaction. This inspired me to learn more about how lighting works in Blender!


text:
Screw Modifier Darker Shading on Half of Object
I'm trying to create a spherical object using a screw modifier on a mesh created using a mirror modifier.
The first screenshot shows my mesh created by applying a mirror modifier over the x axis.

The second screenshot shows the screw modifier applied.

The problem is the split in how the upper and lower halves are shaded (darker on top). Is there a way to fix this?

Probably you should check the 'calc order' option in the screw modifier panel

This fixed it. Is there a setting on mesh that can be changed without having to do it on the modifier? Just trying to understand why this works / what it is actually fixing.

This is due to the mirror: mirrored, the edges are inverted. So when screwed, that creates faces with inverted normals. What you can do: screw the half first, then mirror after that. It does not guaranty back/front faces but all will be in the same orientation. But anyway, 'calc order' is here to handle the situation.

I think the issue may be that your normals are flipped: In 3d each face has a 'normal' that represents which way the lighting should be interpreted. To fix this, in edit mode press CTRL + N. This will try to flip the normals so they point outwards. If this does not fix it, open your toolshelf and look to the Operators menu at the base of it (Looks like this). Check the box saying 'Make normals consistent inside'.

This would help only if mesh was composed from faces, but there are none in the question (modifier's result is not counted as it doesn't exist yet). Vertices normals are the ones affecting this behaviour.

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


text:
Texture Painting Problem
I've been trying to resolve this problem for the past 3 days, I searched a lot in the web but didn't find anything like my problem, only with small objects or related problems but none like this.
I have a cartoon landscape that I am trying to put texture with texture painting. The texture I am using has 1024x1024 size, but not matter what I do the result is nerver good.

The first image shows a plane with 300x300 size and a 1024x1024 UV image. I simply created a material, put a texture and increase the size to 100 in the mapping part on the texture panel, and the result is what I want
But the second image shows another plane with the same size object and the same UV size, but this time I tried to paint the same image texture that I use in the first, but the result is always blurred or pixelated.
What can I do for the painting result to appear the same as the other?
I need paint the texture to put other textures like grass and other rock types. I will use this landscape in Unity so need to be simple, cant be a large 8192x8192 texture.
Thanks for the help!

Please edit your question and provide some more details, like your mesh objects, modifier stacks, and UV layout

Hi Duarte Farrajota Ramos, the scene have only 2 default planes scaled to 300x300 (units) no modifiers, and the uv is just the unwarped plane.. I just created 2 planes, in one I created a material and put the texture, and the other I tryed to paint  the texture..

@BryanJonson Could you upload blend file? I can try to fiddle with it and check what's wrong. Don't forget to pack texture - File > External Data > Pack all into .blend file.

Hi LukeD, I have not the same file, but this have the same problem.. te texture painting is only good big, and I need the texture smaller.. https://www.dropbox.com/s/z69i5vyyfh2tp34/TEXTURE%20PAINT%20PROBLEM.blend1?dl=0 hope the file helps. thanks a lot!

FYI, textures are not packed in your file so we can't reproduce your issue (use File/External Data/Automatically pack). But anyway, the problem is surely because the painted part is very small regarding to the brush texture and the terrain's size.

Hi lemon, sorry about the mistake, never added external file, in this link I do like you say and hope the file is there.. in this file I need the right plane stay with the same quality the left.. I the both planes have the same configuration, so I dont find why only the painted is with low quality.
https://www.dropbox.com/s/261z8ouc2z6hs0v/TEXTURE%20PAINT%20PROBLEM.blend?dl=0
thanks!

anyone that can help me please?

Hi, looking in the tutorials I found 1 that help, I made a splatmap and replace the color for textures in nodes, but now I need to bake the textures in to one png image, but all tutorials are about cycles or other things.. can anyone help to only bake this? the project are on the link https://www.dropbox.com/s/jv5ipxk05k5ilq4/TEXTURE%20BAKE.blend?dl=0

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


text:
Image texture won't show on object 3D viewport
I'm new to blender and having trouble showing my image texture on the object which is a .dae.
When I first imported it and selected the rig it already had the material and nodes attached with the diffuse and specular pngs selected.
When I see other tutorials showing how to add texture and render, whenever the base color node is attached to the principle the texture on the object shows, and I've tried viewing it in rendered mode however it is blank.
Could anyone help me with getting the texture to show on the object?

Try [z] and then [2]. Or the third orb (viewport shading; material preview) from left in your 3D-view toolbar.

@gilu This is what shows up when I try material preview.                                                                                [1]: https://i.sstatic.net/nHraE.png

It looks like you haven't UV-unwrapped it. This might get you started: https://www.youtube.com/watch?v=Y7M-B6xnaEM
What happens if you just add a color? Mute texture nodes by selecting and pressing [m].

I tried UV-unwrapping (I think) by following the video yet it still doesn't show on rendered or 3D view. I also tried changing the base color yet nothing happens.  https://i.sstatic.net/xiuAj.png                              https://i.sstatic.net/r594H.jpg

@gilu sorry forgot to @ you

it looks like you're still missing the mapping node for your texture vector. And the image with the color; it's hard to see in edit mode. And still, you're not in material preview mode (3rd orb from left). If all else fails, please attach your .blend file.

So I did in fact actually try everything and preview it in material preview mode several times. It's just not selected in the image attached. I'm going to add my .blend file as I've tried the mapping node and nothing seemed to work. @gilu

as you can see in this picture (https://i.sstatic.net/Kyh1x.jpg) I added some brick texture to your model (your's wasn't packed in the .blend file). I just added a UV-Map node, hit Z-2. That was it...

I tried copying exactly what you did @gilu and nothing showed up still, I'm going to try and reinstall blender and try different older versions.

@gilu I tried other versions and still same issue, when I try adding a normal base colour it remains grey. Not sure what to do since it seems to work for you but not for me.

Is it possible for you to send me your version of the .blend file so I can try and substitute my image for yours and see if it works?

It is ugly, but you'll get the idea:
Blender-File

I figured it out myself.
It's an issue to do with my AMD GPU Driver I think, since I've had issues with blender not opening due to my drivers before and I tried this on my macbook and it worked fine.
I set performance to high quality normals in render properties and it shows the textures now - in material preview before it would be blank. I saw somewhere that rolling back drivers would help so I'll try that as well.
Thank you @gilu for your help though!


text:
How do I make a Cube Background in Blender for Imvu?
This is my first time meshing ever, and I need some guidance on how to make objects without changing the avatar in IMVU. I want to make a room background, kind of like a wallpaper behind my avatar but in cube form. Any help will be very appreciated.

Sorry, most users here won't be familiar with the workflow from blender to IMVU (if one exists). What does the process entail? Do you make objects in blender and then export them in a specific format? Also, what do you mean "without changing the avatar"? Do you mean from a lighting/shading standpoint?

yes you make it in blender than export them in a specific format. I imported an imvu avatar into blender and I would like to know how to create a cube around it without affecting the avatar


text:
Normal map comes out wrong from baking
I am making a train in blender and I want to use normal maps to show panelling and rivets without having to add it to the model. To try this I have made a model with some rivets as shown below (first picture) which I want to bake onto the low detail model (second picture)

However when I try to bake it to a normal map, regardless of what ray distance I use, the normal map comes out looking distorted and green as you can see here:

Does anyone know what might be causing this? I am very stuck. Thanks in advance.

Can you try to increase the Extrusion value?

@Jummit I tried that but when I set the value below 20 the map is still distorted albeit there is less distortion. When I set it above 20 the map is completely blank.

Try setting it to .2 or even less.

Still no luck, I am going to try drawing the normal map instead, thanks for the help


text:
How can I edit bevel parameters on a mesh object I created last week?
Blender 2.90.1 on Windows 8.1
I created a simple mesh object last week (Plane.002 - default name), extruded it to make a rectangular solid, then I edited one of the edges (CTRL+B) with a nice 3-segment bevel. Now I've decided it will render better with more segments.
Where are the bevel params stored for Plane.002 so that I can change Segments=3 to Segments=7 ?
Can it be edited?
Thx!


text:
How to get procedural shader to deform with bone deformation?
I'm using a procedural shader (Cycles) on a model that I've rigged for animation.
When I pose the bones, the texture seems to be projected based on the world space and doesn't move with the deformation.
I saw someone fix this in a YT video a while ago, but now I can't find it.

To move with the surface, the shader would either have to be a function of, or baked  into, UV space.

If you don't need it to be animated you can either bake the colour in the cycles render settings. Or you can set it to be UV with a texture coordinate node.

If you UV-unwrap your model and use the UV coordinates as "Vector" input for your procedurals, you should be fine independent of deformation.
You will probably need to readjust the scale of some of the procedural textures after using a different set of input coordinates, though.


text:
How to change Socket type in node group with Python?
I would like to understand if it is possible to change the socket type of the bpy.data.node_groups['MyGroup'], for example from 'VALUE' to 'RGBA' via python. I'm looking on Blender's bee page, and elsewhere as well. But we don't talk about this.
It seems that you have to create a new Socket, assigning the type, at the time of creation
Easy way to create a New socket:
>>> node_tree = D.node_groups['MyGroup']
>>> input = node_tree.inputs.new("NodeSocketFloatFactor",name="Test")
>>> input.bl_rna
<bpy_struct, Struct("NodeSocketInterfaceFloatFactor")>

it is now possible to change the socket type to <bpy_struct, Struct ("NodeSocketInterfaceColor")> ?

Don't think it is possible, internal data structure is defined when created. What do you want to do, changing it?

I agree with @lemon - not possible as far as I know. Only option is to add now one, move links, remove old one.

@lemon , yes i want to change the Socket type , in a easy way. There are many types of Sockets that you can use, but it is very inconvenient, especially when changing your mind, whether you want to show a slider or not. And many other situations that are really uncomfortable


text:
How to add node in the center of the Shader Editor with python?
I would like to create a node, and center it in the node_tree view that is the "Shader Editor".
Keeping in mind that this operator is only executed by a button in the context of the Shader Editor, so the context is correct.
I was wondering if it was possible to obtain the coordinates of the view, and find the center of it, to assign the coordinates to the new node created, so that it is placed exactly in the center of the view.
Below is an example of an operator creating a simple node, waiting to be positioned in the center of the Shader Editor view. (If possible)
I'd like to understand how you can get the position of the view, or something useful to position it correctly.
Simple test Creation of a node by operator:
class ADDNODE_OT_Test(bpy.types.operator):
    bl_idname = "node.test"
    bl_label = "Test"

    def execute(self,context):
        mat = bpy.data.materials["My_Material"]
        nodes = mat.node_tree.nodes
        bsdf = nodes.new(type='ShaderNodeBsdfPrincipled')
        #bsdf.location = (?,?) <--- Is possible to get and set the center of the view location into the Shader editor?
        return{'FINISHED'}

Feed it into the transform operator.
Rather than place the node into the editor at the location of view centre, suggest: make active and  feed the created (and / or other selected) nodes into the transform operator.
If you add say 3 nodes in your operator could make them relative to each other and let the user place them.
The script in the answer https://blender.stackexchange.com/a/197449/15543 creates a menu to add any of the math nodes from an expanding menu.  Use commented return instead

class AddMathNode(Operator):
    ''' Add Math Node '''
    bl_idname = "node.add_math"
    bl_label = "Add Math Node"
    items = [
        (p.identifier, p.name, p.description)
        for p in ShaderNodeMath.bl_rna.properties["operation"].enum_items
            ]
    #print(items)
    operation : EnumProperty(
        items=items,
        name="Operation",
        default='ADD',
        )

    def execute(self, context):
        # the material in the node editor
        mat = context.material
        # add a new math node to its nodes
        n = mat.node_tree.nodes.new("ShaderNodeMath")
        # set some properties
        n.operation = self.operation
        n.name = self.operation.lower().title()
        # make active
        mat.node_tree.nodes.active = n

        return bpy.ops.transform.translate('INVOKE_DEFAULT') # use translate

Putting in 2d region centre.
Most spaces in blender have a 2d region which is the window we look into. The tool panels, headers and other parts making up the area. Others like the 3d view have a 3d region.
If need be will supplement answer with how to place node right in the middle, but alas think that having the option to move and drop where I want feels more consistent with default behaviour.

Hey, batFINGER very interesting using transform.translate
But the problem remains similar, assuming that we move away from the center of the graph x = 0 and y = 0. This node is grabbed at a different point than it should be.
That is, it doesn't stay in the center of the cursor, as I think it should do in this case.
Try to move the visual away from the center of the X-Y graph and call the operator, you will see that the node is not out of sight. (I hope I'm not wrong)


text:
Is using maps of different sizes on the same material harmful?
I don't understand if it's an inconsistent practice, but I was wondering whether to actually use in the same shader, of the same material, the following sample maps:

Diffuse Map 4K
Bump Map 2K
Normal Map 3K
Etc..

Whereas some maps may have different aspect ratios
Does this kill anything in the shader calculation?
Can something obsolete happen in this case?
Is it bad practice for performance?

If you get what you want is all good. If your maps are way larger than the size they will be on the final render, then is a waste to have them so big. If you see artifacts, blurs or pixelation, then you need bigger maps. All images use resources in your computer, the larger images will use more resources, so it is a matter of using your resources optimally.

Your answer, it refreshes me, therefore, there seems to be no problems in the technical side of the Software, I think if you are 100% sure of what you are saying, this could be the answer I was looking for.


text:
Is it possible to get the status of the Shader Compilation with python?
I'm wondering if there is any API to configure and get when the shader compilation is ready.
It would be useful to me to see when I add a material via script, when this is actually compiling and finished compiling
I have the feeling that this is not possible, but I wanted to get rid of this doubt

Assuming Blender 2.8 or 2.9?

2.9 or newer is better


text:
How to mix 2 Material into geometry nodes?
I would like to mix 2 materials with the geometry nodes, just like I did in the left material example, where, via a mix node which in this case I am using to simulate 2 different Red / Green materials.
I'd like to Use 2 Red / Verse materials in the Geometry Node, and do the same.
I find the "Replace Material" node very nice but I don't think it's possible to do it with it. I made this visual example to make it easier to explain what I would like to do.
Anyone have any idea if this is possible and how?

You could use the same shader editor "Mix Idea" material and use the set material node in geometry nodes to use that material in geometry nodes?

The idea is to use 2 different materials and mix them in geometric nodes

Why do you need to use GN for such thing? GN assigns material based on geometry (vertices) ... so the purpose matters.

@vklidu I agree with what you said, and if animation is required, the values can easily be edited. I guess this is more of a feature question (to ask if its possible) rather than a question where there really is a problem.

I would still appreciate if you can answer my comment. To offer solution that fits to your needs we need to know more about Why GN and How do you plan to use it. Because like I said ... for such sharp material edge you need to generate some how vertices at that place (if the Factor for split has to be GN parametr).

@vklidu My example consists of a Map Range, which depending on the setting can make the deadline +/- marked. I would like to reproduce the same situation Identical with the Geometry Nodes (If possible) The aim is to obtain the same situation that I am obtaining with the material node tree

if this is your only one point, than go by Chris's way ...

Inside GN system is material assigned according to geometry (group of vertices/faces). For such sharp material mix you need vertices at that place (or generate them).
Here is an example with Boolean operation. Plane is used as Factor to control location / rotation... by rotation or moving plane you generate vertices dynamicly.

Great setup, +1!

Good job. But unfortunately I don't like dealing with external objects. I would have preferred to manage through a Procedural node

Sure, no problem :)

do you mean like so?

You have to subdivide the default cube one time to get this result.

I've been avoiding geometry nodes for quite a long time now... But the answers here make me feel they're not that hard, I guess. Good answer though, +1

@YousufChaudhry: thank you...although i am not sure that this is what the OP wants....

I think this is what the OP wants, but side question: Why don't geometry nodes have shader nodes or any texture coordinate? Since there is a Mix RGB node, so it's really hard to find out the purpose of it. O tried using geo node's mix rgb as a solution but it turned out there was no shader to plug it into :D

i have no idea...but i hope it will come ;) the mix rgb node is pretty handy if you want to e.g. animate from one position to another (so you can misuse it as an easy way to move a point along a line via fac)

Wait... Do you literally mean I can use a node even if I have a red line as an output? Or does it work without a red line output? As far as I know, the mix rgb has only colour outputs and only one fac output (not that I'm saying I need more factor inputs, but maybe that would be useful to have a factor for a factor for a factor?)

you can plug e.g. position into mixrgb because position has 3 floats and rgb as well. Geonodes doesn't use alpha values for rgb....but no, you cannot use red lines as output

@Chris Yes, but I can't reproduce that situation, I added a Math (Add) node to adjust the deadline height, but I can't adjust the height. The whole thing looks "Snappy"

You need more vertices to "snap" in shorter steps ... see blend file (I added subdivision node and merge Thresholds into Value node to set it easier. Or you would have to add some math to position middle vertices up&down depending on Threshold value to sync height.

Uh, Ok, So this technique, necessarily requires a subdivision of the mesh as I tested from the file.blend This is very interesting. The problem is that I don't want to subdivide the meshes, the same is true for a material like in my example, it doesn't require subdivision. Maybe this is not yet possible with Geometry nodes

That is what I'm trying to say from the first comment under your Q. With GN you operate on geometry level ... So I don't think it would be different in a future. What you are asking for are designed Shader nodes.


text:
How to continue running a modal operator run from a button in the preferences panel once closed?
I wrote a modal operator, but I have a problem and it is the following:
If I run this modal from the preferences by drawing a button in the addon layout, once I close the preferences, the modal stops, I think because of the missing context (I got this idea but I don't know if it's right)
Anyone have any idea how I can call and run the modal, so that once the preferences window is closed, it doesn't stop?
This example script is modal with the button into the addon['my_addon'].references panel:
class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs itself from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None

    def modal(self, context, event):
        if event.type in {'RIGHTMOUSE', 'ESC'}:
            self.cancel(context)
            return {'CANCELLED'}

        if event.type == 'TIMER':
            # change theme color, silly!
            color = context.preferences.themes[0].view_3d.space.gradients.high_gradient
            color.s = 1.0
            color.h += 0.01

        return {'PASS_THROUGH'}

    def execute(self, context):
        wm = context.window_manager
        self._timer = wm.event_timer_add(0.1, window=context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)

class MyAddonPreferences(bpy.types.AddonPreferences):
    bl_idname = "my_addon"

    def draw(self, context):
        layout=self.layout
        layout.operator("wm.modal_timer_operator", text="Run Timer operator")

Does this answer your question?

Unfortunately I don't think so, the modal simply has to keep running, as access to it is on the addon interface and also in the addon preferences. But I was surprised to notice that if you start from preferences layout it stops when you close the preferences window. In the link you suggested, we talk about starting a modal without the user's knowledge. This would be doable with some tricks, but it's not my case where I have several buttons calling the same modal with different options.

I was thinking of creating a "Fake" context and trying to pass it to the operator. But even I have had little success there


text:
How to add circles at the junction points of the Voronoi lines?
As follows in the image, I would like to add circles of the points where the Voronoi lines join, as I did in my sketch.
I do not understand if it is possible, I would like if it is, to understand how to do it.

The circles are the seeds of the Voronoi pattern (https://en.wikipedia.org/wiki/Voronoi_diagram#Applications). I doubt that you can get them from the image. If you just need a bunch of circles connected by lines Geometry Nodes would be an easier approach.

The seeds are in the center of the cells, not on the interstices between them.  That having been said, some more info on the end goal might be helpful.  Working up a procedural mask of the interstices might be doable if all you want is dots, but if you want more control (borders for circles, different shapes, etc) then Blunder's probably right, Geometry Nodes would probably be better for you if feasible.

Blender's Voronoi output is limited, and those 'points' are undefined, they are only the triple point of the boundary between cells. These are not points in memory, their specific coordinates are at no point calculated by the voronoi shader.
Blender's shader node programming is even more limited, it won't allow you to programatically affect nearby texels, each texel is computed independantly.
What you could do is bake your current lines to a texture, then via edge detecting, find all the triple points and place textures at each one.
This would of course be complicated, I don't know of a program to facilitate it. If I had to make this, I would use image libraries in python.
Alternatively, after baking, manually paste your circles on your texture.
(a more complex solution could be to build a custom voronoi implementation in GLSL and add computation of those points, and distance to those points)

I find this answer very useful. I was trying to mix 2 Voronoi, I am having fun learning more about these texture generators


text:
Blender problem to set colorspace_setting.name with OCIO colorspaces (Python)
Mainly I have such a function, which configures the colorspace, right now I put a try method to avoid an error, when the user uses an OCIO colorspace configuration ( https://opencolorio.org/ )
I usually use 2 types of color space, "sRGB" and "Non-Color"
Example:
def set_colorspace_name(img, name):
    # colorspace_names allows you to get the enum list of existing colorspace types, but I have yet to figure out if it is useful to use it
    colorspace_names = [tuple_element[0] for tuple_element in img.bl_rna.properties['colorspace_settings'].fixed_type.properties['name'].enum_items.items()]
    try:
        img.colorspace_settings.name = name
    except:
        pass

img = D.images['My Image']
set_colorspace_name(img, 'sRGB')

I am in a dead end, I would like to understand how to set the equivalent of 'sRGB' and 'Non-Color' in the OCIO color space, as they will not be present if the user installs this OCIO configuration

I can't really help here but [tuple_element[0] for tuple_element in img.bl_rna.properties['colorspace_settings'].fixed_type.properties['name'].enum_items.items()] can be shortened to img.bl_rna.properties['colorspace_settings'].fixed_type.properties['name'].enum_items.keys()

Blender manages everything in OCIO by default and uses a fixed enum of name for bpy.types.ColorManagedInputColorspaceSetting but the colorspace name should be set by the input routines unless you are creating an image from scratch inside blender.  Is that what you are doing?

At any rate, the name choices are mentioned in the man page I referenced above.  I don't think you can get them from RNA data.


text:
How to use bpy.context in a threading.Thread function?
I submit this example (What a crash blender)
I've tried everything, even context.copy (), but obviously it creates a dictionary and I don't know how to use it
import bpy
import threading

def threads_test(context):
    context.window_manager.popup_menu("String Test")

thread = threading.Thread(target=threads_test, args=(bpy.context,))
thread.name = "Test"
thread.start()

Is there any trick to use? I also tried to track down window_manager from bpy.data, but it also doesn't work.
Some idea?

My experience: threading will make crashes or random crashes when you access some blender data. More infomation:
https://docs.blender.org/api/current/info_gotcha.html

@XY Yes, i know this problem. I was just wondering how to get around the problem (If possible) I have spent the last 24 hours reading many pages about it and I always encounter something like "You shouldn't do this" and "Maybe it can be done" but I never have a true answer and proper

Maybe I gave birth to the idea. That is, No, you can't, or rather. You can, but only occasionally and with luck. I did some tests. So it is highly unreliable that method crash blender which is a marvel. I should create an event timers that intercepts the thread and from there to the limit launch a message. It really is that very frustrating

My solution is make a operator timer rather than the bpy.app.timer, it is more safe and easy to catch error.

Yes, but the problem is that timers look like the equivalent of a modal operator. So if not managed in continuous cycles it will block the user interface. (Which is what I'm trying to avoid) I've been testing with it

The great thing about threading is that you do everything on another Core, and the UI doesn't suffer from any slowdowns due to the script (which can be very complex at times)


text:
Run Python code from external process
Is there a way for an external process (e.g. shell command) to cause Blender to execute a fragment of Python code (on Linux)?
Essentially I would like to make my own version of the "Python Console" that runs separately and sends commands to Blender (which is already running and continues to run as normal with commands being received in the background.)

I see two approaches to this.

You can compile entire blender as python module (completely without user interface) and use it inside an external python script.

https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule

A custom solution. as described here.

How to remotely run a Python script in an existing Blender instance?

Thank you! I think the second link would make a good basis for what I want.

Great link, thank you also!


text:
Choose distinct colors based on Custom Properties
Is there a way to assign a distinct "random" color to a mesh based on the string-value of one of its "Custom Properties"? I am most interested in having this color visible in the 3D viewport to distinguish objects based on their properties while editing a scene.
I'm not sure whether the solution should be based on shading or not. The viewport "solid mode" view with "random" color assignment is close to what I want except that it chooses a separate color for each object rather than for a group with the same property.
For example, supposing that I would have a large number of meshes each with a property "country" and I wanted each mesh with value "australia" to be one color, each with value "usa" to be another color, and so on.

Hello, would it be OK if you represented each country with a number instead of a string of characters ?

That would be workable yep. I'd probably then have two attributes, "country" and "country_num", that correspond with one for human consumption and one for internal use.

You can do it with the latest Blender Version (2.92+) and custom properties :

Download the latest version (At least 2.92+, which is currently in Beta but should be officially released pretty soon).
Select your object, and create your custom property, named "country".
In the value field, you can input a string of characters. Don't forget to press OK to validate your change.

Create another property, let's call it hash. Keep the min and max between 0 and 1.

Right click in the field and choose Add Driver. Delete the target variable, check Self and type hash(self["country"])%1000/1000. This will generate a (kinda) random number between 0 and 1 depending on the string inside the country property. The hash provides the same output if 2 inputs are the same.

Important : You have to enable python scripts globally for this to work. Go to Edit > Preferences > Save & Load and enable Auto run python scripts. You can add your Downloads folder for security, that way downloaded files won't execute custom scripts automatically.

Add a material to your object. Use this layout :

Add an Attribute node set to Object type, and input the hash custom property name. Link it to a Combine HSV node to create a random hue.

Result :

Thank you for the fantastic answer! This seems ideal. The hash presumably gives me consistent color choices for the same string which seems like a big plus (even though it may not choose the most visually distinct colours for the data I happen to use.) Good trade-off.

You could use a different method than hash I guess :) You can also add another property and use it in the shader as an offset to the hash value to fine-tune it

I suppose that one could imagine a future version of Blender where there is a node that takes a string property directly and outputs its hash value, so that it would not be necessary to manually create the hash properties with scripts (e.g. if there would be many different properties to hash.) That's assuming nodes can convert from strings to numbers?

Maybe an elegant solution would even be for the Converter->Math node to have a "Conversion" function called Hash that hashes a string input?

I looked for something like that at first, but internally I don't think you can even feed string data into the shader pipeline. It only works with float Vectors of size 4 as far as I know. Not a developer though :)

I am digging into the source code... it's as good an excuse as any to start learning how Blender works under the hood...

Turns out that the shader pipeline can handle strings, e.g. the "Density Attribute" port of "Principled Volume" shader node. I'm not sure what the neatest way to fit a Hash operation into the existing shaders would be e.g. maybe it should be separate from the Math converter (that purely uses float ports.)

I would plug it into a white noise node and see what comes out :)

Great pointer! If the white noise node took a string input then that would be the very thing.


text:
Keep Blender open after running script from command line for higher rendering throughput
I am using Blender for on-the-fly data generation for a machine learning task. The data creation process should be fast, and is conditioned on some parameter values given by my model, e.g., an RGB color value.
The model training happens in Python. For now, I pass the created values to Blender, where I have a script called render, that reads the passed [args] and uses them to render an image via bpy.ops.render.render.
Python side:
os.system('blender -b testFile.blend --python-text render -- [args]')

Blender side:
# retrieve args
...

# set scene params with args
...

# render
bpy.context.scene.render.filepath = path
bpy.ops.render.render(write_still=True)

This works fine. The two main bottlenecks for speed are
a) writing the image to (and reading it back from) disk, and b) opening and closing Blender every time. I can work around a) by setting up a RAM disk and writing/reading directly to/from that. But I don't know how to work around b).
Is it possible to always have Blender open in some background process, and then call its script render which reads my arguments and renders an image?

so your calling os.system from the terminal with an interactive python shell open? which OS are u using?

I'm using Ubuntu. The call to os.system happens from within a python script, not an interactive shell.

ah so u probably want blender to run in the bg as service

yes that's exactly what I'm trying to get it to do! Any tips on how that can be done?

i posted this question in askubuntu. they said u are already in headless mode and its the fastest way. read their comment in https://askubuntu.com/questions/1421962/how-to-run-blender-as-a-service#comment2474877_1421962

don't use os.system. use requests and you can create a session and use a keep alive

Thanks a lot for your help, and for going through the effort of posting a separate question for this. Unfortunately, I'm as lost as your are when it comes to how this will actually work. As far as I can see from a quick google check, that's a package mostly used for html requests? Let's hope that some of the other askubuntu people might answer!

yeah this guy with 278k reputation mentioned about using requests so i would think that's a "reputable" answer. lol. that's why I asked him to convert that command into a request. or maybe he didn't know what he was talking about or made a mistake.

I found this question, which explains how to start a process in the background and have it accept commands via stdin: https://stackoverflow.com/a/9327923/5860941. Unfortunately, it's not working for me - I tried passing both --python-text render -- [args] and only [args] via stdin, but no output.

I'm starting to think that the https hint was not completely off. What about if I run blender in the background, as a non-blocking subprocess, with subprocess.pOpen. Inside Blender, there will be a python script executing an infinite loop, that is listening for data sent in on a local port (e.g., localhost:6006). When data arrives, it will use it to render the images. From my other python script, I can then send data to this port. Will keep you posted, let's see if this works!

I found a neat way to do it. The trick is to have blender open as a non-blocking background process using the subprocess module, and then, when starting up Blender, create a server that listens on a local port. From the python script that executes the machine learning task, we can now send data to that port, which, upon arrival, will invoke the rendering process in Blender.
Python Script:
import time
import socket
from subprocess import Popen

# start non-blocking subprocess with blender in the background.
# this will execute the script "render_server" in blender.
process = Popen(['blender -b ../gradientTest.blend --python-text render_server'], shell=True)

# give blender some time to load and run the script that opens the server port.
# without this, we will get OSError[111]: Connection Refused.
time.sleep(1.0)

# set up the socket connection
host = socket.gethostname()
port = 12347                   # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))

for j in range(2):
    # do arbitrarily complex things
    ...

    # string of arguments, will be parsed on the blender side.
    args = '1.0 0.0 0.0 0.0 1.0 0.0' if j == 0 else '1.0 1.0 1.0 0.0 0.0 0.0'
    s.sendall(str.encode(args))   # send to server running within blender
    data = s.recv(1024)           # get ack back, to see that server is finished
    print('Received', data.decode('utf-8'))

print("Done. Closing.")
s.close()

Blender Script:
import bpy
import socket

host = ''        # Symbolic name meaning all available interfaces
port = 12347     # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))

s.listen(1)
conn, addr = s.accept()

while True:

    try:
        data = conn.recv(1024)

        if not data:
            print("no data, exiting.")
            break

        received_info = data.decode('utf-8')
        print("Client Says: ", received_info)
        vals = received_info.split(' ')         # split args string into list of numbers
        render_images(vals)                     # render with those
        conn.sendall(b'ack')                    # send back ack signal to acknowledge we're done

    except socket.error:
        print("Error Occured. Exiting.")
        break

conn.close()

what a coincidence.. i was experimenting on a similar script to this one. I'm currently trying to find a non-blocking way to listen to data instead of the infinite while loop so i can still interact with blender. do you know of any event handlers?

Hi, I was just looking into this quickly and found that you need to use threading, as in this answer: https://stackoverflow.com/a/58665660/5860941. Create the server listener and the infinite while-loop in the thread_function, and it will be executed in the background and listen to commands, while Blender is still fully responsive. I tested it, and it works fine :)

that makes sense! many thanks!


text:
Vertex count changes when exporting mesh as plymesh
When I create a simple Icosphere mesh in Blender, the statistics tab shows me that it has 42 vertices. I then export this mesh to .ply and then re-import the .ply-file. Now, the statistics tab shows 63 vertices.
What is going on? Why are some vertices being duplicated?

Hello ! Have you tried removing double vertices in edit mode ?

Hey, yes I just tried merging by distance, which brings back the original - correct - vertex count of 42. But what is going on? Why is .ply, an established format, not imported / exported properly?

He, I can't say. You'd have to ask either the writers of the importer or the exporter feature.

If you make your comment into an answer I'll mark as accepted, thanks :)

Answering my own question here for future reference:
exporting the mesh without UV coordinates solves the issue, i.e., export -> untick "UVs" under the geometry tab.


text:
Blender is applying only part of texture onto plane ? -- No Shading -- Bug?
turning to you with a really strange issue - Blender only applies part of my texture onto a plane! I have an image texture that ranges from RGB black [0,0,0] to green [0,1,0] and red [1,0,0]. When I apply this texture onto a plane, without any shading, i.e., just the image texture node into material output, Blender only puts a part (roughly 80%) of the texture onto the plane (namely the part until green [0, 0.8, 0] and red [0.8, 0, 0]).
This can be verified in UV Editor mode, when using the color picker tool and picking from the image texture and the texture plane, respectively: the image texture will give you [1.0, 1.0, 0.0] in the upper right corner, whereas the textured plane will return [0.8, 0.8, 0.0].
My problem is that I need the entire texture on the plane. I already tried experimenting with plane size, etc., but didn't have any success. Does anybody know what's going on here? This seems really strange. I attached the blend file and the texture!
Attached blend file:

I opened your file and everything is ok, whole texture visible.

Thanks! Did you check the color values at the upper right corner in the viewport? What RGB value does it return?

In addition to Fowl's answer, change the Colorspace settings from Filmic to Standard to see the real colors in material view; see this.

I think your problem is in view port settings.
As you wrote, your image RGB goes over variety of colors and the corners should give absolute number of the color (as 1.1.0 in case of yellow) This can be picked by color picker in UV editor or texture paint as the texture is shown without any view port shading.
In fact, the view port has some basic shading and light from the very beginning and the colors in 3D view port are always distorted by the environment as the pure color is not reachable in a real world normally.
There is no problem with the texture. If you want the absolute color output you have to set up you render, color or material to give you this output.
If you want it to be seen just in view port then change your shading.