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

Disthron



Registered
  08/02/2005
Points
  1101

VIP Member
25th January, 2008 at 21:19:45 -

Ok, I have an idea about this, I'm not shore if it would work but I'll put it out there anyway.

You could try using a sprite as a semi-transparent overlay. For every animation, possibly including alternat directions, you would have a corresponding animation in the overlay sprite. You would use the directions in the overlay sprite to change the directions of the shadows on the main sprite. This way you can have the overlay sprite always looking toward the closest light sorce and as long as you've dune the pre-rendering right you should be able to fake the effect.

In order to make the directions for the shadows. First I'd make a black and white bumpmap for my charecter. I'd go into Photoshop and use the render lighting effects. I'd position the light in the 32 directions that MMF suports, I think you can save custome presets and I would definatly use a macro to help with all the frames. This should give you the shadows.

Though it would be considerably less work for something like a car as oposed to a human. This would still be pritty tedious and time consuming way to do it. Also you won't be able to get it looking perfict. However if you were to slug through it you could probably acheve a cool effect that I don't think would caus much slowdown at run time. You wouldn't even need to use any extensions, just give it a tint value.

 
"Oh, my god! A lightning monster just ripped out this poor woman's eyes, and your mocking her shrubbery!" - The Spoony One

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
26th January, 2008 at 07:14:25 -

Yeah, but as you said, that's a lot of work, and it's still not the real thing. And it wouldn't allow for multiple light sources and stuff like that. But if you're prepared to go such lengths just for a half-arsed version of the effect, then sure =P

The reason why they can do stuff like this in other languages is that they have much more control over their bitmaps and blitting/drawing operations than we have in MMF. Languages like C++ are harder to learn, and more abstract, but so much faster and more flexible than MMF when it comes to things like this.

 
n/a

Johnny Look

One Happy Dude

Registered
  14/05/2006
Points
  2942

VIP Member
26th January, 2008 at 17:17:51 -

coff Construct coff coff coff

 
n/a

Ganymede Graphics

Possibly Insane

Registered
  17/04/2006
Points
  2711

GOTW JANUARY 2011
28th January, 2008 at 19:18:59 -

yeah the animation direction technique sounds like one of our only working ideas so far... i need to learn c++ >_>

 
Especially that.
   

Post Reply



 



Advertisement

Worth A Click