Updating Tangents and Binormals for Skinned and Morphed Anim

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby Vectrotek » Wed Jun 29, 2016 4:38 pm

Glad you could use it. I'm trying to get it into a custom node node but I need to learn a LOT more about Irrlicht.
(There were some "Tan Updater" bugs, but they were sorted out in later posts..) Ugh.. I've got a lot to learn..
Currently struggling through Screen Quads and just, now, got Mongoose7's very cool screen quad tutorial..
I can compile it, so i'll work with it.. (that's my motto)..
Oh! Your RPG Builder is really really cool! I wish I could dive into that! Maybe later..
Cheers!
User avatar
Vectrotek
Competition winner
 
Posts: 1076
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby Vectrotek » Thu Jun 30, 2016 4:12 pm

Christianclavet, you have great understanding..
Oh, by the way I think certain other people missed my last post where there are more than one texture per object..
Anyhow, Normal maps are still not the same as Bumpmaps! :mrgreen:
Oh never mind... its late and I haven't slept for three days..
Love your page.. Cheers!
User avatar
Vectrotek
Competition winner
 
Posts: 1076
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby The_Glitch » Mon Feb 20, 2017 1:16 am

It's been a while but I tried this on the latest irrlicht trunk and I did find a lot of issues.
Most noted was if the mesh was composed of multiple mesh buffers instead of just one things did not look proper.
User avatar
The_Glitch
Competition winner
 
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby Vectrotek » Mon Feb 27, 2017 5:19 pm

The newer tangent updater should work but I see that Irrlicht has issues with INSTANCES of objects..
See my latest posts "a new complication"
http://irrlicht.sourceforge.net/forum/viewtopic.php?f=4&t=51607&start=195
User avatar
Vectrotek
Competition winner
 
Posts: 1076
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby devsh » Mon Apr 03, 2017 7:11 am

just btw, you dont need to update or store the bitangent, you can cross product with normal and tangent on the fly in the vertex shader
User avatar
devsh
Competition winner
 
Posts: 1853
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby Vectrotek » Sun Apr 23, 2017 3:04 pm

If you animate a mesh with bones, then you HAVE TO update the Tangents AND Binormals
because the absolute position of vertices (upon which T's and B's rely) in a triangle
"changes" at every frame. Matrices handle the rotation and scaling of WHOLE objects just fine, but,
again, Skinning and deforming character limbs complicates things somewhat.

Also, crossing the Tangent with the Normal in the shader, to get a Binormal whether Vertex or Fragment
will not work because to get the the CORRECT Bi-Normal a different vertex of the Tri, i.e. vector has to be read
which cannot be done during any action inside the shader.
Now, unless there has been some significant architecture changes in graphics hardware
which I don't know of, then I'm afraid this is how it is.
Anyhow, only when you look "real closely" at Specular Highlights in Skinned Objects using Normal Maps, then
the "Physical Error" brought about by animation and "bogus" Binormals will be noticeable.
But, let me add, there are very few software titles out there that has truly addressed this problem,
not even Doom MMXVI. In fact I've never seen any Game or 3d App that does this successfully!
Anyway, these things really only become important if you are using Normal Maps on your objects
and real time lights in the scene.

Anyhow I've deliberated on this at length in previous posts which you probably did not look at yet.

Anyway, I hope to be upgrading my system really seriously soon..
Currently busy with studies.. Living day by day..
User avatar
Vectrotek
Competition winner
 
Posts: 1076
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby devsh » Thu Feb 01, 2018 11:55 pm

You know that you could probably use screen-space derivatives of the model-vertex-position and texture-coordinates to reconstruct a tangent and bitangent, I was a paper about doing bumpmaps without having that data at hand.

What's cool about it is that if you stretch your texture over the same area (like stretch the skin) the normal deviation becomes less pronounced (surface gets less bumpy).
User avatar
devsh
Competition winner
 
Posts: 1853
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby Vectrotek » Sat Feb 03, 2018 10:29 pm

It does sound possible.. Definitely worth looking into.
I'm just worried about those tangents as they are generated by Irrlicht.
But.. With a deeper understanding of screen space a lot becomes possible!
Yes, it "feels like" one could find in screen space all that is needed to have physically correct mapped normals.
User avatar
Vectrotek
Competition winner
 
Posts: 1076
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa


Re: Updating Tangents and Binormals for Skinned and Morphed

Postby Vectrotek » Thu Feb 08, 2018 8:17 am

How is a float packed into a 32 *4 i.e. 128 bit render target?
IEEE-754 etc etc..
I heed your message on the other board but for for my own sanity I need to know..
Image
User avatar
Vectrotek
Competition winner
 
Posts: 1076
Joined: Sat May 02, 2015 5:05 pm
Location: South Africa

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby devsh » Thu Feb 08, 2018 11:18 am

IEEE-754, yes.

Remember to pack straight into 32bit uint, as you have no guarantee on the endianness of the GPU.
User avatar
devsh
Competition winner
 
Posts: 1853
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: Updating Tangents and Binormals for Skinned and Morphed

Postby devsh » Tue Feb 13, 2018 8:36 pm

have you got any skinned and normal/bump (or even better relief) mapped models that have an OK license to include with engine samples?

I want to put together an example of that tangent-less paper.
User avatar
devsh
Competition winner
 
Posts: 1853
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Previous

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest