Edemsky Posted January 6, 2017 Share Posted January 6, 2017 Hi, everyone! So, we can put a different textures on each side of a "box" using multimaterials and submeshes (like this http://playground.babylonjs.com/#T40FK). But I need to do it on a more complex mesh. In my case it's a wall (which is basically a box with a small depth) with a square-cuts therein for windows which I made using CSG.subtract method. There is an example of that wall, but with single material. I need at least two different textures (front and back side of the wall), but with that square-cuts it's impossible to set the parameters of submeshes. Is there any other ways to set different textures on each side? Sorry for my EngIish and I hope I've clearly explained the issue. Any ideas? Thank you! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 6, 2017 Share Posted January 6, 2017 Hey! You can still duplicate the object. It won't be too expensive and will save you a lot of work Quote Link to comment Share on other sites More sharing options...
Edemsky Posted January 6, 2017 Author Share Posted January 6, 2017 3 hours ago, Deltakosh said: Hey! You can still duplicate the object. It won't be too expensive and will save you a lot of work What do you mean? Create two identical walls with different textures and use them as one single object? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 6, 2017 Share Posted January 6, 2017 yep Quote Link to comment Share on other sites More sharing options...
Edemsky Posted January 6, 2017 Author Share Posted January 6, 2017 10 minutes ago, Deltakosh said: yep I thought about it too, but in that case other four faces of wall will have two halfs of different textures which doesn't look nice Maybe it's the best option and i'll go with it. Thanks a lot for your respond anyway! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 7, 2017 Share Posted January 7, 2017 It's not impossible to figure out the position of the submeshs uv. Its 0-1 on the x and y. So if the farthest point is 1 and the closest is 0 you just transpose the position of the vetrice in relation to the others to a 0-1 scale. 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.