Re: [Algorithms] Stripping scaling out of a hierarchy.
Brought to you by:
vexxed72
From: Jon W. <jw...@gm...> - 2009-12-19 01:51:13
|
First: Why don't you make your runtime support scaling? Second: If you can't do that, then what you said you were doing would be the right thing to do, assuming you implement it correctly. For the hierarchy: Remove scale from the node transform (times parent extracted scale) Bake scale into any attached geometry foreach child: do the same, passing along any scale you've extracted Extracting scale from a matrix is easy as long as there is no skew or rotated scale center; simply measure the length of each of the basis vectors (X, Y, Z) and normalize to 1. No full decomposition needed. Sincerely, jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Fri, Dec 18, 2009 at 3:11 PM, lei...@co... < lei...@co...> wrote: > Hello everyone. > > My XSI exporter supports exporting a small hierarchy of objects. One > of it's uses is to allow the game to find parts like the tracks, body, > wheel, turret etc. All works fine until I purchased some models that > are the wrong scale and I decide to scale them in XSI to 1 unit is 1m. > Now my hierarchy has scaling in it. This becomes a mess with bounding > volumes on parts and frame of references having scaling in it. I > finally found an option in XSI to freeze all the scaling but I was > wondering how can I have my build tool do the same thing so that I won't > have problems down the road? Also its bugging me. > > I tried resolving all the nodes into model space and then using inverse > transforms to resolve the local transforms on each part. It didn't work. > > Leigh > > > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |