Newbie’s question toward Jmonkey's Display Cliping

Hi there,

I heard OpenGL can do “The Guard Band Clipping”. My question to you is how Jmonkey does it? I am guessing that for the moving characters like enemy, maybe, they should show up fully within the computer’s monitor display, so that you do not have to perform clipping so much. For static objects, maybe the clipping would always be required?

How do you make it optimise in JMonkey?

Thank you.

If the object is outside the view frustum it will be culled. It just means it won’t be part of the render cycle, it will be skipped. For all intent nothing is affected by this action. It’s the equivalent of setting cull mode. I’m not certain it goes any deeper than that as far as the programmer is concerned, so all relevant controls etc will continue to work as normal.

Efficient scene hierarchy’s and management is important and plays a fair role when you come to a stage where you need to yield some frames/memory/etc.

As time goes by one generally learns through practice how these things work best but it’s not something you should worry about hugely in the beginning. Just know that if even a single pixel is in the view frustum it will ALL be rendered.

Thank you.

@jayfella that actually made me think of a question. I had never though about it before, but how does reflection work with an object that is not in the view? Lets say the user is looking at a mirror and sees a object that is behind them. How does the system know to render the object?

1 Like

They just render the scene from a different viewpoint - hence why they are expensive.

In the case of a mirror the viewpoint would be the mirror and the direction would be the angle of incidence so you see a rendered scene of the “reflected” scene.

Water and other surfaces are more complicated (calculating fresnel and refractions) but the premise always starts with those humble beginnings.

3 Likes

Yep, any time there is real reflection, the scene was rendered at least twice.

2 Likes

once GPU light raytracing will be on most cards, then as i know it can be used to make mirrors without dupplicate of render.

but seems like this is far far away time.

shadows too.

but i dont even care to know how it work exactly, because it is only on new cards.