Crystal Generator Tool #8: Refining and Fixes

Work In Progress / 07 December 2019

After a bit of user testing I have discovered that clicking the rename field without typing anything renames the file to ""; this causes an invalid path when it comes to saving the asset so I have implemented a Dialouge window when the asset is renamed in this way which also prevents the save from being executed. Users found this a bit easier to use as it allowed them to not do it accidentally and allowed the workflow to be polished,

I implemented a system for adding the custom material clone to the crystals using List<T> which uses a forloop to add the material to all of the crystals which had been instantiated. Funnily enough, I was not aware that lists are not automatically cleared which led to 208 meshes being stored and Unity to almost crash - after finding this error, I simply added a ClearList function before the objects are instantiated and it now works.

One issue I seem to be facing now is forcing the custom material clone to look the same as the normal one - for some reason the material is resetting to default when it is being cloned and I am unsure why especially when it seems to have the correct parameter clone values when they are exposed. It seems it will be a lot of trial and error to fix this.

Crystal Generator Tool #7: Cloudy Patterns

Work In Progress / 05 December 2019

Looking further into Shadergraph I am slowly realising how textures can be created procedurally using Math functions as well as noise patterns available within the editor; by combining these with a texture input I have been able to allow a customisation feature where the crystals look 'cloudy' and a bit more fantasy-like. Adding some animation to the UV co-ordinates has allowed the crystals to look more alive which could potentially be supported by particles and lighting in the future.

Combining these cloudy elements with my randomisation function has allowed for some pretty cool colour combinations to come out of it!

Looking forward in progress, I need to sort out the saving of the materials/prefabs so the user can keep the crystals they use; as well as model further variations of crystals which can look more detailed.

Crystal Generator Tool #6: Visual Updates

Work In Progress / 03 December 2019

Having made some basic prefabs for crystals using online reference images, I implemented these into the array which are then taken into the tool for the random choice generation - users are also able to add their own crystals into the /Meshes/ folder which the tool can automatically add to its array. By allowing random rotations and scaling, it allows the crystals to have further variation and this allows the concept of the tool to have a larger unique selling point in comparison to other assets on the Unity store.

Having generated some basic circle code using a tutorial, the crystals are able to replicate a fantasy environment and this also allows them to also look like strategically placed crystals as well as clusters.

Crystal Generator Tool #5: UI

Work In Progress / 03 December 2019

After heavy experimentation with the different functionalities the tool could have, I decided to separate out the Mesh Generation from the Customisation tab. This is now shown in a 2x2 grid with the main mesh elements on the top and the customisation on the bottom row.

After working on the mesh generation code, I realised the original concept of creating the crystals through code would not be a good solution to this generation due to finding out the normal code for a Primitive Cube is an extensive amount which I would not be able to implement even with knowing the pseudo code.

Working on a new system, I decided that creating a set amount of meshes that the tool can pull models from would be the best course of action. I added the array to the GUI, as well as new parameters which dictate how many are instantiated, how they are scaled and how they are positioned in a circle relative to one another in order to create a cluster type feel.

Overall, this has become an excellent update of progress and it is definitely motivating to see something finally come out of the tool. Onto the next update!

Crystal Generator Tool #4: Improvements

Work In Progress / 20 November 2019

To demonstrate the shader, I modelled a very basic crystal which has around 30-40 polygons maximum. I had to UV these quickly just to make sure I could demonstrate what I wanted to show in terms of progress to my colleagues. Overall, I believe the tool is showing genuine progress, but I am not completely happy with the visuals just yet. I also need to work on the algorithm for the actual mesh generation which could let the user change the size and the amount of crystals present - however I can see the UVs being issues.

The feedback I recieved was as follows:


  • Make a clone of the crystals in the middle and then put the pattern on top of it and it could look better – maybe look into it with shaders
  • Move "randomise all" to the top so a user doesn’t accidentally click it when they customise it loads
  • Whack an alpha parameter into the texture
  • Add colour choice to emissive
  • Edge damage on the crystals
  • Random directions for placement

Good things

  • Visuals are nice
  • Reflections are really good
  • Nice customisation

Bad things

  • Looks “too” solid

After looking at this feedback, it is important to look at prefab variations and overrides as it could greatly improve the customisation and will allow me to implement them into the tool itself. Much of the feedback is also stating movements and adding colour choice to other elements such as emissive, which should be easy to implement when using Shadergraph.

  Current Shadergraph Set-up:

Crystal Generator Tool #3: Adding Texture

Work In Progress / 20 November 2019

One of the core components of the crystals I wanted to implement was adding refraction which could be affected by the texture the designer wants to add to their crystals. I added a texture node within Shadergraph which can be readily changed in my UI as well as implementing texture co-ordinates so the texture can move on the horizontal and vertical axis as designated by the user.

I also added the functionality for Shadergraph to create a normal map from the texture supplied to add a bit more realism to the design itself; by doing this, the light can refract using the normals and the crystals can then have a bit of added geometry which doesn't affect the polygon count.

I think it may be worth looking into the feedback I receive shortly and add this to the development of the tool, as I am not quite happy with the position of it yet - is it possible to achieve the crystal I want visually?

Crystal Generator Tool #2: Basic Integration

Work In Progress / 20 November 2019

Learning and implementing Unity UI into my tool has allowed a method of customisation that I would like to be featured within the tool. 

By setting up parameters such as colour, size, patterns etc. the user will be able to customise these elements without even touching the Shadergraph code attached to the material. This is ideal as it will save a designer the complexity of having to learn Shadergraph and gives the designer a clean and easy to use interface.

So far, there is implementation for colour and fresnel customization through the sliders which are connected to the attributes within the Shadergraph - interestingly, the attributes were just Hex values until I renamed them which seems to be a weird way of going about it (@Unity).

The Fresnel slider is a simple 0-1 slider, while the colour involves a colour picker or the ability to randomise the colours using "Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f);" which allows the randomisation to pick brighter colours as recommended by the Unity documentation ( and also prevents the crystals from being a horrible colour.


Crystal Generator Tool #1: Concept and Implementation

Work In Progress / 20 November 2019

For an assignment, we have to create a product we can sell - this could be a game, app, tool etc. Wanting to work with shaders and the roles of a technical artist, I have decided to combat a tool which would allow a designer to create a crystal and save out the prefab to use within the scene itself. 

This generator tool would include (in order of priority):

  • Colour customisation using EditorGUILayout.ColorField.
  • Size/Amount of points customisation using integers.
  • Pattern/Noise customisation for the noise shader using textures.
  • Reflection customisation.
  • A ‘randomise’ function to allow the generation of random crystals – allow constraints to be customised using [MinMax in Unity UI].

Stretch Goals:

  • The ability to ‘paint’ the crystals onto the scene for easier placing.
  • Growing crystals.

Looking at these similar examples there seems to either be a ‘generator OR pretty’ dynamic happening within the Unity Store; the assets seem to either be very aesthetically appealing or actually have a generator that works – but not both.

I believe the idea I am proposing here could work due to its gap in the market, and it would allow me to have an excellent portfolio piece with technical art.