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 Polantaris · Aug 26, 2013 at 02:35 AM · materialspost effectsfading

Fade Out over length of object on Material?

I couldn't find a question about this, so I thought I'd ask: I was wondering if there was any way to make it so that a Material fades out as it goes.

So, for example, starting at the left side of a material, as it draws to the right, it increasingly fades out until it reaches an Alpha level of 255, starting at 0 (Or any start/end values you want). Or, perhaps, from the center going outward it does the same effect.

Is there any possible way to do this? There's a lot of Shader Options, however I can't seem to find one that does this. As long as the effect exists in some form I can most likely work with it.

Context: I have it so that the edge of my walls are met with blackness. I want it so that it looks like the walls do not abruptly end, but fade into darkness. I don't really want to edit all of the different textures I may use to create this effect, because it would be a very large amount of extra materials to do it (At least 3x what I have now, because I would have the default, the regular wall, and then the corner wall, which would need its own, and other possible special circumstances), and several annoying computations that I don't really want to perform (so that every wall is facing the correct direction with the correct material on it).

If it's impossible, I'll probably just leave it be, however it would add some decent visual effects if I were able to do this. Thanks in advance for any info.

Comment
Add comment · Show 1
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 Polantaris · Aug 26, 2013 at 03:57 AM 0
Share

So I'm looking at ShaderLab, but the Documentation doesn't seem to be fleshed out as much as I would hope.

For example, I figure a way to potentially do this is to have X draws, where it allows larger alpha values the closer it gets to the center. I am trying to see if building Rects would work, but I'm not sure if you can control their size relative to the object. For example, Rect 1 would be Alpha 25 but 100% of the object, while Rect 2 would be Alpha 50 but 90% of the object. Using a concept like this, I could make it so that it slowly gets less transparent as the rectangles get smaller, however I'm not really sure if this is possible.

I noticed that you can create a Rect Property, however I'm not sure what Options are available in it because I cannot find any information in the reference documents.

It just shows: name ("display name", Rect) = "name" { options } Defines a rectangle (non power of 2) texture property. But what can be in {options}? I cannot find anything that says what that could be. I'm hoping maybe the ability to control the size of the Rect in relation to the object the $$anonymous$$aterial would be attached to.

Anyone have any ideas?

0 Replies

· Add your reply
  • Sort: 

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

15 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

Related Questions

Crud. How do you insert a meterial again? 1 Answer

Models in prefab are broken after updating .fbx file 0 Answers

map of earth on material (sphere) is distored - Why? 0 Answers

I imported the Ghost Town asset package and now the models in dont have textures or meshes dont show up. 0 Answers

Problem with rendering of standard material on iOs platform. 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