Archive 17/01/2023.

Urho - SetMaterial (No shadows , black spots etc..)

Jimmy781

Hey guys , is there any way to set a material so that all sides are always have the same color / light .

obj.SetMaterial(Material.FromImage(“test_icon.jpg”));

This one looks good from the top view but from the sides , it looks darker / black . At first i thought it was the light position

obj.SetMaterial(cache.GetMaterial(“Materials/Stone.xml”));

However this is the inverse , it looks good from the sides , but the top part appears black / very dark

This is the stone.xml

<material>
    <technique name="Techniques/DiffNormalPacked.xml" quality="1" />
    <technique name="Techniques/Diff.xml" quality="0" />
    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
    <texture unit="normal" name="Textures/StoneDiffuse.dds" />
    <parameter name="MatSpecColor" value="0.3 0.3 0.3 70" />
</material>

Is there any way to fix that ?

Eugene

Use unlit techniques?

GoogleBot42

You can use unlit techniques like eugene said but I don’t think you will be able to have a normal map because I think normal mapping requires lighting to make the object look 3D.

GoogleBot42

You are probably looking for using: <technique name="Techniques/DiffUnlit.xml" />