no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | exporting_objects_to_3d [2014/10/06 04:55] – debashree | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | =====Exporting objects to 3D===== | ||
+ | To export as a 3D file, | ||
+ | |||
+ | - In the **File** menu, select **Export to various 3D formats** | ||
+ | - In the **Export as a VRML 2 file** box, select the file type you want to export as. | ||
+ | - Assign a name to the file and click **Save** | ||
+ | |||
+ | Note: | ||
+ | |||
+ | When you export to VRML 2.0, the camera is set as per the location and lookat objects. Moreover, it is possible to incorporate VRML materials directly into TAD when exporting to VRML 2.0. | ||
+ | |||
+ | In order to get materials in the exported VRML file, first you should understand the syntax of a special materials file used by TAD | ||
+ | |||
+ | This file is called tad.mat and it should be kept in a sub-directory " | ||
+ | |||
+ | tad.mat should have lines of the following type | ||
+ | |||
+ | m(MaterialNameStr, | ||
+ | |||
+ | The ListOfMaterialProperties should be within square brackets and it should contain the following (all are optional, non-repetitive): | ||
+ | |||
+ | transparency(number) | ||
+ | specularColor(number, | ||
+ | shininess(number) | ||
+ | emissiveColor(number, | ||
+ | diffuseColor(number, | ||
+ | ambientIntensity(number) | ||
+ | imageTexture(string) | ||
+ | textureScale( number, | ||
+ | |||
+ | In the above, all properties dealing with Color (e.g. emmisiveColor(...)) takes three numeric values: First one is for Red, second is for Green and third is for Blue. The imageTexture(...) is a filename (JPG or GIF or PNG) which forms the texture of the surface being rendered. textureScale(...) tells how the imageTexture gets scaled in the x and y direction on the surface. | ||
+ | |||
+ | You can edit the tad.mat file which is present in the system folder of TAD, from within the Settings dialog (File | Settings) | ||
+ | |||
+ | An example of tad.mat is as follows: | ||
+ | |||
+ | m(" | ||
+ | m(" | ||
+ | m(" | ||
+ | m(" | ||
+ | |||
+ | You may wonder where the vlf(...) properties came from. Well that is meant for export to VirtuaLight and not for VRML. You will read about it when we examine export to VirtuaLight. | ||
+ | |||
+ | Okay, now the materials are defined. What next? | ||
+ | |||
+ | In order to place the materials on an object in the exported VRML 2 file, that object should be enriched with the following attribute " | ||
+ | |||
+ | Go to its class; right click for the menu, select Edit Ardela and give the following attribute in the inheritable portion of the Ardela editing dialog. Then confirm the editing and close it. | ||
+ | |||
+ | vrmlmtl(@," | ||
+ | |||
+ | All objects of that class (and sub-classes underneath it) will now be dressed up with marble. If you do not want that behavior, instead of placing vrmlmtl(...) in the object' | ||
+ | |||
+ | Make sure that you use that material which was specifically meant for VRML 2. If you use the default tad.mat file, you cannot use " | ||
+ | |||
+ | B) Export to Virtualight | ||
+ | You can setup tad.mat with two material properties that is specifically meant for VirtuaLight in the tad.mat file. One is vlf(...) and the other is vl(...) | ||
+ | |||
+ | vlf(filename) specifies an external filename which contains all the shading instructions that VirtuaLight recognizes. Consult VirtuaLight documentation for that. Specify the filename properly. If it contains backslashes, | ||
+ | |||
+ | m(" | ||
+ | |||
+ | If you use vl(string), then the shading instructions are placed directly within vl(...) (put within quotation marks) | ||
+ | |||
+ | In order to place the materials on an object in the exported Virtualight file, do the same as what was done for VRML except that the Ardela attribute to be added is | ||
+ | |||
+ | vlmtl(@," | ||
+ | |||
+ | (substitute materialname with whatever that was defined for the Virtualight materials in tad.mat file) | ||
+ | |||
+ | C) Export to Renderman | ||
+ | Renderman has only one material property that can be placed in the tad.mat file. That is rmf(...) | ||
+ | |||
+ | rmf(filename) | ||
+ | |||
+ | Its behaviour is same as that of vlf(...) for Virtualight. | ||
+ | |||
+ | In order to place the materials on an object in the exported Renderman file, do the same as what was done for VRML except that the Ardela attribute to be added is | ||
+ | |||
+ | rmmtl(@," | ||
+ | |||
+ | (substitute materialname with whatever that was defined for the Renderman materials in tad.mat file) |
Press F1 inside the application to read context-sensitive help directly in the application itself
← ∈
Last modified: le 2023/04/22 20:59