Text to Texture

This guide shows you how to use Meshy-for-Unity to generate texture for your 3D models from text prompts.


Prerequisite

See Prerequisite.

Tutorial

After registering a Meshy account and obtaining an API key, we can use Meshy-for-Unity to generate textures. In this tutorial, we will use a car model as an example. After installing Meshy-for-Unity, we create a new scene in Unity and add the car model.

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_13-59-17_0002.png

First, we need to configure the API key. In Unity, select Window->Meshy->"API Key".

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_16-49-59-cut_0252.png

Enter the API key obtained from the Meshy website, and click "Save Key" to save the API key to local.

meshy_for_unity-text_to_texture_screenshot_from_2023-10-20_09-53-11_0289.png

Now we can start generating textures for our car model. In the scene, right-click the car game object and select Meshy->"Text To Texture".

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_16-50-46_0749.png

In the popup window, you can enter custom prompts to generate textures, and click "Submit Task" to submit the task.

For example:

  • Object Prompt: A car,
  • Style Prompt: little blue traveling car, brand new,4k,hdr,highest quality.

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_10-26-27-0_0044.png

After submitting the task, you can click the "Refresh Task List" button to get the task list, which records the status of submitted tasks. When a task is completed, you can click the "Download" button to download the model with generated textures. Please note that completed tasks will expire after a few days, and only unexpired tasks will be displayed in the task list.

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_10-26-27-1_0240.png

After clicking the "Download" button, the model will be automatically downloaded to Assets->Meshy directory.

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_17-01-03_0829.png

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_16-58-44_0532.png

Add the textured model to the scene, and you can see the final model with textures!

meshy_for_unity-text_to_texture_screenshot_from_2023-10-26_16-48-55_0057.png