Hi,
Back in the days of GM7, there was no 3d lighting limit, now there is like an 8 light limit. Is there any way to use more than 8 active lights at once in Game Maker Studio?Thank You,Hi,
Back in the days of GM7, there was no 3d lighting limit, now there is like an 8 light limit. Is there any way to use more than 8 active lights at once in Game Maker Studio?Thank You,
Someone please help!
It would probably be better to go somewhere like the GMC because I'm not sure how quickly you will get a response on something in regards to 3d. I don't know how many 3d GM devs frequent the site.
8 active lights DOES both seem like a short limit and a potentially excessive amount of light sources. Good luck, though!Thanks Acid, I would go to GMC, but they have a long history of people overlooking my posts.
I am pretty sure the 8 light limit was in GM7 too. Did they change functions or something?
The limit is a DirectX thing, and the 8 light limit was present in all versions of Game Maker that supported 3D.
There are many workarounds. The first is to set the eight lights the eight nearest light sources in your scene. Another is to use the shaders in GMS to implement a dynamic lighting system. And you can always 'fake' the lighting, or use lightmaps.That's strange, in Hospital 3d III there were infinite lights, (It was made with GM7)
You can use a deferred rendering shader (as opposed to forward rendering) or you can prioritize lights by their proximity to the camera and define them from there. Here's a good GMC topic with shaders using either rendering method: http://gmc.yoyogames.com/index.php?showtopic=590847
I think in good looking AAA games the technique for limited lights in forward rendering tends to be prioritizing them per object being lit or per region as opposed to everything for the camera. Like say you have streetlamps that never overlap with their lit areas. For every object or region you could detect the nearest streetlamp and define it to the same light slot. Voila, infinite lights, using only 1 light slot. In AAA games they probably have quadtrees and octree regions prioritizing lights and fading the farthest ones for a smooth transition in the case of 9 nearby, shifting lights.The only option is to use shaders, in this topic the same question is discussed.
http://gmc.yoyogames.com/index.php?showtopic=613208EDIT: The suggestion above is good, but the shader in this topic is more simple.When it comes to things like these, I would prefer using Unity over GameMaker. The program wasn't designed for 3D development and it seems they are doing this for performance reasons.
Sorry for discouraging you.