- Home /
make object to appear from bottom up
How can I make object of single mesh to appear from bottom up. I can change alpha of shader to make object appear or disappear or make it semitransparent but how to make it semi transparent partially. For example If I wanted to make a bottle 50% transparent and "fill it" from bottom up with full opacity. So lets say 30% of bottle from bottome will be full opacity and rest with 0.5 alpha. Is there a way to achieve this?
Answer by OperationDogBird · May 24, 2013 at 10:59 PM
A possible solution for u may be to use a separate object inside the bottle to act as the fluid. If you set the scale properly when exporting the mesh( in unity y = 1, being full ) then you could just set the scale on the y axis to be the exact percent the user has filled. Setting y to .1 would be 10%. This makes it pretty easy for you, as you wont need to do more complex shader calls/calculations. If there is a reason this will not work for your purposes, please update your question with any additional info.
Hi, thanks for answer, I'm looking for something more general, bottle was just simple example. but I'l like to get this work with more complex objects, like statue. Lets say its an object which will have to be uncovered little by little. It will be 0% uncovered = it will show 50% opacity. If it will be uncovered by 30% than 30% of statue from bottom will be 100% opaque and rest 50% and so on until completely uncovered and fully opaque.
Hi, I played with this shader before because of something else and it did not work for me. I tried again now and realized that it does not hide objects with some shaders. It did not hide my object of fountain I tried to hide. It was because It had assigned mobile/diffuse shader. When I changed to diffuse it hid it. So it does work for some shaders. On other hand objects with shader unlit/Transparent Cutout are hidden on its own even without attached render queue script. $$anonymous$$ost difficult issue is water plane with FX/Water shader and this is not hidden as well which I cannot just change to something else. also the question is if it si possible to hide it to be 50% opaque and not fully hidden?
Answer by tomekkie2 · May 24, 2013 at 11:49 PM
You can also use a transparent shader with alpha - texture and animate the uv on it.
Hi, thanks for idea, this is close to what I need. But the objects may be a bit more complex like statue or car etc. And I will target mobile platforms so model will be low poly with UV maps. If I animate UV map offset it would look like pulling a skin on the object. not really nice ;o(
Your answer
Follow this Question
Related Questions
Transparency / depth problem 0 Answers
Make transparency ignore meshes inside? 1 Answer
Standard shader - fade mode renders texture in wrong order 1 Answer
[ problem ] transparent shader !!! 1 Answer
Transparent Camera layer rendering 0 Answers