Browse Source

Add more stuff in the physics playground

Panagiotis Christopoulos Charitos 7 years ago
parent
commit
2a4ba6c516

+ 3 - 3
samples/physics_playground/Main.cpp

@@ -56,7 +56,7 @@ Error MyApp::sampleExtraInit()
 	{
 	{
 		ModelNode* monkey;
 		ModelNode* monkey;
 		ANKI_CHECK(
 		ANKI_CHECK(
-			getSceneGraph().newSceneNode<ModelNode>("monkey_p2p", monkey, "assets/SuzanneMaterial-material.ankimdl"));
+			getSceneGraph().newSceneNode<ModelNode>("monkey_p2p", monkey, "assets/Suzannedynamic-material.ankimdl"));
 
 
 		BodyNode* body;
 		BodyNode* body;
 		ANKI_CHECK(getSceneGraph().newSceneNode<BodyNode>("bmonkey_p2p", body, "assets/Suzanne.ankicl"));
 		ANKI_CHECK(getSceneGraph().newSceneNode<BodyNode>("bmonkey_p2p", body, "assets/Suzanne.ankicl"));
@@ -79,7 +79,7 @@ Error MyApp::sampleExtraInit()
 			ANKI_CHECK(getSceneGraph().newSceneNode<ModelNode>(
 			ANKI_CHECK(getSceneGraph().newSceneNode<ModelNode>(
 				StringAuto(getAllocator()).sprintf("monkey_chain%u", i).toCString(),
 				StringAuto(getAllocator()).sprintf("monkey_chain%u", i).toCString(),
 				monkey,
 				monkey,
-				"assets/SuzanneMaterial-material.ankimdl"));
+				"assets/Suzannedynamic-material.ankimdl"));
 
 
 			Transform trf(Vec4(-4.3f, 12.0f, -3.0f, 0.0f), Mat3x4::getIdentity(), 1.0f);
 			Transform trf(Vec4(-4.3f, 12.0f, -3.0f, 0.0f), Mat3x4::getIdentity(), 1.0f);
 			trf.getOrigin().y() -= i * 1.25f;
 			trf.getOrigin().y() -= i * 1.25f;
@@ -169,7 +169,7 @@ Error MyApp::userMainLoop(Bool& quit)
 		ANKI_CHECK(getSceneGraph().newSceneNode<ModelNode>(
 		ANKI_CHECK(getSceneGraph().newSceneNode<ModelNode>(
 			StringAuto(getAllocator()).sprintf("monkey%u", instance++).toCString(),
 			StringAuto(getAllocator()).sprintf("monkey%u", instance++).toCString(),
 			monkey,
 			monkey,
-			"assets/SuzanneMaterial-material.ankimdl"));
+			"assets/Suzannedynamic-material.ankimdl"));
 		// monkey->getComponent<MoveComponent>().setLocalTransform(camTrf);
 		// monkey->getComponent<MoveComponent>().setLocalTransform(camTrf);
 
 
 		BodyNode* body;
 		BodyNode* body;

+ 1 - 1
samples/physics_playground/assets/SuzanneMaterial-material.ankimdl → samples/physics_playground/assets/Suzannedynamic-material.ankimdl

@@ -3,7 +3,7 @@
 	<modelPatches>
 	<modelPatches>
 		<modelPatch>
 		<modelPatch>
 			<mesh>assets/Suzanne.ankimesh</mesh>
 			<mesh>assets/Suzanne.ankimesh</mesh>
-			<material>assets/Material-material.ankimtl</material>
+			<material>assets/dynamic-material.ankimtl</material>
 		</modelPatch>
 		</modelPatch>
 	</modelPatches>
 	</modelPatches>
 </model>
 </model>

+ 29 - 0
samples/physics_playground/assets/dynamic-material.ankimtl

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- This file is auto generated by ExporterMaterial.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="rotationMat" builtin="ROTATION_MATRIX"/>
+		
+	
+		<input shaderInput="diffColor" value="0.078310 0.218610 0.640000"/>
+		<input shaderInput="specColor" value="0.400000 0.400000 0.400000"/>
+		<input shaderInput="roughness" value="0.000000" />
+		<input shaderInput="metallic" value="1.000000"/>
+		
+		<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


+ 1 - 1
samples/physics_playground/assets/floorMaterial-material.ankimdl → samples/physics_playground/assets/floorwalls-material.ankimdl

@@ -3,7 +3,7 @@
 	<modelPatches>
 	<modelPatches>
 		<modelPatch>
 		<modelPatch>
 			<mesh>assets/floor.ankimesh</mesh>
 			<mesh>assets/floor.ankimesh</mesh>
-			<material>assets/Material-material.ankimtl</material>
+			<material>assets/walls-material.ankimtl</material>
 		</modelPatch>
 		</modelPatch>
 	</modelPatches>
 	</modelPatches>
 </model>
 </model>

BIN
samples/physics_playground/assets/physics_playground.blend


+ 215 - 13
samples/physics_playground/assets/scene.lua

@@ -5,7 +5,7 @@ local node
 local inst
 local inst
 local lcomp
 local lcomp
 
 
-node = scene:newReflectionProbeNode("reflprobe0", Vec4.new(-13.4112, -13.4112, -13.4112, 0), Vec4.new(13.4112, 13.4112, 13.4112, 0))
+node = scene:newReflectionProbeNode("reflprobe0", Vec4.new(-134.112, -134.112, -134.112, 0), Vec4.new(134.112, 134.112, 134.112, 0))
 trf = Transform.new()
 trf = Transform.new()
 trf:setOrigin(Vec4.new(0, 9.1132, 0, 0))
 trf:setOrigin(Vec4.new(0, 9.1132, 0, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
@@ -14,41 +14,243 @@ trf:setRotation(rot)
 trf:setScale(1)
 trf:setScale(1)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 
 
-node = scene:newModelNode("floorMaterial-materialnone0", "assets/floorMaterial-material.ankimdl")
+node = scene:newReflectionProbeNode("reflprobe1", Vec4.new(-2.65221, -3.25716, -11.7323, 0), Vec4.new(2.65221, 3.25716, 11.7324, 0))
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(0, 0, 0, 0))
+trf:setOrigin(Vec4.new(39.81, 2.89296, 3.00294, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
 rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
 rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
 trf:setRotation(rot)
 trf:setRotation(rot)
 trf:setScale(1)
 trf:setScale(1)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("floorMaterial-materialnone0_cl", "assets/floor.ankicl", trf)
 
 
-node = scene:newModelNode("wallsMaterial_001-materialnone1", "assets/wallsMaterial_001-material.ankimdl")
+node = scene:newModelNode("floorwalls-materialnone0", "assets/floorwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(0, -5.06862, 0, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("floorwalls-materialnone0_cl", "assets/floor.ankicl", trf)
+
+node = scene:newModelNode("wallssky-materialnone1", "assets/wallssky-material.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
 trf:setOrigin(Vec4.new(0, 9.10935, 0, 0))
 trf:setOrigin(Vec4.new(0, 9.10935, 0, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
 rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
 rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
 trf:setRotation(rot)
 trf:setRotation(rot)
+trf:setScale(10)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+
+node = scene:newModelNode("Suzannedynamic-materialnone2", "assets/Suzannedynamic-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(179.045, 9.70113, 0, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
 trf:setScale(1)
 trf:setScale(1)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("Suzannedynamic-materialnone2_cl", "assets/Suzanne.ankicl", trf)
 
 
-node = scene:newModelNode("SuzanneMaterial-materialnone2", "assets/SuzanneMaterial-material.ankimdl")
+node = scene:newModelNode("wallwalls-materialnone3", "assets/wallwalls-material.ankimdl")
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(-23.0149, 9.70113, 0, 0))
+trf:setOrigin(Vec4.new(37.2714, 2.88619, 0, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
 rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
 rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
 trf:setRotation(rot)
 trf:setRotation(rot)
 trf:setScale(1)
 trf:setScale(1)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
 node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
-node = scene:newStaticCollisionNode("SuzanneMaterial-materialnone2_cl", "assets/Suzanne.ankicl", trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone3_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone4", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(37.2714, 2.88619, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone4_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone5", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(37.2714, 2.88619, 6, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone5_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone6", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(37.2714, 2.88619, 12, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone6_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone7", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(42.2714, 2.88619, 12, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone7_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone8", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(42.2714, 2.88619, 6, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone8_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone9", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(42.2714, 2.88619, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone9_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone10", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(42.2714, 2.88619, 0, 0))
+rot = Mat3x4.new()
+rot:setAll(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone10_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone11", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.7985, 6.37661, 12, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone11_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone12", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.7985, 6.37661, 6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone12_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone13", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.7985, 6.37661, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone13_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone14", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(39.7985, 6.37661, 0, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone14_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone15", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(33.7985, 5.37661, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone15_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone16", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(32.7985, 4.37661, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone16_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone17", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(31.7985, 3.37661, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone17_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone18", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(28.7985, 0.376611, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone18_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone19", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(29.7985, 1.37661, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone19_cl", "assets/wall.ankicl", trf)
+
+node = scene:newModelNode("wallwalls-materialnone20", "assets/wallwalls-material.ankimdl")
+trf = Transform.new()
+trf:setOrigin(Vec4.new(30.7985, 2.37661, -6, 0))
+rot = Mat3x4.new()
+rot:setAll(7.54979e-08, 1, 0, 0, -1, 7.54979e-08, 0, 0, 0, 0, 1, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+node = scene:newStaticCollisionNode("wallwalls-materialnone20_cl", "assets/wall.ankicl", trf)
 
 
 node = scene:newPointLightNode("Lamp")
 node = scene:newPointLightNode("Lamp")
 lcomp = node:getSceneNodeBase():getLightComponent()
 lcomp = node:getSceneNodeBase():getLightComponent()
-lcomp:setDiffuseColor(Vec4.new(100, 100, 100, 1))
-lcomp:setRadius(30.0003)
+lcomp:setDiffuseColor(Vec4.new(50, 50, 50, 1))
+lcomp:setRadius(300)
+trf = Transform.new()
+trf:setOrigin(Vec4.new(4.07624, 74.4447, -1.00545, 0))
+rot = Mat3x4.new()
+rot:setAll(-0.290865, -0.771075, 0.566429, 0, -0.0551891, 0.604562, 0.794644, 0, -0.955171, 0.199873, -0.2184, 0)
+trf:setRotation(rot)
+trf:setScale(1)
+node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
+lcomp:setShadowEnabled(0)
+
+node = scene:newPointLightNode("Lamp_001")
+lcomp = node:getSceneNodeBase():getLightComponent()
+lcomp:setDiffuseColor(Vec4.new(10, 0.0813347, 0.29831, 1))
+lcomp:setRadius(20)
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(4.07624, 5.90386, -1.00545, 0))
+trf:setOrigin(Vec4.new(39.9823, 2.42134, 2.25079, 0))
 rot = Mat3x4.new()
 rot = Mat3x4.new()
 rot:setAll(-0.290865, -0.771075, 0.566429, 0, -0.0551891, 0.604562, 0.794644, 0, -0.955171, 0.199873, -0.2184, 0)
 rot:setAll(-0.290865, -0.771075, 0.566429, 0, -0.0551891, 0.604562, 0.794644, 0, -0.955171, 0.199873, -0.2184, 0)
 trf:setRotation(rot)
 trf:setRotation(rot)
@@ -58,9 +260,9 @@ lcomp:setShadowEnabled(1)
 
 
 node = scene:newPerspectiveCameraNode("Camera")
 node = scene:newPerspectiveCameraNode("Camera")
 scene:setActiveCameraNode(node:getSceneNodeBase())
 scene:setActiveCameraNode(node:getSceneNodeBase())
-node:setAll(1.22173, 1.0 / getMainRenderer():getAspectRatio() * 1.22173, 0.1, 100)
+node:setAll(1.22173, 1.0 / getMainRenderer():getAspectRatio() * 1.22173, 0.1, 500)
 trf = Transform.new()
 trf = Transform.new()
-trf:setOrigin(Vec4.new(7.48113, 5.34367, 6.50764, 0))
+trf:setOrigin(Vec4.new(7.48113, 7.87011, 6.50764, 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(0.685921, -0.323983, 0.651573, 0, 0, 0.895416, 0.44523, 0, -0.727676, -0.305392, 0.614184, 0)
 trf:setRotation(rot)
 trf:setRotation(rot)

+ 2 - 2
samples/physics_playground/assets/Material_001-material.ankimtl → samples/physics_playground/assets/sky-material.ankimtl

@@ -18,8 +18,8 @@
 		
 		
 	
 	
 		<input shaderInput="diffColor" value="0.012172 0.367335 0.640000"/>
 		<input shaderInput="diffColor" value="0.012172 0.367335 0.640000"/>
-		<input shaderInput="specColor" value="0.500000 0.500000 0.500000"/>
-		<input shaderInput="roughness" value="0.097847" />
+		<input shaderInput="specColor" value="0.040000 0.040000 0.040000"/>
+		<input shaderInput="roughness" value="1.000000" />
 		<input shaderInput="metallic" value="0.000000"/>
 		<input shaderInput="metallic" value="0.000000"/>
 		
 		
 		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>
 		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>

+ 1 - 1
samples/physics_playground/assets/walls.ankicl → samples/physics_playground/assets/wall.ankicl

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

BIN
samples/physics_playground/assets/wall.ankimesh


+ 2 - 2
samples/physics_playground/assets/Material-material.ankimtl → samples/physics_playground/assets/walls-material.ankimtl

@@ -18,8 +18,8 @@
 		
 		
 	
 	
 		<input shaderInput="diffColor" value="0.548460 0.640000 0.063144"/>
 		<input shaderInput="diffColor" value="0.548460 0.640000 0.063144"/>
-		<input shaderInput="specColor" value="0.500000 0.500000 0.500000"/>
-		<input shaderInput="roughness" value="0.097847" />
+		<input shaderInput="specColor" value="0.400000 0.400000 0.400000"/>
+		<input shaderInput="roughness" value="1.000000" />
 		<input shaderInput="metallic" value="0.000000"/>
 		<input shaderInput="metallic" value="0.000000"/>
 		
 		
 		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>
 		<input shaderInput="emission" value="0.000000 0.000000 0.000000"/>

+ 1 - 1
samples/physics_playground/assets/wallsMaterial_001-material.ankimdl → samples/physics_playground/assets/wallssky-material.ankimdl

@@ -3,7 +3,7 @@
 	<modelPatches>
 	<modelPatches>
 		<modelPatch>
 		<modelPatch>
 			<mesh>assets/walls.ankimesh</mesh>
 			<mesh>assets/walls.ankimesh</mesh>
-			<material>assets/Material_001-material.ankimtl</material>
+			<material>assets/sky-material.ankimtl</material>
 		</modelPatch>
 		</modelPatch>
 	</modelPatches>
 	</modelPatches>
 </model>
 </model>

+ 9 - 0
samples/physics_playground/assets/wallwalls-material.ankimdl

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>assets/wall.ankimesh</mesh>
+			<material>assets/walls-material.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 1 - 1
shaders/Ssr.glslp

@@ -76,7 +76,7 @@ Vec3 raymarch(Vec3 r, Vec3 n, Vec3 viewPos, Vec2 uv, F32 depth)
 	ray = normalize(ray);
 	ray = normalize(ray);
 
 
 	// Compute step
 	// Compute step
-	const U32 BIG_STEP_SKIP = 32u;
+	const U32 BIG_STEP_SKIP = 16u;
 	U32 stepSkip = BIG_STEP_SKIP;
 	U32 stepSkip = BIG_STEP_SKIP;
 
 
 	const U32 STEP_FRACTION = BIG_STEP_SKIP / (4u + 1u);
 	const U32 STEP_FRACTION = BIG_STEP_SKIP / (4u + 1u);

+ 1 - 1
thirdparty

@@ -1 +1 @@
-Subproject commit acba40e60ef73fa71c9bc98c7ead979bd415b860
+Subproject commit 9463ab160a76834c4ec4d70ef6949ba35ee06010

+ 16 - 9
tools/scene/ExporterMaterial.cpp

@@ -118,19 +118,26 @@ void Exporter::exportMaterial(const aiMaterial& mtl) const
 	}
 	}
 	else
 	else
 	{
 	{
-		float shininess = 0.0;
-		mtl.Get(AI_MATKEY_SHININESS, shininess);
-		const float MAX_SHININESS = 511.0;
-		shininess = std::min(MAX_SHININESS, shininess);
-		if(shininess > MAX_SHININESS)
+		float roughness = 0.0;
+		if(mtl.mAnKiProperties.find("roughness") != mtl.mAnKiProperties.end())
 		{
 		{
-			LOGW("Shininness exceeds %f", MAX_SHININESS);
+			roughness = std::stof(mtl.mAnKiProperties.at("roughness"));
+		}
+		else
+		{
+			mtl.Get(AI_MATKEY_SHININESS, roughness);
+			const float MAX_SHININESS = 511.0;
+			roughness = std::min(MAX_SHININESS, roughness);
+			if(roughness > MAX_SHININESS)
+			{
+				LOGW("Shininness exceeds %f", MAX_SHININESS);
+			}
+
+			roughness = roughness / MAX_SHININESS;
 		}
 		}
-
-		shininess = shininess / MAX_SHININESS;
 
 
 		xml = replaceAllString(
 		xml = replaceAllString(
-			xml, "%roughness%", "<input shaderInput=\"roughness\" value=\"" + std::to_string(shininess) + "\" />");
+			xml, "%roughness%", "<input shaderInput=\"roughness\" value=\"" + std::to_string(roughness) + "\" />");
 
 
 		xml = replaceAllString(xml, "%roughnessTexMutator%", "0");
 		xml = replaceAllString(xml, "%roughnessTexMutator%", "0");
 	}
 	}