We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Importing Custom Surfaces with GDL Object

kittonian
Beginner
I'm on a Mac using ArchiCAD 20 and while I realize that, at least in the past forum posts I've read through from years ago, surfaces (or materials) are per project and not directly a part of a GDL object, I was wondering if it was possible to write some GDL script so that when an object is inserted into a project, its custom surfaces are also added to the project.

We have hundreds of objects as I'm sure many of you do as well, and unless I want a massive template file containing every possible surface for all of these objects, I am stuck creating these surfaces again and again, OR, loading each one in one-by-one from a C4D file.

I simply want to choose an object from the library and if the surface it is set to use is not present, I would like that surface to be automatically created in the project file.
ArchiCAD 25 | Cinema 4D R23
12-Core Mac Pro (2 x 3.46 6-Core Xeon, 64GB DDR3)
OS X 11.2.3
AMD Sapphire Pulse Radeon 5700 XT (8gb)
8 REPLIES 8
Barry Kelly
Moderator
Yes you can 'DEFINE MATERIAL' in each object and it will be available only for that object.
You could then have a simple routine to 'SET MATERIAL' to the one you defined if the material parameter is 0 - GENERAL (i.e. no material defined).

This will only be the basic settings for a material and not the full range of Cinerender settings.
But it should still look OK in Cinerender as the basic settings will still be used.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
kittonian
Beginner
Thanks for the reply Barry. What I actually need is the Cinerender material not a basic one. We often create object in C4D along with the relevant materials and then import those into ArchiCAD and make them GDL objects.

It is extremely important that I am able to somehow bring those materials into a project whenever the object is loaded.

For example:

1. A new ArchiCAD project is created
2. I need a bed for the bedroom so I go into my library and choose one of my custom beds
3. That bed is inserted into the project and the C4D (or rather Cinerender) materials are also loaded into the project

I do not need the materials to be for that object only. They are welcome to be used on any object in the project. The main point is that they are available in the project when the object is loaded in.
ArchiCAD 25 | Cinema 4D R23
12-Core Mac Pro (2 x 3.46 6-Core Xeon, 64GB DDR3)
OS X 11.2.3
AMD Sapphire Pulse Radeon 5700 XT (8gb)
Barry Kelly
Moderator
The defined materials will work with Cinerender, they just won't have all the advanced settings a Cinerender material can have.
And of course you won't be able to tweak them as they will be contained in the object - but only for that object.

It is also possible to define materials in a MASTER_GDL file and these will then be available to your entire project (all objects, walls, slabs, etc.).
You can have multiple MASTER_GDL files so you can have a s many as you need (one for each object?) that can be loaded along with each object.
If a defined material already exist in the project it will not create a duplicate.
However you will lose all control of the surface (material) index numbers which can cause problems if you cut and paste or use modules between files.

I think your best bet might be to make one or more attribute files that contain the surface materials that you want.
These can be fully functioning Cinerender materials.
These can then be added to any of you files.
Not automatically as you add objects but separately with the Attribute manager.
You could group your attributes into say timber, metal, plastics, paint, etc., and just load the attribute files you need either in their entirety or you can pick and choose the individual materials you want.

Personally I would just add all materials to your template so they are there from the start.
Unless you have many hundreds or thousands of materials, which then I would use attribute files to load what is needed.


Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
kittonian
Beginner
The attribute file may be the better solution, especially separated into different categories as you mentioned. Thank you for that suggestion.
ArchiCAD 25 | Cinema 4D R23
12-Core Mac Pro (2 x 3.46 6-Core Xeon, 64GB DDR3)
OS X 11.2.3
AMD Sapphire Pulse Radeon 5700 XT (8gb)
Aaron Bourgoin
Virtuoso
Any chance of Graphisoft releasing the spec that defines all the parameters of a Cinerender Surface. Even just as documentation in the GDL Manual - or an addendum to it.

I asked about this several times and it didn't seem to be a priority.

Greyscale Gorilla express some interest in the specification so as to make their Surface Libraries compatible with ARCHICAD. That wasn't a done deal or anything, but I think they were certainly willing to consider it. A response from them would be impossible without the spec.
Think Like a Spec Writer
AC4.55 through 27 / USA AC27-6000 USA
Rhino 8 Mac
MacOS 14.6.1
kittonian
Beginner
What we really need is for VRay to become compatible with ArchiCAD so we can interchange VRay materials between C4D and ArchiCAD. It always sucks having to redo all the materials in ArchiCAD when the client wants a photo-realistic render and you export out to C4D.
ArchiCAD 25 | Cinema 4D R23
12-Core Mac Pro (2 x 3.46 6-Core Xeon, 64GB DDR3)
OS X 11.2.3
AMD Sapphire Pulse Radeon 5700 XT (8gb)
Laszlo Nagy
Community Admin
Community Admin
Aaron wrote:
Any chance of Graphisoft releasing the spec that defines all the parameters of a Cinerender Surface. Even just as documentation in the GDL Manual - or an addendum to it.

I asked about this several times and it didn't seem to be a priority.

Greyscale Gorilla express some interest in the specification so as to make their Surface Libraries compatible with ARCHICAD. That wasn't a done deal or anything, but I think they were certainly willing to consider it. A response from them would be impossible without the spec.
There is some documentation on gdl.graphisoft.com, but they state it is under construction so I don't know if they would work or not:

http://gdl.graphisoft.com/gdl-docs/cinerender-docs/
http://gdl.graphisoft.com/gdl-docs/cinerender-docs/surfaces/
http://gdl.graphisoft.com/gdl-docs/cinerender-docs/surfaces/channel-details/
http://gdl.graphisoft.com/gdl-docs/cinerender-docs/surfaces/shader-details/
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Aaron Bourgoin
Virtuoso
Thanks, this looks to be more than what was posted previously.
Think Like a Spec Writer
AC4.55 through 27 / USA AC27-6000 USA
Rhino 8 Mac
MacOS 14.6.1