The Daily Click ::. Forums ::. Klik Coding Help ::. bump mapping of course!
 

Post Reply  Post Oekaki 
 

Posted By Message

Ganymede Graphics

Possibly Insane

Registered
  17/04/2006
Points
  2711

GOTW JANUARY 2011
22nd January, 2008 at 08:24:08 -

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.

thankkyoohh


 
Especially that.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
22nd January, 2008 at 09:21:38 -

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.

Image Edited by the Author.

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
22nd January, 2008 at 09:48:44 -

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.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
22nd January, 2008 at 09:54:18 -


Originally Posted by Dr. James
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.



http://www.blackskygame.com/images.php I heard this game uses 2D bump mapping.

I mean, it's certainly doable. But in MMF? I don't know...

 
n/a

Ganymede Graphics

Possibly Insane

Registered
  17/04/2006
Points
  2711

GOTW JANUARY 2011
24th January, 2008 at 04:18:09 -

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/

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?

 
Especially that.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
24th January, 2008 at 04:32:35 -


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.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
24th January, 2008 at 04:35:34 -

And seriously, what's wrong with those quote tags? I'm sure I closed that first tag, but it still messed up <_<

Image Edited by the Author.

 
n/a

Deleted User
24th January, 2008 at 04:41:23 -

Your < /quote > was right next to a link. See, it broke the link too. You need to leave a space.

The < and > codes don't work right, they still get picked up as tags.

Image Edited by the Author.

 

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
24th January, 2008 at 04:46:30 -

Bah, that shouldn't make any difference. I know my HTML. It's that stupid link detector thingy that keeps screwing up my posts. *Grumble* <_<

 
n/a

Ganymede Graphics

Possibly Insane

Registered
  17/04/2006
Points
  2711

GOTW JANUARY 2011
24th January, 2008 at 04:47:54 -

do you mean some kind of mask..?

 
Especially that.

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
24th January, 2008 at 05:29:12 -

... 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)

 
Image
http://bfollington.tumblr.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
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:

http://www.clickteam.com/CTforum/showflat.php3?Cat=&Board=upload&Number=287586

Image Edited by an Administrator.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
24th January, 2008 at 20:35:50 -

It's not really that helpful :\ it can't really be real time and it's hardly reproducible. I guess it's kinda a proof of concept.

 
Image
http://bfollington.tumblr.com

Ganymede Graphics

Possibly Insane

Registered
  17/04/2006
Points
  2711

GOTW JANUARY 2011
24th January, 2008 at 23:26:49 -

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.

 
Especially that.

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
25th January, 2008 at 00:21:04 -

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.

 
Image
http://bfollington.tumblr.com
   

Post Reply



 



Advertisement

Worth A Click