PEDN> Main Web>WebLeftBar>ModGuide (2008-03-04, LiXizhi) Change language en zh-cnEditAttach

Modeling Tools Guide

This topic teachs you how to mod for ParaEngine.

Building Mod

Character Mod

ParaX Exporter Reference

Description

This is the ParaEngine X file exporter for 3dsmax 7&8 (latest service pack is required). Contact the ParaEngine Tech Studio to get the plug-in for a newer or previous 3dsmax version. It exports both static and animated models in ParaEngine's extensible ParaX? file format. It supports both text and binary output and a variety of exporting options. The text output format for static scene model is by default compatible with the DirectX? 's X-file format. Other formats can only be used in ParaEngine. Like XML, each ParaX? file have schema embedded in the file.

Copyright

The exporter is copyrighted by ParaEngine Corporation. At the moment, it is free for personal usage. Please contact ParaEngine for commercial use.

Installation

Install the latest version of DirectX? SDK, extract 3DXI_R[X].rar to the 3dsmax[X]'s install directory(such as D:\Program Files\3DMAX7.0\). X is the version of 3dsmax. [this step is not needed if you have the latest 3dsmax service pack], and then use any of the following methods. Note: if you are using 3dsmax 8, please copy everything in ./3dsMax_8_Exporter_dll to ./3dsMaxExporter directory and override if necessary.

[method I]

  1. Edit the plugin.ini in the 3dsmax folder, add the following line:
   
   ParaXModel=D:\lxzsrc\ParaEngine\World Editor\3dsMaxExporter\Debug
Replace the directory with the one on your machine. Make sure it contains the ParaXExporterMax? .gup file, which is actually the DLL file generated by this program.

  1. Copy the correct version of dxcc.dll to the 3dsmax's install directory (such as D:\Program Files\3DMAX8.0\).

[method II]

Copy *.gup, dxcc.dll and "ParaXmodel.templates" to the [3dsmax directory]\plugin\, where [3dsmax directory] is the root directory of 3ds max(such as D:\Program Files\3DMAX8.0\).

TIP To use the exporter: one can access the exporter plug in 3dsmax by selecting file->export... (Select file type: ParaEngine X file)

Known Issues

  1. DXCC.dll failed when starting 3dsmax: Install the latest version of DirectX?
  2. Plug-in error: Apply the latest service pack to 3dsmax.Or install 3DXI_R[X].rar in the ParaEngineSDK? 's 3dsmax exporter directory.

User Guide

Modelers should follow the following principle when building their static or animated models in 3dsmax.
  • The system unit in 3dsmax is 1 meter in ParaEngine. So it is advised that artists use meters in 3dsmax
  • The z axis in 3dsmax is y axis in ParaEngine. Fortunately, they all mean the world up direction. Basically, what one see in 3dsmax is the same as that in ParaEngine.
  • When building character model in 3dsmax, the character’s facing should be the positive x axis in 3dsmax.
  • When creating animated models, one can use skin, physique, biped (motion capture) or any other animation method, as long as the following rules are followed.
  • Avoid scaling the mesh model. If one have to, scale the model and then remove any scaling transformation from the node. Please refer to 3dsmax manual for how to do so.
  • Avoid animating scaling transformation. If one have to, use only uniform scale, i.e. scale the same amount along x, y, z axis. The current exporter ignores the scale’s rotation axis.
  • The exporting can merge animations in different max files to a single ParaX? file, so long as all max files share the same mesh (including transforms) and bone hierarchy. See the for more information. A good practice for building multiple animations is to construct a reference model, bind bones to it and then save to a max file. And then clone any number of this reference max file, animate bones and save each max file as animation sequence. Please refer to the ./sample directory for max file samples.
  • All mesh faces must be assigned a textured material in order to be treated as renderable faces.
  • Objects or mesh a face that does not have a material assigned to it is treated as physics face only. Physics faces will block characters and will not be rendered. In most cases, we use the 3dsMax primitives such as boxes, cylinders, etc to build the physics faces in the model.
  • If there are multiple renderable meshes or objects in the scene, it is better to convert all of them to a single mesh. This can be done by first converting all objects to editable meshes, and then attaching all other meshes to a particular one. 3dsmax will automatically combine all used materials to a single multi-material, which can be exported by the exporter.
  • Texture and Materials: Always use standard material and only use the diffuse and opacity map of the material. IMPORTANT: the diffuse and opacity map should be the same texture file. Material that only uses diffuse map will be exported as DXT1 format which contains 1 bit alpha; material with opacity map will be saved as DXT3 which has 3 bits alpha. Artist is advised to use "tga" texture format when composing the texture. The exporter will automatically save it as "dds" format according to their usage.
    • "_r[0-9]": Replaceable textures: name the material name in 3dsmax as r, r1,r2, ..., r9 or *_r[0-9] to specify replaceable textures. If it is "r" and "r2" are equivalent. So if there is only one replaceable texture, just name it "r".
    • "*_b": Disable alpha testing in max material: alpha testing is by default enabled for all exported max material.To disable alpha testing, name the max material as "*_b", such as "mat_b".
    • "*_a": Disable physics in max material: physics is by default enabled for all exported max material.To disable it, name the max material as "*_a", such as "mat_a", this can be combined with other endings such as "_b" and "_r[0-9]", such as "mat_b_a". This is usually for tree leaves faces in a mesh.
    • "*_t": if the material name ends with "_t", z buffer write will be disabled. this is usually the case for particle meshes, etc.
    • "*_u": if the material name ends with "_u", it will be unlit, which means no lighting is applied to surface.
    • "mirror surface:ray-tracing": In Reflection map, specify "ray-tracing" in the reflection map of 3dsmax to export reflective surface. Currently, only horizontal reflective surfaces at y=0 plane can be displayed correctedly in engine.
    • "Normal mapping": either bump or displacement map of 3dsmax can be used. the texture file must be the same as the diffuse map plus "Norm". For example, the diffuse texture is "face.dds", then the normal map must be "faceNorm.dds"
    • "cubic environment map": specify reflect/refract map in the reflection map of 3dsmax materail to export environment mapped surfaces. The exporter will use the 6 surface files to generate the exported cubic texture file. The exported cubic texture file has the same name as the first surface file name plus "Env". For example, the first diffuse texture is "sky_up.jpg", then the exported normal map will be "sky_upEnv.dds"
    • "light map": it must be specified as bitmap in the reflection map of 3dsmax. The exported texture file has the same file name as the texture file in the channel.For example, the reflection texture is "face.tga", then the light map will be "face.dds". The light map intensity can be specified in the ammount of the reflection map. The amount parameter in 3dsmax is [0,100]. The actual light map intensity exported is X/10, with the exception that 100 stands for 1. Hence, 10 is 1, 20 is 2, 99 is 9.9; yet 100 is 1.
      • light map may be shared among multiple materials
      • Restriction 2:If a model uses lightmap, the entire model must all use light map, except for physics faces. I may remove this restriction in future version.
      • Exporting multiple UV sets are now supported, such as for light maps. Using multiple UV sets usually result in more duplicated vertices. So it is not advised to use extensively.
  • Texture UV: Never set texture tiling in the material editor, since they are not exported by the exporter. Use UV mapping in the modifier stack instead.
  • Try to put the max file and its referenced textures in the same folder. See the for shared texture and exporting rules.
  • Node instancing is not supported.
  • Animated Texture or Texture sequence: if the texture file name ends with _a{0-9}{0-9}{0-9}.xxx, it will be regarded as a texture sequence. Always specify the last texture in the sequence in the diffuse or opacity map.
  • Texture can now be flash movie file, such as swf or flv. For example. xxx_a009.jpg. This will actually export all 9 textures from xxx_a001.jpg to xxx_a009.jpg. Currently the frames per second or FPS is always 15. TODO: maybe encode such information in to the texture file name.
  • Texture UV animation in the material editor (translation, rotation and scaling) is exported. UV animation is assumed to be looped globally for all animation sequences. It is good to use UV animation for special effect,such as blinking eyes, etc. However, currently only the UV translation animation is rendered in the game engine.
  • The Rain/Spray particle systems are now exported. In 3dsmax create pannel, select particle system->spray to create.
    • Particle system can be attached to bones.
    • we can assign a standard material to the spray emitter using the material editor. The material name can be XXX rows cols, such as "MyTexture 2 3", in which case, the texture will be evenly divided in to 2*3 tiles, and that ParaEngine's particle system will randomly pick one to use for each newly born particle.
    • the size parameter of a particle system is not exported in full animation block, but only three keys are exported, hence it only makes sense to animate it using less than 3 keys.
    • the material diffuse color and transparency is used for particle color animation. Like size paramter, only three keys are exported, hence it only makes sense to animate it using less than 3 keys.
    • The particle object name in 3dsmax can be the following format
               "XXX [sphere [r = float_rotation]] [g = float_gravity] [s = float_slowdown]",  
               such as "spray01 sphere r = 0.5 g = 0 s = 0.01" 
            
    • emitter type is derived from the spray particle object name in 3dsmax.By default it is a plane emitter.
      • if the node name contains "sphere", then it is a sphere particle emitter
        • the node name also contains "r = float_value", initial rotation angle is set for the sphere, it is usually in the range [-Pi/2, Pi/2], such as "XXX sphere r = 0.5".
      • if the node name does not contains "sphere", then it is a plane particle emitter
      • the display type of a particle determines how a particle is rendered. By default it is a 0.
        • 0 or 2 means normal particle which is centered on the particle origin with a given size.
        • 1 means that particle is rendered with origin at the particle system center and extends to the particle origin.

  • Body attachments are supported through special bone names: Bones whose name contain the following string will be regarded as attachments.
       "Head" or "头部":  up to 4 parent bones of the head bone is used to rotate the character's upper body. 
       "L UpperArm" left shoulder
       "R UpperArm" right shoulder
       "L Hand" left hand
       "R Hand" right hand
       "Mount" or "Shield" the mount position for car or horse, etc. 
          It may also be the shield position where weapons may be attached on character models.
          "Mount1", "Mount2",..."Mount9" are supported for additional mount point in the model.
      
    ALERT! IMPORTANT: in order for bones to be exported. it must be bought to at least one vertex. I will remove this restriction though in future.

  • "XRef Scene..." in 3dsmax is supported. "XRef Object..." will be supported in future. We can import animated mesh files as Xref scenes into a static mesh file, so that the static mesh will have animated part at runtime. if the the xref scene file path is directory/filename(number).max, the xref scene actually used will be directory/filename.x. Only a single animation id =0 is used for xrefed animated mesh. In order to transform Xref Scene, one can create a dummy object such as a point at the origin, and bind the xref file to it. ParaX? export will apply the same transform to the xref mesh as to the dummy parent object. Note It is important that dummy object be created at the scene origin, otherwise the rendering will be inconsistent in ParaEngine.
    • if the file name of the XRef Scene is filename.lua.max, it is treated as a script object and is exported as filename.lua. In a script scene, the scene itself is not rendered but merely served as a visual clue for artists and designers. The script file plays a role similar to character event file, with even handlers for on_action, on_click, etc. We can use script Xref scene to add interactivity to a static mesh object, such as specifying mount surface, and lots of game elements that is instanced with the mesh. For more information about script Xref scene, please see the ParaEngine documentation.
  • Skin Export: If there are multiple skins applied to multiple meshes, only the one with the largest number of bones are exported. In custom character system, there might be many meshes(body parts) each with different skins. in such situation, we should create a dummy mesh such as box, and create a skin over it using all the bones in the scene. This just ensures that all bones are exported. Please note that in 3dsmax, there is a limit of bone numbers that could be applied to a given vertex, hence we need to distribute bone weights over serveral vertices. When using the above method, the initial bone position (the biped standard pose) must be the same
  • Shared animation support: in order to use shared animation, all characters need to have the same da vinci initial position. Since all animations are based on relative bone rotation to this initial character position. Most 3dsmax biped bones are exported with some predefined ID, so that we can share animations among multiple animated character. for shared animations to take effect,bones must be named properly in 3dsmax (the default biped naming of character studio in 3dsmax 7,8,9 is compatible with us). Here is the list of known bone names (case insensitive, maybe prefixed with any characters like biped01,but not surfixed): Root(any name which is parent of pelvis), Pelvis,Spine, L Thigh,L Calf, L Foot, R Thigh,R Calf, R Foot, L Clavicle, L UpperArm? , L Forearm, L Hand, R Clavicle, R UpperArm? , R Forearm,R Hand,Head,Neck, L Toe0, R Toe0, R Finger0, L Finger0, Spine1, Spine2, Spine3, The parent of the pelvis bone is always regarded as the root bone (Root). All predefined bones must have pivot points,otherwise external animation will not be applied. only the Bone_Root's translation animation (which is also scaled automatically according to the local model) will be applied to the local model, for all other predefined bones, only rotation is applied. This conforms to the BVH file format, where only the root node has translation and rotation animation, where all other nodes contains only rotation animation. This allows the same animation data to be applied to different models with different bone lengths, but the same topology.
  • Note: Physique is not well supported when exporting a character that support external shared animation. One can use the free autodesk plug-in Phy2Skin? to convert a physique to skin when mesh is at initial pose. After conversion, one also needs to manually add the root biped bone to the skin and assign some weight to it. The reason behind this is that Physique does not export the root bone, which contains translational animations required by shared animation.
  • LOD mesh or char export: export lod mesh or character file (XML) in a directory. LOD mesh XML file is just a meta file referencing a collection of x files and specifying which file to use when object is within a given radius. In order to automatically generate mesh LOD file, one needs to first export each LOD mesh or char file to their corresponding x file respectively. then open any of the max file and select export LOD mesh, the LOD XML file will be automatically generated according to the file name of the max file. See below: Put all your LOD mesh's model max files(all resolutions), textures and exported x files in the same directory. Name each file as objectName_LOD10.max or objectName_LOD20(0).max. the number in the trailing "_LODnumber" means within what distance in meters this file shall be used. E.g. in your directory, you have char_LOD5(0).max, char_LOD20(0).max,char_LOD30(0).max, chat.dds, char_LOD5.x, char_LOD10.x, char_LOD30.x. Open char_LOD5(0).max and export LOD, the final file will be char.xml which contains reference to all other three x files with proper show distance. Suppose filename of the static or character meshis "parentdir/xxx_LOD10(0).max", the exported file will be "xxx.xml", and the LOD setting are retrieved from the filename. e.g. _LOD10 means this LOD is used within 10 meters.It will also search for all xxx*.x files in the current directory for other LOD mesh files.

Exporting Guide

The exporter supports a so called intelligent mode. If one follows the following procedures, he or she can painlessly converting mesh models to ParaX? file.

Setting up the game root directory.

Suppose ParaEngine SDK is installed on D:\ParaEngineSDK\. Then this is the game root directory. For artists, who do not have ParaEngine SDK, they can cheat the exporter by putting a file called "ParaEngine.sig" in the working directory. The directory which contains the "ParaEngine.sig" file is treated as the game root directory by the ParaEngine exporter. ALERT! IMPORTANT: The artists should save texture and max files in the sub directory of the game root, so that the exporter can automatically generate texture paths relative to the game root. It is highly advised that artists install a copy of ParaEngineSDK? to their working directory to examine their exported file. To refresh a newly exported model, one needs to restart the ParaEngine executable as well.

Prepare your max file

See above

Export max file(s)

One can export the entire scene, the selected objects in the scene, or a group of max files, etc with any of the following methods.

[Method1] Intelligent export:

Select file->Export (ParaEngine X file); specify any file name (which is not used during exporting). This will export the scene or selection using intelligent export option. It is equivalent to the following.
   *   sOutputPath = 3dsmax max file path, changing extension from ".max" to ".x".
   *   dwFileType = DIRECTX_TEXT
   *   bRelativePath = true
   *   sRelativeToPath = auto-finding root path by searching for the "ParaEngine.sig" file in the parent directories of sOutputPath.
         The parent directory which contains the sig file is regarded as the root path.
   *   bForceDDSTexture = true;
   *   bOverwriteDDSTexture = false;
   *   bReplaceTexturePath = false;
   *   bForceNoAnimation = true;
   *   bSingleTextureName = false;
   

[Method2] Export all max models in a root directory

  1. Export all max models in a root directory and its sub directories, all of which use default intelligent export options (see above):
  2. Select file->Export (ParaEngine X file), browse to the root directory and select export all files in dialog.
  3. Select file->Export (ParaEngine X file), browse to the root directory and save model as "all.x". This will cause the exporter to export all max models in the directory and subdirectories of "all.x" ALERT! Note: if the model path contains the word "backup", it will be skipped during batch export.

[Method3] Export animations from multiple files

Put all animated max models to a single directory. Usually the directory contains only models which share the same mesh and bones. Open any of the max file in 3dsmax and Select file->Export (ParaEngine X file). Type the object name and specify parameters in brackets"(...)". The file format is given below:
   { sObjectName (-1) |  sObjectName (nAnimID) }
For example, "MyModel(-1)" or "MyModel(0)".
  • If nAnimID is -1, all models in the current max file's directory will be merged and exported to a single ParaX? Model file called sObjectName.x; in the example, it will be "MyModel.x".
  • If nAnimID is non-negative integer, only max file whose ID equals to nAnimID will be exported.
  • If sObjectName is blank, the current max file name,excluding parameter block string,will be used.

The file name of all max models in the directory should follow the following convention in order for the exporter to automatically export it.

   
   sObjectName (nAnimID [, fAnimSpeed] [, nonloop] [, no_key_reduction]).max

For example, "MyModel(0)" or "MyModel(4, 1.234)" or "MyModel(30, 0, nonloop)".

  • nAnimID: this is the animation id for the max file. ParaEngine reserves animation id in the range [0,255]. Animation outside this range is user defined animation sequences. For a mapping from id to their interpreted action in ParaEngine, please see . For example, 0 means default standing states; 4 means walking state.
  • fMoveSpeed: movement speed in meters per second unit. Default value is 0.
  • "nonloop": if "nonloop" is present in the file name, the animation exported will be non-looped, otherwise it is saved as looped animation.
  • "no_key_reduction": if "no_key_reduction" is present in the file name, the exported animation keys will not be reducted. In other words, this will cause all key frame data to be exported, which usually results in very large animation file.

For example: suppose you have the following max and texture files in the ./dog/ directory

      
   ..............................
   ./dog/dog_stand (0).max
   ./dog/dog_walk (4).max
   ./dog/dog_jump (38).max
   ./dog/dog_swim (42).max
   ./dog/dog.tga
   ..............................
One can open ./dog/dog_stand (0).max in 3dsmax, and select file->export (ParaEngine X file), and type "mydog (-1)". If your models are OK, the exporter will generate a file at "./dog/mydog.x", which contains all animation sequences in the ./dog directory. This may takes some minutes if there are many animation sequences. When testing, it is usually more convenient to open a max, such as "dog_stand(0).max" and export as "(-1)","(0)","(4)", etc; the generated file will be named according to the current max file, in above case, it is "dog_stand.x".

Exporting options

see ParaXBuilder? .h, there are many options to customize.
_TODO_
show a UI dialog in 3dsmax to customize the options.

Demo file

Some demo files are in the install directory.

Debugging

Set VC++ project property:
  1. Debugging:command: C:program Files\3DMAX7.0\3dsmax.exe
  2. Debugging: working directory: D:\Program Files\3DMAX7.0 1. Set breakpoint and press F5. Note: there is an unknown user break exception when begins exporting, just click continue.
The entry file is XFileExporter? .cpp, once can set break points there

The log file is output to C:\ParaXexporterLog.txt

Architecture

The main exporting code is in MaxPipeline? .cpp and ParaXBuilder? .cpp.
  • CXFileExporter? is an implementation of 3dsmax exporter interface. It is also the entry point when the user chooses to export anything.
  • CMaxPipeline? will then be called to generate all the intermediary data through the 3dsmax's IGame interface, which includes materials, meshes, frames(bones). I also decide if the material contains the opacity map. If so, it will be treated as a texture with alpha. The texture file existence is also verified here. It will try to search in the same directory of the max file, if the texture is not found.
  • CParaFile? : it contains the file path functions and basic file search and writing interface.
  • CLog: It logs to "C:/ParaXModelLog.txt".
  • CParaXBuilder? : This is the main file. The entry function is CParaXBuilder? ::ParaXSaveModel(), which is called by the CXFileExporter? .it takes the result generated by CMaxPipeline? . It further optimizes the meshes by sorting the faces by materials and merges identical ones. It will also generate DDS textures if that that option is set. Hence it generates another optimized intermediary data presentation of the model. This model is both verified and sorted. Currently I only sort by textures and merge all physics faces (i.e. material without texture) using the last non-textured material. In other words, I made no advanced Vertex Cache optimization. Rather this is done by ParaEngine at runtime. Since the physics does not like duplicating vertices for more efficient caching in GPU. Finally, it calls one of the saving functions to save in a specified encoding and file type, such as DirectX? text file or ParaX? binary or text file.

Appendix A: Animation ID table

   
================================
   *   STAND=0,
      DEATH=1,
      SPELL=2,
      STOP=3,
   *   WALK=4,
   *   RUN=5,
      DEAD=6,
      RISE=7,
      STANDWOUND=8,
      COMBATWOUND=9,
      COMBATCRITICAL=10,
      SHUFFLELEFT=11,
      SHUFFLERIGHT=12,
   *   WALKBACKWARDS=13,
      STUN=14,
      HANDSCLOSED=15,
   a   ATTACKUNARMED=16,
   a   ATTACK1H=17,
      ATTACK2H=18,
      ATTACK2HL=19,
      PARRYUNARMED=20,
      PARRY1H=21,
      PARRY2H=22,
      PARRY2HL=23,
      SHIELDBLOCK=24,
      READYUNARMED=25,
      READY1H=26,
      READY2H=27,
      READY2HL=28,
      READYBOW=29,
      DODGE=30,
      SPELLPRECAST=31,
      SPELLCAST=32,
      SPELLCASTAREA=33,
      NPCWELCOME=34,
      NPCGOODBYE=35,
   a   BLOCK=36,
   -   JUMPSTART=37,
   *   JUMP=38,
   -   JUMPEND=39,
      FALL=40,
   -   SWIMIDLE=41,
   *   SWIM=42,
   -   SWIMLEFT=43,
   -   SWIMRIGHT=44,
   -   SWIMBACKWARDS=45,
      ATTACKBOW=46,
      FIREBOW=47,
      READYRIFLE=48,
      ATTACKRIFLE=49,
      LOOT=50,
      READYSPELLDIRECTED=51,
      READYSPELLOMNI=52,
      SPELLCASTDIRECTED=53,
      SPELLCASTOMNI=54,
      BATTLEROAR=55,
      READYABILITY=56,
      SPECIAL1H=57,
      SPECIAL2H=58,
      SHIELDBASH=59,
   a   EMOTETALK=60,
      EMOTEEAT=61,
      EMOTEWORK=62,
      EMOTEUSESTANDING=63,
      EMOTETALKEXCLAMATION=64,
      EMOTETALKQUESTION=65,
      EMOTEBOW=66,
   a   EMOTEWAVE=67,
      EMOTECHEER=68,
      EMOTEDANCE=69,
      EMOTELAUGH=70,
      EMOTESLEEP=71,
      EMOTESITGROUND=72,
      EMOTERUDE=73,
      EMOTEROAR=74,
      EMOTEKNEEL=75,
      EMOTEKISS=76,
      EMOTECRY=77,
      EMOTECHICKEN=78,
      EMOTEBEG=79,
      EMOTEAPPLAUD=80,
      EMOTESHOUT=81,
      EMOTEFLEX=82,
      EMOTESHY=83,
   a   EMOTEPOINT=84,
      ATTACK1HPIERCE=85,
      ATTACK2HLOOSEPIERCE=86,
      ATTACKOFF=87,
      ATTACKOFFPIERCE=88,
      SHEATH=89,
      HIPSHEATH=90,
   *   MOUNT=91,
      RUNRIGHT=92,
      RUNLEFT=93,
      MOUNTSPECIAL=94,
      KICK=95,
      SITGROUNDDOWN=96,
      SITGROUND=97,
      SITGROUNDUP=98,
      SLEEPDOWN=99,
      SLEEP=100,
      SLEEPUP=101,
      SITCHAIRLOW=102,
      SITCHAIRMED=103,
      SITCHAIRHIGH=104,
      LOADBOW=105,
      LOADRIFLE=106,
      ATTACKTHROWN=107,
      READYTHROWN=108,
      HOLDBOW=109,
      HOLDRIFLE=110,
      HOLDTHROWN=111,
      LOADTHROWN=112,
      EMOTESALUTE=113,
      KNEELSTART=114,
      KNEELLOOP=115,
      KNEELEND=116,
      ATTACKUNARMEDOFF=117,
      SPECIALUNARMED=118,
      STEALTHWALK=119,
      STEALTHSTAND=120,
      KNOCKDOWN=121,
      EATINGLOOP=122,
      USESTANDINGLOOP=123,
      CHANNELCASTDIRECTED=124,
      CHANNELCASTOMNI=125,
      WHIRLWIND=126,
      BIRTH=127,
      USESTANDINGSTART=128,
      USESTANDINGEND=129,
      CREATURESPECIAL=130,
      DROWN=131,
      DROWNED=132,
      FISHINGCAST=133,
      FISHINGLOOP=134,
      FLY=135,
      EMOTEWORKNOSHEATHE=136,
      EMOTESTUNNOSHEATHE=137,
      EMOTEUSESTANDINGNOSHEATHE=138,
      SPELLSLEEPDOWN=139,
      SPELLKNEELSTART=140,
      SPELLKNEELLOOP=141,
      SPELLKNEELEND=142,
      SPRINT=143,
      INFLIGHT=144,
      SPAWN=145,
      CLOSE=146,
      CLOSED=147,
      OPEN=148,
      OPENED=149,
      DESTROY=150,
      DESTROYED=151,
      REBUILD=152,
      CUSTOM0=153,
      CUSTOM1=154,
      CUSTOM2=155,
      CUSTOM3=156,
      DESPAWN=157,
      HOLD=158,
      DECAY=159,
      BOWPULL=160,
      BOWRELEASE=161,
      SHIPSTART=162,
      SHIPMOVING=163,
      SHIPSTOP=164,
      GROUPARROW=165,
      ARROW=166,
      CORPSEARROW=167,
      GUIDEARROW=168,
      SWAY=169,
      DRUIDCATPOUNCE=170,
      DRUIDCATRIP=171,
      DRUIDCATRAKE=172,
      DRUIDCATRAVAGE=173,
      DRUIDCATCLAW=174,
      DRUIDCATCOWER=175,
      DRUIDBEARSWIPE=176,
      DRUIDBEARBITE=177,
      DRUIDBEARMAUL=178,
      DRUIDBEARBASH=179,
      DRAGONTAIL=180,
      DRAGONSTOMP=181,
      DRAGONSPIT=182,
      DRAGONSPITHOVER=183,
      DRAGONSPITFLY=184,
      EMOTEYES=185,
      EMOTENO=186,
      JUMPLANDRUN=187,
      LOOTHOLD=188,
      LOOTUP=189,
      STANDHIGH=190,
      IMPACT=191,
      LIFTOFF=192,
      HOVER=193,
      SUCCUBUSENTICE=194,
      EMOTETRAIN=195,
      EMOTEDEAD=196,
      EMOTEDANCEONCE=197,
      DEFLECT=198,
      EMOTEEATNOSHEATHE=199,
      LAND=200,
      SUBMERGE=201,
      SUBMERGED=202,
      CANNIBALIZE=203,
      ARROWBIRTH=204,
      GROUPARROWBIRTH=205,
      CORPSEARROWBIRTH=206,
      GUIDEARROWBIRTH=207,
      STAND1=208,
      STAND2=209,
      STAND3=210,
      LASTONE

Known Issues

  • when there are too many objects in the 3dsmax, the exporter will sometimes crash or run vey slow. It is a 3dsmax API bug. So in such condition, convert all geometry to a single editable mesh in 3dsmax before exporting.
  • when multiple meshes are bound to the same skeleton(bones), make sure that the initial bone positions of all mesh objects are the same. If this rule is not followed, one may notice that some meshes may fly around in unexpected positions when exported. If you are using biped, put the biped to initial pose, and then position your other meshes (such as guns) according to this initial pose, finally bind these meshes to the biped. This will ensure that all later bind meshes share the same initial bone pose as the first mesh (body mesh).
  • Do not use 3dsmax's link method to attach a mesh to a bone. Always use physiques or biped.
  • when changing input method from English to Chinese, the 3dsmax will stop responding.
  • floating bones or floating meshes are not supported. In other words, all bones must have a single parent bone, and if a mesh is animated all of its vertices must be bound to at least one bone.
  • exported animation does not match exactly to the animation in 3dsmax: This is caused by erroneous key reduction. In ParaX? exporter, we allow 0.0001 difference between two adjacent translation keys when key reduction is enabled (by default), however, this will cause large displacement in the exported animation. To fix this problem, specify "no_key_reduction" in the file name. See the "no_key_reduction" file parameter for more informatin.

Change log

  • pivot points are now exported, which repairs some of the wheel animation problem.
  • Single texture export option is added which allow the user to export only texture name.
  • TODO: the export's file name may be used to read the export options from.
  • 2006/4/15: mesh normals are now exported for animated model.
  • 2006/7/2: Reflection map, environment mapping, normal mapping, are now supported by the exporter.
  • 2006/7/12: D3DFMT? _DXT5 is used instead of D3DFMT? _DXT3 to give more precision to the texture alpha channels (4 bits to 8 bits).
  • 2006/8/4: export option dialog is added.
  • 2006/9/2: face is now sorted by render order.
  • 2006/9/6: key reduction algorithm is rewritten.
multiple mount points are supported.
  • 2006/9/11: replaceable texture supported by naming the materials to r#
  • 2006/12/21: alpha testing can be disabled by setting material map to "*_b"
  • 2007/1/4: a bone animation bug is corrected. The bug results in bumpy animation when the first two frames of an animated bone is the same.
  • 2007/1/6: physics mesh is extracted from the static mesh according to the material attribute. In 3dsmax, one can disable physics for a given material by naming the material with "*_a".
  • 2007/1/8: for static mesh object, replaceable texture ID is exported in the text file name of the material as "*;ID", where ID is the replaceable texture ID of the material.
  • 2007/3/8: Texture UV animation in the material editor (translation, rotation and scaling) is now exported. UV animation is assumed to be looped globally for all animation sequences.
It is good to use UV animation for special effect,such as blinking eyes, etc. However, currently only the UV translation animation is rendered in the game engine.
  • 2007/3/11: The Rain/Spray particle systems are now exported. In 3dsmax create pannel, select particle system->spray to create. Particle system can be attached to bones.
we can assign a standard material to the spray emitter using the material editor. The material name can be XXX rows cols, such as "MyTexture 2 3", in which case, the texture will be evenly divided in to 2*3 tiles, and that ParaEngine's particle system will randomly pick one to use for each newly born particle.
  • 2007/5/28 INTERPOLATION_LINEAR_CROSSFRAME is used for UV translation animation. This allows one to translation to a different texture UV immediately between two frames, such as the blinking of eyes.
  • 2007/7/25: skin export will now work with multiple skinned mesh.
  • 2007/7/25: bug fix: if there are multiple standing positions in the same directory, it can still be exported correctly.
  • 2007/8/28: bug fix: we can now export standing animation from any animation file including those named with XXX(ID, speed).max
  • 2007/11/8: if the material name ends with "_u", it will be unlit, which means no lighting is applied to surface.
  • 2008/1/7: LOD mesh exporter is added
  • 2008/1/8: now exports bounding box information in to the ParaXHeader? even for static mesh. The LOD exporter will also utilize this.

TODO List

2006/4/3
  • Extract SRT keys using IGameController? , instead of sampling keys.
  • More advanced vertex cache optimization for static mesh: using NvTriStrifier? ?. Replacing DXCC functions (thus removing dependencies on dxcc.dll).
  • In ParaEngine, optimize bone calculation by hand-coding Pivot*SRT*Pivot logics.
  • Disable SRT keys if they are identity in the animation range.
  • (not needed) change the character orientation to match the coordinate system used in ParaEngine.
  • Support attachments.
  • Max or texture files containing Chinese characters are not allowed when exporting in ParaX? text format file; ParaX? binary file works fine with Chinese characters.
  • Extract animation speed.
  • Turn on silent mode on 3dsmax during batch exporting.
  • more standing animations. see the last three animation ID table.STAND1=208, STAND2=209, STAND3=210,

2007/5/22: TODO: all bones are exported from the source file. This allows some empty bones like Mount attachments to be exported even though they do not have a skin attached to them.

Notes

3dsmax 7.0 sdk's GMatrix multiplication function is sometimes wrong. This takes me quite some time to figure it out. 3dsmax's matrix math is different from standard matrix math. Never use anything that comes from the 3dsmax except for retrieving data.
Topic revision: r1 - 2008-03-04 - 21:33:19 - LiXizhi
 
This site is powered by the TWiki collaboration platformCopyright © 2004-2008 ParaEngine Corporation
Ideas, requests, problems regarding ParaEngine platform Send feedback