One of the most vital parts of the Xfrog workflow probably is getting the finished model into your favourite 3D Application. For that purpose Xfrog has a wide variety of Export Filters, which should enable you to get the model into almost every 3D application on the market. As always there are lots of possible pitfalls connected to exchanging 3D data between different packages and this guidline is meant to help you understanding the nature of the exported file formats, their up- and downsides, problems with reading certain formats into certain applications and of course possible workarounds.

This guideline is separated into several sections. The first section describes the file formats Xfrog exports with all their up and downsides, the second section contains descriptions about how to get your model into application XY best. Furthermore there are sections giving general information about Xfrog Plugins and how they differ from using file exporters as well as a section explaining details about common pitfalls that you may come across with several file formats and how to deal with them.



top




This section describes all file formats that can be written by Xfrog, what parts of the Xfrog model are written to these files and what restrictions a particular file format may have that affect the use with Xfrog.

1.1 rayshade (.shade)

-

1.2 wavefront (.obj)

This format is very widespread, files tend to grow very large due to its ASCII encoding. Additioanl .mtl or .col files are created for the Materials which should carry over fairly well when your appplication supports one of those.



1.3 autocad (.dxf)

DXF is a rather inferior file format, but it has been used in CAD for a very long time now and is widely supported. Due to the ASCII encoding .dxf files tend to grow very large. dxf Files do not contain any more informations than just a list of the triangles. No texture coordinates, smoothed normals or surfacing informations can be represented in this file. Due to its wide support it might serve you well as a last resort when everything else fails.

1.4 renderman (.rib)

RenderMan is special in this collection of file formats because it is not meant to be read into a 3D Application. Rather one should reference this model from your scene (your RenderMan Frontend should be able to handle this, for example through a RIBBox in MTOR) for the renderer to use it at Rendering time. You'll also have to do some preprocessing with textures and shaders which depends on your Renderer to get this to work. Have a look at this tutorial for more details.



Reverse Normal Orientation is here to account for the difference between left handed and right handed coordinate systems. RenderMan Renderers can take data in both, left handed and right handed coordinate systems so usually RenderMan Frontends like MTOR, MayaMax, MaxMan or LightMan switch the Renderer to the orientation their parent Application uses. The RenderMan default is a left handed coordinate system. This is also default for the models Xfrog exports. When you want to use the models in connection with an 3D Application like 3D Studio MAX or Maya which use a right handed coordinate system you have to check this, otherwise the normal will point in the wrong direction and your objects may turn dark or you get weird shading artifacts.

Invert Texture T-Coord should be self explanatory. You'll not have to change this usually.

Optimize is an experimental option. With this box checked the Exporter will try to merge adjacent triangles into bilinear patches. Many RenderMan compliant Renderers work much better with bilinear patches than with triangles.

Create RenderMan Shaders will automatically create RenderMan Shaders creating a surface appearance similar to the settings in Xfrog.

Binary RIB will create a binary instead of the normal ASCII .rib flavour. ASCII is more or less human readable, binary is more similar of the organization of the data in memory. While ASCII files are easy to read, write and manipulate (you can even edit them by hand with a text editor) they tend to grow extremly large and can take a while to read into your 3D application. Binary files are usually much smaller and are read faster but they cannot as easily be edited by hand (which will probably not really be an issue, though) and may have implied limits on polygon/point count which is usually not the case with ASCII encoded files, since binary files use a fixed number of bytes to store references to points/polygons.

1.5 lightwave 6.5 (.lwo)

The LightWave file export uses the file format established with LightWave 6.5 and later, earlier versions of LightWave and other applications only supporting older flavours of the LightWave format will not read the LightWave files generated by Xfrog. All geometry, texture coordinate and surfacing informations get exported. No hand tweaking of the model will be necessary as long as the reading application can interpret all the information in that file.

The file format is binary, file size is pretty small. There is a limit of 1.6 million points/polygons per layer. Since the 1.6 Million point/polygon limit applies per layer, you can push this limit when using the 'Create Multiple Layers' Option. Then each Component can have up to 1.6 Million points/polygons.



Y-Up will flip the y and z axis, because the up-direction is z in Xfrog and y in LightWave.

Use Texture Alpha Channel can be switched off so that the alpha channel of the texture images is not applied to the transparency channel. This can be used in combination with MultiLayer output when you want to use Clip Maps instead of a Transparency Map. This is substantially faster to render, but can only be established by hand since the Clip Map is part of the Scene File. For more information on Clip mapping, see here.

Apply Bump Map applies the texture image to the bump channel.

Create Multiple Layers creates a new Layer for each component instead of putting the whole model into a single layer.

1.6 3d studio r4 (.3ds)

3DS is supported by a large number of 3D applications and the files are usually small, but it has a few drawbacks:

First all texture names are restricted to the old DOS 8.3 naming conventions, so long texture file names may be truncated on export (Xfrog issues a warning when any texture filenames have been truncated). If you are going for a 3ds Export try to stick with 8 characters name and 3 characters extension for texture filenames.

Alpha Transparency will not get exported, since the file format does not allow the transparency channel to look up the transparency from the alpha channel of a texture image.

Only one texture coordinate is allowed per vertex. This leads to problems at the seam where cylindrical components (like Horn components) fold back on themselves. For a more detailed discussion of this problem have a look here.

The 3DS File Format has an limit of 65,000 points/polygons per object. Since this limit is so small Xfrog always puts each component into a new Object and splits up components into more than one object if necessary. This splitting may result in seams in the interpolated normals similar to those created in the case of discontinous normals described here where the object has been split. To resolve this you'll have to manually merge objects that belong to the same component.



Scale Object activates (and let's you specify) a factor by which the object is scaled when exporting. This is here because 3D Studio has a very different scale than Xfrog and other applications might expect .3ds files to be in a different scale and account for that.

1.7 vrml 1.0 (.wrl)

-

top




2.1 maya

[OBJ] Maya reads Wavefront OBJ files

[PlugIn] Also consider using the free Xfrog Maya PlugIn to read Xfrog Models right from within Maya. This also supports animation!

2.2 3ds max

[3DS] The best bet to get your models into 3D Studio MAX is the 3DS Export To get a really clean model you'll have to add the source directory with the textures to your texture searchpath (or copy the textures to a different directory which is already in your searchpath), weld coincident vertices and apply the alpha channels of the texture images to the transparency channel. You may also have to manually adjust texture names, since they might have been truncated.

There's a MAXScript available which does a few of those steps for you automatically. Grab this file [ TweakFrog.mse ] and save it to your MaxScript Folder.

This Script will account for the seam problem outlined here and will automatically apply the alpha channel of texture images to the transparency channel of your materials.

It will not attempt to correct truncated texture names and to merge objects that originally belonged to the same component. To make the Script work as expected you'll have to correct texture names by hand if they have been truncated before you run the Script, otherwise the Script won't be able to find the textures to check whether they contain alpha or not.


To use the Script:
  1. Go to the Utility Panel of 3DS MAX and open the Maxscript-Dropdown (just click on the "Maxscript" button)
  2. In the Maxscript dropdown, click on the "Run Script" button and browse to the place where you saved the Script File. The TweakFrog script is now loaded and can be accessed through the "Utilities" dropdown beneath the "Run Script" button
  3. Choose the Script from the dropdown list and it shows up as an additional dropdown beneath the "Close" button
  4. Be sure that you have selected the whole imported mesh prior to start the Script (imported meshes are selected by default)
  5. Choose whether you want TweakFrog to use welding or not. If you check "weld", you also can specify a welding Threshold (if vertices are at this or a smaller distance to each other they are merged to one)
  6. When you are finished, just press "Tweak iT" and the script begins to wrangle the meshes
  7. After completion there will be a message box telling you that the Script is finished (welding can take quite a while depending on your machine)
This Script has been contributed by Jan Häusle (www.freelance3d.de). If you find bugs or have comments or questions, feel free to drop him a mail.

[OBJ] 3D Studio MAX also reads Wavefront OBJ files.

[PlugIn] Also consider using the free Xfrog 3ds max PlugIn to read Xfrog Models with Animation right from within MAX!

2.3 lightwave 3d

[LWO] LightWave 6.5 and higher will read the LightWave files created by Xfrog without problems, all surfacing texture and geometry informations will be there. Make sure the textures are in LightWave's Content directory, otherwise they cannot be found by LightWave. You can do this by either copying the Xfrog model with textures into your current Content directory or by setting LightWaves Content directory to the directory the Xfrog Object and Textures are stored (the latter will only work for a single Xfrog Object).

[3DS] Older versions of LightWave (before 6.0) will have trouble reading the LightWave files exported by Xfrog and you may want to try importing the .3ds files. Be aware that LightWave prior to 6.0 was not able to handle UV Texture Coordinates which are used for texture projection in Xfrog Models.

[OBJ] Wavefront OBJ also works for LightWave but it requires quite a bit of hand work. At first you'll have to rotate the tree by 90 degree around the X-Axis to get it upright. There are basic surfaces applied, but you'll have to adjust the surfaces to use the textures the original model used within Xfrog. Texture UV's get imported, too, so you can use those for texture projection. More information about the Wavefront OBJ format is here

[Hint] You may also be able to speed up rendering of the Xfrog models significantly by using LightWave's Clip Maps instead of surface transparency. This requires some hand-tweaking, though. With lwo export for example exporting without the texture alpha channel applied to the transparency channel of the Surfaces and with the model split up into multiple layers, you can apply the alpha channel as clip maps when you set up the scene. More Information about that can be found here

[PlugIn] Also consider using the free Xfrog LightWave Object Replacement PlugIn to read Xfrog Models right from within LightWave. This also supports animation and automatic surface replacement.

2.3.1 clip mapping

In LightWave there are two ways of using the texture alpha channel to cut out leaf shapes. The Alpha Channel can be applied as Transparency to the Surface of the Object, or Objects can have a 'Clip Map' applied.

Xfrog's LightWave file format exporter does the former by default, basically because Clip Maps are an Object Property applied at Scene Setup and thus cannot be stored in the Object Files.

Using Clip Maps needs a little setup time and can't be used with the PlugIn (and thus with animation). These drawbacks may be worth it, though, as Clip Maps render significantly faster than surfaces with Transparency Channel.









To get files that make the Clip Map setup easy, make sure you use LightWave Export Settings as shown to the left. Use Texture Alpha Channel is disabled so that no Transparency Channels are applied to the Surfaces. Create Multiple Layers needs to be checked as Clip Maps are applied per Object Layer, not per Surface.

Make sure you remember which Components have Alpha Textures applied!

The next step is to start up LightWave and load the Xfrog model.

Bring up the Image Editor and do Clone->Instance for every Texture Image containing Alpha. For all the newly created Clones choose Alpha Channel->Alpha Only like shown on the second screenshot on the left.

Leave the Image Editor, and activate the first Object Layer containing Alpha Textures. Bring up the Item Properties Panel, go to the Rendering Tab and click on the Clip Map Texture Button.

On the Clip Map Texture Panel choose Image Map as Layer type, UV as projection type, choose the Xfrog Texture channel (usually named 'texuv') as UVMap and select the appropriate of the newly generated Alpha Images. Don't forget to check Invert Layer to make the black parts being cut away instead of the white parts (this is for LightWave 7, there were prior versions handling this the opposite way).

After having done these steps for every Layer you want to apply the Clip Map to, you're done.


2.4 cinema 4d

[LWO] The best bet to get your data into Cinema is to use .lwo to have your data read into Cinema. You'll have to apply alpha transparency by hand and you may encounter problems with Polygon/Point count. This is not actually due to a limitation in the lwo file format, but due to a bug in Cinema's lwo import in Cinema versions 7.303 and lower which crashes when a layer (or the whole object for non-multilayer lwo) contains more than 65,000 points. You can push this limit by exporting Multi-Layer lwo. When you do this the 65,000 points/polygons limit applys to each component, not to the whole model.

[3DS] You can also use the 3DS Import, this just has some restictions implied in the .3ds file Specification. And will require application of the transparency channel by hand.

[OBJ] Cinema also reads Wavefront OBJ files.

[PlugIn] Also consider using the free Xfrog Cinema 4D Object Generator PlugIn to read Xfrog Models right from within Cinema 4D. This also supports animation!

top




Xfrog PlugIns are an alternative way of getting your Xfrog Objects into several 3D Applications. They lift a few restrictions imposed on export through common 3D File formats. A Xfrog PlugIn does not replace Xfrog as an editor - it only creates a Model inside your Application from an existing .xfr file. Plugins do not provide any modeling capability.

The biggest upside is probably that all PlugIns create Models and Materials/Surfaces inside your Application which do not need any further work by hand. Also Xfrog's animation which is rather tough to get into apllications via file formats is automatically translated.

If you want to manipulate your model on point/polygon level by hand, a PlugIn is probably not the way to go, since the Object get's regenerated every time and your changes would be lost. Changing the Material is possibble, though.

Be aware that the Xfrog model is not stored with the scene. The PlugIns only store a reference to the Xfrog file. Any later changes to the Xfrog Model will be reflected in the Scene. This can be positive (when you just optimized some settings) but it can also cause problems for example when you change component Names in the Xfrog file. Also the Xfrog Plugins will fail when the .xfr file is no longer available for some reason (path has changed, the model has been moved to a different location, a network drive is not available, etc.)

3.1 maya plugin

The Maya Plugin for Maya 4.0 and 4.5 is available here.

3.2 3ds max 4 & 5









The Xfrog Plugin for 3ds max is a combination of a Procedural Object and an Importer PlugIn, it will work with 3ds max 4.2 and higher and can be obtained from here.

To read an Xfrog Model into 3ds max, select Import from the File Menu. In the File Selector that comes up next, select Xfrog (*.XFR) as Filetype and choose the .xfr File to Import.

After Import the model should show up in your Viewports fully textured. The Importer inserts a Procedural Object which reads the data from the file you indicated and creates the geometry inside 3ds max. It also creates a Multi Sub Material containing the original surfacing information from the Xfrog File. The Material can be freely edited by you once it has been created.

To bring up the Objects' Options Panel (see image to the bottom left) Select the Modify Tab while the Object is selected.

At the top the Name of the Source File is given. It can not be modified any more, if you want to choose a different Source File you'll have to use the Importer again.

Animation Length will change the time scale of the animation defined in the Xfrog File. By default the animation length defined in the Xfrog file will be used, you can also choose to Scale To Fit the length of the current animation in 3ds max, to explicitly set a Start Time and End Time and to Ignore Animation. If your file doesn't have animation, you should select 'Ignore', since this will prevent the PlugIn from reevaluating the Geometry for each frame when you move the Time Slider.

Animation Playback lets you chosse whether the Animation is played back as a Loop, Swinging back and forth or just Once.

Viewport Quality and Render Quality let you set the level of detail in which the Objects are evaluated for Rendering and Viewports.

Also see the General Information on Plugins.

3.3 3ds max 6

The Xfrog Plugin for 3ds max 6 is a pure Import Plugin and reads Xfrog Models in XFR format into a Mesh Object with all Texture Coordinates and Material Assignements intact. Animation is not supported at the moment.

The Plugin is available for free download here. To install the Plugin just copy the file xfrog.dli from the downloaded archive into your 3dsmax/plugins directory.

To read an Xfrog Model into 3ds max, select Import from the File Menu. In the File Selector that comes up next, select Xfrog (*.XFR) as file type and choose the Xfrog file to Import. After Import the model should show up in your Viewports fully textured.


3.4 lightwave plugin

The Xfrog Plugin for LightWave is an Object Replacement PlugIn and will work for any version of LightWave starting with 6.5b. It can be obtained from here.

Copy the file xfrog.p from the Plugin Directory into the Plugins/Animate directory in your LightWave path. To add the Plugin choose Plug-ins -> Add Plug-ins from the Layout menu and point Lightwave to the xfrog.p file you just copied. LightWave should then let you know whether the Plugin was successfully added. For further information on adding Plugins please refer to your LightWave manual.


To add a Xfrog model to the scene, add a Null Object to the Scene and open the Item Properties Panel. On the Panel choose the Xfrog_3.5 Plugin from the Object Replacement Dropdown.

The Plugin Options are available through the Options Button right to the Dropdown Menu.

Xfrog File opens a file selector Dialog for you to select a Xfrog File to load.

Animation will change the time scale of the animation defined in the Xfrog File. By default the animation length defined in the Xfrog file will be used, you can also choose to scale the Xfrog Animation to fit the length of the current animation in LightWave, to explicitly set a Start Frame and End Frame and to Ignore Animation. If your file doesn't have animation, you should select Ignore, since this will prevent the PlugIn from reevaluating the Geometry for each frame.


Animation Playback lets you choose between different ways of playing back the Xfrog animation inside LightWave.

Preview Resolution and Render Resolution let you set the level of detail in which the Objects are evaluated for Rendering and Preview.

Replace Xfrog Surface let's you choose a surface from the Xfrog file after an Xfrog file is loaded to replace with a LightWave Surface file. These Surface files can be generated by selecting 'Save' on the LightWave Surface Editor Panel.

Make sure the textures are in LightWave's Content directory, otherwise they cannot be found by the Plugin. You can do this by either copying the Xfrog model with textures into your current Content directory or by setting LightWaves Content directory to the directory the Xfrog Object and Textures are stored (the latter will only work for a single Xfrog Object). This is very important as the PlugIn will check the textures for an alpha channel through Lightwave and not apply transparancy to alpha mapped objects when the textures can't be found.

Also see the General Information on Plugins.

More Information about Newtek's LightWave 3D and other Software can be found here.

3.5 cinema 4d r7 plugin

The Xfrog Plugin for Cinema 4D is a combination of an Object GeneratorPlugin and an Importer PlugIn, it will work with Cinema 4D 7.303 and can be obtained from here.







To read a Xfrog Model into Cinema, select Open or Merge from the File Menu. In the File Selector that comes up next choose the XFR File to Import and hit Open.

If the textures belonging to the .xfr Object are not in Cinema's Texture Searchpaths, the Importer will ask you whether it should copy all textures to the document directory. This makes sure textures are found by Cinema, but this will also scatter around Textures on your harddrive multiple times. Generally it's a better idea to set a texture searchpath (Edit/Program-Preferences) in which all the Xfrog related textures can be found. Cinema always looks into all directories below a searchpath entry, so adding the directory where all your models are stored is the best to do.

After Import the model should show up in your Viewports fully textured. The Importer inserts a Procedural Object which reads the data from the file you indicated and creates the geometry inside Cinema. The Importer also creates a Materials containing the original surfacing information from the Xfrog File. The Materials can be freely edited by you once they have been created.


To bring up the Objects' Options Panel (see image to the left) double-click on the Xfrog Symbol in the Object Manager.

At the top the Name of the Source File is given. It can not be modified any more, if you want to choose a different Source File you'll have to use the Importer again.


Animation Length will change the time scale of the animation defined in the Xfrog File. By default the animation length defined in the Xfrog file will be used, you can also choose to Scale To Fit the length of the current animation in Cinema, to explicitly set a Start Time and End Time and to Ignore Animation. If your file doesn't have animation, you should select Ignore, since this will prevent the PlugIn from reevaluating the Geometry for each frame when you move the Time Slider.

Animation Playback lets you chosse whether the Animation is played back as a Loop, Swinging back and forth or just Once.

The Plugin respects the Detail Level set for the Primitive to adjust the detail of the Xfrog Model. This has an effect similar to moving the 'Polys' Slider on the bottom of the Xfrog window.

Especially for still images you may want the Texture Filtering for the created Materials to be Circle instead of MIP and if you are using Premultiplied Alpha Textures this has to be set in the Materials dialog, too. These two things can automatically done at import time through the Xfrog Import Options available through File->Import/Export Settings->Xfrog.

Also see the General Information on Plugins.

More Information about MAXON's Cinema 4D and other Software can be found here.

3.6 cinema 4d r8 plugin

The Xfrog Plugin for Cinema 4D R8 is a combination of an Object GeneratorPlugin and an Importer PlugIn, it will work with Cinema 4D 8.0, makes use of the improved user interface functionality of R8 and can be obtained from here.

All Options work analogous to the plugin for cinema 4d r7.

top




4.1 seams on cylindrical objects (e.g. horn)



Above you see a screenshot of an open Horn Component which is used here to illustrate a problem that might arise with every component/primitve combination which has a cylindrical base shape.


To the left you see the texture that has been put on the horn component above. When comparing those two images you will notice that there is a seam on the back side of the horn where the left and the right side of the texture meet. Basically this means that the vertices along this seams in fact don't have one texture coordinate applied, but two (one for the left side of the texture, one for the right). Most newer Applications can handle this kind of seam internally but since many commonly supported data exchange formats are rather old, some of them can't store a second texture coordinate at certain vertices.

This seam is handled a little differently depending on what a file format can store. The best solution is a file format that can store the second texture coordinate. Sadly this is only the case for the LightWave file format.





For export with other file formats the vertices at the seam get split up into two vertices with the same position, but different texture coordinates. This is the only way to keep texture coordinates intact, but it has its downsides.

It always leads to more data than necessary, since for each original vertex two vertices are stored.

Probably the bigger problem is that most 3D File Formats and Applications don't support interpolated normals stored with the vertices. They compute their own smoothed normals based on some flatness criterion. In most applications a smoothed normal is generated when two or more Polygons share a vertex and the angle between those polygons is below some threshold. At the seam where vertices are split up to leave the texture coordinates intact the vertex sharing criterion is no longer met and no interpolated normal is created. This will leave a visible seam. You can easily notice this effect in the picture on the right, which has been created by exporting the model on the left to 3ds format and reading it into MAX.

Since the inability to store more than one texture coordinate per vertex is in most cases a restriction of the file format and not the reading application, welding all coincident vertices after import will solve this problem. 3DS MAX for example can take more than one texture coordinate per vertex while the 3DS File format cannot. Welding coincident vertices inside MAX will solve the problem. This also works for most other applications.

These problems will never occur if you use the Xfrog PlugIns.

top