DotSceneOctree light problem (3ds max)

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

DotSceneOctree light problem (3ds max)

Post by IFASS »

Code: Select all

<scene>
    <nodes>
        <node name="Box01" id="1">
            <position x="0.000101401" y="0.0198537" z="0.0" />
            <rotation qx="0.0" qy="0.0" qz="0.0" qw="1.0" />
            <scale x="1.0" y="1.0" z="1.0" />
            <entity name="Box01" id="2" meshFile="Box01.mesh" materialfile="MyScene.material" />
        </node>
        <node name="polySurfac" id="3">
            <position x="0.417249" y="0.786697" z="0.117156" />
            <rotation qx="0.707107" qy="0.0" qz="0.0" qw="0.707107" />
            <scale x="24.2147" y="24.2147" z="24.2147" />
            <entity name="polySurfac" id="4" meshFile="polySurfac.mesh" materialfile="MyScene.material" />
        </node>
        <node name="Omni01" id="5">
            <position x="-0.903894" y="0.894635" z="0.286612" />
            <rotation qx="0.0" qy="0.0" qz="0.0" qw="1.0" />
            <scale x="1.0" y="1.0" z="1.0" />
            <light name="Omni01" id="6" type="point" visible="true">
                <position x="0.0" y="0.0" z="0.0" />
                <colour_diffuse r="1.0" g="1.0" b="1.0" />
                <colour_specular r="1.0" g="1.0" b="1.0" />
                <light_attenuation range="0.2" constant="1.0" linear="0.0" quadratic="0.0" />
            </light>
        </node>
        <node name="Omni02" id="7">
            <position x="-0.903894" y="0.588626" z="0.286612" />
            <rotation qx="0.0" qy="0.0" qz="0.0" qw="1.0" />
            <scale x="1.0" y="1.0" z="1.0" />
            <light name="Omni02" type="point" intensity="0.01" contrast="0">
                <colour_diffuse r="0.4" g="0.4" b="0.5" />
                <colourSpecular r="0.5" g="0.5" b="0.5" />
            </light>
        </node>
<octree binFile="MyScene.bin">
        <octsharedgeometry>
            <octGeometry binaryDataOffset="0" materialName="1_-_Default" vertTotal="30" normalTotal="30" texSets="1" />
            <octGeometry binaryDataOffset="960" materialName="2_-_Default" vertTotal="13164" normalTotal="13164" texSets="1" />
        </octsharedgeometry>
        <octNode px="0.00510406" py="15.4568" pz="-0.972801" width="100" height="30.874" depth="100">
            <octNode px="25.2483" py="22.6477" pz="-26.5039" width="34.0684" height="16.4922" depth="24.6803">
                <octMesh>
                    <octGeometry binaryDataOffset="422208" triTotal="4339" />
                    <octMaterial name="2_-_Default" />
                </octMesh>
            </octNode>
            <octNode px="0.00510406" py="8.38668" pz="-0.972801" width="100" height="16.7337" depth="100">
                <octNode px="23.7891" py="11.8628" pz="-24.658" width="37.3211" height="9.78131" depth="28.3818">
                    <octNode px="16.3308" py="13.3167" pz="-20.3251" width="16.2333" height="4.78011" depth="9.79987">
                        <octMesh>
                            <octGeometry binaryDataOffset="448242" triTotal="159" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="32.7285" py="12.8525" pz="-19.9827" width="19.1124" height="7.802" depth="9.85549">
                        <octMesh>
                            <octGeometry binaryDataOffset="449196" triTotal="401" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="17.1506" py="13.6855" pz="-31.3967" width="16.9971" height="6.11602" depth="14.9043">
                        <octMesh>
                            <octGeometry binaryDataOffset="451602" triTotal="779" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="33.0589" py="14.1599" pz="-31.4569" width="18.7814" height="5.16994" depth="14.2082">
                        <octMesh>
                            <octGeometry binaryDataOffset="456276" triTotal="509" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="14.7881" py="9.94646" pz="-19.7536" width="19.3191" height="5.94854" depth="10.9399">
                        <octMesh>
                            <octGeometry binaryDataOffset="459330" triTotal="760" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="32.076" py="10.6681" pz="-17.6959" width="17.5858" height="5.27585" depth="14.4577">
                        <octMesh>
                            <octGeometry binaryDataOffset="463890" triTotal="1662" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="16.3238" py="9.97984" pz="-31.3907" width="15.1883" height="5.90805" depth="14.7557">
                        <octMesh>
                            <octGeometry binaryDataOffset="473862" triTotal="591" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                    <octNode px="33.0831" py="10.0716" pz="-31.4063" width="18.7329" height="4.08297" depth="14.1496">
                        <octMesh>
                            <octGeometry binaryDataOffset="477408" triTotal="691" />
                            <octMaterial name="2_-_Default" />
                        </octMesh>
                    </octNode>
                </octNode>
                <octNode px="0.00510406" py="4.81769" pz="-0.972801" width="100" height="9.59566" depth="100">
                    <octMesh>
                        <octGeometry binaryDataOffset="481554" triTotal="12" />
                        <octMaterial name="1_-_Default" />
                    </octMesh>
                    <octMesh>
                        <octGeometry binaryDataOffset="481626" triTotal="2364" />
                        <octMaterial name="2_-_Default" />
                    </octMesh>
                </octNode>
            </octNode>
        </octNode>
    </octree>
</scene>
I have this .scene file here (deleted the other omni nodes, otherwise the page will get huge) and everything works perfect. Only one thing doesn't work: the lights.

I guess the omninodes aren't specified by the exporter the right way to be used in DotSceneOctree.

Example:
My own .scene file and one from the tutorial, which works.

Tutorial omni node:

Code: Select all

 <node name="Omni01" id="5">
            <position x="-23" y="49" z="18" />
            <rotation qx="0" qy="0" qz="0" qw="1" />
            <scale x="1" y="1" z="1" />
            <light name="Omni01" type="point" intensity="0.01" contrast="0">
                <colour_diffuse r="0.4" g="0.4" b="0.5" />
                <colourSpecular r="0.5" g="0.5" b="0.5" />
            </light>
        </node>
My omni node:

Code: Select all

        <node name="Omni01" id="5">
            <position x="-0.903894" y="0.894635" z="0.286612" />
            <rotation qx="0.0" qy="0.0" qz="0.0" qw="1.0" />
            <scale x="1.0" y="1.0" z="1.0" />
            <light name="Omni01" id="6" type="point" visible="true">
                <position x="0.0" y="0.0" z="0.0" />
                <colour_diffuse r="1.0" g="1.0" b="1.0" />
                <colour_specular r="1.0" g="1.0" b="1.0" />
                <light_attenuation range="0.2" constant="1.0" linear="0.0" quadratic="0.0" />
            </light>
        </node>
---------------

so... what's wrong with the node from the exporter?
(octopus, used with 3ds max 5)
Image
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2
Contact:

Post by pjcast »

All the sttributes with underscores have been renamed in the new .scene format. ie. diffuse_colour is no diffuseColour. The same applies to all attributes, no longer do any of them have underscores.

For a complete listing of each element, and attributes, look at ogreaddons/dotsceneformat
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

pjcast wrote:All the sttributes with underscores have been renamed in the new .scene format. ie. diffuse_colour is no diffuseColour. The same applies to all attributes, no longer do any of them have underscores.

For a complete listing of each element, and attributes, look at ogreaddons/dotsceneformat
so that would make it:

meshfile --> meshFile
colour_diffuse --> colourDiffuse
colour_specular --> colourSpecular
light_attenuation --> lightAttenuation
Image
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2
Contact:

Post by pjcast »

For an update: The lights were showing up... Just, the attenuation values were not read in by the demo dot scene app.

I updated the load light routines in the demo to parse the lights for every possible param. ;)
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
Post Reply