Author Topic: Octree and camera problems  (Read 2667 times)

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Octree and camera problems
« on: October 25, 2013, 06:26:19 pm »
Hello, excuse me . There was no correlation Liezi OcTree control range of Camera rendering

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #1 on: October 25, 2013, 06:49:31 pm »
What?... ???

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #2 on: October 25, 2013, 06:58:04 pm »
The visible range rendering model   .............There are no related tutorials

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #3 on: October 25, 2013, 07:00:52 pm »
Scene segmentation related materials 

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #4 on: October 25, 2013, 08:27:30 pm »
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?

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #5 on: October 26, 2013, 05:13:21 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #6 on: October 27, 2013, 07:32:46 pm »
Creating an octree basically goes like this:

Code: [Select]
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?

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #7 on: October 28, 2013, 05:53:42 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #8 on: October 28, 2013, 07:29:05 am »
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.

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #9 on: October 28, 2013, 08:07:46 am »
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 ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #10 on: October 28, 2013, 07:50:17 pm »
Objects will be culled when outside the fov and so will be octree nodes (if octrees are used).

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #11 on: October 31, 2013, 05:27:27 am »
Ask a model can be provided with a plurality of texture?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #12 on: October 31, 2013, 07:35:04 am »
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...

Offline xujiang

  • byte
  • *
  • Posts: 16
    • View Profile
Re: Octree and camera problems
« Reply #13 on: October 31, 2013, 07:45:58 am »
Need a reference code? Also need a particle effects of reference materials

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Octree and camera problems
« Reply #14 on: October 31, 2013, 08:36:56 pm »
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.