Hello everybody,
My question is very simple.I understand that game maker is not the ultimate 3D tool and it isn't working very well with 3D graphics, however If i want to bring any normal maps in Game Maker (for more details) how can I do it?
Textures and normals
Started by euma12, May 25 2012 08:25 PM
4 replies to this topic
#1
Posted 25 May 2012 - 08:25 PM
#2
Posted 25 May 2012 - 08:36 PM
To use a normal map in GameMaker, you'd have to use a renderer DLL like GMOGRE or Ultimate 3D.
There is one catch though - you have to use GM 8.0 (or earlier supported versions), as these DLLs aren't actively supported anymore. GameMaker does not natively support normal maps.
There is one catch though - you have to use GM 8.0 (or earlier supported versions), as these DLLs aren't actively supported anymore. GameMaker does not natively support normal maps.
#3
Posted 25 May 2012 - 08:45 PM
Not even 8.1?
#4
Posted 25 May 2012 - 11:07 PM
If you're willing to forsake per-pixel lighting and alpha-mapping AND willing to take about 6 times as much memory AND willing to draw... between 6 and 12 times as much per light each time, then you can have normal maps in native GM.To use a normal map in GameMaker, you'd have to use a renderer DLL like GMOGRE or Ultimate 3D.
There is one catch though - you have to use GM 8.0 (or earlier supported versions), as these DLLs aren't actively supported anymore. GameMaker does not natively support normal maps.
Here's how:
Create 6 textures (1 for each cardinal 3D direction). These should be greyscale images with value corresponding to the absolute value of a coordinate of the normal for each texel. (Negative values get a separate texture).
Create 6 models (1 for each cardinal 3D direction). These should be the same as the regular model EXCEPT that the normals correspond with a cardinal direction (You can do local-space normal mapping, but since models don't bend it'll probably work best to use global-space normal mapping).
Using the default blending mode, draw one of the normal-map models with its corresponding texture map.
Set blending mode to additive, then draw rest of the normal-map models with their corresponding texture maps.
Set blending mode to subtract, then draw the normal-map models with the texture maps corresponding to the OPPOSITE direction.
Congratulations! You have calculated the lighting for a single light. For multiple lights, draw the scene to a surface for each, then add the surfaces together.
To give it texture, draw the regular model (unlit) with a multiplicative blend mode (draw_set_blend_mode_ext(bm_dest_color, bm_zero)).
And there you have it. Normal mapping. Slow, imperfect, COMPLETELY NOT WORTH IT normal mapping.
#5
Posted 25 May 2012 - 11:40 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











