Home › Forum › SOFA › Using SOFA › [SOLVED] Shadows depend on absolute scale of object?
Tagged: Linux_ubuntu, ogl, shadow, SOFA_2112, visual
- This topic has 0 replies, 1 voice, and was last updated 2 years, 10 months ago by Scheikl.
Viewing 1 post (of 1 total)
-
AuthorPosts
-
13 January 2022 at 18:33 #21400ScheiklBlocked
Hi!
When scaling down an object (e.g. when you want to have your scene in meters instead of millimetres), shadows are not drawn on the objects anymore.Scaled scene:
<?xml version="1.0"?> <Node name="root" dt="0.02" > <RequiredPlugin pluginName="SofaOpenglVisual"/> <RequiredPlugin pluginName="SofaGraphComponent"/> <RequiredPlugin pluginName='SofaLoader'/> <BackgroundSetting color="0.5 0.5 0.5" /> <MeshOBJLoader name="meshLoader_0" filename="mesh/dragon.obj" translation="0 0 -0.05" scale3d="0.003 0.003 0.003" handleSeams="1" /> <OglModel template="Vec3d" name="VisualModel" src="@meshLoader_0" material="Default Diffuse 1 0 1 0 1 Ambient 1 0 0.2 0 1 Specular 0 0 1 0 1 Emissive 0 0 1 0 1 Shininess 0 45 No texture linked to the material No bump texture linked to the material " blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" /> <MeshOBJLoader name="meshLoader_1" filename="mesh/floor.obj" translation="0 -0.025 0" scale3d="0.005 0.005 0.005" handleSeams="1" /> <OglModel template="Vec3d" name="FloorV" src="@meshLoader_1" material="Default Diffuse 1 0.5 0.5 0.8 1 Ambient 1 0.1 0.1 0.1 1 Specular 0 0.5 0.5 0.5 1 Emissive 0 0.5 0.5 0.5 1 Shininess 0 45 No texture linked to the material No bump texture linked to the material " blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" /> <LightManager name="lightManager1" listening="1" shadows="1" softShadows="0" /> <OglShadowShader name="oglShadowShader1" /> <DirectionalLight name="spotLight1" shadowTextureSize="512" direction="-0.5 -0.5 -0.5" shadowFactor="1" /> </Node>
Original scene:
<?xml version="1.0"?> <Node name="root" dt="0.02" > <RequiredPlugin pluginName="SofaOpenglVisual"/> <RequiredPlugin pluginName="SofaGraphComponent"/> <RequiredPlugin pluginName='SofaLoader'/> <BackgroundSetting color="0.5 0.5 0.5" /> <MeshOBJLoader name="meshLoader_0" filename="mesh/dragon.obj" translation="0 0 -5" scale3d="0.3 0.3 0.3" handleSeams="1" /> <OglModel template="Vec3d" name="VisualModel" src="@meshLoader_0" material="Default Diffuse 1 0 1 0 1 Ambient 1 0 0.2 0 1 Specular 0 0 1 0 1 Emissive 0 0 1 0 1 Shininess 0 45 No texture linked to the material No bump texture linked to the material " blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" /> <MeshOBJLoader name="meshLoader_1" filename="mesh/floor.obj" translation="0 -2.5 0" scale3d="0.5 0.5 0.5" handleSeams="1" /> <OglModel template="Vec3d" name="FloorV" src="@meshLoader_1" material="Default Diffuse 1 0.5 0.5 0.8 1 Ambient 1 0.1 0.1 0.1 1 Specular 0 0.5 0.5 0.5 1 Emissive 0 0.5 0.5 0.5 1 Shininess 0 45 No texture linked to the material No bump texture linked to the material " blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" /> <LightManager name="lightManager1" listening="1" shadows="1" softShadows="0" /> <OglShadowShader name="oglShadowShader1" /> <DirectionalLight name="spotLight1" shadowTextureSize="512" direction="-0.5 -0.5 -0.5" shadowFactor="1" /> </Node>
Do you have an idea on how to address this issue?
Cheers,
Paul -
AuthorPosts
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.