3dmodel diffuse colour is brighter than expected

Discussion about custom hills.
Post Reply
sneze2r
Posts: 58
Joined: 17 Feb 2020, 12:56

3dmodel diffuse colour is brighter than expected

Post by sneze2r »

Hello,
I noticed that when defying 3dmodel with some diffuse colour, material and texture, then 3dmodel is brighter than similar object(in this example pillar) that have the same texture, material and colour parameters. Example:

Code: Select all


    <profile id="y0">
        <start x="0" y="0" refx="dhill" refy="inrun-top"/>
        <line x="2" y="0" refx="dhill" refy="inrun-top" refyx="0"/>
    </profile>

    <pillar refx="dhill"  refy="y0"
        lz="1" ty="0" by="0" x1="0" x2="1" type="blend"
        t="Textures\grid.png" m="Materials\metal.xml" c="0xffcccccc"/>
    <3dmodel id="test">
        <batch id="test" texture1="Textures\grid.png"  material="Materials\metal.xml" fvf="322"  order="0">
            <vertex id="1" x="0" y="0" z="0" v1="0" u1="0" diffuse="0xffcccccc"/>
            <vertex id="2" x="1" y="0" z="0" v1="1" u1="0" diffuse="0xffcccccc"/>
            <vertex id="3" x="1" y="0" z="-1" v1="1" u1="-1" diffuse="0xffcccccc"/>
            <vertex id="4" x="0" y="0" z="-1" v1="0" u1="-1" diffuse="0xffcccccc"/>
            <face v1="1" v2="2" v3="3"/>
            <face v1="1" v2="3" v3="4"/>
        </batch>
    </3dmodel>
    <3dmodel-instance id="test" refy="y0"/>
Pic rel- on the left 3dmodel, on the right darker pillar. What's the cause of it? Is there any way to define colour that is 1:1 the same as the pillar instead of trail and error approach?
Image
Jussi Koskela
Site Admin
Site Admin
Posts: 3647
Joined: 22 Jan 2007, 14:42
Location: Finland
Contact:

Re: 3dmodel diffuse colour is brighter than expected

Post by Jussi Koskela »

The textures in pillars are automatically modulated with a soft lightmap texture so that large flat areas won't look so monotonous / repetitive. This effect can be clearly seen for example in the large pillar in Lahti HS130.
Post Reply