3D Lighting tips
With my return to using the new Game maker 8 (very good if you ask me) i have being experimenting with the 3D aspect of Game Maker 8. One thing i noticed which could be called intolerable was (and probably included with all Game Makers which have 3D) that some of my shapes and such were kept black (example: floors, cylinders). This is because they have no normals to put light onto (or something similar to this). The solutions are found to be the following:
(REMEMBER: [CODE] tags aren't included ;) )
[CODE]
d3d_set_lighting(false)
//shape
d3d_set_lighting(true)
[/CODE]
Basically this disables lights while drawing this object causing no light to affect the object itself.
The simple way of avoiding this problem
2.
Get a modelling program (for something as simple as shapes i would suggest anim8or as it requires the simplest amount of knowledge, however for more harder models go for blender, sketchup or milkshape). Draw your shape and load it into the game, these models will have the ability for light to be shown but is the harder way.
3.
Fake lighting. The hardest to pull off. Pulled it off once on my old computer before it got formatted ; The idea and limitation of Fake lighting is that the light source can't change position. Better for lighting in rooms rather than a day/night system. It requires a texture of gradient type (which has a dark and light source. Light being on one side and dark of the other. HOWEVER, there must be normal (or unaffected by lighting colour) on the background seperating it. It is a matter of trail and error really.
I preferbly go for number one. If your good go for number two. Number three is for more of the smart graphic artists which could have a chance of pulling it off :P
Catch ya later.
(REMEMBER: [CODE] tags aren't included ;) )
[CODE]
d3d_set_lighting(false)
//shape
d3d_set_lighting(true)
[/CODE]
Basically this disables lights while drawing this object causing no light to affect the object itself.
The simple way of avoiding this problem
2.
Get a modelling program (for something as simple as shapes i would suggest anim8or as it requires the simplest amount of knowledge, however for more harder models go for blender, sketchup or milkshape). Draw your shape and load it into the game, these models will have the ability for light to be shown but is the harder way.
3.
Fake lighting. The hardest to pull off. Pulled it off once on my old computer before it got formatted ; The idea and limitation of Fake lighting is that the light source can't change position. Better for lighting in rooms rather than a day/night system. It requires a texture of gradient type (which has a dark and light source. Light being on one side and dark of the other. HOWEVER, there must be normal (or unaffected by lighting colour) on the background seperating it. It is a matter of trail and error really.
I preferbly go for number one. If your good go for number two. Number three is for more of the smart graphic artists which could have a chance of pulling it off :P
Catch ya later.
Labels: 3D - Advanced

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home