Page 1 of 3

Re: Polygon limit?

Posted: Thu Mar 24, 2011 2:50 pm
by JensAyton
Commander McLane wrote:
I don't know how the number of polygons will impact the frame rate. I am no ship builder myself. I tend to think that the impact of shaders will be bigger than the impact of polygon-number, but I can be wrong.
They’re different types of cost. Setup time costs and vertex shader/transform costs are per-polygon, while fragment shaders’ costs are per rendered pixel (in addition to a per-frame setup cost which is roughly proportional to the number of uniforms, including textures). A slow fragment shader will slow you down when the ship’s close to the camera, while a high polygon count will slow you down whenever the ship’s in drawing range.
Svengali wrote:
- vertex/face counts will have an impact on spawning the entity. Higher detailed models will need more time, probably because of the octree calculations.
Correct.
Svengali wrote:
And positioning/rotating the entity will be slightly slower.
True, but potentially misleading; geometric transformations are actually part of the per-vertex drawing cost, and generally happens on the GPU (in the vertex shader) and is elided for objects outside drawing range. Oolite 1.x doesn’t reuse identical vertices, so the vertex count in this case is strictly three times the number of triangles. 3000 vertices is a very small number in this context, so you don’t need to worry about it.
Svengali wrote:
- textures have to be loaded. I/O transfers can be pretty slow and GPU limits for the max size can cause weird effects.
Textures don’t just affect loading, either; textures may need to be swapped in and out of video memory, and there’s a setup cost per object per frame per material per texture.
Svengali wrote:
While doing the inflight overlays for the Vector I've seen that using a shadered entity with shadered subents is slower than doing it with single entities.
There’s a cost for switching shaders (bigger than the cost of switching textures), so using specialized shaders for different parts of a ship can easily be a failed optimization.
Svengali wrote:
I've read that 2nd generation GPUs are handling the if/else stuff different to 3rd generation GPUs.
Yes. The old approach is equivalent to evaluating each branch, then calling mix(a, b, (float)condition);. This allows each vertex/fragment in a batch to have the same control flow – it’s a lot like SSE programming.

Newer GPUs have better but still limited ability to branch.

Re: Polygon limit?

Posted: Thu Mar 24, 2011 3:17 pm
by ZygoUgo
On a kind of related note I was wondering how Oolite goes about using two cores? I find alot of pausing when things are being spawned which made me wonder about it. Oolite definately recognises I have two cores, so is it currently using them, or will this be for /2?

Re: Polygon limit?

Posted: Thu Mar 24, 2011 3:39 pm
by Svengali
Thanks a lot Ahruman.

He, and your explanations made me thinking about the buoyRepair station (urgs) .-)

Re: Polygon limit?

Posted: Thu Mar 24, 2011 3:45 pm
by JensAyton
ZygoUgo wrote:
On a kind of related note I was wondering how Oolite goes about using two cores? I find alot of pausing when things are being spawned which made me wonder about it. Oolite definately recognises I have two cores, so is it currently using them, or will this be for /2?
It loads textures on secondary threads, but it can’t usefully do that for models because the geometry and octree data are required for important quantities like mass and collision radius (which also determines render distance).

Re: Polygon limit?

Posted: Thu Mar 24, 2011 5:07 pm
by ZygoUgo
Thanks Ahruman, it's interesting to get an insight under the bonnet

Re: Polygon limit?

Posted: Thu Mar 24, 2011 5:31 pm
by Staer9
Unfortunately my computer is one of the slow ones, so if it will run on this it will run on anything... if it runs at all.

Re: Polygon limit?

Posted: Thu Mar 24, 2011 10:29 pm
by Svengali
Staer9 wrote:
Unfortunately my computer is one of the slow ones, so if it will run on this it will run on anything... if it runs at all.
Maybe it will need some tweaks, but it will run - I'm pretty sure. So don't give up (and post a screenshot!) as we are keen to see it .-)
You'll also see that we are a friendly bunch here and help is in most cases not far away if you are running into trouble.

The discussions above are mostly about fine details that are often confusing in the beginning and Ahrumans explanations are a big help to create OXPs at a higher level. We are all learning and trying our best to reach the goal.

Some topics might be of interest for you:
- The Shipyard at the End of the Ooniverse. Modeller's bit.
- Shaders’ Outpost
- Skinner’s Den

Re: Polygon limit?

Posted: Fri Mar 25, 2011 12:43 pm
by Staer9
Image
here is what it should look like when finished, (it is based on someone elses design.

Re: Polygon limit?

Posted: Fri Mar 25, 2011 12:55 pm
by Gimi
:shock:

Oooooooh. I like that very much. Does the lady have a name yet.

Re: Polygon limit?

Posted: Fri Mar 25, 2011 1:08 pm
by Killer Wolf
That's a bit saucy, bit of a Slave 1 next gen type thing going on. Definitely looks polyheavy!

Re: Polygon limit?

Posted: Fri Mar 25, 2011 1:19 pm
by Griff
woah! That looks amazing! The textures and modelling work are really great, lots of lovely fiddly bits too (um, by that i mean the wires and stuff near the 'eye' and the struts and stuff on the back), can't wait to see it in game! What have you got planned for it? it looks like some sort of Military attack drone or something!

Re: Polygon limit?

Posted: Fri Mar 25, 2011 2:12 pm
by Commander McLane
Looking really nice! Just don't make the mistake of making it too small. Have a look at the sizes of other ships and then decide which one it should match.

Oolite ships are much bigger than you would think!

Re: Polygon limit?

Posted: Fri Mar 25, 2011 5:42 pm
by Svengali
Yes - cool model - pretty texture! Looks superb 8)

Re: Polygon limit?

Posted: Fri Mar 25, 2011 5:58 pm
by TGHC
I can't see the image or a link.

Re: Polygon limit?

Posted: Fri Mar 25, 2011 7:01 pm
by Mauiby de Fug
For TGHC: http://i26.tinypic.com/rt0yvb.jpg
(Acquired by selecting "Quote" on Staer9's post to see the location of the image inside the image tag things...)