Geometry alteration just in front of the camera ?

Julien Bayle's icon

Hi there,
I'll fire a small series of questions about a project and I'd prefer to separate them in order to keep things more organized for people that could answer/read.

I'd need to have a (BIG) mesh and to explore it with a gl.camera.
I want to be able to trigger alteration of it but just near from the camera (for aesthetic and performance reasons)

Any leads for that ?
geometries will be meshes, gridshape.. whatever
vertex shader related to the camera could be the key.
I'd need an example...

Rob Ramirez's icon

i would parse your mesh into smaller sections, and use a jit.gl.mesh for each section. that will make it easier to isolate the relevant section (proximity to the camera), and should make updating the relevant section easier. you will have to manage the date yourself, e.g. keeping the "seams" joined (by sending duplicate data for those vertices).

Julien Bayle's icon

That's smart !
But I'd need to have a pre calculated / planned camera path no ?

I'd like to be able to make the camera "flying" randomly, slowly, around the structure

Rob Ramirez's icon

not sure why that would make a difference to what you're asking

Julien Bayle's icon

Not sure I understood it well, so.
I guess the idea is to have a "kind of" octree of the space and depending where my cam is, to alter the part of space.

Thanks for your answer. I'll try this.