Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
110 views

How to generate Textures without Rendering to File?

I’m working on a task that involves generating a large number of textures in Blender using Python (bpy) as a standalone (without the GUI). While I can automate the creation of shader nodes, I’m ...
Oren Matar's user avatar
0 votes
0 answers
17 views

How to implement code into OSL

I want to implement a BSDF into OSL, but I only have a few ideas of how that's done. Do I copy and paste the parameters in the script node?
Robert Hintz's user avatar
0 votes
0 answers
15 views

How To Fix Naming Conflicts Causing Broken Clothing/Shader UI?

Novice Blender user here 😊 I downloaded two models from a popular character modeler online. The models use the Character-UI add-on by nextr3d to manage clothing/shader options. They are great models, ...
rockafellerskank's user avatar
0 votes
0 answers
25 views

Copy Normals Of Multiple Faces?

as you may know this is the output of Alt + N >> Copy Vectors with multiple faces selected.. the goal is, having a given object with bad shading and an exact copy of it with good shading, to ...
holy jesus's user avatar
1 vote
1 answer
102 views

Scene optimization on a material level?

How can I properly optimize a scene at a material level? For example. I have 2 different versions of the same rock texture in different resolutions, 1k for the background and 8k for the foreground. ...
elistuff's user avatar
2 votes
0 answers
38 views

How can I get the final evaluated material color of each face?

I want to be able to get the final evaluated color for each face regardless of what shader node setup I have. I just want to get the final color result flowing into the Base Color socket of the ...
Megan Love's user avatar
1 vote
1 answer
227 views

How to replace vertex normal with custom normal data?

I have a set of custom normal data here. First one simply use the normal data in the shader. Second one is achieved by define custom split normals of this mesh from normal data by script.(...
Wow's user avatar
  • 21
1 vote
0 answers
95 views

How to build a scene with Curved World effect

Is there a way to have a curved world like Death Spank or Animal Crossing? This effect used to be called Rolling Log Effect (by Nintendo) also World Bending Effect is another name. This effect is a ...
Roozy's user avatar
  • 186
0 votes
1 answer
138 views

Why is #frame_end returning a 0 value?

I'm trying to make a looping animation and want to call the value of my end frame so that I can adjust the length of the animation without breaking the loop. However, when I type #frame_end into the ...
Max Williams's user avatar
0 votes
1 answer
134 views

How to change selected nodes width in node editor using python?

I am trying to select one node in node editor, then select same type of nodes and change width of all selected nodes using python, this script select same type of nodes but it cannot change its height ...
Yokomizo's user avatar
  • 414
0 votes
1 answer
416 views

How to get name of a shader node group in Python (and check if there is a certain shader node inside it)

The material is looking like this: I'm trying with this code: ...
Artichoke's user avatar
  • 413
0 votes
0 answers
321 views

Batch renaming materials to texture name "XPS Shader"

If my node is "XPS_Shader" instead of "BSDF_PRINCIPLED",how to change these code? ...
mini core's user avatar
0 votes
0 answers
42 views

Manipulate shader based off moving geometry relative to camera

My intention is to write a shader that will most closely resemble how motion in claymation looks. Specifically, for example, when a character moves their hand, you can see slight abnormalities in the ...
Adalex3's user avatar
  • 165
2 votes
1 answer
3k views

Fixing undefined shader nodes

I am using blender 3.0.0 and i have many shader trees on objects with undefined mix RGB nodes, is there a script or any other way to revers to the original nodes state on multiply objects?
digitvisions's user avatar
1 vote
0 answers
342 views

Color alteration in writing and reading image textures using GPU module and Frament shader

I'm trying to understand how to use Fragment shaders in Blender for editing and saving some images. Collecting pieces of information here and there, I produced a simple code that read an image, draw ...
zompa84's user avatar
  • 51
2 votes
1 answer
247 views

Why does Blender invert/rotate the UV coordinates in OSL?

I have a very simple setup (see picture). I would expect that when I do shader myshader(output color Cout = color(0.0, 0.0, 0.0)) { Cout = color(u, 0.0, 0.0); } ...
a-python-script's user avatar
1 vote
1 answer
81 views

Need help with script that loops through a collection and bakes objects

So I'm having some difficulty with a script I wrote that should loop through a collection of objects and bake the materials for each object. I feel like I'm pretty close, but the script is failing at ...
rtwhite's user avatar
  • 193
0 votes
1 answer
80 views

Is there a way to switch a texture between left and right pass for a stereoscopic rendering (3.1.2)?

Is there a way to switch a texture between left and right pass for a stereoscopic rendering (3.1.2)? I'm creating a stereoscopic 360; one of the "subjects" of the scene is a person filmed on ...
Puntoz3r0's user avatar
0 votes
0 answers
733 views

Batch export 1000 .glb files

I’m trying to batch export 1000 .glb files with a script. the model I want to export uses an image sequence as a image texture that is cycling through 1000 different images. there is also a counter as ...
soulxchild's user avatar
0 votes
1 answer
171 views

Scripting/ import image from files to shading Image Texture

After 10 hours of research I'm finaly asking for help I try to open an image from my files with a script here Until now I managed to create the image Texture and to set inputs and outputs but I can't ...
Aci's user avatar
  • 1
1 vote
2 answers
1k views

How to script value in Shader so it changes over time?

I need this number to change in a given range over time. I thought that I could just write a driver to this value, but I did not find any random function that could solve my task.
White Raven's user avatar
  • 1,055
4 votes
1 answer
194 views

How to script to check the maximum number of textures supported per shader?

I ask this, because I would like to create a python script that checks what is the maximum number of Textures supported for Shader. This would prove very useful in understanding how many different ...
Noob Cat's user avatar
  • 1,372
4 votes
1 answer
760 views

Use custom vertex attribute in Attribute node (shader network)

I was reading this post and this one : Other than copy new data to specific "known" vertex attribute like "Color" for example. There is way to read custom vertex attributes in the ...
barakooda's user avatar
  • 303
0 votes
0 answers
105 views

What is the best way to encode a material into python code?

I'm looking for the most widely applicable a way to convert materials into executable python code, with code. This method should be able to accomodate node groups, and multiple nodes with identically ...
Exporer's user avatar
  • 13
3 votes
0 answers
230 views

Aperture Science portals using OSL

I am wanting to create Aperture Science style portals, And I’m aware of various compositing techniques to do this, but to make it more flexible I am thinking about using Open Shading Language. I do ...
TheLabCat's user avatar
  • 7,760
0 votes
1 answer
888 views

How to access the data from a node socket, for processing it?

I am trying to create a custom node of my own, where I get the input from node sockets, process it (all in code, without involving node groups) and put that processed data to an output node socket to ...
Xafar's user avatar
  • 11
0 votes
2 answers
2k views

How can I turn nodes that made in shader editor to script? [duplicate]

I want to make a button and when I press it, it will apply the material I made, that mean the nodes. I try different way to type script but it wasn't work. ...
8N Films's user avatar
  • 173
2 votes
2 answers
405 views

Edit Many Materials at Once [Insert a Group in all materials node chain]

The Situation: I'm creating a flying photo effect of hundreds of photos, using a particle system. I've created a custom group that includes lowering transparency based on camera distance, so as you ...
Lucas's user avatar
  • 21
1 vote
0 answers
41 views

Shaders Nodes - Attaching and detaching nodes with python [duplicate]

I would like to import an image as a plane, then add a MixShader and a Transparent BSDF, detach the Material Output Surface link, attach the BSDF to the MixShader, to the Material Output, then add the ...
Michael Teiniker's user avatar
2 votes
0 answers
160 views

Create texture image from mesh location

I'm stuck on an issue, that I hope some of you can help me with. I'm trying to create 4 texture images, that hold XYZ values (+more) for a mesh. The problem is that I'm not 100% how it should be saved,...
Kevin Mn's user avatar
1 vote
0 answers
51 views

Adding Image Texture Shader Node to a certain material? Blender2.8+ [duplicate]

I'm trying to add a Image Texture node, so when I bake textures it is saved to a specific file: ...
sephiroth85's user avatar
1 vote
1 answer
417 views

How to link the output of a Vector Math node to another node?

I try to build a operator for some specific shaders by using Python but got stuck on how to make a node connection between ColorRamp (input) and Vector Math (output): When I try to use ...
Kayla Man's user avatar
0 votes
1 answer
7k views

How to make an object transparent in the viewport?

I would like to make one of my objects transparent in the 3D Viewport. When I look around I get tons of answers - all different, and some of them a lot more complicated than others and also older from ...
DrDress's user avatar
  • 563
3 votes
1 answer
1k views

OSL Texture Mapping [duplicate]

I'm new to OSL and Blender. I'm using the following code to generate a circle on a plane. The plane, however, appears to be split into two triangles. Can anyone explain how to fix this so my OSL ...
Dr. Pontchartrain's user avatar
2 votes
1 answer
751 views

A Way to Create Blender Materials in Text or Script? (Included: Script to Retexture SFM Models in Blender!) [duplicate]

I have a model from Source Filmmaker that has a bunch of different textures. It's all imported and ready to be textured using Blender nodes, but since there are so many objects (over 40) in this ...
pridestalker's user avatar
1 vote
0 answers
501 views

Is it possible to export a shader editor nodegroup to a script/text file?

Looking to export an extremely complex nodegroup to a script for a framework test. If i can export the nopdegroup to code, then i would be able to use another program to fill in the parameters of the ...
darupta's user avatar
  • 39
1 vote
1 answer
618 views

Blender 2.8 Text Editor OSL Script Node Update Disabled

I found out what Open Shading Language was today and was excited to try it out, and it was working at first. But at some point, I found that I could no longer press the "Script Node Update" ...
ElliotThomas's user avatar
2 votes
1 answer
1k views

How to Update NodeSocketString Value inside a node group in a attribute node using python

I have an Attribute node inside a node group, and for the node group inputs, I have created a NodeSocketString, Using ...
Rakesh choudhary's user avatar
1 vote
1 answer
765 views

How to access the list of volume grids using python?

I wanted to access the attributes imported with a vdb file but I have no idea how to do that. Actually what I was trying to do is - In the attribute node in material for the vdb file I wanted to get ...
Rakesh choudhary's user avatar
0 votes
1 answer
110 views

how can I share variables between glsl and python in the bge?

I am currently writing a glsl shader in the bge, My question is, if I have glsl embedded into my python script, how can I if possible share memory/variables between my glsl and my python so the below ...
Frederick's user avatar
  • 159
1 vote
0 answers
167 views

Comic book shader

I just started using Blender slowly switching over from long time Maya use . . I want to be able to control the gray values with image textures so I can create more detail in those areas . . anyone ...
Allen Altiner's user avatar
2 votes
0 answers
302 views

OSL: HalfVector Question

EDIT: I pasted a copy of the code for convenience. I have a question about the halfway vector between the camera and light vectors giving odd results in my shader. I included screenshots of my OSL ...
emerca20's user avatar
2 votes
1 answer
233 views

Passing float texture to fragment shader returns incorrect value in Blender 2.8

I am trying to pass image texture to fragment shader and read it back. But it only works if the color of the pixel is set to 0.0 or 1.0. The value returns to the buffer if the value is set to, for ...
Nguyen Cong's user avatar
2 votes
1 answer
1k views

Shader script nodes have no parameters

I am trying to do my first OSL shader script. No matter what I do, even when using all the examples, when I add a node for my shader none of the parameters show up as node inputs/outputs as I have ...
Brad's user avatar
  • 245
1 vote
0 answers
114 views

gbl shader blender 2.8

After adding an draw handler to my operator my terminal is showing the following: ...
XIWEI ZHOU's user avatar
1 vote
1 answer
2k views

How to create a new material and set it as active material using python script

How can I create a new material and set it active material on the active object using python script.
Rakesh choudhary's user avatar
3 votes
1 answer
888 views

Blender 2.8: How to select multiple object with the same diffuse color in principled shader?

I have to import various fbx file scenes , bringing in a large amount (>10.000 Objects) into the scene with each single import. Each import scene stands on its own. Imported fbx files will not be ...
pixelpoems.de's user avatar
1 vote
0 answers
141 views

Create a Material using Python script

I have Created a Node group Using Python Script and Now I wan't is To Convert This To Add-on, I Wanted that whenever I click a Button "Add Test Material", It Create a Material which consist of That ...
Rakesh choudhary's user avatar
0 votes
1 answer
828 views

How to Delete Color Stops of Color Ramp using Python

I have Added a Color ramp in my node editor using a Script and I wan't that the Color Stops That Are Available by default Should be Deleted. before I add new stops I know how to add new stops but i ...
Rakesh choudhary's user avatar
3 votes
1 answer
1k views

How To Append a Node group from another Blend file Using Python Script

How To Append a Node group from another Blend file that is Present in my D drive on my windows computer. I wan't to Append a Material and path to my material is - - D:\2.8\Test01.blend\Material\...
Rakesh choudhary's user avatar