bugCal3D - 3d character animation library - Bugs: bug #18045, Tangent space calculation does not...

Show feedback again

bug #18045: Tangent space calculation does not include cross factor

Submitted by:  Peter Amstutz <tetron>
Submitted on:  Mon Apr 18 15:19:17 2011  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sun Mar 19 17:25:55 2017, comment #1:

I don't understand your code:
it seams you store something (bitangents)computed for each first vertex of a triangle and sum it along triangles iteration for later purpose but what is it?

julien valentin <mp3butcher>
Project Administrator
Mon Apr 18 15:19:17 2011, original submission:

When calculating the tangent space basis (required for normal mapping), Cal3D does not set the cross factor. The cross factor is necessary to prevent inverted tangent spaces in areas where the texture map is reused and/or reverses direction.

Attached is a modified CalCoreSubmesh that correctly calculates the cross factor. The functions of interest are:

void CalCoreSubmesh::UpdateTangentVector(int v0, int v1, int v2, int mapId, std::vector<CalVector>& bitangents);

bool CalCoreSubmesh::enableTangents(int mapId, bool enabled);

Peter Amstutz <tetron>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #12881:  coresubmesh.cpp added by tetron (25kB - text/plain)
file #12882:  coresubmesh.h added by tetron (4kB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mp3butcher (Posted a comment)
  • -unavailable- added by tetron (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Apr 18 15:19:17 2011tetronAttached File-=>Added coresubmesh.cpp, #12881
      Attached File-=>Added coresubmesh.h, #12882
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup