Large Polygons and Lighting

Started by
4 comments, last by Graham 21 years, 9 months ago
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
Go on an Intense Rampage
Advertisement
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
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

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
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

We''ve got a milestone today,.. Yesterday??!?, oh well 29 hours straight and still going,.. ... just

This topic is closed to new replies.

Advertisement