I'm Creating some nodes through python script. The problem is that all the nodes are overlapping each over. I just wanna programatically re position those nodes. How to do this?   imgtx1 = nodes.new('ShaderNodeTexImage')  imgtx2 = nodes.new('ShaderNodeTexImage')   Just consider these 2 nodes as of now. Thanks in advance!
850
How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?
11547
\begin{tikzpicture} \node [draw=black, anchor=south west] (label) at (0,0){\includegraphics[width=300mm]{th.jpg}}; \coordinate (ZX) at (157mm,104mm); \coordinate (YB) at (249mm,39mm); \coordinate (YY) at ($(ZX)!1.5!(YB)$); \coordinate (ZZ) at ($(YB)!2.5!(ZX)$); \draw[blue!20,very thick] (ZZ)--(YY); \draw[red!20,very thick, rotate around={90:(ZX)}] (157mm,104mm)--(249mm,39mm);%It works \draw[red!20,very thick, rotate around={-90:(ZX)}] (ZX)--(YB);%It doesn't work \filldraw[white] (ZX) circle (2mm); \filldraw[white] (YB) circle (2mm); \end{tikzpicture}   a working example       \documentclass{minimal} \usepackage{tikz,tikz-3dplot}  \begin{document}    \tdplotsetmaincoords{70}{115}    \begin{tikzpicture}[scale=4,tdplot_main_coords] \pgfmathsetmacro{\rvec}{.8} \pgfmathsetmacro{\thetavec}{30} \pgfmathsetmacro{\phivec}{60}  \tdplotsetrotatedcoords{\phivec}{\thetavec}{0}   \coordinate (O) at (1,1,1);   %these 2 lines overlap \draw[thick,-&gt;] (O) -- (0,.5,0); \draw[thick,tdplot_rotated_coords,-&gt;] (O) -- (0,.5,0);   %these 2 lines dont overlap \draw[thick,-&gt;] (1,1,1) -- (0,.5,0); \draw[thick,tdplot_rotated_coords,-&gt;] (1,1,1) -- (0,.5,0); \end{tikzpicture} \end{document}
10118
When I overlap 2 objects like this    resulting freestyle lines are like this    But I want render overlapped edge lines like this(red lines below picture)    What's the easiest way to accomplish my purpose?(A lot of objects in my work are made in that way so resulting render image misses many overlapped edges. I tried to remake some object to reveal overlapped edges but I realized that remaking all objects is too hard to me.)
63195
I have the following Tikz picture:  \begin{tikzpicture}   \node (a) {A};   \node [below=2cm of a] (b) {B}; \end{tikzpicture}   When I compile this code with PDF-LaTeX, I get the expected result: "B" appears 2 cm below "A".  When I compile the exact same code with plain LaTeX, in the DVI file, "A" and "B" are in the same position, mashed together.  In the PS file, after another re-compilation, they appear correctly again.  Is there some way or workaround to work with PGF/Tikz with positioning straight with the DVI preview?
38679
How do I make partially shaded nodes with tikz without hardcoding coordinates?  A plain MWE is as follows:  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[mynode/.style={circle,draw=black,minimum size=10mm}]      \filldraw[fill=gray!25] (-3.5mm,-3.5mm) arc [start angle=225, end angle=405, radius=5mm];     \node at (0,0) [mynode] {\Large $x$};  \end{tikzpicture} \end{document} \end{tikzpicture}   This works, but I had to compute the coordinates of the shaded arc, and is very tedious when I have to work with a large number of nodes. Is there a way to do this automatically?  I have other code that uses , so if the solution can build on top of that it would be even better.
75691
How can I make a number of objects (or copies of one object) sit "snugly" on an irregular surface - like trees or rocks on irregular ground?  I once came across a tutorial that covered this but I cannot find it again.  The only thing I can think of is to create a "pseudo object" whose vertices represent the desired relative target locations then use retopologize to make the "pseudo object" vertices conform to the surface of the irregular target object and, finally, use dupliverts to place the added objects.
37049
I have drawn 4 nodes with  \documentclass[tikz,border=5pt]{standalone}  \usetikzlibrary{positioning}  \begin{document}  \begin{tikzpicture}[node distance=2cm]  % nodes \node [draw] (A) {A}; \node [draw, right=of A] (B) {B}; \node [draw, right=of B] (C) {C}; \node [draw, right=of C] (D) {D};  % arrows \draw [-&gt;] (A) -- (B) -- (C) -- (D);  \end{tikzpicture}  \end{document}   I am trying to draw an arrow between each node.  If I use  \draw [-&gt;] (A) -- (B) -- (C) -- (D);   I get lines between each node but only an arrow from C to D.  Can I, in one line, draw arrows between all of the nodes?
77091
I'm trying to get a nice tree without the overlaps, can anyone help me to improve my code?  \documentclass{standalone} \usepackage{amssymb} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{dsfont} \usepackage{tikz} \usetikzlibrary{shapes} \usetikzlibrary{graphs}  \begin{document}       \begin{tikzpicture}[baseline,level/.style={level distance=20mm, sibling distance =35mm/#1},scale=1]         \node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}             child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                 child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                     child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                     child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         }                     }                 }                    child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                     child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             }                         }                     }                     child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             }                         }                     }                 }             };     \end{tikzpicture} \end{document}
69920
TL;DR  How to take a shape or Image Texture and multiply it with random Location, Rotation and Scale along object:    Background  I have created my first procedural shape on my own from this function: $(x^2 + y^2 - 1)^3 - x^2y^3 = 0$   (big yay for math idiot)   Here is the result:    And I want to do something useful with it.  Research  I've tried to find something similar over the web (this is trending right now) and I'm surprised that this question wasn't asked before or I'm looking with wrong terms. I've tried random pattern, duplicating texture, populating image, random tiles, custom tiles and such. There is a lot about tiling textures but each and every Q&amp;A I've stumbled upon are about non overlapping ones. For example:            Tryout:  The only way I can think of this is to duplicate shape as a group and manually change values in Mapping Nodes:    As you can see this is... Well. Bad.  I've tried messing with Modulo, mixing Noise between vectors, using custom node groups for LocRotScale (thanks Gandalf) but results was none, thus nothing even to show.  Question  I want to populate this shape (or any other) along the object with random Location, Rotation and Scale - with control over its number/density and maybe variation strength.  Edit: I'm not looking for alternative methods of creating this setup such as Particles, Image Textures generated in 3rd party software, OSL shaders (CPU only) and such. My intention is to use this in procedural texture generation in Cycles with GPU support.  Blend file  Nothing really needed for this question but here - have this heart from me :)
109640
I have a few materials that are slightly different but all have an emission shader. Whenever I want to control the strength of all the emission shaders I have to go into each object's material one by one to change the value. I'm wondering if there's a node or add on that can change all of them at the same time. Thanks for any help I appreciate it.
106382
I have lots of objects consisting of many different meshes. Some of these meshes come with transparent materials applied to them. My goal is to modify the nodes list, add new nodes and change the links for the transparent materials. Based on , I can detect the transparent materials (thanks to ) using the following Python script:  for obj in bpy.data.objects:     if obj.type == 'MESH':         for slot in obj.material_slots:             if slot.material:                 mat = slot.material                 for node in mat.node_tree.nodes:                     if node.label == "Mix Color/Alpha":                         if node.inputs[1].default_value[0] &lt; 1:                             print("Material '%s' on object '%s' seems transparent" % (mat.name, obj.name))   Also, based on  (again, thanks to ) I can manually add shader nodes to get depth maps or surface Normals while ignoring those materials as shown below:    I need to do this process for thousands of objects. I am pretty new to the concepts of nodes in Blender and do not know how modify the nodes and remove/add links to do what is being shown in the GIF image above. So I wonder, how can I add the math and mix shader nodes and add/remove the corresponding links using Python?  You can download  .obj file and load it in Blender to be able and make sure your code works. Just make sure you have selected Cycles before importing the obj file into Blender so that Blender creates the materials' nodes list automatically.  NOTE: I'm not sure how this helps but some of the meshes share the same materials. For instance, in the car example, the headlamps and the glasses (windshield, side windows) share the same material.  NOTE: Just loading the object and doing rendering will not get you the same Normal maps as shown here. The surface Normals of the object I provide here are incorrect. If you want to get the same surface Normals you need to do the following: join all the meshes. Then go edit mode and recalculate outside surface Normals of the downloaded object. Then turn off Auto Smooth.
103993
How can one subdivide at an arbitrary position, say the cylinder side faces, using CTRL+R (subdivide loop tool), so that the texture is not stretched like this:  Before    After    If this is not possible with this tool, is there another way, like for instance recalculating a group of UV coordinates by means of their vertex position and their surrounding vertices.
2
I have been following  tutorial until I started adding nodes. The problem is that he has completely different nodes than I have. Even nodes that are created at start are different (I have Material and Output and he has Render Layers and Composite). Have I missed something or should I use different nodes than he?
52513
Sometimes, nesting tikzpicture environments seems inevitable, e.g., if you want a node to contain a TikZ picture on its own. () However, nesting tikzpicture environments is , also because the inner environment  from the surrounding tikzpicture environment.  In a comment to a , Martin Scharrer has suggested that     a command [that resets all TikZ/PGF attributes] would be very difficult to maintain, because all TikZ attributes would need to be set with it explicitly.   Is there a way, with the current implementation, to save/restore all of TikZ/PGF's internal state, in order to apply it to a nested tikzpicture environment? If not, what would be really necessary to implement a "clean start with default values" for nested tikzpicture environments? Any thoughts?
73957
I want to make a wall with a image repeating across it like wallpaper.  I tried it in the node editor but the image is taking up the entire plane. I just want it to be small and for the image to repeat across the entire plane.  How do I do that?
62552
From a given node tree, what is the most reliable way to get the end node being used for output, if any?  My current approach is to check for the correct output type for the tree (OUTPUT_MATERIAL, OUTPUT_WORLD...) and for is_active_output:  nodes = node_tree.nodes  for n in nodes:     if n.type == 'OUTPUT_WORLD' and n.is_active_output:         return n  return None   However, I see no guarantee that there is only one node with is_active_output (I can set this to True in multiple nodes).  The ShaderNodeTree has an active_input field, but the value is -1.
2218
I know that there is tikz, but also eso-pic and textpos.  I'd like to see a list of possible ways (not necessarily packages) for absolute positioning of things (which I believe amounts to "boxes") on the page, together with their advantages and disadvantages (for instance: tikz's current page node is very easy to use, but usually requires two LaTeX runs, and overhead from loading tikz if you don't need it for any other things is considerable).  Both LaTeX and ConTeXt solutions are welcome