2021-02-14 09:36 PM - last edited on 2021-09-14 01:23 PM by Noemi Balogh
2021-02-14 11:32 PM
2021-02-14 11:39 PM
define material "Clearance Surface" 5, 1, 0, 0You do this in the master script and then you set the material in the 3D script using
material "Clearance Surface"Is the image you sent a single object? if so you may want to set the rgb value to an array parameter with 3 columns (r, g and b) and a separate row for each plane. Then you will have to definite the material in the 3D script so the one material can have varying results using loop function and referencing the array. actually this might not work as it might say that the material has already been defined. If thats the case then you could perhaps make the name of the material also a variable based on the loop number (eg "Plane Surface " +str(n, 1, 0). I haven't tested this logic yet but it works for GROUP statements.
2021-02-15 07:33 PM
2021-02-15 10:04 PM
Peter wrote:Does that apply to materials contain within a GDL object (not MASTER_GDL) that doesn't populate the attribute list, or is it just for attribute list materials?
Be aware that you can't define too many materials. Enough for a few hundred colors from a palette, but not for smooth multi-color gradients.
2021-02-18 12:06 PM
2021-02-18 11:14 PM
2021-02-20 11:50 AM
Kristian wrote:Thanks Kristian!
wow Mats! your playing is pretty crazy, would scare most of the kids out of the park.
To assign an rgb colour to the planes you have to define the "material" in the master script. Simple RGB material definitions are quite simple, below is the logic and an example:
define material <name> <type>,
r, g, b
The definition can get more complex with more values if you want to control "shininess", "transparency" and alike. This is determined by the <type> value. if you just want the rgb values then choose a <type> value between 2 and 7:
2: matte
3: metal
4: plastic
5: glass
6: glowing
7: constant
The rgb values are in the range of 0 - 1, so typically I write them as a fraction of 255 (eg 194/255, 72/255, 44/255). Though for the example below I have just used the 1 and 0 because its a straight red colour.
This is my red clearance space using the glass <type> to make it transparent.define material "Clearance Surface" 5, 1, 0, 0You do this in the master script and then you set the material in the 3D script usingmaterial "Clearance Surface"Is the image you sent a single object? if so you may want to set the rgb value to an array parameter with 3 columns (r, g and b) and a separate row for each plane. Then you will have to definite the material in the 3D script so the one material can have varying results using loop function and referencing the array. actually this might not work as it might say that the material has already been defined. If thats the case then you could perhaps make the name of the material also a variable based on the loop number (eg "Plane Surface " +str(n, 1, 0). I haven't tested this logic yet but it works for GROUP statements.