Using Normal Maps (demo)

Started by eri0o, Sat 09/12/2017 22:38:28

Previous topic - Next topic

eri0o

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


Danvzare



Dualnames

"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
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

eri0o

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

I'm sorry u had to go through my posts.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Dualnames

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Monsieur OUXX

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?
 

eri0o

@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

This particular test has normal maps generated by the plugin
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Monsieur OUXX

Quote from: Dualnames on Tue 12/03/2019 16:43:27
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?
 

eri0o

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

#13
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.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Monsieur OUXX

Quote from: Dualnames on Tue 12/03/2019 18:46:06
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

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.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Monsieur OUXX

Quote from: Dualnames on Wed 20/03/2019 11:44:09
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.

That is awfully generous of you. Thank a lot!
 

Dualnames

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

jhonberg

Quote from: eri0o on Sat 09/12/2017 22:38:28
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!



Great Scott!!! what kind of sorcery is this!!

eri0o

#19
Hey, I tried to workout the building of Dualnames Normalmap plugin here. Thing is when actually trying to use, well, it's working on Windows, but I am getting an error under linux:

Error: Plugin 'agsnormalmap' is an old incompatible version.

Does anyone knows why I am getting this error? (I found it comes from agsplugin.cpp)

Spoiler
Code: bash

Adventure Game Studio v3.4 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2019 others
ACI version 3.4.3.1

Initializing allegro
Initializing game data
Located game data file: /home/erico/git/AGSNormalMap/AGSProject/Compiled/Linux/data/AGSProject.ags
Opened game data file: game28.dta
Game data version: 49
Compiled with: 3.4.3.1
Setting up game configuration
Logging scipt to "warnings.log"
Setting up window
Initializing TTF renderer
Initializing mouse: number of buttons reported is 3
Checking memory
Data directory: /home/erico/git/AGSNormalMap/AGSProject/Compiled/Linux/data
Initializing keyboard
Install timer
Sound settings: digital driver ID: 'Auto' (0xffffffff), MIDI driver ID: 'Auto' (0xffffffff)
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0 failed: No such file or directory
Warning: cannot enable MIDI audio.
Problem: No compatible drivers found in the system..

You may supress this message by disabling MIDI sound in the game setup.Installed digital driver ID: 'ALSA' (0x414c5341), MIDI driver ID: 'None' (0x0)
Install exit handler
Initialize path finder library
Game GUI version: 118
Requested script API: v3.4.1 (5), compat level: v3.3.4 (2)
Plugin 'agsnormalmap' loading succeeded, resolving imports...
An internal error has occurred. Please note down the following information.
If the problem persists, post the details on the AGS Technical Forum.
(ACI version 3.4.3.1)

Error: Plugin 'agsnormalmap' is an old incompatible version.
***** ENGINE HAS SHUTDOWN
[close]

SMF spam blocked by CleanTalk