We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-07-12 04:49 AM - last edited on 2023-07-18 06:15 AM by Laszlo Nagy
I create a window from polygons using texture. In 3D view everything works as expected: the texture shows up.
But in elevationviews the windows are always white:
I figured out that this is caused by how I create the textures in GDL. I use the texture command like in the example 3 from GDL:
DEFINE MATERIAL "Yellow Brick+*" 20,
1, 1, 0, ! surface RGB [0.0 .. 1.0]
0.58, 0.85, 0, 0,
! ambient, diffuse, specular, transparent
! coefficients [0.0 .. 1.0]
0, ! shining [0.0 .. 100.0]
0, ! transparency attenuation [0.0 .. 4.0]
0.878401, 0.513481, 0.412253, ! specular RGB [0.0 .. 1.0]
0, 0, 0, ! emission RGB [0.0 .. 1.0]
0, ! emission attenuation [0.0 .. 65.5]
IND(FILL, "common brick"), 61,
IND(TEXTURE, "Brick") ! Fill index, color index, texture index
But I set Fill index=-1 and color index=-1
because I have no idea what the color index is.
I would like to pass the color index of a self created RGB color.
But I did not found a command in GDL like:
DEFINE COLOR "dummyColor" ...
Solved! Go to Solution.
2023-07-12 05:41 PM
Thanks a lot.
I solved the problem with the white windows in elavation view by settings the values for surface RGB [0.0 .. 1.0] correctly. They were set to white. Now the color shows up correctly in elevation view.
So what does Fill index and color index do?
In what view/situation can I see the difference in setting them or leave them -1?
2023-07-12 01:13 PM - edited 2023-07-12 01:20 PM
For color you can use REQUEST ("PEN_OF_RGB", colorRGB, penindex) or "RGB_OF_PEN".
There is no command "color index" or "Define Color". I think "color index" must be better named "pen index of fill"
2023-07-12 05:41 PM
Thanks a lot.
I solved the problem with the white windows in elavation view by settings the values for surface RGB [0.0 .. 1.0] correctly. They were set to white. Now the color shows up correctly in elevation view.
So what does Fill index and color index do?
In what view/situation can I see the difference in setting them or leave them -1?
2023-07-13 03:19 AM
Not an answer to your question.
But just curious.
Do you have to define materials (or other attributes) at all?
Can't you just use the attributes in your file?
And if you don't have them, just create them.
Use the Attribute Manager to import/export to other files and most importantly your template.
Unless you need your objects to be used in other files (that don't have those attributes and you don't want to use Attribute Manager) and you must have those specific attributes, then that is fine, DEFINE away.
Barry.
2023-07-14 06:37 PM
The created window scripts are generated programmatically as a BIM export from another system. So the materials cannot be predefined, have to be created on the fly and the Attribute Manager no is an option.
2023-07-17 03:07 PM
Fill and pen index are an attribute index. There is no value reserved as undefined.
A negative fill index is for fills defined in the script, those are to be used through the IND command.
Fill 0 is an empty fill, GLOB_FILL_INDEX_BACKGROUND is the default background fill, and GLOB_FILL_INDEX_SOLID is the default solid fill.
Pen -1 is opaque and pen 0 is transparent (when used as background pen of a fill).
A positive index is to be used through a parameter, where the user can select the actual fill, and GDL will receive the corresponding index.