a newbie wants to make an architectural virtual tour...

k2k

11-07-2006 04:38:12

Hi everybody I am new on this forum and I am really glad that oFusion does exist, as OGRE alone seemed to me much too complicated (I heard something about C++ 11 years ago…) and now with oFusion I am close to be able to get my architectural models (with baked lighting maps) into OGRE… In fact in two days I hope I will :-)
And all that to be able to achieve architectural virtual tours…

So here comes my question:

As I would like to add collision detection so my camera does not wish to pass through the walls and maybe a slider to switch magically from the day lighting to the night lighting what kind of tools do I need? I have read something about YAKE but it seems far more complicated than OGRE combined with oFusion with my little C++ knowledge (and without any tutorial) … and I think I really don’t need such a powerful tool… So any suggestions, maybe even an introduction to the tools you suggest…

I am surely not the only one on the forum who tries to use oFusion in this direction, so any help would be really appreciated…

Lioric

11-07-2006 16:43:34

It should be very easy to create basic collision detection for your camera and the meshes

You can search the Ogre Wiki for examples or the forums for simple examples of basic application that makes simple collision detection

For this you will use a collision detection library that integrates with ogre, i.e. OgreNewton, NxOgre

Those libraries will (or should, as i have not used them) let you simply pass to them the entitiy or object node and they will handle the rest, you can use the AABB of the objects as you dont need fine precision in your project

You will use the scene load event system, override the onEntity or onNode load functions, and when they are called, you will pass the node or the entity to the collision detection library

For the day/night system, the simple setup you can use, probably is creating two sets of lightmaps for your objects, bake the day and the night lighting to different textures, then set the day texture in the first pass of each material and the night in the next pass

In your application you can disable the day or the night pases when needed (when the slider is at each side) and blend between them (when the slider is on a different position) using an alpha map of 2x2 size, this alpha map will be updated in your application each time you move the slider, with a color corresponding to the slider position, from opaque to transparent

There are several ways to generate the effects you want, or the collision detection system, but the above mentioned methods probably are easier for you

k2k

11-07-2006 17:52:58

Thank you for a really fast reply.
It wasn’t so easy for me to find the OgreNewt forum after some days of browsing Ogre forums but now that I know what to search it is much easier… and there are even some tutorials for newbies :D

For the day/light setup I was thinking about something very similar to your description…. I am only a little bit afraid about the way I have to code this switcher etc in C++ :?

I will try to achieve something by myself as I have some free time these two weeks…

Of course if somebody have done something similar in the past and enthusiastically wants to share his code it would be totally unexpected and really welcome …