Using the Texturing SDK
Learn how to integrate the Unity AI Texturing SDK into your Unity project
Last updated
Learn how to integrate the Unity AI Texturing SDK into your Unity project
Last updated
Copyright (C) 2023 Aqueduct Software, Inc. All rights reserved.
This guide will explain how to integrate the Unity AI Texturing SDK into your project. By the end of this guide, you will have all the components necessary in your project to begin texturing assets with Polyhive!
Please make sure you've completed the following prerequisites before moving forward with this guide:
This guide assumes basic knowledge of Unity. If you're new to Unity, please check out their official getting started tutorial.
Now that you've registered an account and created an API key - let's texture an asset through Unity!
To begin, navigate to the Polyhive Unity SDK scenes folder in Unity (Packages > Polyhive > Scene) and open the SampleScene.
This scene has a sample helmet asset for texturing. Add the helmet to the scene by dragging the object into the main window.
Next, you must provide your API key. If you don't have an API key, please check out the create API key section to learn how to create one.
Click on the Window button at the top of the Unity window, and select Polyhive and then Polyhive Settings:
Input your API key in the API KEY field and press the save button.
Please be aware that by storing the API key in the PolyhiveManager the API key will be saved within your Unity scene file. As a result, anyone with access to the source code of your Unity project will be able to view your API key.
Now that you've added your API key, let's texture an asset with Polyhive. To do this, open the Polyhive Prompt Window by clicking the Window button at the top and then selecting Polyhive > Polyhive Prompt Window:
The Polyhive Prompt Window enables you to submit AI texturing jobs directly from Unity. You can specify prompts and other parameters.
Let us retexture the helmet in the scene. Select the game object at the bottom and type prompts and specify settings:
Once we have specified our prompts and settings, click Submit Texture Job and wait for the job to complete.
You can see past texturing jobs and monitor the progress of ongoing jobs with the Polyhive Job Status bar. To do this, click the Window button at the top and then select Polyhive > Polyhive Job Status:
The job status window will be empty the first time you open it.
Click the Refresh button to see past and current jobs.
Once your job finishes running, you will be able to download the retextured asset by clicking the Download button next to the desired job.
The files will appear in Assets > Polyhive:
Add your retextured asset to your Unity scene!
Congrats, you've just integrated the Polyhive Unity SDK into your project - it really is that easy! If you run into any issues setting this up, please contact us at rahul@polyhive.ai. We would also love to hear about any feedback you can provide!