View Full Version : Strange unexpected deformation!
PosingMantis 07-10-2006, 06:50 PM Hi Everyone,
In the middle of the project we are noticing a very strange problem with maya. The problem came into picture when attempting to render the shots. When we rendered one of the characters and noticed that the eyeball mesh has got literally deformed, its surface has become un-even. Later we noticed that its not only the eyeballs but all the meshes that were skinned were getting deformed. In the end we zeroed down to the actual problem.
As a (rigged) character is moved away from its bind pose or its origin, after some value (about 10000 units and upward) the mesh tends to distort physically. It neither is an illusion nor viewpiort problem.
We can also setup a simple scene to see this. Create a sphere and a joint. Skin the sphere to the joint and move the joint by 100000 units in all three axes. Wallah!! its no more a sphere. The deformation is also noticable very subtly around the value of 5000, especially in the render, when it becomes too prominent. This distortion also happens when we apply a lattice to the same sphere(instead of skinning) and move the lattice to the same value. There are other strange things that i noticed at this point. When i create a locator and try snapping it to one of the vertices on the sphere, the pivot point of the locator is not at its geometrical center.
All we could conclude from this behaviour is that maya is not able to process huge values properly. I guess there is a limit to the precision of numbers it can evaluate. But in our project, we want our characters to be flying in space which in almost all cases are very far from origin. Getting everything near origin will mess up the whole production.
I'm sure someone must've faced the same problem and discovered/developed a bugfix to it. Please share your precious knowledge since it'll be very helpful to smoothly continue the production without looking back on reworking.
Thanks.
|
|
ntmonkey
07-10-2006, 09:38 PM
Sounds like a floating point issue. We ran into this issue with eyes on a show that was using XSI. So it's not exclusive just to Maya. If you take that sphere, throw it under a group, and scale it up by 50 or so, you'll notice that the discrepancy is less noticeable. You could probably reduce the effect by scaling, but it won't get rid of it altogether.
Hope it helps,
-Lu
Emil3d
07-11-2006, 12:51 AM
I made the test. And I got some distortion in the viewport but the sphere renders fine.
I had to group the camera to the joint in order to keep track of with this huge distances.
http://f10.putfile.com/7/19020463437.jpg
isoparmB
07-11-2006, 02:42 AM
We experienced this problem before as well. Maya tends to calculate poorly if you go farther away from the origin. It happens to fast moving objects with paint effects as well, we had to generally constrain our animations to the origin or work near the origin to avoid this.
If the premise is that maya cannot calculate properly farther away from the origin, or that fast camera motions create discrepancies in rendering, the solution would be to constrain the camera and all animating objects to the origin.
In those scenarios the workaround we found was to first group the camera setup, then all of the relevant animated and miscellanous objects (lights, etc.) , into one group node (for characters we'd group the top level controllers along with any constraint objects we had, we avoided grouping the geometry because of double transform issues). We'd first group the objects separately, then group those groups so that every animating object was under one transform. This is to ensure that the relationship of all animating objects relative to the camera will not change, as this is the only essential thing when it comes to camera positions and rendering(you can move this new top node, and things will still look the same in the camera). Then we had to pick a reference point in the scene which we would use a costraint point where we would snap the pivot point of our top group PER FRAME. This could be the main controller of a certain character, but this could also be your camera pivot point. We displayed this pivot point so it would be easier to snap to during the origin constraining process. Then the final part would be to go to the first frame of animation, select the top node and hit insert to move it's pivot point, snap the top node's pivot point to the reference pivot point, hit insert again to lock the pivot, grid snap the top node to the origin and then set keyframes on the top node. Then we'd go to the last frame of the animation, repeat the process. We'd then narrow it down to the mid point of the animation, then the mid point of both halves, so that the pivot was more or less locked down. THEN we'd proceed to keyframe on EVERY frame. It was a tedious but necessary process, since all our shots were already animated, and it really shouldn't take longer than 10 minutes on simple scenes.
I'm not sure if this is the path you guys should take, but it is one solution. Strictly speaking, I think it could even be scripted into something that's semi automatic.
PosingMantis
07-12-2006, 04:56 PM
Thanks for the replies guys!
After playing around with the animation files a bit, i figured out a simple method that works well and eliminates the problem. The character i experimented on was at a distance of about 100000 units in x,y and z from origin. As usual, the geometry was totally deformed. I picked the main character control, and grouped it (just Ctrl+g). By default, maya puts the pivot of this group at the origin. I then applied -100000 units on x,y and z of the group, which brings the character to the origin. If i render the character now, it renders flawlessly!!
So basically i need to set the scene so that all characters are brought within about 1000 units from origin.
I made the test. And I got some distortion in the viewport but the sphere renders fine.I had to group the camera to the joint in order to keep track of with this huge distances.
The deformation wont be visible in greyscale (though i can notice it very subtly in ur render), but it shows up clearly once textured and rendered. In the renderer we r using it blows up the effect so much that the eyeballs no more remain spherical.
Give a value of 500000 on all axis and render it. U'll certainly see the deformation.
IsoparmB,
The method u've expalained needs bit more explaination for me to understand. I got confused in the middle and couldn't execute it fully. But i guess the method i've mentioned above is simpler. In case u've already tried and found any disadvantages in it, please share it with us.
Thanks.
isoparmB
07-13-2006, 01:23 AM
Your method will work just fine, as long as your animated objects do not move great distances (i.e., like a spaceship doing a fly-by on a planet, and the space ship moving 50,000 units into the distance). But in case you already set up the camera in your scene, it would be best to parent that to your group as well so that you have the same framing as you did in your old location.
We like to call our method "origin constraining". It's more for PFX rendering, because of the issue with paint effects not being able to catch up with fast moving geometry. We did this for some of the shots of the Grandma in Hoodwinked. The method ensures that the framing of all elements is consistent even though you will change the overal location of the characters in your maya scene, and you end up with a scene you think is moving very fast when viewed through the render cam, but when you look through another perspective camera with the grid on, you should notice that all of the elements move relative to the origin. What we basically do is parent all moving objects and the camera to a group node. We then select a pivot point (it can be anything in your existing scene, like the pivot point of the main control of a character.), and display it. We use this as a reference point where we snap our top node pivot point to: It will be this reference point that will be constrained to the origin. We have to change the pivot point per frame because what we are trying to do is pin the reference point to the origin on a per frame basis. This ensures minimal movement in your scene, relative to the origin.
CGTalk Moderation
07-13-2006, 01:23 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.