View frustrum manipulation

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

View frustrum manipulation

Post by Asterisk Man »

Is there any way of manipulating the view frustrum of a camera to enlarge it, in all directions, by something like 10%, or 50 pixels/units, without enlarging the actual camera view frustrum? (Like creating a new frustrum with enhanced values)

The reason I'm asking is that, by doing view frustrum culling, I'm losing some primitives I shouldn't be, because the frustrum's planes aren't actually behind any of the corners, so they think that the primitive doesnt exist.
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

are you asking in general or in Irrlicht?
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

Post by Asterisk Man »

In Irrlicht :)
zola

Post by zola »

You could use the AABB of the view frustum for culling.

Or do the following:

matrix4 mat;
mat.setScale(Vector3(0.1,0.1,0.1));
SViewFrustrum myFrust;
myFrust.transform(mat);

This scales the frustrum by factory 0.1 in every direction.
E.v. You have to make sure You don't accidently scale the original frustrum.


Tom
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

Post by Asterisk Man »

Would't this scale the frustrum to a 10th of its size?
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

I believe it would. He must have read your question incorrectly.
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

Post by Asterisk Man »

Probably, but by setting the scale to vector3df(1.1f,1.1f,1.1f) I should get the effect he's talking about. Tnx man! Ill sure try this
Post Reply