• 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 /
This question was closed Oct 16, 2013 at 01:09 AM by Benproductions1 for the following reason:

Asking for shader code

avatar image
0
Question by DHoffman · Oct 15, 2013 at 06:02 PM · shadermaterial

Good looking crystal material

I'm trying to get a decent crystal material in Unity, and none of the built-in shaders seem to fit the bill. It must have the following features:

  • Variable opacity - real-time refractions not required, but it should be able to be made translucent, either via a straight alpha value or an alpha texture.

  • Cast shadows - shadows don't have to take opacity into account - it can cast shadows as if the object was opaque. This is non-negotiable. Shadows are required in order to be able to see where objects are above the ground.

  • Specular highlight - alternatively a reflection map would work. Doesn't need real-time reflections though.

  • Tintable - must be able to adjust the color in real time.

Additionally, it'd be nice if it can function on mobile platforms, but that's optional. (I may give up on the variable opacity for mobile if necessary.) Has anyone seen an existing shader that can handle these requirements? Or found a good way to fake them with the built-in shaders? Best I can get are using Reflective/Specular (which has no transparency) or some of the Particles ones (which don't cast shadows). In fact, pretty much all of the shaders with variable opacity don't cast shadows, which I absolutely need for game-play reasons. A variation of Reflective/Specular with variable opacity would probably be the best way to go.

Comment
Add comment · Show 4
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 DHoffman · Oct 16, 2013 at 06:37 AM 0
Share

WTF? Is it not allowed to ask about shader code on this site? I checked the FAQ and there's nothing about that on there. That's also a pretty dumb reason to close a perfectly legitimate question. I'm just asking if it's even possible to get a shaders that combines features from several other shaders. I'm not asking someone else to do work for me - I'd assume something like this already exists somewhere, but I can't find it, so I was asking if anyone else has seen something that would do the trick.

avatar image AlucardJay · Oct 16, 2013 at 07:43 AM 2
Share

Have you tried the asset store? Both these are free :

  • https://www.assetstore.unity3d.com/#/content/729 (heard good things about this one)

  • https://www.assetstore.unity3d.com/#/content/3

unitygems shader tutorials (may be helpful) : http://unitygems.com/noobshader1/

Edit : Also have a look at the one on the Unify Community Wiki.

  • http://wiki.unity3d.com/index.php/IPhoneGems

  • http://wiki.unity3d.com/index.php/Shaders

  • http://wiki.unity3d.com/index.php/$$anonymous$$ain_Page

There may some stuff in the Unity Forum ShaderLab too (or start a new post) :

  • http://forum.unity3d.com/forums/16-ShaderLab

  • http://forum.unity3d.com/forum.php

avatar image ArkaneX · Oct 16, 2013 at 08:40 AM 0
Share

I also think this is perfectly valid question...

avatar image DHoffman · Oct 16, 2013 at 12:13 PM 0
Share

@alucardj Thank you. Both of those look pretty good. Only thing I'm not sure about is if they are mobile-compatible, because they don't say anything about it. But I'll try them out and see. (I've got an old-model Android to test on, which should be a good lowest-common-deno$$anonymous$$ator, but I don't have an iOS device available to test that.)

0 Replies

  • Sort: 

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

Material doesn't have a color property '_Color' 4 Answers

How come edititng "_Glossiness" through script doesn't work? 1 Answer

Represent Land 3D Area End 0 Answers

Glowing material/shader ? 1 Answer

Changing Emission Scale UI with Script 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