Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Help with normals

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Mar 2018 01:52 Edited at: 21st Mar 2018 01:52
Trying to get normals to work and not having any luck. (attached project)
Could someone tell me what i am doing wrong here please.
Thanks

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Mar 2018 10:15
I can't open rar at work so I'll just take a random guess, when you calculate the normals are the verts in the right order? If they're reversed, the normal will point in the opposite direction and leave you seeing the backface.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 21st Mar 2018 10:28 Edited at: 21st Mar 2018 10:30
Hi


- Your diffuse texture isn't very good with normalmap, so you can't see your normalmap.
- your ambient is too bright
- the main issue : AppGameKit doesn't have specular, so, we don't see the normalmap in some case because we haven't specular light. Another issue : we can change the intensity of the normalmap in the code, we have to create a shader for that, that's not cool ^^.

I have changed your code & textures to see the normalmap. it works fine now .



But we need specular in the agk shader to get better result !
AGK2 tier1 - http://www.dracaena-studio.com

Attachments

Login to view attachments
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 21st Mar 2018 11:12
He wasnt really doing much wrong to start with.

Blendman your point light is in Vertex mode so wont actually use the normal map...lol. You can tell it doesnt as the normal map a has no effect as it rotates. Normal mapping is a per fragment effect and needs lights that operate in that mode (otherwise the normal map isnt actually being used!

Ive attached a version that looks better and actually uses the normal map properly rather than attaching a vertex point light.

You dont actually NEED a specular shader to see the lighting effect of the normal map. Plus adding a specular shader yourself is pretty easy and can give you even better effects!

Attachments

Login to view attachments
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 21st Mar 2018 12:10
Bengismo wrote: " Plus adding a specular shader yourself is pretty easy and can give you even better effects!"


A little example would be so nice!
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 21st Mar 2018 12:32 Edited at: 21st Mar 2018 12:33
basicFantastic wrote: "A little example would be so nice! "


I already posted one!

https://forum.thegamecreators.com/thread/221784#msg2621472
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 21st Mar 2018 14:35
I think basicfantasic would say : an exemple of code
+1 for an example of code .
AGK2 tier1 - http://www.dracaena-studio.com
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Mar 2018 16:31
Guess I was way off. I should just stay quiet in matters of 3D.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Mar 2018 19:10
Thanks guys. Absolutely super helpful!
One question for blendo: You desaturated the texture right?
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 21st Mar 2018 19:16
Blink :
No, i have changed the gamma, brightness and contraste. Not touch the saturation
AGK2 tier1 - http://www.dracaena-studio.com
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Mar 2018 19:17
To try and reduce the range of brightness? I'm guessing?
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 21st Mar 2018 20:01
To see the normalmap
With the black colors in the image, I didnt see the normalmap.
It was only to test.
AGK2 tier1 - http://www.dracaena-studio.com
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Mar 2018 20:06
ok. thanks
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Mar 2018 00:45 Edited at: 23rd Mar 2018 02:31
I think the lesson i learned here is let the shader do it's job


One other question;
Does anyone have an example of a light map texture and it's use?

Attachments

Login to view attachments
hoyoyo80
7
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 23rd Mar 2018 03:18
Good topic blinkok! I havent touch so much on shader, im aiming at psp level quality only.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Mar 2018 03:34 Edited at: 23rd Mar 2018 03:36
Setting PointLightMode() to pixel lighting makes a big difference
Thanks Bengismo!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 13:11:14
Your offset time is: 2024-04-19 13:11:14