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.

Bug Reports / Skinned Meshes not sending correct normal information to GPU

Author
Message
provoststeven
14
Years of Service
User Offline
Joined: 17th Jul 2009
Location: Irvine, California
Posted: 21st Apr 2010 13:39
I attached a screenshot displaying this issue.
Both of these characters are part of the same ".x" file.
The character on the left is skinned with bones, whereas the character on the right is not skinned.
I used KWXport to create the ".x" file from 3DSmax 2010.

I have to be honest, i'm not positive that it is an issue with the normals, as i borrowed the code for generating spec, and the diffuse map looks correct.

Here is the shader code:

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Apr 2010 17:03
How can we possibly comment without the x file?
provoststeven
14
Years of Service
User Offline
Joined: 17th Jul 2009
Location: Irvine, California
Posted: 21st Apr 2010 19:17
my mistake

here's the .x file

Attachments

Login to view attachments
provoststeven
14
Years of Service
User Offline
Joined: 17th Jul 2009
Location: Irvine, California
Posted: 21st Apr 2010 19:29
Here are the textures

Attachments

Login to view attachments
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Apr 2010 10:56
Figure you have to use the untweak "float4x4 boneMatrix[##] : BoneMatrixPalette;" input from dbpro and iterate trough that in the VS shader to get the vertex locations on a skinned model.

Regards
provoststeven
14
Years of Service
User Offline
Joined: 17th Jul 2009
Location: Irvine, California
Posted: 22nd Apr 2010 12:00
can you elaborate? I'm not sure how to pass this information from darkbasic to the shader.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 22nd Apr 2010 14:13 Edited at: 22nd Apr 2010 14:14
Take a look at the fastbone shader http://forum.thegamecreators.com/?m=forum_view&t=127395&b=1

I did not find it now, but there is a version in one of the newsletters with normalmapping. They all derive from FPSC i guess.

Regards
provoststeven
14
Years of Service
User Offline
Joined: 17th Jul 2009
Location: Irvine, California
Posted: 23rd Apr 2010 13:43
had no luck with the fastbone shader, I found another shader that implements bones. This managed to move all the verts into the correct position, however the normal, tangent, and/or binormal information was incorrect. I'm fairly certain this is a bug on DarkBasic's side.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 24th Apr 2010 03:55
I have my character model's bonerigged & animated with normal, specular, emissive and self shadowing effects derived from the DBP bonematrix. Works perfectly.

Found a shader similar to the one i used as a template, here: http://forum.thegamecreators.com/?m=forum_view&b=21&t=155573&p=0

Can't find the exact shader i used as a template though, was in one of the Newsletters. It had depth blur and some other effect i cut out in my implementation (was the Aiko and Colonel models hovering over a lava field and a backdrop, if someone can relate to that and find it)

Regards
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Apr 2010 20:09
provoststeven

Sorry. Only just returned to this board.

Not sure what problem I'm supposed to be focussing on - and runnable code (NOT an exe please) would be helpful too.

Is the shadow/depthmap stuff in the shader relevant? If not I guess it could be deleted.

Will look at this soon.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Apr 2010 21:49 Edited at: 25th Apr 2010 23:11
I've tried to get your shader working and failed completely.

I then tested your object with one of my shaders (just uses base texture and normal map) and can't see a problem. Perhaps you could enlighten me?

Here's the dba code:



and here's the shader:



Screenshot:



Edit Tried to guess what you were trying to do with your shader, so here's some revised code:

Dba file:


Shader:



New screenshot:

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Apr 2010 23:06
Screenshot for previous post.

Attachments

Login to view attachments
provoststeven
14
Years of Service
User Offline
Joined: 17th Jul 2009
Location: Irvine, California
Posted: 26th Apr 2010 05:49
W00T!!!!

thanks Green Gandalf!

(Number of times you've helped me)++;

Login to post a reply

Server time is: 2024-03-28 15:02:43
Your offset time is: 2024-03-28 15:02:43