Octree and camera problems

Started by xujiang, October 25, 2013, 06:26:19 PM

Previous topic - Next topic

xujiang

Hello, excuse me . There was no correlation Liezi OcTree control range of Camera rendering

EgonOlsen


xujiang

The visible range rendering model   .............There are no related tutorials

xujiang

Scene segmentation related materials 

EgonOlsen

Sorry, i still don't get the question. You can create an octree if you feel that it's needed. You can use it for rendering and/or collision detection. It has nothing to do with the camera. So what's the actual question? When and why to use it?

xujiang

I need to make a big scene with OcTree control within sight of model rendering, outside the field of view does not render. But I did not find the relevant information, will have to provide reference information related to you?

EgonOlsen

Creating an octree basically goes like this:


obj.build();
...
OcTree occy=new OcTree(obj, 1000, OcTree.MODE_OPTIMIZED); // Or a different value than 1000
occy.setCollisionUse(true); // Or false if you want to
occy.setRenderingUse(true); // Or false if you want to
obj.setOcTree(occy);


Is that what you are looking for?

xujiang

Thank you, you send the code is  exactly what I need, and I also need the code of  rendering control, used to control the render scene in the field of vision scope, outside of the visual field is not been  rendered. some relevant example is ok

EgonOlsen

Anything outside of the fov won't the rendered anyway. That's one purpose of a 3d engine, there's nothing to code for that. It happens automatically.

xujiang

The engine system default has put the inside of the visual field rendering,not rendering outside the field of vision ?
Just need to set the  (Config.maxPolysVisible = 3000;)?  and don't have to write other algorithms to implement ?

EgonOlsen

Objects will be culled when outside the fov and so will be octree nodes (if octrees are used).

xujiang

Ask a model can be provided with a plurality of texture?

EgonOlsen

You mean multi texturing? Yes, the engine supports this. But the file format like obj and 3ds don't, so you have to apply the additional layers in code or by splitting the models before exporting them or...

xujiang

Need a reference code? Also need a particle effects of reference materials

EgonOlsen

I'm sorry, but i can't give "reference code" for everything. There are examples, there's a wiki and there are Javadocs. If you have specific questions, feel free to ask them here but i can't provide you with a silver bullet that solves all problems. For multi texturing, have a look at the TextureInfo class.