Jump to content

Multiple textures on complex mesh


Edemsky
 Share

Recommended Posts

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.

wall.png
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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...