i have always wondered this... does anyone know if there would be any way to... emulate? is that the right word? anyway if so, is there anyway to emulate bump mapping for sprites on mmf2, or i guess any other click team product. i've got no idea whats out there. well i do, but i'm not sure how to use them... all. GAH i'm tired... yeah so BUMP MAPPING. any way? i would love to know if anyone has any ideas. i don't need explination, but i'd still like to have a look into it.
I can't recall anyone ever doing it in MMF. You'd have to create an extra channel to store the height/depth of each pixel in the sprite, and it's really not the easiest thing to do in MMF, especially if you want to apply the effect to many objects at the same time, etc. I'm thinking arrays, but that'd cause problems when working with multiple objects.
Another way would be to use alterable strings or values or something. Either way, it's gonna require some leet skillz to pull off, so meh. I'm waiting for someone to come in and prove me wrong though, because I know next to nothing about these things anyway.
You'd need another channel and a light source. I don't think I've seen 2D bumpmapping been done before, I thought it was limited to a 3D light source on a texture.
i know its not mmf, lol thats for sure. but it proves it can be one. i'm wondering if you can somehow analyze the brightness of colours through some extension... and then add even more brightness accordingly. but i can't imagine how. i would've thought it would be done through arrays... but lol yeah O_o?
Originally Posted by Toe_Fungus i know 2d bumpmapping can be done. i've seen it in an incredible game called hammerfall, you can find it clearly shown here. http://www.fun-motion.com/physics-games/hammerfall/
Oh yeah, I've seen that game. I really can't tell if it's bump mapping/dynamic lighting in the works there though.
Originally Posted by Toe_Fungus i'm wondering if you can somehow analyze the brightness of colours through some extension... and then add even more brightness accordingly. but i can't imagine how. i would've thought it would be done through arrays... but lol yeah O_o?
It's got nothing to do with analyzing the brightness of the sprite. You set up a second image of the sprite, where the color of each pixel tells the renderer how much that pixel "stands out", so that it can generate shading/lighting accordingly. That's how it works.
... At the moment images in MMF are done in 3 or 4 channels (RGB + Alpha) to have bump mapping you need another channel for the "height" of that pixel. That's how the mapping works out how the light would play over the surface. To do it manually would be a pretty extreme challenge, calculating it is one thing but actually lightening and darkening single pixels at runtime is something I don't have a clue on (well not a way that is practical).
I could probably do it for ONE object at runtime and it's not worth the effort to be honest, we'd need an easy way. (I don't know if a pixel shader could handle this in any way... With HWA coming and all)
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
24th January, 2008 at 18:10:30 -
This was made in MMF 1.5
I don't know if it will be useful to you, I'm not sure if it works properly in MMF2 because of the updated extensions, but you can still look at the code:
hmm... this is quite a puzzle. there is no way of somehow replicating the brightness or contrast etc into a value which in practise becomes depth? *ponders* what about... hmm... no *contemplates* ... ... ... perhaps its just a lost cause. how was it done on that hammerfall game!!! gah, damn their malevolence.
It's most likely just done the same way it would be in 3D but they've just restricted the game to use two axis rather than 3. You could try to get a height value by averaging values etc... I'm not sure it would be correct per say. It's more rendering it that is the hard part.