GameMaker Baked 3D shadowmap

E

ewmo

Guest
I'm working on a few projects that focus on a sort of blend between 3D and 2D Assets.

So far I've had the usual hiccups, but at the moment I'm sort of stuck at a sort of impasse where the problems have finally converged on a similar roadblock.

Problem 1:
I need to have a 3D model with its own textures have a static shadowmap overlaid on top of it. I know that this is done with shaders, but the ones I've seen tend to focus on creating the static shadows in GMS upon drawing the model/shader.
What I want to do is bake the shadows in my modelling software (in a gradient of black and white) as a texture and then have that overlaid on top of the normal textured Object with the closer the gradient gets to white being more transparent.


Problem 2:
Similar, but different. The attached file is relevant to this one as I was fiddling with it earlier with some random placeholder assets as example.

Basically there is a larger character in the foreground, then an object between them (which, in the example is a sprite, should be a 3d model) and then a smaller character.
The object between them has a sprite shadow cast onto it, clipped to it with blending layers, and then the smaller character is visible through that above layer when he goes behind it.
From my tweaking I couldn't get a 3D model to interact at all with blending modes, meaning that it would not be clipped to by the shadow, nor have the smaller character seen through it.

The end goal would be to have the character in back have a gradient around him that makes it so the area around the sprite also makes the object more transparent (and less odd looking to have him seen through it), but that is something I've put off until I can work out the 3D aspect.


Would appreciate any help! And feel free to ask more specifics if needed, I'm rather new to gamemaker
 

Attachments

FoxyOfJungle

Kazan Games
About baking, you can do it in Blender.
You should first place lights in the room, generate the UV lightmap texture with a material, then render the lightmap and multiply the diffuse texture with the lightmap, you can do it in GIMP, Photoshop or other software.
 
Last edited:
E

ewmo

Guest
About baking, you can do it in Blender.
You should first place lights in the room, generate the UV lightmap texture with a material, then render the lightmap and multiply the diffuse texture with the normal map, you can do it in GIMP, Photoshop or other software.
I was more looking for the textures to be separate, in terms of being drawn into the game, to allow for some blending shananigans to effect the shading without effecting the models' base texture. This the idea to use a mechanism that others use to load the shadowmap when the game is drawn.

The only difference being that I'd be setting up the lighting elsewhere.
 
Top