slippery Posted December 9, 2015 Share Posted December 9, 2015 I have a box mesh that I am baking a scaling transform into because it has child meshes whose current sizes I do not want to change. I have applied a multi material to this mesh that has 6 submaterials (one for each face). The problem is when I bake the scaling transform, the material starts displaying the same texture for each face rather than a different texture for each face (it displays correctly before baking). Does anyone know why this is and/or how I could fix this? I won't have screenshots or code examples until i get into work tomorrow but if anyone has any ideas It would be very helpful1 Thanks, Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 9, 2015 Share Posted December 9, 2015 Hi Slippery, welcome to the forum! http://www.babylonjs-playground.com/#1V3CAT#49 (a playground demo by Jerome and followers - which I have modified to test parenting-to meshBuilder mesh) Take a look at lines 43 - 57... if you please. See how you can build an 'options object' and use it as an arg/param... to make a box of any size... WITHOUT using scaling? Yay meshBuilder! Ain't that cool? In line 56, I parent box2 ... to box ... and look at that! No inherited scaling. Scaling is still inherited, but the parent hasn't been scaled. I don't know if/how any of this info applies to your sub/multi-materials issue. I don't work with multi-materials very often. So yeah, here you see the meshBuilder, and the perFace box-texturing thing... both are core contributions... by Jerome. (He's a God!) And both "features" might help your project... maybe. Let's hope it works out that way. Welcome again, keep us posted. Quote Link to comment Share on other sites More sharing options...
slippery Posted December 9, 2015 Author Share Posted December 9, 2015 Thanks alot Wingnut, i'll play around with that and see if I can make it work. 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.