aachman98 / Sorcar

Procedural modeling in Blender using Node Editor
https://aachman98.itch.io/sorcar
GNU General Public License v3.0
1.16k stars 112 forks source link

Creating separate objects with parameterized materials #125

Open shiona opened 4 years ago

shiona commented 4 years ago

I would like to create multiple objects in a loop. Preferably in a way that for the first object I could give the value 0 or 1 as a parameter to different transforms (from origin) and for the computation for the material used for that object.

I would like to know if this is possible, and if it is, how.

I have tried to do this in all the ways I can come up with, but the best I've managed is "add cube" to "(local|global) transform" in a loop, but each transform then moves all the previously created cubes. I believe this could possibly be solved by knowing how to select the newly added object, but I haven't managed to do that.

aachman98 commented 4 years ago

Use "Local Transform" node with "Edit Mode" option checked: image

Currently, it is not possible to create new materials using Sorcar nodes. You can assign existing material to selected components though. The node "Material Parameter" can enable you to edit any parameter of the material, but I don't think it will be useful in a loop.

shiona commented 4 years ago

Thanks, the "edit mode" didn't sound like what I needed so I didn't try it. The node based programming seems to just confuse me more than it helps, so I ended up learning a bit of the blender python API and solving my problem using it.

So I'm ok with closing this issue, but in case you want to keep it open to track "create material" node or for some other reason I'm not going to close this now.