ian Posted August 28, 2016 Share Posted August 28, 2016 When and why should we check "Freez World Matrix" for selected object in blender (for babylon exporter) ? Quote Link to comment Share on other sites More sharing options...
dbawel Posted August 28, 2016 Share Posted August 28, 2016 @ian - If I understand correctly, Great question. I always freeze all transforms on all objects prior to export - especially for any skeleton and/or bone objects. For characters, the reason is that in building and setting up your skeleton for binding vertices to bones, the transforms (especially scale and rotation) will/may generally not end up to hold values of 1.0, and 0.0 respectively. And if your scale is anything other than 1.0 in any channel, then your animation will be scaled to a value other than 1. And if your rotations are other than 0.0 and especially if they are already approaching values of -179 or +179 (or even half this), then you will often observe "flipping" and/or gimble lock when you animate bones approaching and certainy beyond these values - depending upon your scene and any proceedural animation of course. However, such issues can also easily apply to parent/child relationships (especially scale); so you have everything to gain by freezing transforms prior to animating in your application or in BJS. But even if you're simply exporting objects in your scene, always freeze transforms to avoid the issues above, and far more issues than I listed. Again, you have nothing to loose and will eventually have problems at some time - perhaps not with your current project, but it will happen in time - guaranteed. So simply play it safe. And as an example, while working on films at Weta in NZ, I made one of the rules in the production pipeline to always freeze all transforms prior to animating and/or exporting from any application. Prior to this rule, almost 30% of work produced by our animation and mocap teams were rejected for flipping of bones and/or gimble lock on objects - costing tons of hours and loads of money. But by the 3rd LOTR film, this # was reduced to less than 2%. I know this isn't a film animation production we're working on here, however, the very same rules apply regardless of the application you are using or the framework used to animated and to render. And BTW - we never had a single asset or animation returned to us by EA or UBISoft once this rule was embedded into all Artists brains and the technical team reviewed and followed it through our pipeline integration - prior to delivery of any game assets to the aforementioned developers. EDIT - Actually, I believe I did misunderstand what you were asking, however, I hope that someone got the message to freeze transforms prior to any export. As for your specific question, there are several circumstances to freezeWorldMatrix(); - including setting bounding boxes to resolve their transform values to maintain consistant physics and collisions - among other uses including texture mapping and vertex animation. Pleae check out the topic below: Cheers, DB Quote Link to comment Share on other sites More sharing options...
ian Posted August 29, 2016 Author Share Posted August 29, 2016 Is freezWorldMatrix() (or in blender exporter addon in blender - check box "Freeze World Matrix" same as if I select object manually in Blender and press ctrl+a (Apply Object transformations) and select "Rotation & Scale" (so that Rotation is set to (0,0,0) and Scale is (1,1,1)) ? (as I see is not same) Does "Freeze World Matrix" do the same to object (so set Rotation (0,0,0) and Scale (1,1,1)) when we are exporting to .babylon file? If I scale Box object (2,2,2) and rotate (30,30,30) and check "Freeze World Matrix" then if I export to .babylon (file still have scale 2.2.2 and rotation 30,30,30. but. greetings Quote Link to comment Share on other sites More sharing options...
max123 Posted August 29, 2016 Share Posted August 29, 2016 @ian Wouldn't Ctr+a in Blender screw up rotations? If an object's position is at, say, 1,0,0 and you apply that transformation, it's pivot is still at 0,0,0. Quote Link to comment Share on other sites More sharing options...
ian Posted August 29, 2016 Author Share Posted August 29, 2016 If origion is 1,0,0 and if we do ctrl+a (rotation). Object should still have origin 1,0,0 (object's origion = "pivot"). ctrl+a rotation or scale just reset transtomration matrix (rotation to 0,0,0 and scale 1,1,1) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.