Dear Lua Coders,
First of all I'd like to thank to everyone who contributed to "Render and save all render targets to PNG".
Now I have a huge request which is extremely important in my work. It is possible to construct nodes - see orbx attached, but on the greater scale - LUA is necessary.
Namely: I can use "random color texture" and assign to gradient control points the same jpg texture and modify their input values independently - see the screenshot. This allows to transform the same texture over instances. The effect is - THEY DON'T LOOK THE SAME In my simple example (the screenshot) you see only 3 different transforms. But I can add more and more control points to the gradient node and get more and more different transforms of the same texture.
Let's assume I have 1000 instances. And I want to create 1000 control points in the gradient, connect the same image texture to them (as copies) and modify their transform independently and randomly.
The script may look like this (I am not LUA coder, so forgive me my way of presenting the algorithm)
1. Set N (no of max transforms/control points), to e.g. 1000.
2. Create the gradient node with N control points.
3. Let "i=1,...,N" enumerate consecutive control points in the gradient.
4. For every i-th control point set its position value equal to
pv(i) = (1/(N-1))*(i-1)
(If N=1000, pv(1)=(1/(1000-1))*(1-1)=0;
pv(2)=(1/(1000-1))*(2-1)=0.001;
...
pv(1000)=(1/(1000-1))*(1000-1)=1)
5. Load an image texture (would be very nice to load more than one )
6. Connect the same image textures (as copies) to i-th value (let's call it v(i))
7. Randomly assign values for 3D transforms, also for gamma and power if possible.
in a do loop form:
=========
N=1000;
for i (from 1 to 1000);
set i-th position value (in the gradient node)to pv(i)=(1/(N-1))*(i-1);
connect an i-th image copy to v(i);
randomly assign values (taken from the input panel)to the image texture 3D transforms, (also to gamma and power if possible);
i=i+1;
endfor;
=========
The input panel for random values may look like this - see the attachement.
Guys, I am begging you - please help with writing the script. This is the most important feature I need. I am creating tons (literally millions of mouldings on my classical architecture buildings) and the must by UVed and unfortunately they look the same. This script would solve this problem.
smicha