The index of target file is strange

MakeHuman python API, python plugins, etc

Moderator: joepal

The index of target file is strange

Postby mutouweng » Tue Nov 29, 2011 5:38 am

Hi ,
recently,I am studying the MH source code.
Firstly,I think the index of .target file (in the /data/targets/ folder) must come from the base.obj(in the data/3dobjs),but I find that each .target file isn't corresponding each group of the base.obj file.So I really want to know how to deal with the base.obj file to get .target file,also how to deal with the index of base.obj to get the index of .target file.
Thanks so much.
mutouweng
 
Posts: 3
Joined: Tue Nov 29, 2011 2:57 am

Re: The index of target file is strange

Postby mflerackers » Tue Nov 29, 2011 8:14 am

Even though I hate being repetitive I need to remind you that all code and data is copyrighted under the GPL3, so any applications based on this code or data needs to be released as GPL3 as well.

The indices in the target files are exactly those vertex indices in the obj file. Note that obj indices start from 1, while we rebase everything from 0.
MakeHuman project Developer
mflerackers
 
Posts: 636
Joined: Thu Feb 05, 2009 11:53 am
Location: Kyoto

Re: The index of target file is strange

Postby mutouweng » Fri Dec 09, 2011 9:39 am

Yeah, i am clear about it. i am just a student from university.

you said that"
The indices in the target files are exactly those vertex indices in the obj file.
Note that obj indices start from 1, while we rebase everything from 0."

I made a simple test. The process is:
1.read the .target file and .obj file
2.compare the indices of .target file with the indices of .obj file
3.if the two indices is the same,draw the vertex corresponding to the indices.

I find that there are very few vertexs far from the corresponding area of .target file.
I'm confused for this. could you please tell me the reason of the phenomenon.
I find that i am not very clear about the relationship between the two indices.
Thanks so much!
mutouweng
 
Posts: 3
Joined: Tue Nov 29, 2011 2:57 am

Re: The index of target file is strange

Postby mflerackers » Sat Dec 10, 2011 3:27 pm

You just need to use finalVertex[i] = obj.vertex[i] + target.vertex[i].
MakeHuman project Developer
mflerackers
 
Posts: 636
Joined: Thu Feb 05, 2009 11:53 am
Location: Kyoto

Re: The index of target file is strange

Postby mutouweng » Sun Dec 11, 2011 12:32 pm

I am so appreciate for your patience.I think i didn't illustrate my question clearly.
You said that " finalVertex[i] = obj.vertex[i] + target.vertex[i].",that's right,
but according to my simple test, i am confused that a few vertexs are far from the corresponding
area of .target file. Are these vertexs wrong? Do these vertexs have a special purpose?
Thanks so much!!!
mutouweng
 
Posts: 3
Joined: Tue Nov 29, 2011 2:57 am

Re: The index of target file is strange

Postby mflerackers » Mon Dec 12, 2011 3:08 am

Do you mean you are seeing the prisms/diamonds which are not part of the model but used as posing reference? You should not draw groups starting with 'joint'.
MakeHuman project Developer
mflerackers
 
Posts: 636
Joined: Thu Feb 05, 2009 11:53 am
Location: Kyoto


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest