Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Normal maps or polygons? #46330
05/19/05 13:15
05/19/05 13:15
Joined: Mar 2005
Posts: 18
V
voodoofactory1 Offline OP
Newbie
voodoofactory1  Offline OP
Newbie
V

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: voodoofactory1] #46331
05/19/05 16:21
05/19/05 16:21
Joined: Nov 2004
Posts: 1,011
South Africa
capanno Offline
Serious User
capanno  Offline
Serious User

Joined: Nov 2004
Posts: 1,011
South Africa
I guess the shader for the normal map is run by the CPU, so i think that normal maps should work better than high polycount models, given that all the work will rest on the GPU. please correct me if Im wrong.

Re: Normal maps or polygons? [Re: capanno] #46332
05/19/05 16:24
05/19/05 16:24
Joined: Nov 2004
Posts: 1,011
South Africa
capanno Offline
Serious User
capanno  Offline
Serious User

Joined: Nov 2004
Posts: 1,011
South Africa
I have a question, does normal maps work with static lights, or with dynamic ones only?

Re: Normal maps or polygons? [Re: capanno] #46333
05/19/05 16:29
05/19/05 16:29
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

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 Offline
Serious User
capanno  Offline
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
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

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.
Re: Normal maps or polygons? [Re: Matt_Aufderheide] #46336
05/19/05 18:47
05/19/05 18:47
Joined: Nov 2004
Posts: 1,011
South Africa
capanno Offline
Serious User
capanno  Offline
Serious User

Joined: Nov 2004
Posts: 1,011
South Africa
OK thanx for clearing it up.


Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1