home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / directx2 / docs / conv3ds.txt < prev    next >
Encoding:
Text File  |  1996-05-17  |  5.5 KB  |  164 lines

  1. conv3ds
  2. -------
  3.  
  4. conv3ds converts 3ds models produced by Autodesk 3D Studio and other
  5. modelling packages into X Files.
  6.  
  7.  
  8. How to use it
  9. -------------
  10.  
  11. At its simplest you can run it with no options and it will (endeavour) to
  12. produce an X file containing a hiearchy of frames. For example:
  13.  
  14. conv3ds file.3ds 
  15.  
  16. will produce an X File file.x. Use Frame::Load to load the frame.
  17.  
  18. If the 3ds file contains key frame data then you can produce an X file
  19. which contains an animation set using the -A option. For example:
  20.  
  21. conv3ds -A file.3ds
  22.  
  23. Use AnimationSet::Load to load the animation.
  24.  
  25. If you want to make an X file containing a single mesh made from all the 
  26. objects in the 3ds file then use the -m option.
  27.  
  28. conv3ds -m file.3ds
  29.  
  30. Use MeshBuilder::Load to load the mesh.
  31.  
  32.  
  33. Other useful options
  34. --------------------
  35.  
  36. * The -T option will wrap all the objects and frame hierarchies in a single
  37. "toplevel" frame. This enables you to load all the frames and objects in
  38. the 3ds file with a single call to Frame::Load, using the default options
  39. (ie. Load the first toplevel frame hiearchy in the X file). The frame 
  40. containing all the other frames and meshes is called "x3ds_filename" 
  41. (without the .3ds extension). When used with the -m option this option has
  42. no affect.
  43.  
  44.  
  45. * The -s option allows you to specify a scale factor for all the objects
  46. converted in the 3ds file. For example 
  47.  
  48. conv3ds -s10 file.3ds
  49.  
  50. will make all the objects 10 times bigger, and
  51.  
  52. conv3ds -s0.1 file.3ds 
  53.  
  54. will make all the objects 10 times smaller
  55.  
  56.  
  57. * The -r option reverses the winding order of the faces when the 3ds file is
  58. converted. If after converting the 3ds file and viewing it in D3D, the object
  59. appears "inside-out" try converting it with the -r option. All Lightwave
  60. models (see notes below) exported as 3ds files will need this option.
  61.  
  62.  
  63. * The -v option turns on verbose output mode. Specifiy an integer with it.
  64. The only useful (currently) integers are: 
  65.   -v1, print out warnings about bad objects and general information 
  66.        about what the converter is doing 
  67.   -v2, print out basic keyframe information, objects being included in the
  68.        conversion process, and information about the objects while being saved.
  69.   -v3, very verbose (mostly useful for debugging) information.
  70.  
  71. The default is -v0.
  72.  
  73.  
  74. * The -e option allows you to change the extension for texture map files. For
  75. example:
  76.  
  77. conv3ds -e"ppm" file.3ds
  78.  
  79. and file.3ds contains objects which reference the texture map file brick.gif,
  80. the X file will reference the texture map file brick.ppm. The converter does
  81. not convert the texture map file. The texture map files must also be in the
  82. D3DPATH when the resulting X File is loaded.
  83.  
  84.  
  85. Other options
  86. -------------
  87.  
  88. * The -t option specifies that the X File produced will not contain texture
  89. information.
  90.  
  91. * The -N option specifies that the X file produced will not contain Normal
  92. information. All the D3DRM Load calls will generate normals for objects
  93. with no normals in the X file.
  94.  
  95. * The -c option specifies that the X file produced should not contain
  96. texture coordinates. By default if you use the -m option the outputted mesh
  97. will contain 0,0 uv texture coordinates if the 3ds object had no texture
  98. coordinates.
  99.  
  100. * The -f option specifies that the X file produced should not contain any
  101. FrameTransformMatrix.
  102.  
  103. * The -z and -Z options allow you to adjust the alpha face color value of 
  104. all the  materials referenced by objects in the X File. 
  105. This is best illustrated with an example:
  106.  
  107. conv3ds -z0.1 -Z0.2 file.3ds 
  108.  
  109. says add 0.1 to all alpha values under 0.2. And
  110.  
  111. conv3ds-z"-0.2" -z1 file.3ds
  112.  
  113. says subtract 0.2 from the alpha values for all alphas.
  114.  
  115. * The -o option allows you to specify the filename for the .X File produced.
  116.  
  117. * The -h option tells the converter not to try to resolve any hiearchy
  118. information in the 3ds file (usually produced by the keyframer). Instead all
  119. the objects (when the converter is not used with the -m option) are outputted
  120. in toplevel frames.
  121.  
  122.  
  123. 3ds file produced from lightwave objects
  124. ----------------------------------------
  125.  
  126. There are a number of issues with 3ds files exported by the trans3d
  127. plugin for lightwave. These are best handled using the following
  128. options to conv3ds.
  129.  
  130. conv3ds -r -N -f -h -T|m trans3dfile.3ds
  131.  
  132. All the 3ds objects which we've come across produced by trans3d and the
  133. lightwave object editor need their winding order reversing (otherwise they
  134. appear "inside-out" when displayed) and contain no normal information.
  135.  
  136.  
  137. Hints and Tips
  138. --------------
  139.  
  140. Some of these are pretty obvious but are probably worth saying anyway.
  141.  
  142. If, after loading an object produced by conv3ds into the D3DRM viewer,
  143. you can't see the object then try using the -s object
  144. with an integer of say, 100, to increase the X file objects scale.
  145.  
  146.  
  147. If, after loading the object into the viewer and switching from flat
  148. shading into Gourard shading the object turns dark grey try converting 
  149. with the -N option. 
  150.  
  151. Textures can be the biggest problem. If after converting the object the
  152. textures don't get loaded then make sure that the object is referencing
  153. either .ppm or .bmp files (using the -e option), make sure the textures
  154. width and height is a power of 2, and make sure the textures are stored 
  155. in one of the directories in your D3DPATH.
  156.  
  157.  
  158. Known bugs and problems
  159. -----------------------
  160.  
  161. Currently conv3ds can't handle dummy frames used in 3ds animations. 
  162. It just ignores them (but will convert any child objects).
  163.  
  164.