[solved]Camera Clipping

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
hioctane
Posts: 2
Joined: Sun Dec 21, 2008 7:00 pm

[solved]Camera Clipping

Post by hioctane »

Hi,

i made a scene with 100x100 models. The Polygon count is about 500k. I i change the view of my camera that i only see 9 of them i get a Polygon count of 150k. I thought that irrlicht clips all models away that aren't in my View. My Camerasettings are: fov = PI/2.5f, aspect = 4.0f/3.0f, farPlane = 1000.f und nearplane = 1.f.

Is there a flag to set that irrlicht clips all models that are not in the view of my camera ?
Last edited by hioctane on Sun Dec 21, 2008 9:15 pm, edited 1 time in total.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: Camera Clipping

Post by Acki »

hioctane wrote:Is there a flag to set that irrlicht clips all models that are not in the view of my camera ?
maybe use setAutomaticCulling(...) on the nodes !?!?! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hioctane
Posts: 2
Joined: Sun Dec 21, 2008 7:00 pm

Post by hioctane »

thx Acki, works great :)
IrrNoob
Posts: 110
Joined: Sun Nov 16, 2008 8:01 pm
Location: Fort Collins, Us

Re: Camera Clipping

Post by IrrNoob »

Acki wrote:
hioctane wrote:Is there a flag to set that irrlicht clips all models that are not in the view of my camera ?
maybe use setAutomaticCulling(...) on the nodes !?!?! ;)
Acki how do I call setAutomaticCulling() on a node?

in the API it said

Code: Select all

scene::ISceneNode::setAutomaticCulling( EAC_FRUSTUM_SPHERE );
but adding it to my project produces an error.
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

You aren't actually using that code, are you? You should have something like

Code: Select all

scene::ISceneNode * node ;

...

node->setAutomaticCulling( scene::EAC_FRUSTUM_SPHERE ) ;
If that doesn't solve your problem, we'll need to have the code that is causing your error as well as what the error was.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

It isn't a good idea to add 10,000 models to the scene, that many models will eat up lots of time drawing each one and traversing the scene graph.

If they're blocks that make up your world then a better idea is to batch them all up into a single mesh containing as few buffers as possible, then create an OctTree node out of this mesh.

You can find an example here-
http://bitplane.net/download.php?view.24
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply