- Home /
Making only some parts of a 3D object's texture transparent
So I'm trying to make potion bottles for my RPG in Blender, and I've basically made an object that has an outer shape which will be the glass vial, and an inner fill which will be the potion part (just a solid that will change it's color based on the potion).
Here is my usual workflow:
Create object in Blender and UV unwrap onto a texture
Export object to Unity and create material out of the texture if I haven't already
Apply material to object
The issue is I want the glass vial outside of the potion to be transparent like glass, and the inside part to be solid like a thick liquid (no animation, or liquid simulation though just a solid mesh).
In the past I've had metallic and see through objects where I change the material's transparency or metallicity, but how can I do that when the material on the inside needs to not be transparent?
The only thing I can think of is to split this object to use 2 different materials but I don't know if that's really the best way.
It's common to either use multiple materials or even objects for this sort of thing, yeah.
Thanks! I wasn't sure if that would be a really bad way of doing it.
Answer by Batzuga · Jan 28, 2020 at 01:54 AM
Well there are several ways, depending on what you want it to be like. In blender you can make a small object inside the vial and give it different material.
In blender you can also give different faces, different materials. So if you use, for example, 3 different materials for an object in Blender, you can change the material for those areas in Unity too.
Here's a link to one guys solution with shaders. This is the best way, in my opinion. And also most versatile.
Thanks a lot! The link looks amazing! I know nothing about shaders though, any idea if this is super sophisticated? Or tips on where to start?
Your answer
Follow this Question
Related Questions
Apply PNG as texture to 3d object 0 Answers
How can I animate the surface of a 3D object? 0 Answers
Need help with URP Lit Shader 1 Answer
How do I properly apply a transparent texture to a mesh? 2 Answers
No culling in a transparent texture 0 Answers