Horde3D
http://www.horde3d.org/forums/

automatically load all scene settings
http://www.horde3d.org/forums/viewtopic.php?f=2&t=413
Page 1 of 1

Author:  newbie3D [ 14.07.2008, 12:49 ]
Post subject:  automatically load all scene settings

Hi guys,


I use Horde3D Scene Editor to create my scene and save it when done.
In my program, I load all nodes using Horde3D functions and still have to do the configuration for some stuff such as:

// doing transform, is it done in SceneEditor already?
Horde3D::setNodeTransform( env, 0, -20, 0, 0, 0, 0, 20, 20, 20 ); // for the environment
...
// Add knight
_knight = Horde3D::addNodes( RootNode, knightRes );
Horde3D::setNodeTransform( _knight, 0, 0, 0, 0, 180, 0, 0.1f, 0.1f, 0.1f );
// Add light source, light params configured in SceneEditor for what?
NodeHandle light = Horde3D::addLightNode( RootNode, "Light1", 0, "LIGHTING", "SHADOWMAP" );
Horde3D::setNodeTransform( light, 0, 15, 10, -60, 0, 0, 1, 1, 1 );
Horde3D::setNodeParamf( light, LightNodeParams::Radius, 1000 );
Horde3D::setNodeParamf( light, LightNodeParams::FOV, 90 );
Horde3D::setNodeParami( light, LightNodeParams::ShadowMapCount, 1 );
Horde3D::setNodeParamf( light, LightNodeParams::ShadowMapBias, 0.0025f );
Horde3D::setNodeParamf( light, LightNodeParams::Col_R, 1.0f );
Horde3D::setNodeParamf( light, LightNodeParams::Col_G, 0.8f );
Horde3D::setNodeParamf( light, LightNodeParams::Col_B, 0.7f );
...
The question is, all these configurations (camera position, light's parameters, objects' parameters) have already done in SceneEditor, so are there any way to load all these stuff automatically? (with just one load statement)

Thanks in advance

Author:  swiftcoder [ 14.07.2008, 12:56 ]
Post subject:  Re: automatically load all scene settings

When you load a scen saved from the scene editor, it will load the entire scene: lights, cameras, models, terrains, etc. and they will all have the transform you set in the editor.

Author:  newbie3D [ 15.07.2008, 03:29 ]
Post subject:  Re: automatically load all scene settings

Thanks Swiftcoder, now I can load it all :D

Author:  newbie3D [ 15.07.2008, 05:44 ]
Post subject:  Re: automatically load all scene settings

I change the colour of light in SceneEditor (to Tomato), but it has no effect when I load the scene (the colour now has its default value - White).
Could anyone explain this? Or which property in the xml file I could change to make effect (I try ...colour="tomato" but it did not make sense)?

Author:  Volker [ 15.07.2008, 07:28 ]
Post subject:  Re: automatically load all scene settings

newbie3D wrote:
the colour now has its default value - White.
Could anyone explain this? ?

Yes, if you're using the official release. See http://www.horde3d.org/forums/viewtopic.php?f=3&t=306

Author:  newbie3D [ 15.07.2008, 08:22 ]
Post subject:  Re: automatically load all scene settings

Yeah, I see the problem remains in Horde SDK 1.0.0 Beta 1. In In egLight.cpp LightNode::parsingFunc function as Bylkki has pointed out.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/