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 / [SOLVED] Issue with Normal Maps?

Author
Message
Mambazo
18
Years of Service
User Offline
Joined: 11th Dec 2005
Location:
Posted: 7th Jun 2020 00:43
Expected behaviour would be that all faces react the same way to the light source.

Is the box underside normal vector flipped?
Is the tangent generated for the face incorrect?
Is there an issue with the shader generated by SetObjectNormalMap()?

I dunno!

Video of issue:


Normal map used:


Code to recreate:
If at first you don't succeed, sky-diving isn't for you.

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 7th Jun 2020 02:03 Edited at: 7th Jun 2020 02:24
This post has been marked by the post author as the answer.
Its a bug with the way in which AppGameKit creates the cube internally. Only the bottom face has the issue.

It can be fixed with a function:



it probably wants raising as an issue on github
Mambazo
18
Years of Service
User Offline
Joined: 11th Dec 2005
Location:
Posted: 7th Jun 2020 11:33 Edited at: 7th Jun 2020 13:45
I took the auto-generated shader and modified its check on the normal.y, seems to have fixed it without needing to modify the mesh.

From this:


To this:


Now I'm no so sure it is a mesh issue after all!

If at first you don't succeed, sky-diving isn't for you.

Login to post a reply

Server time is: 2024-11-22 04:18:56
Your offset time is: 2024-11-22 04:18:56