Scene.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. -- Generated by: C:\src\anki\out\build\x64-Release-VK\Binaries\GltfImporter.exe CornellBox.gltf .. -rpath Assets -texrpath Assets -v -j 0 -light-scale 0.01839878467931728
  2. local scene = getSceneGraph()
  3. local events = getEventManager()
  4. node = scene:newSceneNode("Mesh_0")
  5. node:newModelComponent():loadModelResource("Assets/Mesh_0_backWall_24a9b01d8fc47286.ankimdl")
  6. trf = Transform.new()
  7. trf:setOrigin(Vec3.new(0.000000, 0.000000, 0.000000))
  8. rot = Mat3.new()
  9. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  10. trf:setRotation(rot)
  11. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  12. node:setLocalTransform(trf)
  13. node = scene:newSceneNode("Mesh_1")
  14. node:newModelComponent():loadModelResource("Assets/Mesh_1_ceiling_3aa8abc0da9fdec8.ankimdl")
  15. trf = Transform.new()
  16. trf:setOrigin(Vec3.new(0.000000, 0.000000, 0.000000))
  17. rot = Mat3.new()
  18. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  19. trf:setRotation(rot)
  20. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  21. node:setLocalTransform(trf)
  22. node = scene:newSceneNode("Mesh_2")
  23. node:newModelComponent():loadModelResource("Assets/Mesh_2_floor_cc46c84f817f093a.ankimdl")
  24. trf = Transform.new()
  25. trf:setOrigin(Vec3.new(0.000000, 0.000000, 0.000000))
  26. rot = Mat3.new()
  27. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  28. trf:setRotation(rot)
  29. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  30. node:setLocalTransform(trf)
  31. node = scene:newSceneNode("Mesh_3")
  32. node:newModelComponent():loadModelResource("Assets/Mesh_3_leftWall_acf66dd2ebcb73e6.ankimdl")
  33. trf = Transform.new()
  34. trf:setOrigin(Vec3.new(0.000000, 0.000000, 0.000000))
  35. rot = Mat3.new()
  36. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  37. trf:setRotation(rot)
  38. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  39. node:setLocalTransform(trf)
  40. node = scene:newSceneNode("Mesh_4")
  41. node:newModelComponent():loadModelResource("Assets/Mesh_4_light_82ddb9b3263c8f6e.ankimdl")
  42. trf = Transform.new()
  43. trf:setOrigin(Vec3.new(0.000000, 0.000000, 0.000000))
  44. rot = Mat3.new()
  45. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  46. trf:setRotation(rot)
  47. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  48. node:setLocalTransform(trf)
  49. node = scene:newSceneNode("Mesh_5")
  50. node:newModelComponent():loadModelResource("Assets/Mesh_5_rightWall_46f15190068c514a.ankimdl")
  51. trf = Transform.new()
  52. trf:setOrigin(Vec3.new(0.000000, 0.000000, 0.000000))
  53. rot = Mat3.new()
  54. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  55. trf:setRotation(rot)
  56. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  57. node:setLocalTransform(trf)
  58. node = scene:newSceneNode("Mesh_7")
  59. node:newModelComponent():loadModelResource("Assets/Mesh_7.001_tallBox_287bd3c185e6905a.ankimdl")
  60. trf = Transform.new()
  61. trf:setOrigin(Vec3.new(-1.675000, 3.600000, -1.450001))
  62. rot = Mat3.new()
  63. rot:setAll(0.958636, 0.000000, 0.284634, 0.000000, 1.000000, 0.000000, -0.284634, 0.000000, 0.958636)
  64. trf:setRotation(rot)
  65. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  66. node:setLocalTransform(trf)
  67. node = scene:newSceneNode("Mesh_6")
  68. node:newModelComponent():loadModelResource("Assets/Mesh_6.001_shortBox_4122029d89b53875.ankimdl")
  69. trf = Transform.new()
  70. trf:setOrigin(Vec3.new(1.637500, 1.800000, 1.862499))
  71. rot = Mat3.new()
  72. rot:setAll(0.966822, 0.000000, -0.255450, 0.000000, 1.000000, 0.000000, 0.255450, 0.000000, 0.966822)
  73. trf:setRotation(rot)
  74. trf:setScale(Vec3.new(5.000000, 5.000000, 5.000000))
  75. node:setLocalTransform(trf)
  76. node = scene:newSceneNode("Camera")
  77. scene:setActiveCameraNode(node)
  78. comp = node:newCameraComponent()
  79. comp:setPerspective(0.100000, 500.000000, getRenderer():getAspectRatio() * 1.024779, 1.024779)
  80. trf = Transform.new()
  81. trf:setOrigin(Vec3.new(0.217066, 6.668793, 17.325689))
  82. rot = Mat3.new()
  83. rot:setAll(0.999854, -0.000334, 0.017085, -0.001690, 0.992972, 0.118341, -0.017005, -0.118352, 0.992826)
  84. trf:setRotation(rot)
  85. trf:setScale(Vec3.new(1.000000, 1.000000, 1.000000))
  86. node:setLocalTransform(trf)
  87. node = scene:newSceneNode("Point")
  88. lcomp = node:newLightComponent()
  89. lcomp:setLightComponentType(LightComponentType.kPoint)
  90. lcomp:setDiffuseColor(Vec4.new(10.000000, 10.000000, 10.000000, 1))
  91. lcomp:setShadowEnabled(1)
  92. lcomp:setRadius(20.000000)
  93. trf = Transform.new()
  94. trf:setOrigin(Vec3.new(0.000000, 8.913514, 0.000000))
  95. rot = Mat3.new()
  96. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, -1.000000, -0.000000)
  97. trf:setRotation(rot)
  98. trf:setScale(Vec3.new(1.000000, 1.000000, 1.000000))
  99. node:setLocalTransform(trf)
  100. node = scene:newSceneNode("Cube.011")
  101. comp = node:newGlobalIlluminationProbeComponent()
  102. trf = Transform.new()
  103. trf:setOrigin(Vec3.new(-0.064907, 4.847455, -0.144611))
  104. rot = Mat3.new()
  105. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000)
  106. trf:setRotation(rot)
  107. trf:setScale(Vec3.new(5.912430, 5.785918, 5.520432))
  108. node:setLocalTransform(trf)