Is there any way to set a 'drawing distance'?

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
Soy1Bonus
Posts: 31
Joined: Mon Jun 21, 2004 8:41 am
Location: Spain (Cantabria)
Contact:

Is there any way to set a 'drawing distance'?

Post by Soy1Bonus »

For example, in many racing games you can set a drawing distance and you can see the triangles stop being drawn at that distance.

Is there an option like this in Irrlicht?

That would be a nice opcion for big maps (combined with some distance fog).

Note: I'm spanish and I don't usually write in english, so my grammar is pretty bad. I'm sorry! :oops:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

In the camera creation, add a "setFarValue". SetFarValue handles the clipping plane forthe rendering process

camera->setFarValue ( 50000.0f ) ; //sets the distance for the clipping plane, the bigger the farther

try it out with different values, compile and see the changess yourself

for the fog:

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
driver->setFog(SColor(0,200,50,0),true, 0,4000); //fog color-final values= amount of fog, distance
driver->setTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY,true );
Image
Post Reply