Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Model shading weird problem #259200
04/04/09 18:48
04/04/09 18:48
Joined: Apr 2009
Posts: 1
S
shinramidgar Offline OP
Guest
shinramidgar  Offline OP
Guest
S

Joined: Apr 2009
Posts: 1
Im a newbie at gamestudio and I just started trying to make models.
I have found a weird problem going on with my models.
(I created my some of my own faces in here and welded some verticies)
1)
url: http://i698.photobucket.com/albums/vv345/shinramidgar/4-4-200912-29-09PM.jpg
2)
url: http://i698.photobucket.com/albums/vv345/shinramidgar/4-4-200912-31-13PM.jpg
3)
url: http://i698.photobucket.com/albums/vv345/shinramidgar/4-4-200912-32-25PM.jpg

as you can see in 1) it creates a weird shading illusion to make these faces seem indented when they are really flat.

in 2) it does yet another wierd shading thing

in 3) it shades all the faces seperatly and weirdly

if anyone can help me that would be awsome

(note 1) and 2) also occur in the engine)


Last edited by shinramidgar; 04/04/09 18:49.
Re: Model shading weird problem [Re: shinramidgar] #259237
04/04/09 21:32
04/04/09 21:32
Joined: Sep 2005
Posts: 96
L
lyingmime Offline
Junior Member
lyingmime  Offline
Junior Member
L

Joined: Sep 2005
Posts: 96
I believe what you are seeing is the result of smooth shading. All polygons in the engine are smooth shaded (as opposed to hard edged). One way that you can get around this is to normal map your objects. Another is to change your geometry in a way that will work better with smooth shading.

In a little more detail... Normals determine how a polygon is illuminated. When the normal is parallel to the angle of the light source, the luminance of the light source is multiplied by 1. When the normal is perpendicular to the light source, the luminance is multiplied by 0. (Thus a face that is tangent to the light source receives no light.)

Now, with smooth shading, each polygon face (triangle) has a single normal at the center of the face. As you move away from the center, the normal angle is blended toward the normal angle of the neighboring faces. Generally, organic models will look better with this method and inorganic models will look...broken.

What you want to do is tell the engine to treat all the normals on the flat surfaces (the ends of the cylinder) as all pointing out the same direction. Then, for all the normals around the body of cylinder, smoothly blending into one another. Many software engines have an option known as hard edges that allow you to set this without normal mapping, but most real time engines do not, because additional computations are necessary.

Hope that helps. You should be able to find some normal mapping tutorials online. And you may see why real time apps generally avoid machine-cut pieces like what you're making here.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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