bugCal3D - 3d character animation library - Bugs: bug #8852, strange vertex translation in core...

 
 
Show feedback again

bug #8852: strange vertex translation in core submeshes

Submitted by:  None
Submitted on:  Wed 04 Apr 2007 12:23:20 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-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.

 

Wed 04 Apr 2007 12:23:20 PM UTC, original submission:

I want to change a Cal3D hand model by scaling each finger segment. Each segment consists of vertices influenced by a bone.
My algorithm works in the following way:
At first I extend a bone and calculate the scale factor. After that I transform all vertices influenced by this bone into local coordinates. Then I multiply each vertex by the scale factor and cancel then the local transformation. I execute this course of events with each finger segment. The intention consists in adapting the finger lengths of each user in the current time. I use a data glove and transmit datas to the hand model.Thus I can virtually simulate a Cal3d hand model from each user.

I have following problem:
The are two possibilities to get all coordinates from each vertex of the submesh.
In the first example I use the CalModel and the CalRenderer:

file: submesh.txt

In this case I can't allocate a vertex to the influenced bone.
So I've to use the CalCoreSubmesh. There is a structure from "coresubmesh.h"

typedef struct
{
CalVector position;
CalVector normal;
std::vector<Influence> vectorInfluence;
int collapseId;
int faceCollapseCount;
} Vertex;

To get the values of the Vertex structure I only can do in the following way:

file: coresubmesh.txt

But the values of each vertex from the second procedure are different to the first procedure. The values of each vertex of the second procedure do not agree with the coordinates of the bones. There is a translation. I've found out that the translation is equal to the local translation of the first bone (r_wrist) from the file "skeleton.xsf". Manually I can add a translation vector on each vertex and then I have the right coordinates, which are equal to the bones. But that's dirty, because I want to use this procedure for other hand models.

How can I get the right coordinates of all vertices with influenced bones from the Core Submesh?

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #2197:  Skeleton.XSF added by None (11kB - application/octet-stream)
file #2198:  coresubmesh.txt added by None (721B - text/plain)
file #2199:  submesh.txt added by None (933B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by None (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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Apr 2007 12:23:20 PM UTCNoneAttached File-=>Added Skeleton.XSF, #2197
      Attached File-=>Added coresubmesh.txt, #2198
      Attached File-=>Added submesh.txt, #2199
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup