How to make VR space, ‘TREASURE HUNTER’ – Render crystals by Shader Forge

In this article, I explain how to create the Material of crystal by ShaderForge. By combining some Nodes, I set Opacity and Refraction to render crystals.

Render crystals

Let’s aim to render cristal’s distinctive transparency and shininess. To adjust them afterwards, I make it possible to be controlled by sliders.


Settings for Colour and Fresnel

Create the texture of crystal by connecting Emissive and Fresnel. The base colours of crystal are white and blue. Connect them to Lerp.   Then, connect Fresnel to Lerp. Make the parameter of Fresnel adjustable by a slider. I set ‘Max’ to 3 here.   Connect the Lerp for colours to the Emission input pin.   Connect Fresnel to the Opacity input pin. It ended up with the shown above. After this, we create the Nodes for Refraction.

Set Refraction

Make the parameter of ‘Refraction’ adjustable to control the refraction. Connect a slider to Multiply and set ‘Max’ to 3. Refraction is adjusted by this value.   Connect the Multiply above and ‘UV coord’ to another Multiply, and then connect it to the Refraction input pin.   In the Shader inspector, you can adjust Colour, Fresnel and Refraction. Let’s add a good taste to the texture by adjusting the colour, transparency and refraction intensity.   After this, duplicate it and place them with variation by varying the scale and the angle.  

VR space, ‘Treasure Hunter’ is completed

As the rocks floating around looked a bit boring, I added a vertical gentle motion to them. I added a slower motion to the large rocks while I added a bit quicker motion to small rocks. All you need to complete this VR space is to convert it into a Prefab and upload it to STYLY. How easy it is!   In this article, I introduced how to make the Shader for crystal by Shader Forge. As Unity2018 has ‘Shader Graph’ now, people mainly use it in future, I guess. This article concludes the introduction of ‘Treasure Hunter’. It’s a beauty of STYLY to create and enjoy a VR space with your favourite taste like this! You can access the VR space created in this series at TreasureHunter.