Collada plugin for
After Effects

More info here
VR

TurboCAD to trueSpace to Godot notes

TurboCAD to WebXR workflow notes

Design in TurbodCAD, export collada to trueSpace and finally export collada to the Godot game engine.
Publish to WebXR for a true to scale space that can be experienced in VR.

TurboCAD

Use the house wizard to start the house

  1. new from template, House Template
  2. insert floor plan picture from file - place in a BG layer
  3. draw line to match an image line, say 40ft
  4. Size field enter 40' without pressing enter, scale field shows something like 1.721018, set image scale x and y to match
  5. move image for good origin/player starting point
  6. when placing rooms they can overlap, then just fix walls later
  7. don't fight snapping - no way to turn it off
  8. walls build outward from the center by default
  9. build house and adjust walls, hide slab layer to avoid confusion
  10. add doors and windows
  11. do not add appliances, create and export appliances separately
  12. change line color from layer to direct colors - select by layer then change it

Export

  1. save as version for export preparation
  2. explode walls
  3. explode windows twice
  4. explode doors twice
  5. clear the text and dimension layers
  6. get image plane by explode, add thickness
  7. save, then save as collada format

export cabinetry and appliances from symbols library as collada files.

trueSpace

unofficial patched version plus extra scripts

Unofficial trueSpace Updates - https://www.united3dartists.com/forum/viewforum.php?f=55

Collada importer

Material Utilities

UV all add generic flattened uvs

Collision Script add bounding box based collision mesh to selected object, tool creates Godot and Unreal compatible collision meshes

Import the Collada file

  1. tS import via my collada import, scale 0.3048
  2. result 116 nodes
  3. delete VisualSceneNode
  4. convert to scene instanced materials - use converter included in patched tS
  5. set material editor to scene instancing
  6. autofacet normals is needed - just select all "node*" and do it
    le toolbar > open > organize > select, set to "node"
    autofacet
  7. fix materials default model shader values (Material Utilities - Fix Shiny) - bad export values from tcad
  8. also rename all materials with sensible names (Material Utilities)
  9. save materials to library, rename inside the library
  10. apply constant texture to the image plane geometry and apply planar UV map
  11. if materials already established:
    for each material:

    1. delete the D3D material node
    2. load the material from the library
    3. connect the node
  12. select all "node"s again and quadrify normals scripts, object mode
    quads are needed before flatten uvs will run
  13. uv editor must be open, set flatten max angle to 90 and min segment to 4 for cleaner result
  14. run tool "UV all" to give imported objects UVs
    (now need to fill the uv area - maybe just scale not fill? later, have idea on paper)

Import symbols

  1. material instancing as "None"
  2. import scale 0.3048,
  3. origin to good place on the mesh,
  4. reset Matrix,
  5. fix color,
  6. assign quick cube uv,
  7. name the materials
  8. save to library with same name as tcad symbol, zoom in and have the front of object facing in the +Y direction to get a well lit preview

Add collision meshes - including basic ground and any ramps or standable items

can also add collisions in Godot via the Mesh button that appears center top of the 3d view when a scene mesh is selected.

https://docs.godotengine.org/en/stable/getting_started/workflow/assets/importing_scenes.html
more collision options including -convcol postfix => add mesh shaped convex collision as child in scene, mesh name in scene will not have the "-convcol" postfix
a torus mesh will have 4 convex shapes assigned to it
with -col postfix the triangles of the mesh will be copied and used for collision. Note objects should have unique names before the postfix is assigned.
tS dae exports invisible objects, -noimp postfix can prevent import into godot scene.

tga files will retain transparency exported from tS, so want tga in tS and use tga when copy textures on dae export
note: DefaultTexCoordShader does not export to collada in any standard way
scale the uvs in godot material
emission material need to set color to black or change operator from Add to Multiply
need power of 2 textures for performance
too shiny materials set roughness to 1
TODO - steps to setup Godot for WebXR, links and notes + 1 button script move/look
final result everything is great in oculus rift s, scale good, normalmap looks good
cardboard good, normalmap not as nice as oculus

Material Utilities - Fix Shiny will check for a default model shader specular color equal to the color shader and change it to gray 16

FPS preview

  • open new 3d window, set fov to 1.39
  • convert default 3d view to link editor
  • start fps nav
  • eye position 0.2 = 1.8 - 0.2 = 1.6
  • walk speed 1.4 to match godot script speed
  • FPN Setup.RsObj Script to setup a new 896x896 fpn view

Godot WebXR will start at (0,0,0) facing in tS +Y direction(Godot +Z)

Godot

requires newer versions that include WebXR feature

How to make a VR game for WebXR with Godot

  • script altered for navigation
  • Button is placed at the root level - not clear on page
  • ARVROrigin is placed inside a KinematicBody
  • Capsule collision shape place inside the KinematicBody
  • need to download the ExportTemplates - not clear on page, Editor > Manage Export Templates to download and install

import first dae and first open with "New Inherited" option - cannot find any good info on this option. Several say don't ever do it then others do it all the time. Seems to work so I'll join the do it all the time camp.

Anti Aliasing:
project settings > rendering > quality > Use Fxaa
result looks better

WebXR only works from HTTPS! - vscode https:

ssl for visual studio code https serving (rough notes):

openssl already installed via git bash
windows bug need winpty ahead of openssl command
https://gist.github.com/RagedUnicorn/6379aec82d8f333a8a2220ac7a1931a6
winpty
https://www.akadia.com/services/ssh_test_certificate.html instructions to create ssh_test_certificate
winpty openssl genrsa -des3 -out server.key 1024
pass password goes here
now have new file server.key
winpty openssl req -new -key server.key -out server.csr
now have server.csr file, note: challenge password and company name left blank
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
now have server.crt file
move the server files(server.key, server.csr, server.crt) into Programs/https/ so can use anywhere

have ssl files in c:\Programs\https
create folder ".vscode" in the folder
create "settings.json" inside it

set content of the file

{
    "liveServer.settings.https": {
        "enable": true,
        "cert": "C:\\Programs\\https\\server.crt",
        "key": "C:\\Programs\\https\\server.key",
        "passphrase": "password goes here"
    }
}

WebXR Emulator Extension for both Chrome and Firefox.

Firefox is not complete(has issues with controller buttons) for WebXR, Edge is better

for oculus rift the guardian must be set to see at proper height

Custom Google Cardboard code - root node script
look mode in the code, press button to toggle look and walk modes

cardboard button = select event id=3 get Select Start, Select and Select End
I have the ARVROrigin inside a KinematicBody with CollisionShape Capsule 1.752(5'9") tall, 0.5wide(0.25r)
any way to set the height? - default 1.6m standing how sit?
parent the ARVROrigin inside a spatial and use it to adjust the height relative to 1.6m above ground
currently can move forward backward left and right by tilting the head or by using the left oculus joystick controller
inside tS export dae to a folder with copy textures option then copy the folder into the godot working folder
open and inherit to make godot scene and add into the main scene

transparency works in the web browser but too much would be bad for performance

Spacial material transparent flag works but back face color is white, unshaded works better, maybe lighting issue?

tS inputbitmap usage used in collada export DIFFUSEMAP, NORMALMAP, ALPHAMAP

close godot scene before reimporting collada file changes

KinematicBody Capsule collision - total height is 1.75, radius 0.25, margin 0.04, height is 1.75 - 2* 0.25 - 0.04 = 1.21
October 5 2021