Jump to content

Mix Textures/Materials? How to use two Materials on one Face?


jellix
 Share

Recommended Posts

Hi,

technically my question is: how can I blend one material with ontother one and get one mixed material out of it?

My case is:

I have a mesh of a shirt and apply a "baked shadow" texture to it.

Now I want to give the shirt an additional texture (or material?) to show some pattern on the shirt while keeping the baked shadow also. The pattern is repeated while the texture for the baked shadow is not.

So I want to "multiply" the pattern onto the baked shadow-texture.

I have already read https://doc.babylonjs.com/tutorials/How_to_use_Blend_Modes but I dont want one mesh to be multiplied to another mesh that lays beneath. Instead I want to apply a mixed material onto one mesh.

Thanks for help!

Link to comment
Share on other sites

Hey

so you have multiple options:

- Duplicate your mesh (Not fan of this one but woth mentioning still)

- Use multimaterial: with this technique you can add submeshes to your mesh. Each submesh can have it's own material but they still share the same geometry. More about multimats here: https://www.eternalcoding.com/?p=283

- Use decals

Link to comment
Share on other sites

Hi, thanks for the answers!

The mesh has pretty much polygons so duplicating it will lower the performnace, right?

But now I have a solution so far: In my case it's all about just showing this one object. So I remove all lights, applied lightmap (baked shadow) onto the emissiveTexture and apllied the pattern onto the diffuseTexture.

Looks nice. Unfortunately there is no Bump-Mapping visible anymore (because of no lights). But I will have a look at that now ...

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...