farvalue

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
grantkrieger
Posts: 25
Joined: Fri Jul 27, 2007 10:02 am

farvalue

Post by grantkrieger »

Hello,

I have a large warehouse which is my world. In this I have many models. I want the whole warehouse to be visible all the time but I want the far value applied on models within .

Example
- If this was possible it would be great to set the far value for the Warehouse to 18000 and set far value to models within to 3000.

The reason why I need far value on models set down is I have many and I need better performance. However my warehouse looks funny with a low far value.

Please help.

Thanks

Grant
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

You could use fogging to make the farvalue drop off point invisible and you'd just get fog going off into the distance, but of course this might not suit your warehouse as you don't usually have fog inside...

I guess an option could be to first render the warehouse with the farvalue required and then change the farvalue in the camera and then render the rest of the objects... I'm not sure if that would work very well and you'd have to edit the source or call render methods yourself rather than smgr->drawAll();

Another option is that i guess you could do this with shaders, so if you can manage shaders then that could be the easiest method.
Image Image Image
grantkrieger
Posts: 25
Joined: Fri Jul 27, 2007 10:02 am

Post by grantkrieger »

Thanks.

Fogging seems like it might be the easiest route. Sorry I am not familar with fogging. How do I implement fogging ? I dont even know where to start

Thanks

Again
Umbra
Posts: 19
Joined: Sun Aug 26, 2007 12:54 pm

Post by Umbra »

As far as i know irrlicht dont support fog.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Irrlicht does support fog. It's in one of the examples... but i forget which...

You have to set up the driver initially with fog values such as where it starts and ends etc and then for each node you have to set it to receive the fog, in the materials i think.

So check the API (IVideoDriver and ISceneNode) for fog functions.
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It's example 8. You have some values stored in the driver (such as color) and you enable fog per MeshBuffer in the Material. However, it'll probably look strange if you don't enable fog for a complete scene node... So you could use the ISceneNode methods to alter material settings.
Post Reply