CeX3D Converter can do:
It is available for:
It is a standalone command line utility which can be installed so that objects can be converted with only 2 mouse clicks in Windows Explorer.
See Appendix A: Features
for details about what is supported.
This document in other formats
This document is a available in the following different file formats:
To install CeX3D Converter on your computer
you should follow the instructions given
in the one of the subsections below which
correspond to your system.
Installing on Windows
The unpacked directory also contains two example batch files which enables you to convert files with only 2 mouse clicks in Windows Explorer. These batchfiles can be installed as follows:
gzip -d CeX3DConverterCmd*_x86-linux.tar.gz tar -xvf CeX3DConverterCmd*_x86-linux.tar
cp CeXC /usr/bin
CeX3D Converter is a standalone command line utility. This means that under Windows you use it from DOS and under Linux you use it from a Unix shell.
Under Windows you can also convert files with 2 mouse clicks in Windows Explorer. However, this probably still requires that you edit a batchfile to do the conversion the way that you need it.
The following will describe the commandline options for the converter.
Basic use of CeX3D Converter
CeX3D Converter can be called with the command CeXC like this:
CeXC --to=<output format> MyObject.lwo
Where <output format> is one of:
So for instance you can type:
CeXC --to=Unreal.T3D MyObject.lwo
The default for <output format> is RIB so if you just write
CeXC MyObject.lwo
then CeX3D Converter will convert to RenderMan RIB format. You can convert several files at once by writing a command like this:
CeXC MyObject1.lwo MyObject2.Lwo MyObject3.Lwo
CeX3D Converter has many options for controlling the conversion process. The options available can be shown if you run the converter without any arguments:
CeXC
The other options will also be documented in the following sections.
Tutorial for convertering from LightWave on Windows to RenderMan on Windows
If you are converting LightWave 3D objects made on Windows into RenderMan RIB files and RenderMan shaders to be rendered with Larry Gritz's Blue Moon Rendering Tools (BMRT) on Windows, you would problably want to use a command similar to this:
CeXC --fromTextureRoot=C:\MyLWTextures\ --toTextureRoot=C:\MyBMRTTextures\ --textureExtension=TIFF MyObject.Lwo
If you are using BMRT then you would probably want to know that BMRT only supports 24bit TIFF images. So you will have to convert and rename your texture files to the appropriate 24bit TIFF files.
To render the exported files with BMRT you need to set up your BMRT paths correctly for shaders and all. You also need to compile the generated shaders with the BMRT command 'slc'. Then you can render with the BMRT command 'rendrib' - but see the BMRT documentation about these things.
Unfortunately I do not have any experience with Pixar's Photorealistic RenderMan (PRMan) on these matters.
If you need the details of why the CeXC commands looks as described above -
then they are documented after these tutorials.
Tutorial for convertering from LightWave on Windows to RenderMan on Unix
If you are converting LightWave 3D objects made on Windows where your textures are stored in 'C:\MyLWTextures\' and you want to convert into RenderMan RIB files and RenderMan shaders to be rendered with Larry Gritz's Blue Moon Rendering Tools (BMRT) on Unix where your textures are stored in '/usr/local/myBMRTTextures/', you would problably want to use a command similar to this:
CeXC --fromTextureRoot=/C/MyLWTextures/ --toTextureRoot=/usr/local/myBMRTTextures/ --toOSType=Unix --textureExtension=TIFF MyObject.Lwo
If you are converting LightWave 3D objects made on Unix where your textures are stored in '/usr/local/myLWTextures/' and you want to convert into RenderMan RIB files and RenderMan shaders to be rendered with Larry Gritz's Blue Moon Rendering Tools (BMRT) on Windows where your textures are stored in 'C:\MyLWTextures\', you would problably want to use a command similar to this if you're using CeX3D Converter for Unix:
CeXC --fromTextureRoot=\\usr\\local\\myLWTextures\\--toTextureRoot=C:\\MyLWTextures\\
--toOSType=Windows --textureExtension=TIFF MyObject.Lwo
If you're running CeX3D Converter on Windows, you should remove the double backslashes in the Windows filepaths 'C:\\MyLWTextures\\' and '\\usr\\local\\myLWTextures\\'.
You will still need to convert textures and compile RenderMan shaders
as described in the previous tutorial.
Tutorial for converting from LightWave to UnrealEd
If you are converting LightWave 3D objects into Unreal.T3D files then you would problably do something like this:
CeXC --to=Unreal.T3D --textureWidth=256 --textureHeight=256 --coordTransformsLH=rz90,ry90 MyObject.Lwo
After this is done you will want to import this correctly into the Unreal Editor. This is done with the following steps:
For more details about the Unreal Editor you should look for the
Unreal Editor documentation.
CeX3D Converter options reference
The following is a complete reference to all of CeX3D Converter's options.
Overview
Options for renaming texture filenames
To change the root directory where your texture files are placed during the conversion you can use the options '--fromTextureRoot' and '--toTextureRoot'.
The option '--fromTextureRoot' specifies the prefix of the path to be removed from the texture filenames:
--fromTextureRoot=<old texture root>
Notice that if you need to use backslashes in the texture root you must type 2 backslashes for each backslash in the filename if you're running CeX3D Converter for Unix. You should not do this if you're using CeX3D Converter for Windows.
As an example of this you could change the texture directory from 'C:\Textures\' to 'T:\' with the following:
CeXC --fromTextureRoot=C:\Textures\ --toTextureRoot=T:\ MyObject.Lwo
Again, remember to use double backslashes if you're using CeX3D Converter
for Linux.
--toTextureRoot
To change the root directory where your texture files are placed during the conversion you can use the options '--fromTextureRoot' and '--toTextureRoot'.
The option '--toTextureRoot' specifies the new texture root directory:
--toTextureRoot=<new texture root>
If you need to use backslashes in the texture root you must type 2 backslashes for each backslash in the filename when using CeX3D Converter for Unix.
As an example of this you could change the texture directory from 'C:\Textures\' to 'T:\' with the following:
CeXC --fromTextureRoot=C:\Textures\ --toTextureRoot=T:\ MyObject.Lwo
Again, remember to use double backslashes if you're using CeX3D Converter
for Linux.
--textureExtension
If you set the following option:
--textureExtension=<extension>
then all texture filenames will have their old file extension removed and the specified <extension> will be used instead. For example if you specify
--textureExtension=TIFF
and a texture is called Texture.JPEG then it
will be renamed to Texture.TIFF.
--toOSType
Setting the option:
--toOSType=Unix
will convert all texture filenames to Unix filenames. For instance backslashes in Windows filenames will become slashes and volume names in windows like 'C:\' will become directories - in this example '/C/'. This is handy when converting objects from Windows to Unix.
Setting the option:
--toOSType=Windows
will convert all texture filenames to Windows filenames. For instance slashes in Unix filenames will become backslashes. This is handy when converting objects from Unix to Windows.
The default value for '--toOSType' is 'Windows'
if you are using CeX3D Converter for Windows. The default is
'Unix' if you are using CeX3D Converter for Linux.
--textureWidth and --textureHeight
If you are converting to Unreal.T3D format then you will most likely want to specify the resolution of the textures you are using. This can be done with the following options:
--textureWidth=256 --textureHeight=256
In this case the textures used in the object
must have the resolution 256x256 pixels in the Unreal Editor.
The default value for '--textureWidth' and '--textureHeight' is 512,
so if you don't set the '--textureWidth' and '--textureHeight' option,
your textures must be 512x512 pixels.
--scale
If you wish to scale objects during conversion it can be done by setting the option:
--scale=<factor>
For instance if you wish to scale an object by a factor of 2.5 it is done like this:
--scale=2.5
The default scaling factor when converting to RenderMan is 1. When converting to Unreal the default scaling factor is 40.
The reason for setting the Unreal scale factor to 40 as default
is that one unit in LightWave is 1 meter. One unit in
Unreal on the other hand, is about one inch.
--coordTransformsLH
When converting objects it is possible to rotate them. This can be done with the option:
--coordTransformsLH=<transforms>
Here <transforms> is a comma separated list of transformation operations. Each transformation operation can be one of:
For example if you want first to rotate 12.5 degrees around the X axis and then 45 degrees around the Y axis you can write:
--coordTransformsLH=rx12.5,ry45
When converting from LightWave to the Unreal Editor you will probably want to use:
--coordTransformsLH=rz90,ry90
This is because in LightWave (and in RenderMan) the coordinate system looks like this:
In the Unreal Editor however, it looks like this:
So rotating first 90 degrees around the Z axis and then 90 degrees around the Y axis will transform objects so that up in LightWave becomes up in the Unreal Editor, away from the camera in LightWave becomes away from the camera in the Unreal Editor and so forth. It should also be noted that when rotating some multiple of 90 degrees the rotations will be completely accurate - this is not always the case when working in LightWave, so you are encouraged to use CeX3D Converter to handle this :)
You can also consider using the option:
--coordTransformsLH=rx90
This will at least convert up in LightWave to up in the Unreal Editor.
The attentive reader will already have noticed that both of the above
coordinate systems are lefthanded coordinate systems.
This is the reason why the option is called '--coordTransformsLH' and
not just '--coordTransforms'.
When '--coordTransformsLH'
is used, the objects are simply kept in the lefthanded coordinate systems
- and this is also what makes most sense, since all supported formats use
lefthanded coordinatesystems. However it should be noted that
mathematical standard coordinate systems are right handed coordinate systems,
so this is what CeX3D Converter uses internally -
but the option 'coordTransformsLH' will not disappear in the future.
--destFileName
When converting files, the filename of each converted file is automatically generated from the input filename. For instance if you convert an object called MyObject.Lwo into Unreal.T3D format, then the destination file will be called MyObject.t3d. If you don't want your file to have these default names you can specify your own destination filename with this option:
--destFileName=<filename>
read | read | read | write | write | |
LWOB | LWO2 | Unreal.T3D | RIB | Unreal.T3D | |
Triangles | Yes | Yes | Yes | Yes | Yes |
Arbitrary polygons | Yes | Yes | Yes | Yes | Yes |
Planar mapped textures | Yes | Yes | No | Yes | One per polygon |
UV textures | No | Yes | No | Yes | One per polygon |
Other surface data | Yes | Yes | No | Yes | No |
Additive surfaces | No | No | No | No | No |
Reflections | Yes | Yes | No | No | No |
Refractions | No | No | No | No | No |
Caustics | No | No | No | No | No |
Notice that a feature
has to be supported for both the file format you are reading
and the file format you are writing before it will actually
work.
Limitations in the formats
The Unreal.T3D file format
has limited capabilities for texture support.
It only supports one color texture
per polygon. So if there are multiple textures on
a polygon, only the first color texture
will be exported in the Unreal.T3D file. However, you can create
several LightWave surfaces for different polygons, each with different texture.
The Unreal Editor only supports texturing of up to 3 accurate UV
texture coordinates - so when working with UV textures you should
probably triangulate your objects.
The Unreal.T3D file
format also only seems to be capable of handling polygons
with up to 16 vertices each and only polygon meshes containing
up to 500 polygons in total. CeX3D Converter will try to
split polygons with more than 16 vertices - but this will
of course generate additional polygons, so you may want to
split these polygons manually.
Appendix B: Planned features
The following features are currently planned to be implemented in a near future:
Credits in no particular order goes to: