Archived

This topic is now archived and is closed to further replies.

Graham

Large Polygons and Lighting

Recommended Posts

I was wondering if having very large polygons would make the lighting look very bad. I heard that this was true but it was from a fairly old article. I suspect that it might be true because DirectX would have to interpolate between larger distances and problems might occur. Go on an Intense Rampage

Share this post


Link to post
Share on other sites
Yup, you will get problems,

For instance the classic example of a triangle that has its points at

0,0,0
5,0,0
5,0,5

And if you have a light that is at

2.5,0,2.5

And its radius is only 1 metre, this means none of the verts of the triangle are going to be lit by the light. This results in a black triangle. Also if only one vert gets lit, and the tri is big, you will most likely get some nasty gourard [sic?] artifacts.

To solve this you should subdivide your triangle more, this means a vert is more likely to get lit by the light.

[Wish]
When we eventually get phong shading in hardware the above should not be a problem. Oh well *one* day
[/Wish]


Mark Duffill[The Jackal]
Eurocom Entertainment Software

Share this post


Link to post
Share on other sites
quote:

[Wish]
When we eventually get phong shading in hardware the above should not be a problem. Oh well *one* day
[/Wish]



What, so FF DOT3 isn''t close enough (ignoring precision issues) ?

Actually with a pixel shader, particularly DX9 and DX9 level hardware it *IS* possible. Dependent texture read to get interpolation of higher precision normals, then the full Phong function in the shader.

Phong as in D3DRS_SHADEMODE = D3DSHADE_PHONG is actually pretty unlikely IMO - no IHVs are spending any real time on the fixed function ways of doing stuff anymore.



--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
quote:

Phong as in D3DRS_SHADEMODE = D3DSHADE_PHONG is actually pretty unlikely IMO - no IHVs are spending any real time on the fixed function ways of doing stuff anymore.



I suppose I just "Want the Moon on a stick"

[This is our famous phrase when the publisher wants a feature 10 mins before a milestone that will take 4 weeks to implement. My reply is, "Well, they can have the stick" ;]

Mark Duffill[The Jackal]
Eurocom Entertainment Software

Share this post


Link to post
Share on other sites
quote:

[This is our famous phrase when the publisher wants a feature 10 mins before a milestone that will take 4 weeks to implement. My reply is, "Well, they can have the stick" ;]



- tell me about it - we''ve got alpha on Monday

Share this post


Link to post
Share on other sites