Collada plugin for
After Effects

More info here
VR

Deus Ex to VR notes

Export level from DeusEx

Transfer a DeusEx map to WebXR using trueSpace, Blender and Godot

  • use unrealed to open dx files - open level > *.* now can see and load dx map files
  • exporter may have name/length limitations - export to c:\temp worked
  • (get textures from website) (can also export 1 by 1 manually)
  • https://www.textures-resource.com/pc_computer/deusex/
  • copy the textures to the same folder as the exported t3d file
  • convert the pcx images to png format, SageThumbs worked well for this
  • use the t3d importer for trueSpace, unreal input output script
  • UE4 map unchecked
  • check to make sure all the required textures are ready by opening a log view and pressing the Texture Check button
  • only import brushes first, uncheck all except for Brushes, Flatten Booleans and Auto Boolean
  • scene must be completely empty before import t3d brushes otherwise the booleans gets off
  • import scale 0.02 for actual life size
  • autoBoolean option on - AutoIt must be installed - if not each brush from the level will need user input
  • https://www.autoitscript.com/site/
  • AutoIt provides an activeX com control so that trueSpace can control the mouse remotely
  • The computer can't be used during the import process. Press (esc) key to cancel the import. It can be resumed by using the After Crash button.
  • The import process takes a long time and is prone to crashing. Small levels like "08_NYC_Bar" can take an hour to import. Larger levels like "06_HongKong_WanChai_Market" can take all day. The reason is that tS booleans get slower when 1 mesh has many materials.
  • A faster importer for Blender is in the works, but it has boolean issues so time would be needed to manually fix the geometry errors. Truespace can import a level without textures more quickly so it might be helpful in the future to see how the imported geometry should look.
  • As the importer runs it will change the 3d view so that AutoIt can interact with the custom boolean tool by moving the mouse to the center of the 3d view then left and right clicking.
  • At regular intervals the scene file will be saved to the same location as the t3d file
  • Any brush with only 3 or 4 vertices will import as a separate mesh - this helps reduce the number of materials in the main map mesh and tS can't select a mesh from the back so the boolean could fail for those objects if they are facing the wrong direction.
  • if truespace crashes load the backup scene file and press the After Crash button, when asked say yes to remove the last imported brush. Then start the import process again and it will skip forward to the point of the last backup.
  • save the scene after the import is complete
  • after import flatten GiantSubLevel if needed
  • edit and remove the level brush - the giant cube that contains the entire map - easier to edit
  • Fix Orphan Materials
  • Remove the t3dgroup
  • convert materials to scene instanced
  • save scene again - it will be smaller due to material instancing, instancing also better for some export formats
  • separate out unique items by material + connected geometry to reduce the number of materials in 1 giant map and make uv much easier. In tS if an object has a hundred materials you may have to cycle through all those materials to see the uvs used with that material. Don't remember but I think if hide geometry you don't have to cycle through all materials?
  • Fix Orphan Materials as separate the items - also needed to be able to edit uv
  • fix uvs and material errors
  • for uv editing - break the level into managable pieces, running Fix Orphans
  • fix any incorrect texture assignments
  • purple transparent change to tga files and add transparency in place of purple color, set purple close to color of object
  • truespace needs a separate node group, with bitmap usage set to ALPHAMAP
  • restart trueSpace - seems crashy if import one after another
  • uncheck Brushes and import mover brushes and fix their uvs, open the doors so can walk through them inside trueSpace.
  • note: tS will not allow walking below the z = 0 plane, so if underground must raise all up
  • restart truespace
  • import static mesh proxies from t3d file
  • creates t3dStaticMeshStore group, cube object inside each will be named according to the source static mesh
  • restart trueSpace and import the lights if desired - skipping this step for now, webxr slow with so many lights
  • next will get lwo mesh files and textures
  • create a folder to receive the exported meshes and textures
  • use the deus ex mesh tool mesh extractor to export meshes, textures and animations
  • the defaults are good for single meshes - lightwave, first frame only, export mesh textures - can select and export several at 1 time
  • the name of the static mesh can be found on the mesh node inside the imported object
  • look at an item in level Display properties, LODMesh will give the u file and mesh name
  • DeusexDeco.u - some stuff
  • DeusexItems.u - food etc
  • DeusExCharacters.u - use mesh name from LOD then level object name to export 1 by 1
  • inside uedit look at character properties > Display > Mesh => LodMesh'u_file.mesh_name'
  • export mesh_name and choose the specific character from the popup list
  • use sagethumbs to convert pcx images to png
  • do not move or delete the original pcx files
  • Blender 2.93
  • (use custom lwo import for blender - can load all at once and reduce to 1 uv and use png instead of pcx image textures) Blender and Carrera page
  • Combine UVs checked
  • Convert PCX checked
  • select all the lwo files and import
  • rename the shaders - generic "Surface" names cause clashes later
  • save blender format file
  • remove lights and cameras or select meshes and use selected only option and export as collada/dae for trueSpace
  • uncheck copy textures
  • import to tS using collada importer, if use fbx importer then must use the copy texture option in Blender
  • import scale = 1.0
  • unparent from the "Scene" node
  • convert to scene instanced materials
  • put imported meshes into a 2d group "lwoStaticMesh"
  • open t3d fbx utilities
  • set fbx source to lwoStaticMesh group
  • set t3d destination to t3dStaticMeshStore
  • press copy fbx meshes
  • delete source and destination groups
  • fix any bad rotations and all characters subtract 90 from Z rotation, move in Zs so feet touch the floor
  • turn on the option show backfaces, so plants and some other items look better
  • edit purple textures - create alpha for purple and change purple to near color of texture, save as tga
  • in tS load texture twice, once for color and once for alpha
  • for characters set constant alpha on sunglasses and purple
  • (truespace first person navigation setup)
  • D3DView/EyeCamera... fov set to 80 degrees(1.396) === max cardboard spec
  • FPS nav and walk around
  • actor radius 0.2
  • eye position 0.2 = height - eye height
  • official walk speed 1.4, set at 1.2 indoors and 2.4 for running
  • import lights and adjust attenuation quadratic 0.05 to 0.07, const & linear 0.0
  • note: too many lights for webxr to run well
  • umodel (UE Viewer) to preview animations, DeusExCharacters.u, pg up to get to people faster than pg dn
  • umodel
  • c:\deusex\system
  • deusexcharacters.u
  • open
  • pgup/pgdn to find...
  • Object = GM_Suit from NathanMadison>display>mesh> xxx.GM_Suit
  • animation ?= Orders
  • [] to select animation, space to play
  • create folder for the animation files
  • copy base mesh and textures into animation folder, include the pcx files as well as the pngs
  • use the deus ex mesh tool mesh extractor to export animations include textures
  • choose animation range
  • DeusExCharacters.u - SitBreathe, BreatheLight, Idle1
  • toilet and computer animation inside DeusExDeco.u, Flush, Activate
  • animations will export as 1 mesh file for each frame of the animation
  • base meshes are already loaded into Blender from the static mesh imports
  • copy pcx and png of non-character meshes into the animation folder
  • import lwo animation frame files to Blender, no need to convert pcx to png, combined uv doesn't matter
  • select the animation frame mesh then add the base mesh to the selection and via shape keys dropdown on the right "Join as Shapes"
  • repeat for all frames
  • double click to rename the shape keys, (keep original names?)
  • use od copypaste to "copy" the base mesh, https://heimlich1024.github.io/OD_CopyPasteExternal/ just today a pull request to fix blender morph copies was accepted
  • blender object > copy to external
  • with base mesh loaded in tS, select it and od copypaste "paste" to get the morphs
  • uncheck UVs
  • tS morph panel has little room for track name - edit the panel, shift drag to resize whole column
  • animate and set linear interpolation
  • sitbreathe has a rate of 2.5, so set keys 15 frames apart assuming 30fps
  • use vertex animation texture to export the animation - vertex animation textures
  • TurboCAD to Godot page has notes for exporting from tS to Godot and publishing a WebXR page for VR walkthroughs

Some more things to do for the NYC Bar map - export some sounds(fans, restroom sounds, computer, music. Animate the spinning fans. Bake the lighting into the textures - can't use lightmap in Godot since the animation textures already use uv2 and Godot only has 2 uv channels. Unreal has support for multiple uv channels but no support for WebXR. Vertex animation needs the base mesh exported in the first frame pose, so may need to import to Godot separately? Interactive doors, flush toilet, activate computer.

Plans: bring Blender t3d importer to same level as truespace importer(except booleans will not be good). Also transfer vertex aniamtion texture code to blender. My code is based on blender code from youtube but mine uses the relative vertex positions instead of absolute so it works better with smaller motions. The DeusEx character idles looked terrible using absolute positioned vertices.

  • side note play anims via nodes in tS
  • (install RsAnimPlugin will get toolbar, with left most button has command: RsAnimPlugin.CreateProcClip('')
  • select the animation clip node, press the button, add timer event and binaryop node set to operand "mod", A connect to frame, B set to frame count for the clip)
  • or (just copy keyframes)

NOTE: tS bug - transparent texture works poorly, looks good in other apps so don't try to fix in tS

October 26, 2021