Fill a transparent mesh partially with another material

Hi,

i want to “fill” a complex Mesh with a glowing material depending on a scalar parameter…
Basically a complex 3d version of the iphone battery symbol…

Does anyone has an idea how to accomplish such an effect?

My approach so far is to use 2 meshes:
the first one for the transparent hull and a second one with a glowing material.

but i don’t know how to “cut” the second mesh depending on a scalar parameter…

any suggestion would be very appreciated and i would post the final solution for every one interested
Thank you :slight_smile:

There are a couple of different ways to do something like this. I included an example: [Download here][1]

For this one you only need 1 mesh, it just cuts the height based in the parameter “Fill Amount”.

Here is what the material looks like:

The way it “fills” the mesh is with the y uv’s it gets from the mesh, if you need the uv’s to be something else, you could also store the top down gradient in vertex colors using an external modeling tool. There are some other features you might want to use for your mesh like distortion and scene color influence. There is also a value for how transparent the “Empty” area is. Empty being red in the above picture.

Amazing! Thank you!

I would give you more than just an upvote for that :slight_smile: