www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: xujiang on October 25, 2013, 06:26:19 pm
-
Hello, excuse me . There was no correlation Liezi OcTree control range of Camera rendering
-
What?... ???
-
The visible range rendering model .............There are no related tutorials
-
Scene segmentation related materials
-
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?
-
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?
-
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?
-
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
-
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.
-
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 ?
-
Objects will be culled when outside the fov and so will be octree nodes (if octrees are used).
-
Ask a model can be provided with a plurality of texture?
-
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...
-
Need a reference code? Also need a particle effects of reference materials
-
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.
-
Egon, you are a saint for decoding this. Does it help to know Germain? :- )
-
Egon, you are a saint for decoding this. Does it help to know Germain? :- )
No, i don't think so... ;)
-
Excuse me, can display text?
-
http://www.jpct.net/forum2/index.php/topic,1074.0.html (http://www.jpct.net/forum2/index.php/topic,1074.0.html)
-
Screen flicker ,How to solve? The following code
private Canvas canvas = null;
...
buffer = new FrameBuffer(GanmeConfig.WIDTH, GanmeConfig.HEIGHT, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL, IRenderer.MODE_OPENGL);
canvas = buffer.enableGLCanvasRenderer();
canvas.setBounds(0, 0, GanmeConfig.WIDTH, GanmeConfig.HEIGHT);
frame.add(canvas);
...
while(flag){
....
buffer.clear();
sh.updateShadowMap();
sh.drawScene();
skybox.render(world, buffer);
buffer.clearZBufferOnly();
world.renderScene(buffer);
world.draw(buffer);
buffer.update();
buffer.displayGLOnly();
//////////////////
canvas.repaint();
Thread.sleep(14);
}
buffer.dispose();
frame.dispose();
-
You have two renderers active with this setup. They to leave out the enableRenderer for the GLRenderer to see if that helps.
Apart from that, i don't get your render loop...why are you using drawScene in the ShadowHelper and in addition, you are also rendering the world itself? That doesn't make any sense exception if the ShadowHelper uses a different world. If not, this is just wrong...
-
To solve the canvas flicker? Canvas double buffer?
-
I don't think so. Just have a look at the AWTGL example what comes with the distribution. Apart from that, you seem to ignore my former post, which contains some ideas on how to fix this.
-
Please provide reference URL
-
I want to use the OpenGL window, but many controls need to write their own. For example, I need a text input China text whether to support the input method?
-
(http://b.zol-img.com.cn/soft/6/328/ce2ThDYP5CFE.jpg)
-
Please provide reference URL
Reference to what? The example that i mentioned can be found in the jpct.zip.
-
To solve the canvas flashing Liezi
-
As said: There's an example in the distribution that doesn't flicker. You can build upon that and see what's wrong with your code. And i mentioned that your render loop is most likely wrong. I don't see how i'm supposed to provide a kind of "reference url" to anything... ???