Skurkis Co Assets

Mystic Ice

December 18, 2019

Screenshot of Mystic Ice Assets

Link to Mystic Ice on the Unity Asset Store.

Getting Started

My only professional occupation until now has been Software Development. Mystic Ice is the start of what I hope will be a successful business and creative outlet. Over the last 10 years I’ve spent a significant amount of my free time learning both Unity , Blender , and the finer points of 3D rendering. The following is a short writeup of the systems I learned and processes I followed to create these assets.

Unity: Submission Guidelines

If you’re looking to submit assets to the Unity Asset Store , you’ll want to check out the submission guidelines   before getting started. The guidelines specify many requirements for the models, textures, and prefabs you’ll be submitting your package with - including special requirements for assets that target Mobile devices.

Blender: Python Scripting

Exporting each asset from Blender to Unity in a way that conformed to the submission Guidelines was time consuming. It involved lots of clicking and memorization of settings within Blender. Because of that, I decided to take advantage of the Python scripting interface that Blender provides. I created some (almost) reusable scripts to export out the 3D models and bake the atlased texture map using Blenders’ Cycles renderer.

def export_models():
    # Store selection
    view_layer = bpy.context.view_layer
    obj_active = view_layer.objects.active
    selection = bpy.context.selected_objects
    bpy.ops.object.select_all(action='DESELECT')

    for obj in selection:
        obj.select_set(True)

        # some exporters only use the active object
        view_layer.objects.active = obj

        name = bpy.path.clean_name(obj.name)
        model_path = os.path.join(repodir, unity_path, project_path, "models", name)
        
        print("Exporting Model: ", name);

        # -- Start Model Export
        bpy.ops.export_scene.fbx(
            filepath=model_path + ".fbx",
            use_selection=True,
            bake_space_transform=True,
            axis_up="Y",
            axis_forward="-Z",
            object_types={"MESH"}
        )
        
        obj.select_set(False)

    # Restore selection
    view_layer.objects.active = obj_active

    for obj in selection:
        obj.select_set(True)
        

Blender: Cycles Shading System

The Cycles rendering system the Blender feature I never had time to dig into until now. It’s main responsiblity is to generate the color you see as you’re looking at the models. The workflow involves adding a connecting nodes as pictured below. Nodes can do everything from vector math to generating colors.

Examples of composing Cycles nodes

Some technical details

In order for Unity to batch your assets into a single draw call, each asset needs to be 300 vertices or less and share a single simple material. Knowing that, I decided to bake the texture information into a single atlas texture. I wen’t that route because it allowed me to avoid visible mesh seams as well as the ability to bake in the shadows visible on the bottom of each model. In the future I might explore creating a seamless material and using that in combination with a Unity shader to create the shadow effects on the bottom of the model.

Conclusion

Thanks for stopping in. Feel free to drop me a line through my email or LinkedIn. Thanks!


Ryan Skurkis

Written by Ryan Skurkis and based out of Chicago. Please reach out over LinkedIn or email me ryanskurkis@gmail.com