0 registered members (),
18,580
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Normal maps or polygons?
#46330
05/19/05 13:15
05/19/05 13:15
|
Joined: Mar 2005
Posts: 18
voodoofactory1
OP
Newbie
|
OP
Newbie
Joined: Mar 2005
Posts: 18
|
I was just wondering about something. Given the specs of the average current generation cpu's and graphic cards( about 2,4GHz cpu's and the 9000 series Radeons, with 64-256mb), at what point do normalmaps start getting more efficient than polygons. I mean, if you have a model, at what number of polygons, it'd be more efficient to add detail via normal maps? What would run better: a 20.000 polygon model without per pixel lighting or a 4000 polygon model with normal maps and per pixel lighting?
I ask this because, I don't know much about shader programming and as such don't always have the ability to combine parts of shaders, to get the desired effect. Because of that it could be that I can't use normal mapping on a model, because I want a fixed function effect on there as well. Ofcourse, the two effects could be merged into one shader, but I can't do it.
|
|
|
Re: Normal maps or polygons?
[Re: capanno]
#46333
05/19/05 16:29
05/19/05 16:29
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Normal maps are almost always more efficient than polygons..plus they are far more flexible than just adding polygons.. the quality is so much better with per pixel lighting and normal mapping, that the question is moot. Normal maps give you ability to add a huge amount of detail.
Normal mapping/per pixel light shaders are run on the GPU, not the CPU. The reason they are more efficient than adding far more polygons is simply that running a pixel shader is faster than transforming and drawing thousands of polys. If you have 5 characters on the screen of 3000 polys each, thats about 15,000 polys, minus backfaces, and LOD. Now if those models were 10,000 polys ach, then you'd have 50,000 polys. If you can use normal maps to make the 3000 poly model look essentially the same as the 10,000 poly model, the difference are huge.
Per-pixel lighting/normal mapping shaders won't work with the static lights. you will need to use dynamic lights, as the engine automatically passes the position, color, and range of each dynamic light to the shader.
|
|
|
Re: Normal maps or polygons?
[Re: Matt_Aufderheide]
#46334
05/19/05 18:34
05/19/05 18:34
|
Joined: Nov 2004
Posts: 1,011 South Africa
capanno
Serious User
|
Serious User
Joined: Nov 2004
Posts: 1,011
South Africa
|
Are the dynamic lights per-pixel?
And wat are vertex normals?
Last edited by Capanno; 05/19/05 18:36.
|
|
|
Re: Normal maps or polygons?
[Re: capanno]
#46335
05/19/05 18:37
05/19/05 18:37
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
you must write a shader to do per-pixel lighting. The standard lights are only hardware vertex lights, but you can pass the light properties to a shader, and use them to calculate per-pixel lighting. Do a search for my Ultimate Lighting shader..
Vertex normals are simply the direction the vertex (and thus the polygon) 'face'.. All lighting models depend on the vertex normals. The simple diffuse lighting formula is diffusecolor=dotproduct(normal,lightdirection). However, if this formaula is applied using only vertex normal data, your lighting quality will be based on the number of vertices you have..so if you have a low poly model, your lighting will be accordingly low resolution. The purpose of per-pixel lighting/normal mapping, is that you can do the dot product based not only on the vertex normal but the normalmap data as well. The calculation is the same as vertex lighting.
Therefor a normal map adds pixel level data to the normals of the model, but can only be used in a per-pixel calculation.
Last edited by Matt_Aufderheide; 05/19/05 18:49.
|
|
|
|