jellix Posted September 14, 2016 Share Posted September 14, 2016 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! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2016 Share Posted September 14, 2016 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 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted September 14, 2016 Share Posted September 14, 2016 - Custom Shaders Quote Link to comment Share on other sites More sharing options...
jellix Posted September 15, 2016 Author Share Posted September 15, 2016 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 ... Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 15, 2016 Share Posted September 15, 2016 Like Deltakosh says, i think decals is the best solution here. 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.