Skip to content

Latest commit

 

History

History
210 lines (164 loc) · 11.4 KB

texture-generator.md

File metadata and controls

210 lines (164 loc) · 11.4 KB
title description
Texture Generator
The Texture Generator tool quickly creates custom textures for meshes through text prompts.

import BetaAlert from '../includes/beta-features/beta-alert.md'

The Texture Generator tool is designed to quickly create custom textures for your meshes through text prompts. You can select a mesh or Class.Model made up of several meshes¹, type in any prompt to preview results within a few seconds, then generate full textures.

"Rusted Charred Metal Castle"

"Mossy Stone Fortress"

"Snow Covered Ice Sculpture" **Texture Generator** is best suited for custom 3D assets where the desired texture is contextual to the asset itself. To generate repeating or tiled images for texturing surfaces like a wood floor or cobblestone pathway, [Material Generator](../studio/material-generator.md) may produce better results. 1 When generating a texture for a `Class.Model` group of `Class.MeshPart|MeshParts`, the meshes should be arranged in a sensible way such that a unified body is formed. Avoid generating a texture for an arbitrary group of meshes scattered about the model's bounds, or for more than one identical mesh in the same operation.

Generate textures

To begin generating textures, navigate to the Model tab and open the Texture Generator tool.

Texture Generator indicated in Model tab

With the tool's window open:

  1. Select a Class.MeshPart or a Class.Model comprised of Class.MeshPart|MeshParts in your scene.

  2. In the tool's preview pane, click and drag to set a generation angle that highlights the significant features or surfaces for texturing.

    Good generation angle focusing on primary faces of a tower mesh Focus on the primary faces of a tower mesh, visible to players Bad generation angle focusing on bottom of tower mesh Bottom of tower mesh will not likely be visible to players
  3. Enter a prompt describing your desired texture, for example:

    • "Rusted Charred Metal Castle"
    • "Mossy Stone Fortress"
    • "Snow Covered Ice Sculpture"
    Using more descriptors in your prompt and iterating can help you find a texture that suits your needs. For more information, see [Best Practices](#best-practices).
  4. Click Preview to create a texture preview in real time. This process typically takes about 20 seconds but may take longer during peak periods.

    When you've found a texture that looks suitable, use the "rotate" buttons to rotate the view 90° around the mesh. To return to the prompt input to iterate and/or create a new preview, click the "back" button.

    Texture preview showing in tool window At this point, the texture may not appear visually consistent from all four views. However, the model will create a texture that's more consistent during the texture generation process.
  5. When you're satisfied with the texture, click Save & Apply to create a full texture for your mesh. This process typically takes a few minutes but may be longer during peak periods. When complete, the new texture will be applied to the mesh through a Class.SurfaceAppearance instance.

    Texture applied to mesh in 3D world Final generated textures will be a close match to what you observe in the preview pane, but may not be an exact match. You can continue to iterate on a style prompt and compare previous versions as outlined in [Managing Textures](#managing-textures).

Manage textures

Generated textures appear in the Saved Textures section of the tool's window. For each texture, you can click the to access various options.

Saved Textures list in tool window

Option Description
**Insert Mesh with Texture** Inserts a copy of the textured mesh/model into the workspace.
**Show in Inventory** Opens your **Images** inventory on the [Creator Dashboard](https://create.roblox.com/dashboard/creations?activeTab=Image) where you can inspect the texture image.
**Export** Exports the mesh to your local system as a `.obj` file.
**Remove** Removes the texture from the **Saved Textures** list.

Advanced options

Expanding the Advanced Options section in the tool's window allows you to configure the following aspects.

Advanced Options panel in tool window

Seed control

You can choose to either randomize the seed or set a specific seed for texture generation. Setting a specific seed before generating a texture ensures you get consistent results each time you use a specific prompt.

Generation angle

Allows you to set a primary generation angle to prioritize during the preview generation phase to ensure the most important areas of your mesh are visible and able to be textured. This angle is also controlled by clicking and dragging the mesh in the preview window.

See Best Practices for detailed recommendations on choosing a generation angle.

Smart UV unwrap

In 3D modeling, a UV map is a 2D representation of the surface of a 3D model, allowing 2D textures to be accurately applied to the 3D model. UV coordinates U and V refer to the horizontal and vertical axes of this 2D space, similar to the X and Y axes in a 2D graph.

For the texture generator tool to create well-formed textures, your mesh's underlying UV maps need to fit a few guidelines. First, all UV coordinates must be within the unit square, as UV maps outside of the unit square will wrap around to the other side of the UV map and create artifacts or seams in the final texture. Second, all UVs must be non‑overlapping, as overlapping UVs will result in inconsistent textures and color placements.

Selecting the Smart UV Unwrap option will take a mesh with no UVs (or incompatible UVs) and apply the necessary UV coordinates for texturing. If your UVs are compatible, they won't be affected and you can use your mesh as‑is.

Specify front view

When this setting is enabled, the generation angle selected during the preview stage is specified as the "front" of your mesh. This allows the tool to better texture meshes with a clear front and back by identifying each side, resulting in more consistent and coherent textures. This is particularly helpful for objects with a clear front and back, like avatars, animals, and clothing.

Front view of character's lab coat with Specify Front View disabled

Back view of character's lab coat with Specify Front View disabled

"Lab Coat with Badge" prompt with **Specify Front View** disabled, yielding lab coat "front" on both front and back

Front view of character's lab coat with Specify Front View enabled

Back view of character's lab coat with Specify Front View enabled

Same prompt with **Specify Front View** enabled, yielding correct "front" and "back" of lab coat

Best practices

The following prompting tips enable the tool to provide better and more consistent results.
  • Provide as much detail as possible in your prompt. Short, vague prompts will lead to inconsistent or unexpected results.
  • Include texture attributes like material types, colors, patterns, wear and tear, etc. The more constraints you give the tool, the better it can generate what you have in mind.
  • Use descriptive phrases instead of single words for key items, for example "worn leather" instead of just "leather."
  • Add styling cues like "cinematic," "photorealistic," "cartoon," or "low poly" to influence the overall look.
The [generation angle](#generation-angle) sets the most important view of your mesh which will be prioritized during generation. Changing this angle can often help eliminate inconsistencies in textures.
  • Setting the generation angle to highlight the meaningful faces of your mesh will result in better generations.
  • For flat objects like plates, swords, and fences, make sure the generation angle displays a view with a high surface area.
  • For humanoid and animal meshes, experiment with different generation angles, such as a head-on view of the face and a side view profile, to find the most consistent and coherent texture.
Generating the most suitable textures is an iterative process. It helps to preview often and tweak prompts incrementally to reach your vision.
  • If a texture doesn't meet your expectations, identify what to change instead of starting over. For example, tweak the color or pattern description.
  • Change the prompt word order. Words at the beginning of the prompt can have more weight when generating.
  • Generate several previews to compare different prompts, or try the same prompts with different seeds to get a preview that fits your vision.