Login  Register

Re: Optimising a voxel engine

Posted by Xerxes Rånby on Jan 22, 2017; 9:52am
URL: https://forum.jogamp.org/Optimising-a-voxel-engine-tp4037587p4037589.html

You may have run out of GPU's memory bandwidth as well
http://www.openglsuperbible.com/2014/01/24/memory-bandwidth-and-vertices/

2017-01-22 10:50 GMT+01:00 Xerxes Rånby <[hidden email]>:
You should lower your vertex count.

As a rule of thumb,
entry level GPU can only process 1 vertex per clock cycle a high end GPU can process up to 5 vertex each clock cycle.
If you want to rendering 1k objects * 4k vertives * 60 fps then you will hit the above limit.

You requiring at least a 2.4ghz entry level GPU for full frame-rate while most entry level GPU's are clocked at 800Mhz.
Some high end GPU's may handle your workload, still your vertex count is high!

A good engine also know which objects are out of view. The fastest vertex to render is the vertex never rendered.
A good engine uses shades to make things look good without increasing the vertex count.

You should consider posting a compilable example based on JogAmp if you want more specific help (we do not offer support for lwjgl in this forum).


2017-01-22 8:51 GMT+01:00 deardanielxd [via jogamp] <[hidden email]>:
Hi. I am new to OpenGL4. I am currently writing my own Voxel engine using lwjgl. My final goal is to make a small simulator to simulate a small ecosystem. I implemented the entity renderer and light inside my engine. At the beginning, I followed a youtube channel, called ThinMatrix. I changed the structure and some details of the engine to make it easier to implement my simulator. Currently, I added about 1K objects and each with about 3-4K vertices.  I implemented textured mapping and lighting effects. I added two point lights. One is static and one is controlled by the mouse. Overall, I think the whole program is quite simple, but the fps is just only 20-30. And here is my questions.

1. What can I do to improve my engine? Or, how do you optimise your engines?
2. What are the most common bottlenecks in OpenGL 4?
3. I have heard of buffer of batch data. According to my understandings, it is about combining several buffers into one single buffer to speed up the rendering. Am i correct? Currently, I separated the buffers into normals, vertices and texture buffers. Is that a bad practise? If I apply the "buffer of batch data" technique. How much will it improve?

Any advice will be very helpful. Thanks 


If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Optimising-a-voxel-engine-tp4037587.html
To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML