samsaga2
07-08-2008 16:05:08
I've tried everything. All the shadowtypes, ogremeshupgrades, different scenes with differents lights, differents materials and nothing works. I don't see any shadows on the scene. Thanks in advance.
scene.osm:
scene.material
scene.cpp
scene.osm:
<oe_scene>
<sceneManager type="1" />
<bkgcolor r="0" g="0" b="0" />
<lightColor r="0.5" g="0.5" b="0.5" />
<shadowTechnique type="17" tex_size="512" tex_count="1">
<color r="0.6" g="0.6" b="0.6" />
</shadowTechnique>
<entities>
<entity name="Suelo" hidden="false" filename="Suelo.mesh" CastShadows="no" ReceiveShadows="yes">
<position x="0" y="0" z="-7.6293945e-006" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
</entity>
<entity name="hall" hidden="false" filename="hall.mesh" CastShadows="no" ReceiveShadows="yes">
<position x="0" y="58.793034" z="0.76563126" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
</entity>
....
<cameras>
<camera name="Camera_Hall_principal" FOV="1.287">
<position x="235.47209" y="111.06847" z="168.66985" />
<rotation x="-0.56705034" y="-0.18383192" z="0.13161154" w="-0.79204684" />
<scale x="0.99999881" y="0.99999982" z="0.99999988" />
</camera>
</cameras>
<lights>
<light name="foco_superior02" type="omni" on="true" CastShadows="yes" intensity="1">
<position x="174.95961" y="226.68513" z="-100.08699" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<color r="1" g="1" b="1" />
<specular r="0" g="0" b="0" />
</light>
</lights>
</oe_scene>
scene.material
material suelo_[Suelo]
{
technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1
specular 0 0 0 1 25
alpha_rejection greater 128
texture_unit
{
texture_alias Map #153
texture suelo.dds
}
texture_unit
{
texture_alias baked_suelo_LightingMap
texture SueloLightingMap.dds
colour_op_ex modulate src_texture src_current
colour_op_multipass_fallback dest_colour zero
}
}
}
}
material hall_[hall]
{
technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1
specular 0 0 0 1 10
alpha_rejection greater 128
texture_unit
{
texture_alias Map #19
texture Paredes_color.dds
}
texture_unit
{
texture_alias baked_hall_LightingMap
texture hallLightingMap.dds
colour_op_ex modulate src_texture src_current
colour_op_multipass_fallback dest_colour zero
}
}
}
}
material escalera_[escalera]
{
technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1
specular 0 0 0 1 10
alpha_rejection greater 128
texture_unit
{
texture_alias Map #164
texture escalera.dds
}
texture_unit
{
texture_alias baked_escalera_LightingMap
texture escaleraLightingMap.dds
colour_op_ex modulate src_texture src_current
colour_op_multipass_fallback dest_colour zero
}
}
}
}
...
scene.cpp
mOgreNode = scene_manager->getRootSceneNode()->createChildSceneNode(name);
mOgreNode->setVisible(true);
mOgreEntity = scene_manager->createEntity(name, mesh);
mOgreEntity->setCastShadows(true);
mOgreNode->attachObject(mOgreEntity);