G3 G2 morphs / shapes / expressions converter

Hi, I'm coding a fully automated script to convert morphs / shapes / expressions from G3 to G2 and G2 to G3.

Hi began few hours ago, and results are corrects so far, but not perfect. I tested it on G3f Clarice character, that I convert for G2f.

G3f Clarice :

 

G2f converted Clarice :

Both figures at the same time :

If you download two first pictures and look at them one after the other, you'll see that geometry is pretty much the same. But here's the problem :

Look at the eyes and nose, there's kind of a geometry distorsion. The thing is that I know what I have to do to get a perfect result, but I'll might need a few help, if someone is interrested. In fact, when I convert from G3 to G2, I have to know for each G2 vertex wich G3 vertex is corresponding to G2 vertex. But that's impossible since geometries are a bit different. So I just have to get the G3 triangle that surrounds the G2 vertex, and then interpolate. 

On the pictures upper, the algo is wrong : for each G2 vertex, I take the 3 nearests G3 vertices, and then interpolate. But the 3 nearests vertices can be others than the triangle surrounding the G2 vertex. So my question is about 3d maths, would someone know how to get that triangle. I Know it's possible, but my math knowledge is pretty limited.

Hope that I'm understandable, I'm not very comfortable with english as soon as I have to talk about algos...  

Comments

  • Have you checked this with Daz? You are effectively giving away the shapes you convert from

  • Sorry, didn't understood what you meant. I don't distribute any underlicense data, I'm just intending to convert owned users G3 shapes to G2, if that's what you meant (not sure). Ther are lots of converters to do that, for poses, uv maps or others. I think that's not different. User could do nothing if he doesn't own the original product. But perhaps I misunderstood you...

  • 3Diva3Diva Posts: 11,973

    I wish I could help, but it's definitely over my head.

    I wish you luck! :D

  • AllenArtAllenArt Posts: 7,175

    I think what Richard means is you'd have to make the script so that the people that use it have to OWN the characters they are converting and I think you already hinted that that's how your script works. You have to own the shape you are converting. Anything beyond this that DAZ requires tho, I personally don't know ;).

    Laurie

  • Thanks for explanations. And yes, the goal is to convert datas from your personnal libraries... A converter is just a way to match an input with an output. I didn't even talk about sharing the script, and even less to share inputs/outputs. But in fact, I need such a program for personnal needs, so I'll do it one way or another, and I just would like tat people who need it can use it. Thanks again for the reply.

  • I finally found a way to manually fix the conversion map, but it take me lot, lot of time to do it, so if someones knows the right algo, I'm still interested. I think it could worth it. I just converted 3400 morphs in 130 seconds. Results would be perfect with the right triangles detection algo whereas right now, I have to manually fix that. So as you can see on the attached picture, I did'nt fixed everything for now (nose, ears, lips...). And I'll have to do that for G3m -> G2m, G1 -> G2, G1 -> G3 etc...

    Hope somebody will help for this. I know this is'nt a developper place, but that's the only one I can ask since I think some people here can be interested in such a script.

    G2f - Converted Clarice.jpg
    905 x 732 - 105K
  • nonesuch00nonesuch00 Posts: 18,729
    MCphylyss said:

    I finally found a way to manually fix the conversion map, but it take me lot, lot of time to do it, so if someones knows the right algo, I'm still interested. I think it could worth it. I just converted 3400 morphs in 130 seconds. Results would be perfect with the right triangles detection algo whereas right now, I have to manually fix that. So as you can see on the attached picture, I did'nt fixed everything for now (nose, ears, lips...). And I'll have to do that for G3m -> G2m, G1 -> G2, G1 -> G3 etc...

    Hope somebody will help for this. I know this is'nt a developper place, but that's the only one I can ask since I think some people here can be interested in such a script.

    Well what you are doing seems similar to what the OneClick, HeadShop, or FaceGen Pro products need to do to find an object file generated from a picture and fit it to the various DAZ Genesis products so the developers of those products seem like they would know off the top of their heads what to do. 

  • Thanks, I didn't thought to that kind of products, I'll give it a look. Maybe somebody on their forums could answer... But the fact is that what I need to do is pretty easy compared to generating a geometry based on a picture... that's why I'm a bit disapointed, I just need a simple algo, but can't figure out how to make it work. Thanks again for the advice.

  • nonesuch00nonesuch00 Posts: 18,729
    MCphylyss said:

    Thanks, I didn't thought to that kind of products, I'll give it a look. Maybe somebody on their forums could answer... But the fact is that what I need to do is pretty easy compared to generating a geometry based on a picture... that's why I'm a bit disapointed, I just need a simple algo, but can't figure out how to make it work. Thanks again for the advice.

    I think though after the product generates a face using the default geometry face object when they export that as a morph to Genesis, G2M, G2F, G3F, G3M they must adjust that morph made from the picture to not one, but three different versions of Genesis so I think FaceGen Pro developer would know for sure and probably the OneClick developer too.

    When I use FaceGen I create a obj from that picture 1 time and them I am able to export that same FaceGen fg file to three different versions of Genesis, 5 different versions if you count the Genesis 2 and Genesis 3 male and females as different versions.

  • Ooh, I didn't understood that part. So that's exactly what I need. I looked their sites, there are no forums. But I'll try contacting the author, May be he would help a young developper in trouble? once again, thank you!

Sign In or Register to comment.