Thread: [Maya2osg-users] Blend shapes
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-19 08:27:51
|
Hi Peter, I'm going to export a 3D character with skeleton animation and blend shapes, so I will at last test the osgAnimation export :) I want to ask you some questions about osgAnimation, the exporter and the process in general. I'd appreciate your advice and your knowledge here, as I had no previous experience here and I don't even know what is supported by osgAnimation and what is not. Are blend shapes supported in Maya2OSG? Is there any development? Or may I have to start from scratch? And about how to prepare the model, it is a pseudo-humanoid character (biped) that will have blend shapes applied only to the face. The artist is asking me whether she should cut out the head to create the blend shapes only there or keep the body geometry as a whole. Is it a problem to rejoin the blend-shaped head later with the rest of the body? Have you ever done it? In case of having the "blend-shaped head" and the body in separate geometries, both affected by the skeleton animation, as long as the vertices in the joint edges are not affected by blend shapes and have assigned the exact same weights in skinning, should it be a problem? Do you think it would produce visible cracks in this part of the geometry? Thanks in advance. -- Javier Taibo |
From: Javier T. <jav...@gm...> - 2011-07-09 18:28:30
|
Hi all, Maya2OSG now exports blend shapes to osgAnimation::MorphGeometry nodes. It's a preliminar version so testing and feedback is welcome. The built-in preview command (osgpreview) has a minimal blend shape previewer, using the following keys: plus - Select next MorphGeometry minus - Select previous MorphGeometry left - Select previous MorphTarget right - Select next MorphTarget up - Increase MorphTarget weight down - Decrease MorphTarget weight I uploaded also a test scene named test_blendshapes.ma to test the export. It's an ugly deformed sphere. Beautiful test models are also welcome :) Peter, I changed lots of things in mesh.{cpp,h}, I hope not to have broken anything. Let me know if you find any problem. Among other things, there were a lot of static attributes that I moved to local variables in the minimum scope where they are used. This way we minimize the unexpected side effects and is less error-prone, and the code is easier to follow. Maybe in any case there could be a good reason to be there, but not as the code is now. I don't know what will be the connection between the rigging/skinning code with mesh.cpp, but I think we can solve it without these static attributes, just passing the needed information as parameters to functions or methods. Well... that's all for today. More to come. Cheers! -- Javier Taibo |
From: Peter W. <pp...@cg...> - 2011-05-19 08:50:35
|
Hi Javier, fast answer, but details on mondy. > Hi Peter, > > I'm going to export a 3D character with skeleton animation and blend > shapes, so I will at last test the osgAnimation export :) I wasn't able to add Skinning Code till now, so all yo can export is transform animation. My osgMaya exporter has skinning implemented, but the merging will take some time, so I don't know how fast I'll get to this. > I want to ask you some questions about osgAnimation, the exporter > and the process in general. I'd appreciate your advice and your > knowledge here, as I had no previous experience here and I don't even > know what is supported by osgAnimation and what is not. > > Are blend shapes supported in Maya2OSG? Is there any development? Or > may I have to start from scratch? I started to write the export for that. I stopped as I was a little frustrated that you cannot't "chain" the skining and morphing in an osg file. Cedric showed me how to do this through code. But now I already know more about osg, and I have an Idea what has to be done. Datails after monday > And about how to prepare the model, it is a pseudo-humanoid > character (biped) that will have blend shapes applied only to the > face. The artist is asking me whether she should cut out the head to > create the blend shapes only there or keep the body geometry as a > whole. Is it a problem to rejoin the blend-shaped head later with the > rest of the body? Have you ever done it? This is the "normal" way people do it in the industry. So for the begining it would be cool if she would keep the whole body mesh attached. Later we should add this functionality, but I don't know how far osgANimation needs to support this. Basically in normal morphing you blend the position of a point to the position of another point. You identify both points with their id. If you screw up point numbering in one of the meshes ( by deliting one Vertex somwhere ) you scre up the morphing. We would require a map between target and source ids. That we can do in the plug in, but can osgAnimation use such a map ? Not shure, but I don't think so. > In case of having the "blend-shaped head" and the body in separate > geometries, both affected by the skeleton animation, as long as the > vertices in the joint edges are not affected by blend shapes and have > assigned the exact same weights in skinning, should it be a problem? > Do you think it would produce visible cracks in this part of the > geometry? No, the way you normally di it is, cut the hayd off, but dont' morph the border edges. With this you guarantee continuity. So always first morphing, than skinning in the deformation chain, but I think your artist knows that. So then the skin is derphonming the morphed mesh, and no cracks will be visible in the morph as well as in the skin. Cheers, PP |
From: Javier T. <jav...@gm...> - 2011-05-19 15:58:35
|
Hi Peter, On Thu, May 19, 2011 at 10:50 AM, Peter Wrobel <pp...@cg...> wrote: > Hi Javier, > > fast answer, but details on mondy. OK. Don't worry just ignore the messages if you're busy. We'll follow the thread next week. >> I'm going to export a 3D character with skeleton animation and blend >> shapes, so I will at last test the osgAnimation export :) > > I wasn't able to add Skinning Code till now, so all yo can export is > transform animation. My osgMaya exporter has skinning implemented, but > the merging will take some time, so I don't know how fast I'll get to this. OK. Maybe I can help with it. I'll take a look at it when I had some time. >> Are blend shapes supported in Maya2OSG? Is there any development? Or >> may I have to start from scratch? > > I started to write the export for that. I stopped as I was a little > frustrated that you cannot't "chain" the skining and morphing in an osg > file. Cedric showed me how to do this through code. But now I already > know more about osg, and I have an Idea what has to be done. > Datails after monday OK. We'll follow the discussion next week. >> And about how to prepare the model, it is a pseudo-humanoid >> character (biped) that will have blend shapes applied only to the >> face. The artist is asking me whether she should cut out the head to >> create the blend shapes only there or keep the body geometry as a >> whole. Is it a problem to rejoin the blend-shaped head later with the >> rest of the body? Have you ever done it? > > This is the "normal" way people do it in the industry. So for the > begining it would be cool if she would keep the whole body mesh > attached. Later we should add this functionality, but I don't know how > far osgANimation needs to support this. Basically in normal morphing you > blend the position of a point to the position of another point. You > identify both points with their id. If you screw up point numbering in > one of the meshes ( by deliting one Vertex somwhere ) you scre up the > morphing. We would require a map between target and source ids. That we > can do in the plug in, but can osgAnimation use such a map ? Not shure, > but I don't think so. Yes, I know the blend shape theory. I didn't know however how much is it supported in osgAnimation. >> In case of having the "blend-shaped head" and the body in separate >> geometries, both affected by the skeleton animation, as long as the >> vertices in the joint edges are not affected by blend shapes and have >> assigned the exact same weights in skinning, should it be a problem? >> Do you think it would produce visible cracks in this part of the >> geometry? > > No, the way you normally di it is, cut the hayd off, but dont' morph the > border edges. With this you guarantee continuity. Yes, that's exactly what I meant. My doubt was, being the geometry split in two pieces, even though the vertices are in the same place if there are any problems of edge cracks. I hope not. -- Javier Taibo |
From: Peter W. <pp...@cg...> - 2011-05-19 18:29:58
|
Hi Javier, and thanks for understanding. Just one questin, how urgent is it at all ? Cheers, PP > Hi Peter, > > On Thu, May 19, 2011 at 10:50 AM, Peter Wrobel<pp...@cg...> wrote: >> Hi Javier, >> >> fast answer, but details on mondy. > OK. Don't worry just ignore the messages if you're busy. We'll > follow the thread next week. > >>> I'm going to export a 3D character with skeleton animation and blend >>> shapes, so I will at last test the osgAnimation export :) >> I wasn't able to add Skinning Code till now, so all yo can export is >> transform animation. My osgMaya exporter has skinning implemented, but >> the merging will take some time, so I don't know how fast I'll get to this. > OK. Maybe I can help with it. I'll take a look at it when I had some time. > >>> Are blend shapes supported in Maya2OSG? Is there any development? Or >>> may I have to start from scratch? >> I started to write the export for that. I stopped as I was a little >> frustrated that you cannot't "chain" the skining and morphing in an osg >> file. Cedric showed me how to do this through code. But now I already >> know more about osg, and I have an Idea what has to be done. >> Datails after monday > OK. We'll follow the discussion next week. > >>> And about how to prepare the model, it is a pseudo-humanoid >>> character (biped) that will have blend shapes applied only to the >>> face. The artist is asking me whether she should cut out the head to >>> create the blend shapes only there or keep the body geometry as a >>> whole. Is it a problem to rejoin the blend-shaped head later with the >>> rest of the body? Have you ever done it? >> This is the "normal" way people do it in the industry. So for the >> begining it would be cool if she would keep the whole body mesh >> attached. Later we should add this functionality, but I don't know how >> far osgANimation needs to support this. Basically in normal morphing you >> blend the position of a point to the position of another point. You >> identify both points with their id. If you screw up point numbering in >> one of the meshes ( by deliting one Vertex somwhere ) you scre up the >> morphing. We would require a map between target and source ids. That we >> can do in the plug in, but can osgAnimation use such a map ? Not shure, >> but I don't think so. > Yes, I know the blend shape theory. I didn't know however how much > is it supported in osgAnimation. > >>> In case of having the "blend-shaped head" and the body in separate >>> geometries, both affected by the skeleton animation, as long as the >>> vertices in the joint edges are not affected by blend shapes and have >>> assigned the exact same weights in skinning, should it be a problem? >>> Do you think it would produce visible cracks in this part of the >>> geometry? >> No, the way you normally di it is, cut the hayd off, but dont' morph the >> border edges. With this you guarantee continuity. > Yes, that's exactly what I meant. My doubt was, being the geometry > split in two pieces, even though the vertices are in the same place if > there are any problems of edge cracks. I hope not. > > |
From: Javier T. <jav...@gm...> - 2011-05-19 19:31:07
|
Hi Peter, On Thu, May 19, 2011 at 8:29 PM, Peter Wrobel <pp...@cg...> wrote: > Hi Javier, and thanks for understanding. > > Just one questin, how urgent is it at all ? Nothing in the plug-in is more important to you than your exams now. Just focus on them and we'll talk about blend shapes, skinning, osgAnimation and everything after them. Btw, good luck! Or maybe I must say... justice! ;) -- Javier Taibo |
From: Peter W. <pp...@cg...> - 2011-05-19 20:00:17
|
Hi Javier, > one questin, how urgent is it at all ? > Nothing in the plug-in is more important to you than your exams now. > Just focus on them and we'll talk about blend shapes, skinning, > osgAnimation and everything after them. > > Btw, good luck! > > Or maybe I must say... justice! ;) > > Wow, I wish that I'll be working in a company with a boss like you :-) and thanks, justice is the only thing I'm missing right now ;-) Cheers, PP |