ArchiCAD to Radiance TranslatorWritten by Paul BourkeMay 1993
The rendering techniques provided by ArchiCAD are fast and suitable for many applications but the realism possible is quite limited. Some other rendering package is necessary for more realistic rendering and to this end ArchiCAD provides an RIB export file format for RenderMan. RenderMan is a very capable and international standard rendering package but it also has many disadvantages for architectural rendering. The main problem is that it can require considerable effort and training to achieve highly realistic scenes. Radiance is another rendering program, it is free (public domain) and has big advantages for architectural rendering. Most of these advantages are a consequence of its radiosity/raytracing approach which has a much better lighting model than conventional raytracing, especially for interior scenes. It is generally quite straight forward to create good results with Radiance even though it doesn't have its own user interface. Radiance also has the capability of doing quantitative lighting analysis including daylighting analysis. In order to use Radiance with the ArchiCAD package we have written a translator that takes a RIB file as output from ArchiCAD and creates a Radiance scene description file ready for the Radiance rendering package. The program is called archicad2rad and runs on the Universities main UNIX machines located in the Computer Centre (although the local personal computers in the School of Architecture act as terminals to these UNIX machines over the campus ethernet network). The program has one required argument which is the RIB file exported from ArchiCAD, it writes the Radiance scene description (header, lighting, materials, and geometry) to STDOUT, this would normally be piped to a file or to some other process in the normal UNIX manner. There are three switches which will determine what data is exported, they are l (light sources), m (materials), and g (geometry). Thus the most common method of calling the translator from UNIX would be archicad2rad -l -m -g myribfilename > myradiancefilenameThis would output lights, materials, and geometry. If the model was modified in ArchiCAD then the next time it was converted only the geometry may need to be created, this would be done with archicad2rad -g myribfilename > myradiancefilenameA major design aim for the translator was that this file can be rendered without modification and can thus be used by relatively novice Radiance and/or UNIX users. The Radiance scene description file created by this translator contains the following major sections:
The materials correspond by name and, where possible, to the type of the material specified within ArchiCAD. Thus an ArchiCAD material name is used as the Radiance material name except that all white characters (spaces, commas, etc) and stripped out to ensure a legal Radiance material name. This material name conversion is of vital importance, it allows the user to modify the material descriptions without editing the geometry. The translator will attempt to create an appropriate material type by looking for Radiance material type keywords within the ArchiCAD material name. For example, the ArchiCAD material name "green glass" will have a Radiance material type "glass", "copper plate" will become a "metal" material type. The translator knows about the following material types.
If the following keywords are found within the ArchiCAD material name the Radiance material type will be "metal"
The translator will set some of the material parameters automatically. The colour of the material is maintained from the colour used within ArchiCAD. Also various keywords will affect the specular and roughness characteristics of "metals", "plastics" and "trans" material types. These keywords are
The first four affect the specularity, the last two affect the roughness of the appropriate materials. So, for example, if one creates a material in ArchiCAD called "shiny aluminium" or "iron, dull smooth" then sensible initial material types and characteristics will be created for the Radiance material description. Of course these would only be very approximate settings and the user would be expected to modify the exact material description for final renderings. Note that materials could include the material type keywords "light", "illum" or "spotlight" and would therefore become the appropriate light sources for Radiance. For spotlights the user will need to specify the direction vector, by default it is pointing down (0,0,-1).
Technical informationThis translator was originally written for version 4.2 of ArchiCAD but the RIB export was significantly changed in version 4.5. This translator was modified for the new RIB format and currently supports both formats. There is no guarantee that it will work correctly with future versions of ArchiCAD.
The translator knows about the following RIB data types, these are the only primitives used at the date of writing for version 4.12 and 4.55 of ArchiCAD.
Other information is acquired by looking at the following RIB comments or key words.
Objects created with the GDL language end up with undescriptive material names. They are called gdl_materialn where n is a number from 1 upward. Their colour is still maintained and that may be used to identify the material. Occasionally polygons with zero area are generated by ArchiCAD, these are also translated into the Radiance file. They will cause warning messages in Radiance but no other problem. They can be manually deleted from the Radiance scene file if necessary. The "Construct Group Heirarchy" setting on output must be set to materials. An example of the rib export dialog A 3D window must be the foremost window for 3D export!
Example:The following image illustrates the highest quality rendering that can be created within ArchiCAD. It is essentially PHONG shading with shadows, transparency, and antialiasing.
The second image is a rendering in Radiance of the scene directly from the translator without the addition of lights or any material modification by the user. As can be seen this is a major improvement over the ArchiCAD version and it can easily be improved with the modification of materials and lighting conditions.
The material list created directly from the translator follows, it shows the automatic generation of material types, names, and parameters. void metal stainlesssteel 0 0 5 0.840208 0.831708 0.848692 0.9 0.05 void plastic plasterrough 0 0 5 0.585519 0.576745 0.518761 0.05 0.1 void metal smoothshinycopper 0 0 5 0.421607 0.459159 0.0926833 1 0 void dielectric clear_dielectric 0 0 5 0.880751 0.959136 0.877089 1.5 0 void plastic redbrick 0 0 5 0.878294 0.398199 0.109468 0.05 0.05 void plastic walnut 0 0 5 0.433326 0.166827 0.0618448 0.05 0.05 void plastic slate 0 0 5 0.518257 0.518257 0.518257 0.05 0.05 void plastic plastersmooth 0 0 5 0.64802 0.638315 0.574136 0.05 0 Radiance scene file example The following shows the structure of a Radiance scene file generated by the translator. # -------------------------------------------------------------- # Archicad2rad output (From ArchiCAD to Radiance converter) # Creator: ArchiCAD 4.0 # Image size: -x 600 -y 600 # Distant light from 0 0 0 # to 0 0 1 # Ambient light: -av 0.2 0.2 0.2 # Distant light from 0 0 0 # to 0.316227 0.316227 -0.894428 # -------------------------------------------------------------- # An example sky void glow dim 0 0 4 0.35 0.4 0.55 0 dim source sky 0 0 4 0 0 1 360 # -------------------------------------------------------------- # An example sun void light solar 0 0 3 800 800 800 solar source sun 0 0 4 0 0 1 5 # -------------------------------------------------------------- # An example moon void light lunar 0 0 3 200 200 200 lunar source moon 0 0 4 1 1 1 5 # -------------------------------------------------------------- # An example light source #void illum lighting #0 #0 #3 1000 1000 1000 #lighting sphere bulb #0 #0 #4 x y z 0.03 # -------------------------------------------------------------- # The model bounds # -55.5729 < x < 114.838 # -114.786 < y < 55.6241 # -19.8846 < z < 97.8431 # -------------------------------------------------------------- # Material definitions (12 of them) The materials would normally appear here
StrataStudio to Radiance ConverterNote: Also seem to work for DXF files from Infini-DWritten by Paul BourkeExamples, technical advice, and testing by Alex Plummer and Matiu Carr June 1993
The rendering techniques provided by StrataStudio are very good and suitable for many applications but the realism possible is quite limited. Radiance is another rendering program, it is free (public domain) and has big advantages for architectural rendering. Most of these advantages are a consequence of its radiosity/raytracing approach which uses a much better lighting model than the conventional raytracing offered by StrataStudio, this is especially so for interior scenes. Radiance also has the capability of doing quantitative lighting analysis including daylighting analysis. In order to use Radiance with the StrataStudio package we have written a translator that takes a DXF file as output from StrataStudio and creates a Radiance scene description file ready for the Radiance rendering package. The program is called strata2rad and runs on the Universities main UNIX machines located in the Computer Centre (although the local personal computers in the School of Architecture act as terminals to these UNIX machines over the campus ethernet network). The program has one required argument which is the DXF file exported from StrataStudio, it writes the Radiance scene description (header, lighting, materials, and geometry) to STDOUT, this would normally be piped to a file or to some other process in the normal UNIX manner. There are three switches which will determine what data is exported, they are l (light sources), m (materials), and g (geometry). Thus the most common method of calling the translator from UNIX would be strata2rad -l -m -g mydxffilename > myradiancefilename This would output lights, materials, and geometry. If the model was later modified in StrataStudio then the next time it was converted only the geometry may need to be created, this would be done with strata2rad -g mydxffilename > myradiancefilename A major design aim for the translator was that this file can be rendered without modification and thus a relatively novice Radiance user can easily get good initial results. The Radiance scene description file created by this translator contains the following major sections
The StrataStudio part names are used as the Radiance material names except that all white characters (spaces, commas, etc) and stripped out to ensure a legal Radiance material name. This material name conversion is of vital importance, it allows the user to later modify the material descriptions without editing the geometry. Note that if parts were not initially used when creating a model it is a simple matter to select pieces of the model and turn them into named parts. Any geometry which is not a part will have a material corresponding to the StrataStudio file name. Keywords in the StrataStudio part name are used to specify material types for Radiance. The translator will attempt to create an appropriate material type by looking for Radiance material type keywords within the StrataStudio part name. For example, the StrataStudio part name "green glass table top" will have a Radiance material type "glass", "mirror plate" will become a "mirror" material type. The translator knows about the following material type keywords. metal illum dielectric glass light trans plastic glow mirror spotlight interface If the following keywords are found within the ArchiCAD material name the Radiance material type will be "metal". So for example the part name "copper panel" will have a Radiance "metal" material. iron copper steel brass bronze gold platinum lead aluminium titanium silver zinc All unrecognised material types will be defined as a Radiance "plastic" material. The translator know about the following colours, if these keywords are not included in the part name, a 50% grey is used. red green blue cyan magenta yellow black white grey brick pink maroon brown orange gold turquoise indigo purple violet The translator will set some of the other material parameters automatically. Also various keywords will affect the specular and roughness characteristics of "metals", "plastics" and "trans" material types. These keywords are dull shiny matte glossy smooth rough The first four affect the specularity, the last two affect the roughness of the appropriate materials. So, for example, if one creates a material in StrataStudio called "shiny aluminium" or "iron, dull smooth" then sensible initial material types and characteristics will be created for the Radiance material description. Of course these would only be very approximate settings and the user would be expected to modify the exact material description for final renderings. Note that materials could include the material type keywords "light", "illum" or "spotlight" and would therefore become the appropriate light sources for Radiance. For spotlights the user will need to specify the direction vector, by default it is pointing down (0,0,-1). Technical informationStrataStudio only uses the 3DFACE primitive in its DXF file export. Most of these polygons will have three vertices although 4 vertex polygons will be created if the vertices are coplanar. The part name is available as the material because StrataStudio puts the part name as the layer control code (8) in its DXF export. StrataStudio is the upgrade product to StrataVision. The StrataVision product was not suitable for translation to Radiance because it did not export the part names. StrataVision models may be converted into Radiance models by first importing them into StrataStudio. Known problems and restrictionsAll restrictions arise from the small amount of data exported to DXF via StrataStudio. Ideally one would like the material names not the part names to be exported in which case the Radiance material names might correspond to the StrataStudio material names. This translator assumes that the model in StrataStudio has been created using metric units. This is a restriction which arises from StrataStudio's conversion (bug) of all units into inches when exporting to DXF. Example:The following model was created in StrataStudio as an example of the translation process. StrataStudio is capable of much better rendering but it was not shown here because only the bare geometry is translated into Radiance. The following image is the rendering of the above after translating the model through the Strata2Rad program. This is the result directly from the translator except for the approximate matching of the camera position and view direction. This rendering just uses the default material definitions, improvements to the rendering can now be made by designing the material definitions and lighting characteristics. The material list created directly from the translator for the above model follows, it shows the automatic generation of material types, names, and parameters. void metal matte_lead_slab 0 0 5 0.5 0.5 0.5 0.8 0.05 void metal iron_roof 0 0 5 0.5 0.5 0.5 0.9 0.05 void plastic rough_grey_column 0 0 5 0.75 0.75 0.75 0.05 0.1 void plastic shiny_brown_bondbeam 0 0 5 0.5 0.16 0.16 0.1 0.05 void plastic shiny_brown_beam 0 0 5 0.5 0.16 0.16 0.1 0.05 void plastic shiny_brown_cornice 0 0 5 0.5 0.16 0.16 0.1 0.05Radiance scene file template The following shows the structure of a Radiance scene file generated by the translator. # -------------------------------------------------------------- # Strata2rad output (From StrataStudio to Radiance converter) # -------------------------------------------------------------- # The model bounds # -55.5729 < x < 114.838 # -114.786 < y < 55.6241 # -19.8846 < z < 97.8431 # -------------------------------------------------------------- # An example sky void glow dim 0 0 4 0.35 0.4 0.55 0 dim source sky 0 0 4 0 0 1 360 # -------------------------------------------------------------- # An example sun void light solar 0 0 3 800 800 800 solar source sun 0 0 4 0 0 1 5 # -------------------------------------------------------------- # An example moon void light lunar 0 0 3 200 200 200 lunar source moon 0 0 4 1 1 1 5 # -------------------------------------------------------------- # An example light source #void illum lighting #0 #0 #3 1000 1000 1000 #lighting sphere bulb #0 #0 #4 x y z 0.03 # -------------------------------------------------------------- # Material definitions (8 of them) The materials would normally appear here # -------------------------------------------------------------- # The Geometry The geometry would normally appear here # -------------------------------------------------------------- # The end
Alias Upfront to Radiance Translator(one page manual)Written by Paul BourkeMay 1992 Description
"Upfront -> Radiance" translator provides a means of converting Alias Upfront models into a scene description format suitable for the Radiance rendering package. Instructions
To use this translator
The Radiance scene description file will have the same name as the exported Architrion text file with the extension ".rad". Note: this is not a general Architrion translator, it only copes with the block entities created by Alias Upfront. Radiance file format
The resulting Radiance scene description will have the same coordinate system as the original Upfront model. The file will contain:
Restrictions
|