Adjusting scene parameters at run-time

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Elusive Pete
Kobold
Posts: 39
Joined: Tue Jun 27, 2006 11:09 am

Adjusting scene parameters at run-time

Post by Elusive Pete »

Hello all,

In the project my team is working on, we want to be able to adjust some scene parameters at run-time. The adjustment probably only needs to be made once, in response to one particular event in the timeline. There are two main things we want to change:
  1. Lighting (from dark to bright)
  2. Materials (colour properties and textures)
All of the geometry, lighting and materials etc. are being created in Maya, and exported to the ".scene" format. The scene will be loaded into an octree scene manager.

While it would definitely be possible to manually adjust parameters and reassign textures in code, I wonder if there might be a better way? The kind of thing I am looking for is a way of specifying different sets of information in the ".scene" file (such as lighting states and material parameters), and switching between them. (Ideally, I would like to avoid manually editing XML files, although we can do that if necessary).

Sorry if my description is not very clear! Any advice would be welcome though.


Thanks.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Right now this is only doable through code, but there's no reason why you couldn't predefine new semantics in your scene file to help automate the process. You might also want to look at the 'material schemes' feature, which lets you switch materials wholesale based on a blanket scheme.
Elusive Pete
Kobold
Posts: 39
Joined: Tue Jun 27, 2006 11:09 am

Post by Elusive Pete »

Thanks, I'll certainly look into the material schemes. I think we'll have to stop short of defining our own semantics in the scene file though, due to deadline pressure! :?

Aside from hard-coding most of it, we're also considering switching out the whole scene. Quite a bit of stuff changes all at once, so it might offer us the best compromise between efficiency and flexibility.
Post Reply