Browse Source

Re-export the physics playground

Panagiotis Christopoulos Charitos 6 years ago
parent
commit
23aae285fc
36 changed files with 629 additions and 180 deletions
  1. BIN
      samples/physics_playground/assets/Asphalt_004_COLOR.ankitex
  2. BIN
      samples/physics_playground/assets/Asphalt_004_DISP.ankitex
  3. BIN
      samples/physics_playground/assets/Asphalt_004_NRM.ankitex
  4. BIN
      samples/physics_playground/assets/Asphalt_004_ROUGH.ankitex
  5. 5 0
      samples/physics_playground/assets/Icosphere.ankicl
  6. BIN
      samples/physics_playground/assets/Icosphere.ankimesh
  7. 8 0
      samples/physics_playground/assets/Icosphere_walls.ankimdl
  8. BIN
      samples/physics_playground/assets/Stone_Wall_007_COLOR.ankitex
  9. BIN
      samples/physics_playground/assets/Stone_Wall_007_DISP.ankitex
  10. BIN
      samples/physics_playground/assets/Stone_Wall_007_NORM.ankitex
  11. BIN
      samples/physics_playground/assets/Stone_Wall_007_ROUGH.ankitex
  12. BIN
      samples/physics_playground/assets/Suzanne.ankimesh
  13. 8 0
      samples/physics_playground/assets/Suzanne_dynamic.ankimdl
  14. 30 0
      samples/physics_playground/assets/dynamic.ankimtl
  15. BIN
      samples/physics_playground/assets/floor.ankimesh
  16. 8 0
      samples/physics_playground/assets/floor_walls.ankimdl
  17. BIN
      samples/physics_playground/assets/physics_playground.blend
  18. 383 145
      samples/physics_playground/assets/scene.lua
  19. 30 0
      samples/physics_playground/assets/sky.ankimtl
  20. BIN
      samples/physics_playground/assets/unbacked/Asphalt_004_COLOR.png
  21. BIN
      samples/physics_playground/assets/unbacked/Asphalt_004_DISP.png
  22. BIN
      samples/physics_playground/assets/unbacked/Asphalt_004_NRM.png
  23. BIN
      samples/physics_playground/assets/unbacked/Asphalt_004_ROUGH.png
  24. BIN
      samples/physics_playground/assets/unbacked/Stone_Wall_007_COLOR.png
  25. BIN
      samples/physics_playground/assets/unbacked/Stone_Wall_007_DISP.png
  26. BIN
      samples/physics_playground/assets/unbacked/Stone_Wall_007_NORM.png
  27. BIN
      samples/physics_playground/assets/unbacked/Stone_Wall_007_ROUGH.png
  28. BIN
      samples/physics_playground/assets/unbacked/physics_playground.blend
  29. BIN
      samples/physics_playground/assets/wall.ankimesh
  30. 8 0
      samples/physics_playground/assets/wall_walls.001.ankimdl
  31. 30 0
      samples/physics_playground/assets/walls.001.ankimtl
  32. BIN
      samples/physics_playground/assets/walls.ankimesh
  33. 30 0
      samples/physics_playground/assets/walls.ankimtl
  34. 8 0
      samples/physics_playground/assets/walls_sky.ankimdl
  35. 79 34
      tools/gltf_importer/Importer.cpp
  36. 2 1
      tools/gltf_importer/Importer.h

BIN
samples/physics_playground/assets/Asphalt_004_COLOR.ankitex


BIN
samples/physics_playground/assets/Asphalt_004_DISP.ankitex


BIN
samples/physics_playground/assets/Asphalt_004_NRM.ankitex


BIN
samples/physics_playground/assets/Asphalt_004_ROUGH.ankitex


+ 5 - 0
samples/physics_playground/assets/Icosphere.ankicl

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<collisionShape>
+	<type>staticMesh</type>
+	<value>assets/Icosphere.ankimesh</value>
+</collisionShape>

BIN
samples/physics_playground/assets/Icosphere.ankimesh


+ 8 - 0
samples/physics_playground/assets/Icosphere_walls.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>assets/Icosphere.ankimesh</mesh>
+			<material>assets/walls.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

BIN
samples/physics_playground/assets/Stone_Wall_007_COLOR.ankitex


BIN
samples/physics_playground/assets/Stone_Wall_007_DISP.ankitex


BIN
samples/physics_playground/assets/Stone_Wall_007_NORM.ankitex


BIN
samples/physics_playground/assets/Stone_Wall_007_ROUGH.ankitex


BIN
samples/physics_playground/assets/Suzanne.ankimesh


+ 8 - 0
samples/physics_playground/assets/Suzanne_dynamic.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>assets/Suzanne.ankimesh</mesh>
+			<material>assets/dynamic.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 30 - 0
samples/physics_playground/assets/dynamic.ankimtl

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- This file is auto generated by ImporterMaterial.cpp -->
+<material shaderProgram="shaders/GBufferGeneric.glslp">
+	<mutators>
+		<mutator name="DIFFUSE_TEX" value="0"/>
+		<mutator name="SPECULAR_TEX" value="0"/>
+		<mutator name="ROUGHNESS_TEX" value="0"/>
+		<mutator name="METAL_TEX" value="0"/>
+		<mutator name="NORMAL_TEX" value="0"/>
+		<mutator name="PARALLAX" value="0"/>
+		<mutator name="EMISSIVE_TEX" value="0"/>
+	</mutators>
+
+	<inputs>
+		<input shaderInput="mvp" builtin="MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="prevMvp" builtin="PREVIOUS_MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="rotationMat" builtin="ROTATION_MATRIX"/>
+		<input shaderInput="globalSampler" builtin="GLOBAL_SAMPLER"/>
+		
+
+		<input shaderInput="diffColor" value="0.097887 0.273263 0.800000"/>
+		<input shaderInput="specColor" value="0.040000 0.040000 0.040000"/>
+		<input shaderInput="roughness" value="0.000000" />
+		<input shaderInput="metallic" value="0.609091" />
+		
+		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>
+		<input shaderInput="subsurface" value="0.000000"/>
+		
+	</inputs>
+</material>

BIN
samples/physics_playground/assets/floor.ankimesh


+ 8 - 0
samples/physics_playground/assets/floor_walls.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>assets/floor.ankimesh</mesh>
+			<material>assets/walls.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

BIN
samples/physics_playground/assets/physics_playground.blend


+ 383 - 145
samples/physics_playground/assets/scene.lua

@@ -1,287 +1,525 @@
 local scene = getSceneGraph()
 local scene = getSceneGraph()
 local events = getEventManager()
 local events = getEventManager()
-local rot
-local node
-local inst
-local lcomp
 
 
-node = scene:newGpuParticleEmitterNode("particles0", "assets/gpu_sparks.ankipart")
+node = scene:newGpuParticleEmitterNode("Cube.020", "assets/gpu_sparks.ankipart")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(25.4112, 0.543148, 22.6792, 0))
+trf:setOrigin(Vec4.new(25.411236, 0.543148, 22.679190, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(0.5)
+trf:setScale(0.500000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 
 
-node = scene:newReflectionProbeNode("reflprobe0", Vec4.new(-134.112, -134.112, -134.112, 0), Vec4.new(134.112, 134.112, 134.112, 0))
+node = scene:newModelNode("Icosphere.001", "assets/Icosphere_walls.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(0, 9.1132, 0, 0))
+trf:setOrigin(Vec4.new(25.411236, 3.345554, 28.742823, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.912920)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Icosphere.001_cl", "assets/Icosphere.ankicl", trf)
 
 
-node = scene:newGlobalIlluminationProbeNode("giprobe0")
-comp = node:getSceneNodeBase():getGlobalIlluminationProbeComponent()
-comp:setBoundingBox(Vec4.new(-128.498, -128.498, -128.498, 0), Vec4.new(128.498, 128.498, 128.498, 0))
-comp:setCellSize(32)
+node = scene:newModelNode("Icosphere", "assets/Icosphere_walls.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(-0.0683718, 9.1926, -0.126609, 0))
+trf:setOrigin(Vec4.new(25.411236, 3.316930, 22.637743, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.264235)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Icosphere_cl", "assets/Icosphere.ankicl", trf)
 
 
-node = scene:newModelNode("floorwalls-materialnone0", "assets/floorwalls-material.ankimdl")
+node = scene:newModelNode("Cube.019", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(0, -5.06862, 0, 0))
+trf:setOrigin(Vec4.new(30.798492, 2.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("floorwalls-materialnone0_cl", "assets/floor.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.019_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallssky-materialnone1", "assets/wallssky-material.ankimdl")
+node = scene:newModelNode("Cube.018", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(0, 9.10935, 0, 0))
+trf:setOrigin(Vec4.new(29.798492, 1.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(10)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.018_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("Suzannedynamic-materialnone2", "assets/Suzannedynamic-material.ankimdl")
+node = scene:newModelNode("Cube.017", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(179.045, 9.70113, 0, 0))
+trf:setOrigin(Vec4.new(28.798492, 0.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("Suzannedynamic-materialnone2_cl", "assets/Suzanne.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.017_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone3", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.016", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(37.2714, 2.88619, 0, 0))
+trf:setOrigin(Vec4.new(31.798492, 3.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone3_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.016_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone4", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.015", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(37.2714, 2.88619, -6, 0))
+trf:setOrigin(Vec4.new(32.798492, 4.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone4_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.015_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone5", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.014", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(37.2714, 2.88619, 6, 0))
+trf:setOrigin(Vec4.new(33.798492, 5.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone5_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.014_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone6", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.013", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(37.2714, 2.88619, 12, 0))
+trf:setOrigin(Vec4.new(39.798492, 6.376611, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone6_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.013_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone7", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.012", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(42.2714, 2.88619, 12, 0))
+trf:setOrigin(Vec4.new(39.798492, 6.376611, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone7_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.012_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone8", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.011", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(42.2714, 2.88619, 6, 0))
+trf:setOrigin(Vec4.new(39.798492, 6.376611, 6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone8_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.011_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone9", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.010", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(42.2714, 2.88619, -6, 0))
+trf:setOrigin(Vec4.new(39.798492, 6.376611, 12.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone9_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.010_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone10", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.009", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(42.2714, 2.88619, 0, 0))
+trf:setOrigin(Vec4.new(42.271385, 2.886189, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone10_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.009_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone11", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.008", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(39.7985, 6.37661, 12, 0))
+trf:setOrigin(Vec4.new(42.271385, 2.886189, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone11_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.008_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone12", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.007", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(39.7985, 6.37661, 6, 0))
+trf:setOrigin(Vec4.new(42.271385, 2.886189, 6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone12_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.007_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone13", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.006", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(39.7985, 6.37661, -6, 0))
+trf:setOrigin(Vec4.new(42.271385, 2.886189, 12.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone13_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.006_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone14", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.005", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(39.7985, 6.37661, 0, 0))
+trf:setOrigin(Vec4.new(37.271385, 2.886189, 12.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone14_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.005_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone15", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.004", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(33.7985, 5.37661, -6, 0))
+trf:setOrigin(Vec4.new(37.271385, 2.886189, 6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone15_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.004_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone16", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.003", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(32.7985, 4.37661, -6, 0))
+trf:setOrigin(Vec4.new(37.271385, 2.886189, -6.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone16_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.003_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone17", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.002", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(31.7985, 3.37661, -6, 0))
+trf:setOrigin(Vec4.new(37.271385, 2.886189, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone17_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube.002_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone18", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Suzanne", "assets/Suzanne_dynamic.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(28.7985, 0.376611, -6, 0))
+trf:setOrigin(Vec4.new(179.044937, 9.701135, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone18_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Suzanne_cl", "assets/Suzanne.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone19", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube.001", "assets/walls_sky.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(29.7985, 1.37661, -6, 0))
+trf:setOrigin(Vec4.new(0.000000, 9.109353, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(10.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone19_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newModelNode("wallwalls_001-materialnone20", "assets/wallwalls_001-material.ankimdl")
+node = scene:newModelNode("Cube", "assets/floor_walls.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(30.7985, 2.37661, -6, 0))
+trf:setOrigin(Vec4.new(0.000000, -5.068616, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("wallwalls_001-materialnone20_cl", "assets/wall.ankicl", trf)
+node2 = scene:newStaticCollisionNode("Cube_cl", "assets/floor.ankicl", trf)
 
 
-node = scene:newModelNode("Icospherewalls-materialnone21", "assets/Icospherewalls-material.ankimdl")
+node = scene:newDirectionalLightNode("Lamp_Orientation")
+lcomp = node:getSceneNodeBase():getLightComponent()
+lcomp:setDiffuseColor(Vec4.new(50.000000, 50.000000, 50.000000, 1))
+lcomp:setShadowEnabled(1)
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(25.4112, 3.31693, 22.6377, 0))
+trf:setOrigin(Vec4.new(4.076245, 74.444725, -1.005454, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.649201, -0.658183, -0.381226, 0.000000, 0.506372, 0.000000, 0.862315, 0.000000, -0.567562, -0.752858, 0.333286, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1.26424)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 
 
-node = scene:newModelNode("Icospherewalls-materialnone22", "assets/Icospherewalls-material.ankimdl")
+node = scene:newPerspectiveCameraNode("Camera_Orientation")
+scene:setActiveCameraNode(node:getSceneNodeBase())
+frustumc = node:getSceneNodeBase():getFrustumComponent()
+frustumc:setPerspective(0.100000, 500.000000, getMainRenderer():getAspectRatio() * 0.750416, 0.750416)
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(25.4112, 3.34555, 28.7428, 0))
+trf:setOrigin(Vec4.new(7.481132, 7.870111, 6.507640, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+rot:setAll(0.685921, -0.324013, 0.651558, 0.000000, 0.000000, 0.895396, 0.445271, 0.000000, -0.727676, -0.305421, 0.614170, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1.91292)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 
 
-node = scene:newDirectionalLightNode("Lamp")
-lcomp = node:getSceneNodeBase():getLightComponent()
-lcomp:setDiffuseColor(Vec4.new(50, 50, 50, 1))
+node = scene:newModelNode("Cube.021", "assets/wall_walls.001.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(4.07624, 74.4447, -1.00545, 0))
+trf:setOrigin(Vec4.new(39.798492, 6.376611, -12.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(0.649201, -0.658201, -0.381195, 0, 0.506372, 3.995e-05, 0.862315, 0, -0.567562, -0.752842, 0.33332, 0)
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(1.000000)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-lcomp:setShadowEnabled(1)
+node2 = scene:newStaticCollisionNode("Cube.021_cl", "assets/wall.ankicl", trf)
 
 
-node = scene:newPerspectiveCameraNode("Camera")
-scene:setActiveCameraNode(node:getSceneNodeBase())
-frustumc = node:getSceneNodeBase():getFrustumComponent()
-frustumc:setPerspective(0.1, 500, 1.22173, 1.0 / getMainRenderer():getAspectRatio() * 1.22173)
+node = scene:newModelNode("Cube.022", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(42.271385, 2.886189, -12.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.022_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.023", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(37.271385, 2.886189, -12.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.023_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.024", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.798492, 6.376611, -18.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.024_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.025", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(42.271385, 2.886189, -18.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.025_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.026", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(37.271385, 2.886189, -18.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.026_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.027", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(34.761005, 2.886189, -21.498241, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.027_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.028", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(44.761005, 2.886189, -21.498241, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.028_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.029", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(47.271385, 2.886189, -25.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.029_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.030", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(32.271385, 2.886189, -25.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.030_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.031", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(32.271385, 2.886189, -31.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.031_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.032", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(47.271385, 2.886189, -31.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.032_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.033", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(44.761005, 2.886189, -34.498241, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.033_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.034", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(38.761005, 2.886189, -34.498241, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.034_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.035", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(34.761005, 2.886189, -34.498241, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(0.995130)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.035_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.036", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(34.798492, 6.376611, -32.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.036_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.038", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(34.798492, 6.376611, -24.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.038_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.039", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(34.798492, 6.398044, -28.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.039_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.037", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(44.798492, 6.376611, -32.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.037_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.040", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(44.798492, 6.376611, -24.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.040_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.041", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(44.798492, 6.398044, -28.000000, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.041_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.042", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.798492, 6.334259, -31.947594, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.042_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.043", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.798492, 6.334259, -23.947592, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.043_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("Cube.044", "assets/wall_walls.001.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.798492, 6.355691, -27.947592, 0))
+rot = Mat3x4.new()
+rot:setAll(0.000000, 1.000000, 0.000000, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(1.000000)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node2 = scene:newStaticCollisionNode("Cube.044_cl", "assets/wall.ankicl", trf)
+
+node = scene:newGlobalIlluminationProbeNode("refl_probe.002")
+comp = node:getSceneNodeBase():getGlobalIlluminationProbeComponent()
+comp:setBoundingBox(Vec4.new(-128.498062, -128.498062, -128.498062, 0), Vec4.new(128.498062, 128.498062, 128.498062, 0))
+comp:setCellSize(32.000000)
+trf = Transform.new()
+trf:setOrigin(Vec4.new(-0.068372, 9.192602, -0.126609, 0))
+rot = Mat3x4.new()
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
+trf:setRotation(rot)
+trf:setScale(128.498062)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+
+node = scene:newReflectionProbeNode("refl_probe", Vec4.new(-134.111938, -134.111938, -134.111938, 0), Vec4.new(134.111938, 134.111938, 134.111938, 0))
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(7.48113, 7.87011, 6.50764, 0))
+trf:setOrigin(Vec4.new(0.000000, 9.113202, 0.000000, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
-rot:setAll(0.685921, -0.323983, 0.651573, 0, 0, 0.895416, 0.44523, 0, -0.727676, -0.305392, 0.614184, 0)
+rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
 trf:setRotation(rot)
 trf:setRotation(rot)
-trf:setScale(1)
+trf:setScale(134.111938)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)

+ 30 - 0
samples/physics_playground/assets/sky.ankimtl

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- This file is auto generated by ImporterMaterial.cpp -->
+<material shaderProgram="shaders/GBufferGeneric.glslp">
+	<mutators>
+		<mutator name="DIFFUSE_TEX" value="0"/>
+		<mutator name="SPECULAR_TEX" value="0"/>
+		<mutator name="ROUGHNESS_TEX" value="0"/>
+		<mutator name="METAL_TEX" value="0"/>
+		<mutator name="NORMAL_TEX" value="0"/>
+		<mutator name="PARALLAX" value="0"/>
+		<mutator name="EMISSIVE_TEX" value="0"/>
+	</mutators>
+
+	<inputs>
+		<input shaderInput="mvp" builtin="MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="prevMvp" builtin="PREVIOUS_MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="rotationMat" builtin="ROTATION_MATRIX"/>
+		<input shaderInput="globalSampler" builtin="GLOBAL_SAMPLER"/>
+		
+
+		<input shaderInput="diffColor" value="0.015215 0.459168 0.800000"/>
+		<input shaderInput="specColor" value="0.040000 0.040000 0.040000"/>
+		<input shaderInput="roughness" value="0.500000" />
+		<input shaderInput="metallic" value="0.000000" />
+		
+		<input shaderInput="emission" value="0.110506 0.266543 1.000000"/>
+		<input shaderInput="subsurface" value="0.000000"/>
+		
+	</inputs>
+</material>

BIN
samples/physics_playground/assets/unbacked/Asphalt_004_COLOR.png


BIN
samples/physics_playground/assets/unbacked/Asphalt_004_DISP.png


BIN
samples/physics_playground/assets/unbacked/Asphalt_004_NRM.png


BIN
samples/physics_playground/assets/unbacked/Asphalt_004_ROUGH.png


BIN
samples/physics_playground/assets/unbacked/Stone_Wall_007_COLOR.png


BIN
samples/physics_playground/assets/unbacked/Stone_Wall_007_DISP.png


BIN
samples/physics_playground/assets/unbacked/Stone_Wall_007_NORM.png


BIN
samples/physics_playground/assets/unbacked/Stone_Wall_007_ROUGH.png


BIN
samples/physics_playground/assets/unbacked/physics_playground.blend


BIN
samples/physics_playground/assets/wall.ankimesh


+ 8 - 0
samples/physics_playground/assets/wall_walls.001.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>assets/wall.ankimesh</mesh>
+			<material>assets/walls.001.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 30 - 0
samples/physics_playground/assets/walls.001.ankimtl

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- This file is auto generated by ImporterMaterial.cpp -->
+<material shaderProgram="shaders/GBufferGeneric.glslp">
+	<mutators>
+		<mutator name="DIFFUSE_TEX" value="1"/>
+		<mutator name="SPECULAR_TEX" value="0"/>
+		<mutator name="ROUGHNESS_TEX" value="1"/>
+		<mutator name="METAL_TEX" value="0"/>
+		<mutator name="NORMAL_TEX" value="1"/>
+		<mutator name="PARALLAX" value="0"/>
+		<mutator name="EMISSIVE_TEX" value="0"/>
+	</mutators>
+
+	<inputs>
+		<input shaderInput="mvp" builtin="MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="prevMvp" builtin="PREVIOUS_MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="rotationMat" builtin="ROTATION_MATRIX"/>
+		<input shaderInput="globalSampler" builtin="GLOBAL_SAMPLER"/>
+		
+
+		<input shaderInput="diffTex" value="assets/Stone_Wall_007_COLOR.ankitex"/>
+		<input shaderInput="specColor" value="0.040000 0.040000 0.040000"/>
+		<input shaderInput="roughnessTex" value="assets/Stone_Wall_007_ROUGH.ankitex"/>
+		<input shaderInput="metallic" value="0.000000" />
+		<input shaderInput="normalTex" value="assets/Stone_Wall_007_NORM.ankitex"/>
+		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>
+		<input shaderInput="subsurface" value="0.000000"/>
+		
+	</inputs>
+</material>

BIN
samples/physics_playground/assets/walls.ankimesh


+ 30 - 0
samples/physics_playground/assets/walls.ankimtl

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- This file is auto generated by ImporterMaterial.cpp -->
+<material shaderProgram="shaders/GBufferGeneric.glslp">
+	<mutators>
+		<mutator name="DIFFUSE_TEX" value="1"/>
+		<mutator name="SPECULAR_TEX" value="0"/>
+		<mutator name="ROUGHNESS_TEX" value="1"/>
+		<mutator name="METAL_TEX" value="0"/>
+		<mutator name="NORMAL_TEX" value="1"/>
+		<mutator name="PARALLAX" value="0"/>
+		<mutator name="EMISSIVE_TEX" value="0"/>
+	</mutators>
+
+	<inputs>
+		<input shaderInput="mvp" builtin="MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="prevMvp" builtin="PREVIOUS_MODEL_VIEW_PROJECTION_MATRIX"/>
+		<input shaderInput="rotationMat" builtin="ROTATION_MATRIX"/>
+		<input shaderInput="globalSampler" builtin="GLOBAL_SAMPLER"/>
+		
+
+		<input shaderInput="diffTex" value="assets/Asphalt_004_COLOR.ankitex"/>
+		<input shaderInput="specColor" value="0.040000 0.040000 0.040000"/>
+		<input shaderInput="roughnessTex" value="assets/Asphalt_004_ROUGH.ankitex"/>
+		<input shaderInput="metallic" value="0.000000" />
+		<input shaderInput="normalTex" value="assets/Asphalt_004_NRM.ankitex"/>
+		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>
+		<input shaderInput="subsurface" value="0.000000"/>
+		
+	</inputs>
+</material>

+ 8 - 0
samples/physics_playground/assets/walls_sky.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>assets/walls.ankimesh</mesh>
+			<material>assets/sky.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 79 - 34
tools/gltf_importer/Importer.cpp

@@ -360,20 +360,24 @@ Error Importer::visitNode(
 		return threadErr;
 		return threadErr;
 	}
 	}
 
 
-	Transform localTrf;
 	HashMapAuto<CString, StringAuto> outExtras(m_alloc);
 	HashMapAuto<CString, StringAuto> outExtras(m_alloc);
-	Bool dummyNode = false;
 	if(node.light)
 	if(node.light)
 	{
 	{
+		ANKI_CHECK(writeLight(node, parentExtras));
+
+		Transform localTrf;
 		ANKI_CHECK(getNodeTransform(node, localTrf));
 		ANKI_CHECK(getNodeTransform(node, localTrf));
 		localTrf.setScale(1.0f); // Remove scale
 		localTrf.setScale(1.0f); // Remove scale
-		ANKI_CHECK(writeLight(node, parentExtras));
+		ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 	}
 	}
 	else if(node.camera)
 	else if(node.camera)
 	{
 	{
+		ANKI_CHECK(writeCamera(node, parentExtras));
+
+		Transform localTrf;
 		ANKI_CHECK(getNodeTransform(node, localTrf));
 		ANKI_CHECK(getNodeTransform(node, localTrf));
 		localTrf.setScale(1.0f); // Remove scale
 		localTrf.setScale(1.0f); // Remove scale
-		ANKI_CHECK(writeCamera(node, parentExtras));
+		ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 	}
 	}
 	else if(node.mesh)
 	else if(node.mesh)
 	{
 	{
@@ -384,8 +388,6 @@ Error Importer::visitNode(
 		HashMapAuto<CString, StringAuto>::Iterator it;
 		HashMapAuto<CString, StringAuto>::Iterator it;
 		if((it = extras.find("particles")) != extras.getEnd())
 		if((it = extras.find("particles")) != extras.getEnd())
 		{
 		{
-			ANKI_CHECK(getNodeTransform(node, localTrf));
-
 			const StringAuto& fname = *it;
 			const StringAuto& fname = *it;
 
 
 			Bool gpuParticles = false;
 			Bool gpuParticles = false;
@@ -398,11 +400,13 @@ Error Importer::visitNode(
 				(gpuParticles) ? "Gpu" : "",
 				(gpuParticles) ? "Gpu" : "",
 				getNodeName(node).cstr(),
 				getNodeName(node).cstr(),
 				fname.cstr()));
 				fname.cstr()));
+
+			Transform localTrf;
+			ANKI_CHECK(getNodeTransform(node, localTrf));
+			ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 		}
 		}
 		else if((it = extras.find("collision")) != extras.getEnd() && *it == "true")
 		else if((it = extras.find("collision")) != extras.getEnd() && *it == "true")
 		{
 		{
-			ANKI_CHECK(getNodeTransform(node, localTrf));
-
 			// Write colission mesh
 			// Write colission mesh
 			{
 			{
 				StringAuto fname(m_alloc);
 				StringAuto fname(m_alloc);
@@ -420,6 +424,10 @@ Error Importer::visitNode(
 				getNodeName(node).cstr(),
 				getNodeName(node).cstr(),
 				m_rpath.cstr(),
 				m_rpath.cstr(),
 				node.mesh->name));
 				node.mesh->name));
+
+			Transform localTrf;
+			ANKI_CHECK(getNodeTransform(node, localTrf));
+			ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 		}
 		}
 		else if((it = extras.find("reflection_probe")) != extras.getEnd() && *it == "true")
 		else if((it = extras.find("reflection_probe")) != extras.getEnd() && *it == "true")
 		{
 		{
@@ -432,8 +440,6 @@ Error Importer::visitNode(
 			const Vec3 aabbMin = tsl - half - tsl;
 			const Vec3 aabbMin = tsl - half - tsl;
 			const Vec3 aabbMax = tsl + half - tsl;
 			const Vec3 aabbMax = tsl + half - tsl;
 
 
-			localTrf = Transform(tsl.xyz0(), Mat3x4(rot), 1.0f);
-
 			ANKI_CHECK(m_sceneFile.writeText(
 			ANKI_CHECK(m_sceneFile.writeText(
 				"\nnode = scene:newReflectionProbeNode(\"%s\", Vec4.new(%f, %f, %f, 0), Vec4.new(%f, %f, %f, 0))\n",
 				"\nnode = scene:newReflectionProbeNode(\"%s\", Vec4.new(%f, %f, %f, 0), Vec4.new(%f, %f, %f, 0))\n",
 				getNodeName(node).cstr(),
 				getNodeName(node).cstr(),
@@ -443,6 +449,10 @@ Error Importer::visitNode(
 				aabbMax.x(),
 				aabbMax.x(),
 				aabbMax.y(),
 				aabbMax.y(),
 				aabbMax.z()));
 				aabbMax.z()));
+
+			Transform localTrf = Transform(tsl.xyz0(), Mat3x4(rot), 1.0f);
+			ANKI_CHECK(getNodeTransform(node, localTrf));
+			ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 		}
 		}
 		else if((it = extras.find("gi_probe")) != extras.getEnd() && *it == "true")
 		else if((it = extras.find("gi_probe")) != extras.getEnd() && *it == "true")
 		{
 		{
@@ -455,8 +465,6 @@ Error Importer::visitNode(
 			const Vec3 aabbMin = tsl - half - tsl;
 			const Vec3 aabbMin = tsl - half - tsl;
 			const Vec3 aabbMax = tsl + half - tsl;
 			const Vec3 aabbMax = tsl + half - tsl;
 
 
-			localTrf = Transform(tsl.xyz0(), Mat3x4(rot), 1.0f);
-
 			F32 fadeDistance = -1.0f;
 			F32 fadeDistance = -1.0f;
 			if((it = extras.find("gi_probe_fade_distance")) != extras.getEnd())
 			if((it = extras.find("gi_probe_fade_distance")) != extras.getEnd())
 			{
 			{
@@ -490,16 +498,13 @@ Error Importer::visitNode(
 			{
 			{
 				ANKI_CHECK(m_sceneFile.writeText("comp:setCellSize(%f)\n", cellSize));
 				ANKI_CHECK(m_sceneFile.writeText("comp:setCellSize(%f)\n", cellSize));
 			}
 			}
+
+			Transform localTrf = Transform(tsl.xyz0(), Mat3x4(rot), 1.0f);
+			ANKI_CHECK(getNodeTransform(node, localTrf));
+			ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 		}
 		}
 		else if((it = extras.find("decal")) != extras.getEnd() && *it == "true")
 		else if((it = extras.find("decal")) != extras.getEnd() && *it == "true")
 		{
 		{
-			Vec3 tsl;
-			Mat3 rot;
-			Vec3 scale;
-			getNodeTransform(node, tsl, rot, scale);
-
-			localTrf = Transform(tsl.xyz0(), Mat3x4(rot), 1.0f);
-
 			StringAuto diffuseAtlas(m_alloc);
 			StringAuto diffuseAtlas(m_alloc);
 			if((it = extras.find("decal_diffuse_atlas")) != extras.getEnd())
 			if((it = extras.find("decal_diffuse_atlas")) != extras.getEnd())
 			{
 			{
@@ -553,13 +558,19 @@ Error Importer::visitNode(
 					specularRougnessMetallicSubtexture.cstr(),
 					specularRougnessMetallicSubtexture.cstr(),
 					specularRougnessMetallicFactor));
 					specularRougnessMetallicFactor));
 			}
 			}
+
+			Vec3 tsl;
+			Mat3 rot;
+			Vec3 scale;
+			getNodeTransform(node, tsl, rot, scale);
+			Transform localTrf = Transform(tsl.xyz0(), Mat3x4(rot), 1.0f);
+			ANKI_CHECK(getNodeTransform(node, localTrf));
+			ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
 		}
 		}
 		else
 		else
 		{
 		{
 			// Model node
 			// Model node
 
 
-			ANKI_CHECK(getNodeTransform(node, localTrf));
-
 			// Async because it's slow
 			// Async because it's slow
 			struct Ctx
 			struct Ctx
 			{
 			{
@@ -567,6 +578,7 @@ Error Importer::visitNode(
 				cgltf_mesh* m_mesh;
 				cgltf_mesh* m_mesh;
 				cgltf_material* m_mtl;
 				cgltf_material* m_mtl;
 				cgltf_skin* m_skin;
 				cgltf_skin* m_skin;
+				Bool m_selfCollision;
 			};
 			};
 			Ctx* ctx = m_alloc.newInstance<Ctx>();
 			Ctx* ctx = m_alloc.newInstance<Ctx>();
 			ctx->m_importer = this;
 			ctx->m_importer = this;
@@ -574,6 +586,10 @@ Error Importer::visitNode(
 			ctx->m_mtl = node.mesh->primitives[0].material;
 			ctx->m_mtl = node.mesh->primitives[0].material;
 			ctx->m_skin = node.skin;
 			ctx->m_skin = node.skin;
 
 
+			HashMapAuto<CString, StringAuto>::Iterator it2;
+			const Bool selfCollision = (it2 = extras.find("collision_mesh")) != extras.getEnd() && *it2 == "self";
+			ctx->m_selfCollision = selfCollision;
+
 			m_hive->submitTask(
 			m_hive->submitTask(
 				[](void* userData, U32 threadId, ThreadHive& hive, ThreadHiveSemaphore* signalSemaphore) {
 				[](void* userData, U32 threadId, ThreadHive& hive, ThreadHiveSemaphore* signalSemaphore) {
 					Ctx& self = *static_cast<Ctx*>(userData);
 					Ctx& self = *static_cast<Ctx*>(userData);
@@ -595,6 +611,11 @@ Error Importer::visitNode(
 						err = self.m_importer->writeSkeleton(*self.m_skin);
 						err = self.m_importer->writeSkeleton(*self.m_skin);
 					}
 					}
 
 
+					if(!err && self.m_selfCollision)
+					{
+						err = self.m_importer->writeCollisionMesh(*self.m_mesh);
+					}
+
 					if(err)
 					if(err)
 					{
 					{
 						self.m_importer->m_errorInThread.store(err._getCode());
 						self.m_importer->m_errorInThread.store(err._getCode());
@@ -605,27 +626,33 @@ Error Importer::visitNode(
 				ctx);
 				ctx);
 
 
 			ANKI_CHECK(writeModelNode(node, parentExtras));
 			ANKI_CHECK(writeModelNode(node, parentExtras));
+
+			Transform localTrf;
+			ANKI_CHECK(getNodeTransform(node, localTrf));
+			ANKI_CHECK(writeTransform(parentTrf.combineTransformations(localTrf)));
+
+			if(selfCollision)
+			{
+				ANKI_CHECK(
+					m_sceneFile.writeText("node2 = scene:newStaticCollisionNode(\"%s_cl\", \"%s%s.ankicl\", trf)\n",
+						getNodeName(node).cstr(),
+						m_rpath.cstr(),
+						node.mesh->name));
+			}
 		}
 		}
 	}
 	}
 	else
 	else
 	{
 	{
 		ANKI_GLTF_LOGW("Ignoring node %s. Assuming transform node", getNodeName(node).cstr());
 		ANKI_GLTF_LOGW("Ignoring node %s. Assuming transform node", getNodeName(node).cstr());
 		ANKI_CHECK(getExtras(node.extras, outExtras));
 		ANKI_CHECK(getExtras(node.extras, outExtras));
-		ANKI_CHECK(getNodeTransform(node, localTrf));
-		dummyNode = true;
-	}
-
-	// Write transform
-	Transform trf = parentTrf.combineTransformations(localTrf);
-	if(!dummyNode)
-	{
-		ANKI_CHECK(writeTransform(trf));
 	}
 	}
 
 
 	// Visit children
 	// Visit children
+	Transform nodeTrf;
+	ANKI_CHECK(getNodeTransform(node, nodeTrf));
 	for(cgltf_node* const* c = node.children; c < node.children + node.children_count; ++c)
 	for(cgltf_node* const* c = node.children; c < node.children + node.children_count; ++c)
 	{
 	{
-		ANKI_CHECK(visitNode(*(*c), (dummyNode) ? trf : Transform::getIdentity(), outExtras));
+		ANKI_CHECK(visitNode(*(*c), nodeTrf, outExtras));
 	}
 	}
 
 
 	return Error::NONE;
 	return Error::NONE;
@@ -919,6 +946,26 @@ Error Importer::writeSkeleton(const cgltf_skin& skin)
 	return Error::NONE;
 	return Error::NONE;
 }
 }
 
 
+Error Importer::writeCollisionMesh(const cgltf_mesh& mesh)
+{
+	StringAuto fname(m_alloc);
+	fname.sprintf("%s%s.ankicl", m_outDir.cstr(), mesh.name);
+	ANKI_GLTF_LOGI("Importing collision mesh %s", fname.cstr());
+
+	// Write file
+	File file;
+	ANKI_CHECK(file.open(fname.toCString(), FileOpenFlag::WRITE));
+
+	ANKI_CHECK(file.writeText("%s\n", XML_HEADER));
+
+	ANKI_CHECK(file.writeText("<collisionShape>\n\t<type>staticMesh</type>\n\t<value>"
+							  "%s%s.ankimesh</value>\n</collisionShape>\n",
+		m_rpath.cstr(),
+		mesh.name));
+
+	return Error::NONE;
+}
+
 Error Importer::writeLight(const cgltf_node& node, const HashMapAuto<CString, StringAuto>& parentExtras)
 Error Importer::writeLight(const cgltf_node& node, const HashMapAuto<CString, StringAuto>& parentExtras)
 {
 {
 	const cgltf_light& light = *node.light;
 	const cgltf_light& light = *node.light;
@@ -1082,9 +1129,7 @@ Error Importer::writeModelNode(const cgltf_node& node, const HashMapAuto<CString
 	ANKI_CHECK(m_sceneFile.writeText(
 	ANKI_CHECK(m_sceneFile.writeText(
 		"\nnode = scene:newModelNode(\"%s\", \"%s\")\n", getNodeName(node).cstr(), modelFname.cstr()));
 		"\nnode = scene:newModelNode(\"%s\", \"%s\")\n", getNodeName(node).cstr(), modelFname.cstr()));
 
 
-	// TODO: collision mesh
-
 	return Error::NONE;
 	return Error::NONE;
 }
 }
 
 
-} // end namespace anki
+} // end namespace anki

+ 2 - 1
tools/gltf_importer/Importer.h

@@ -86,6 +86,7 @@ private:
 	ANKI_USE_RESULT Error writeModel(const cgltf_mesh& mesh, CString skinName);
 	ANKI_USE_RESULT Error writeModel(const cgltf_mesh& mesh, CString skinName);
 	ANKI_USE_RESULT Error writeAnimation(const cgltf_animation& anim);
 	ANKI_USE_RESULT Error writeAnimation(const cgltf_animation& anim);
 	ANKI_USE_RESULT Error writeSkeleton(const cgltf_skin& skin);
 	ANKI_USE_RESULT Error writeSkeleton(const cgltf_skin& skin);
+	ANKI_USE_RESULT Error writeCollisionMesh(const cgltf_mesh& mesh);
 
 
 	// Scene
 	// Scene
 	ANKI_USE_RESULT Error writeTransform(const Transform& trf);
 	ANKI_USE_RESULT Error writeTransform(const Transform& trf);
@@ -121,4 +122,4 @@ void Importer::visitAccessor(const cgltf_accessor& accessor, TFunc func)
 	}
 	}
 }
 }
 
 
-} // end namespace anki
+} // end namespace anki