Author Topic: Using Normal Maps (demo)  (Read 923 times)

Using Normal Maps (demo)
« on: 09 Dec 2017, 22:38 »
Ok, so today I lost some hours of my life coding NormalMap with AGS Script.

In case you want it, Download the Demo here!.

I don't think it looks good, I decided to ditch this idea, but maybe someone wants to try and test this.

I based my code on the code here.

If someone does make it better, faster, please share your enhancemets here!


Jack

  • Think deviant
    • I can help with AGS tutoring
    • I can help with scripting
    • I can help with story design
    • Jack worked on a game that was nominated for an AGS Award!
Re: Using Normal Maps (demo)
« Reply #1 on: 09 Dec 2017, 23:24 »
This is awesome.

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    • I can help with proof reading
    • I can help with scripting
    • I can help with voice acting
Re: Using Normal Maps (demo)
« Reply #2 on: 10 Dec 2017, 12:42 »

selmiak

  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
    • selmiak worked on a game that won an AGS Award!
    •  
    • selmiak worked on a game that was nominated for an AGS Award!

Dualnames

  • AGS Baker
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Using Normal Maps (demo)
« Reply #4 on: 08 Mar 2019, 03:46 »
"WARNING - There has been no post in this topic for at least 120 days"

Dualnames: "Son, I know what I'm about, leave me be"

https://twitter.com/Dualnames/status/1103864496626446336
No more military army stuff. I'm alive and back.

Re: Using Normal Maps (demo)
« Reply #5 on: 08 Mar 2019, 13:09 »
I read so many posts from the dude with anime Rachel pic when I was learning AGS that I am really happy to have done something that turned out useful for you :)

Dualnames

  • AGS Baker
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Using Normal Maps (demo)
« Reply #6 on: 08 Mar 2019, 16:04 »
I'm sorry u had to go through my posts.
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
No more military army stuff. I'm alive and back.

Monsieur OUXX

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
Re: Using Normal Maps (demo)
« Reply #8 on: 12 Mar 2019, 15:35 »
I imagine that the normals map has to be exported then imported into AGS at some post? If that's correct, then under which format is it done?
 

Re: Using Normal Maps (demo)
« Reply #9 on: 12 Mar 2019, 16:34 »
@Monsieur OUXX, you are not wrong, but Dualnames is a crazy brilliant person who also added dynamic normal maps creation if you don't provide one.

Dualnames

  • AGS Baker
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Using Normal Maps (demo)
« Reply #10 on: 12 Mar 2019, 16:43 »
This particular test has normal maps generated by the plugin
No more military army stuff. I'm alive and back.

Monsieur OUXX

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
Re: Using Normal Maps (demo)
« Reply #11 on: 12 Mar 2019, 16:49 »
This particular test has normal maps generated by the plugin

So what's the strategy? Do you need to pass a greyscale sprite and the pixel's grey value provides the orientation of the pixel?
 

Re: Using Normal Maps (demo)
« Reply #12 on: 12 Mar 2019, 16:55 »
I think it accepts a rgba bitmap as a sprite where color to displacement maps RGB to XYZ

X: -1 to +1 :  Red: 0 to 255
Y: -1 to +1 :  Green: 0 to 255
Z: 0 to -1 :  Blue: 128 to 255

Dualnames

  • AGS Baker
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Using Normal Maps (demo)
« Reply #13 on: 12 Mar 2019, 18:46 »
Nope, the plugin grayscales it for you, u define the 'intensity' of that. You literally just do

DrawNormalMap(int sprite, int id) where sprite is the sprite you're importing and id is the id of the normal map, and it generates a normal map
So if you use a dynamic sprite you can use that to feed to the next function which Creates a normal map 'pattern' out of a normal map and a sprite.
« Last Edit: 12 Mar 2019, 18:47 by Dualnames »
No more military army stuff. I'm alive and back.

Monsieur OUXX

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
Re: Using Normal Maps (demo)
« Reply #14 on: 13 Mar 2019, 07:58 »
Nope, the plugin grayscales it for you, u define the 'intensity' of that. You literally just do

DrawNormalMap(int sprite, int id) where sprite is the sprite you're importing and id is the id of the normal map, and it generates a normal map
So if you use a dynamic sprite you can use that to feed to the next function which Creates a normal map 'pattern' out of a normal map and a sprite.

Perfect! All of you!
 

Dualnames

  • AGS Baker
  • Pretty Badass
    • Dualnames worked on a game that won an AGS Award!
    •  
    • Dualnames worked on a game that was nominated for an AGS Award!
Re: Using Normal Maps (demo)
« Reply #15 on: 20 Mar 2019, 11:44 »
I've uploaded both the AGS project file and the source code of the plugin here, https://github.com/Dualnames1/AGSNormalMap I'm working on other stuff right now, so it's hard for me to progress with this currently, i'll come back to it, definitely.
No more military army stuff. I'm alive and back.