Jump to content


Photo

The Most Perfect Normal Mapping


  • Please log in to reply
119 replies to this topic

#101 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 09 October 2007 - 10:01 PM

Well, it's a fun technique in any event. The only real problem with it is if your game requires a lot of shaded sprite animation, you run out of video memory very quickly. To compensate I experimented with half-resolution normal maps (sorry to ruffle your feathers, xygthop3) but the results were pretty bad.

Since you said you wanted to see other attempts, here's mine:

http://host-a.net/u/...akelighting.gmk

Edited by xot, 09 November 2013 - 07:51 PM.

  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.

#102 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 09 October 2007 - 10:16 PM

Okay, i'll take a look at that, you may give me some ideas on how to improve mine. Is that something that i'll have a hard time converting to gm6?

I converted it to gm6 to check it out, its not bad, but it doesnt work nearly the same, it just looks like your drawing the different backgrounds on top of eachother with an alpha and color setting based on the lights. It does look good and run pretty fast, but its not as accurate.

I'm going to work on a new technique in my free time, though it may be very unreliable, and slow, i may be able to get some sort of shading information from an actual normal map, i'm not sure if i can, but i'm going to try to.

Edited by Indecom4000, 10 October 2007 - 05:42 AM.

  • 0

LD-Logo-sml.png


#103 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 14 October 2007 - 06:47 AM

Another small teaser of some of the things i've been working on for the past week or so.

Posted Image

In the final release of this, you can expect to see things in it such as the bloom that is evident in that preview, directional ambient light (aka sun/moon light), which is also evident in that pic, objects that glow and emit light, and various other things, as well as the boost in speed we've been talking so much about.

Anyways, I'm still accepting ideas if you have any to share, or comments on the latest preview.
  • 0

LD-Logo-sml.png


#104 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 14 October 2007 - 01:43 PM

directional ambient light

Directional and ambient are mutually exclusive terms. Ambient means light coming from all directions equally.

it just looks like your drawing the different backgrounds on top of eachother with an alpha and color setting based on the lights.

That's essentially correct. I have prerendered 5 lighting angles (up, down, left, right, and front), and I blend them together proportional to the angle between the game light and prerendered light (Lambert's cosine law), coloring the maps according to the color of the light. This is done with several passes of additive blending, one pass per light. This simulates diffuse shading. The final diffuse lighting composite is then multiplied by the color map (which also includes prerendered ambient occlusion). Finally, an ambient lighting pass is added according color of the ambient light. Not mathematically accurate, but very effective. I experimented with more prerendered lighting maps to reduce error, but it actually made the error more obvious. Perhaps with enough maps this could be improved, but it would be a tremendous waste of memory.

Since you say our techniques are different (which surprises me), why not explain a bit about how yours works?
  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.

#105 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 14 October 2007 - 10:10 PM

Okay, well, mine is I'm sure unlike anyone elses. I draw each objects lighting sprites once per angle, not per light, so if i have a hundred lights, i'll still only need to draw the b&w light info sprites 1 time. I basically draw the lights in one surface and the lighting sprites in other surfaces.
  • 0

LD-Logo-sml.png


#106 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 23 December 2007 - 01:47 AM

Daaaamn, that looks great!
  • 0

#107 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 23 December 2007 - 01:57 AM

thanks!

Its been a while since i've done much with this, i get pretty dissapointed with my old slow ocmputer acting up when i make something in gm, so i've kinda taken a break for a while.
  • 0

LD-Logo-sml.png


#108 RandomX

RandomX

    GMC Member

  • New Member
  • 70 posts

Posted 23 December 2007 - 05:56 AM

120 fps, unbelievable! Well done!!!!
  • 0

#109 naughtydogbig

naughtydogbig

    GMC Member

  • New Member
  • 31 posts

Posted 23 December 2007 - 06:17 AM

nice this will look good when finished
  • 0

#110 naughtydogbig

naughtydogbig

    GMC Member

  • New Member
  • 31 posts

Posted 23 December 2007 - 06:20 AM

nice :blink:
  • 0

#111 LoopStan

LoopStan

    North-See Developer

  • GMC Member
  • 1398 posts

Posted 23 December 2007 - 06:29 AM

My computer is realy fast. I can download a file that is 4 gig in about 46 seconeds. Now thats suposivly fast( i make all my own cards for it therefore almost unlimited stuff lolz)

But that game had like 5 errors in buffering. Try to fix those to
I jsut said the files could not be found
  • 0

Posted Image


#112 Inspire Media

Inspire Media

    GMC Member

  • New Member
  • 20 posts

Posted 23 December 2007 - 07:11 AM

This looks sweet. Keep up the good work.
  • 0

#113 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 23 December 2007 - 08:55 AM

@Loopstan, the problem is your graphics card not my code. You cant handle the surfaces that this requires.

@all else, thank you for the comments, like i said before, i'm adding some new stuff to this, and since you seem to be interested in it again, i'll be working on it more often.
  • 0

LD-Logo-sml.png


#114 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 01 May 2008 - 08:58 PM

My computer is realy fast. I can download a file that is 4 gig in about 46 seconeds. Now thats suposivly fast( i make all my own cards for it therefore almost unlimited stuff lolz)

But that game had like 5 errors in buffering. Try to fix those to
I jsut said the files could not be found


oviously you are lieing. A fast computer doesnt mean fast download speeds. 4 Gigabytes in 46 seconds? impossible. If you "make ur own card" your isp wouldnt allow that fast of a connection... unless you pay for it, and connection that fast doesnt exist. Thats like 20 mgb or more a second... which only 1.3? mb a second exists.

Sounds like someone wants to sound cool, because there not.

Even though it's a big bump, the effect is still worth it.
(my friend didnt tell me... crap) now im flamed.

Edited by X-tra Fear, 01 May 2008 - 09:00 PM.

  • 0

#115 Dreedo

Dreedo

    GMC Member

  • GMC Member
  • 1308 posts

Posted 01 May 2008 - 09:14 PM

yes i have 8mbit internet and i only download at 700 to 900kbps.

Nice program you got here though, shame you dont appear to work on it anymore :/
  • 0

#116 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 02 May 2008 - 05:01 AM

I've started picking this back up recently. I havent actually been able to work on anything of mine recently since my computer crashed, but i'm reformatting and reinstalling windows so i'll be able to pick it back up and finish something usable.
  • 0

LD-Logo-sml.png


#117 makron666

makron666

    GMC Member

  • New Member
  • 22 posts

Posted 27 November 2008 - 11:49 PM

I always get around 255 frames. 2.8ghz pentium D, ati radeon hd 4850, 2gb ram. If i had a better m/board and prosscesor i could get 300+
And net speeds of 1gb/s are possible in singapore.
  • 0

#118 The eleventh plague of Egypt

The eleventh plague of Egypt

    GMC Member

  • GMC Member
  • 1045 posts
  • Version:Unknown

Posted 29 November 2008 - 07:42 PM

Impressive !

I get 225-137 FPS:
E8400 dual-core (3.0 ghz)
4 gb ram
HD 3870 (latest drivers, 8.11)
Win Xp

I can see a strange line when increasing-decreasing the bumpiness. (see at the bottom of the pic)
Posted Image

Edited by The eleventh plague of Egypt, 29 November 2008 - 07:44 PM.

  • 0

#119 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 30 November 2008 - 05:18 AM

I Love Normal Mapping/Bump Mapping, however if you could provide a tutorial on how to generate the normal maps, that would be great!

Now lets see how this works on a horrible machine pile of junk.

I got 10 FPS, but it worked great (Besides the bad fps).
  • 0

#120 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1636 posts
  • Version:GM:Studio

Posted 06 December 2008 - 03:19 AM

actually this doesnt use real normal maps, it uses images, which can be created from normal maps, that represent light coming from 5 angles, left top right bottom, and above. Basically i placed a directional light and had it rotated from these 5 different angles and rendered it out.

I dont have gm installed on this machine, and might not install it at all actually until they can come up with some better speeds, they really hold you down when you add things up.

I might try a technique similar to this in c++ however.
  • 0

LD-Logo-sml.png