Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by stan4u · May 24, 2013 at 09:43 PM · shadermeshtransparencyappear

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image stan4u · May 25, 2013 at 07:46 PM 0
Share

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.

avatar image OperationDogBird · May 26, 2013 at 08:19 AM 0
Share

This question seems to be actually what you are after. Here is the link to the shader used. It uses a render depth/queue shading technique, it will require you to set the render queues.

avatar image stan4u · May 26, 2013 at 07:43 PM 0
Share

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?

avatar image
0

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image stan4u · May 25, 2013 at 07:50 PM 0
Share

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

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges