Unity's shader system is one of the most capable in real-time game development — but it has quirks that trip up artists importing AI-generated PBR textures for the first time. The Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP) handle material inputs differently, and neither maps directly to the five-map output you get from a PBR texture generator.
This guide covers the complete workflow for getting AI-generated PBR textures into Unity correctly — URP and HDRP setup, the Mask Map packing challenge, import settings, and the fastest path from a text prompt to a production-ready Unity material.
What Unity Needs from an AI Texture Tool
Before getting into the setup, it helps to understand what makes Unity's pipeline different from Blender or Unreal. Unity's Lit shaders (both URP and HDRP) don't accept separate roughness and metalness maps the way Blender's Principled BSDF does. Instead:
- URP Lit uses a packed Metallic/Smoothness texture: metalness in the R channel, smoothness (which is 1 - roughness) in the Alpha channel. Or you can drive metalness and smoothness from material sliders.
- HDRP Lit uses a Mask Map: metalness in R, ambient occlusion in G, detail mask in B, smoothness (1 - roughness) in A.
This means a five-map PBR set — albedo, normal, roughness, metalness, height — needs some translation before it plugs cleanly into Unity. The good news: for most indie and mid-size projects, the simplest approach (using sliders instead of packed textures) works fine and takes 30 seconds to set up. The proper approach (packed textures) gives you per-texel accuracy and is worth the extra step for production work.
For AI textures specifically, you also need to verify:
- Clean albedo — no baked-in lighting or specular highlights. Unity's rendering handles lighting; baked lighting in the albedo creates visual artifacts under dynamic lighting conditions.
- Correct normal map convention — Unity's URP uses DirectX format (green channel down) or OpenGL depending on the platform, but the import workflow handles this automatically if you set the texture type correctly.
- Non-color import settings — roughness, metalness, and height are data textures, not images. Enabling sRGB on these breaks the material.
Grix is powered by fal.ai's PATINA model — built specifically for PBR generation, which means albedo outputs have no baked lighting, normal maps are physically accurate rather than decorative, and the roughness is a proper 0-to-1 grayscale range. This is what makes AI-generated textures from purpose-built PBR models different from general image generators: the output is engine-importable data, not rendered art.
Getting PBR Textures from Grix
Go to grixai.com/try — no account required for the first three generations per day. Type your material description and click generate. The PATINA model runs in under 30 seconds and produces a ZIP file containing five PNG maps: albedo, normal, roughness, metalness, and height.
Prompt tips for Unity-bound materials: be specific about surface condition and finish rather than lighting. "Weathered red brick, matte, moss in mortar joints" generates much better-separated roughness data than "old brick." Avoid any lighting descriptors ("sunlit," "shadowed," "in rain") — these bake lighting into the albedo, which you don't want.
Three daily generations without an account is enough to test the pipeline end-to-end. For active development, the Light tier at $8/mo gives enough credits to build a full environment material library — at five times less cost than TexturesFast's $39/mo entry tier.
Unity URP Setup — Lit Shader
Import Settings
Drag all five PNGs into your Unity project (any folder — typically Assets/Textures/MaterialName). Before doing anything with the material, check the import settings on each texture:
- Albedo: Texture Type = Default. sRGB (Color Texture) = enabled. This is correct for the base color map.
- Normal: Texture Type = Normal map. This triggers Unity's normal conversion — it will apply the correct DirectX/OpenGL conversion for your target platform automatically. Do not leave this as Default.
- Roughness, Metalness, Height: Texture Type = Default. sRGB = disabled. These are data textures — enabling sRGB applies gamma correction to linear data, which breaks the material. This is the single most common import mistake.
Quick Setup (Slider Method)
Create a new Material and set the shader to Universal Render Pipeline/Lit. For a fast setup that works well for most cases:
- Base Map → drag your albedo PNG
- Normal Map → drag your normal PNG
- Metallic → set the slider based on your material (0 for non-metals like concrete/wood/stone, 1 for pure metals)
- Smoothness → drag your roughness map into the Metallic Map slot if you want per-texel roughness, then set Smoothness Source to Alpha Channel. Or just use the Smoothness slider (set to 0 if the surface is rough, 1 if it's smooth).
- Height Map → drag your height PNG, enable Parallax Mapping, adjust Parallax Scale (0.01–0.05)
The slider method loses per-texel roughness/metalness variation, but for many materials — stone, concrete, ground, wood — where those values are relatively uniform, it produces good results quickly. For materials with significant roughness or metalness variation (rusted steel, worn tile, weathered metal), the proper packed-texture approach below is worth the extra effort.
Proper Setup (Packed Texture Method)
URP's Metallic/Smoothness map expects metalness in the R channel and smoothness in the Alpha channel. Since Grix outputs separate metalness and roughness maps, you need to pack them. Use any image editor:
- Open the metalness map
- Add a new alpha channel
- Paste the roughness map into the alpha channel
- Invert the alpha channel (smoothness = 1 - roughness)
- Export as PNG with alpha enabled
In Photoshop: Channel Mixer → paste roughness into Alpha → Image → Adjustments → Invert on the alpha channel only. In GIMP: Colors → Curves on the Alpha channel, drag from bottom-left to top-right to invert. Free tools like Materialize (open source) also automate this packing step if you prefer a dedicated tool.
Import the packed texture with sRGB disabled (it's a data texture), set Texture Type to Default. In the material, drag it into the Metallic Map slot and set Smoothness Source to Albedo Alpha. The material now uses per-texel metalness and smoothness derived from your AI-generated maps.
Unity HDRP Setup — Lit Shader
HDRP's Lit shader uses a Mask Map with four channels packed: R = Metallic, G = Ambient Occlusion, B = Detail Mask, A = Smoothness (1 - Roughness). This is a different pack format from URP.
Creating the Mask Map
In any image editor, create a new image and assemble the channels:
- R channel — paste the metalness map grayscale
- G channel — set to white (255) if you don't have an AO map. Grix's five-map set doesn't include ambient occlusion; for most game dev workflows, baking AO in-engine or leaving it white is acceptable.
- B channel — set to white (255) unless you're using HDRP detail maps
- A channel — paste the roughness map, then invert (smoothness = 1 - roughness)
Export as TGA or PNG with all four channels. Import with sRGB disabled.
HDRP Material Setup
Create a new Material, set shader to HDRP/Lit. In the Surface Inputs section:
- Base Color Map → albedo PNG (sRGB enabled)
- Normal Map → normal PNG (set as Normal map in import settings)
- Mask Map → your packed RGBA texture
- Height Map → height PNG. Enable Displacement Map in the Surface Options. Set Amplitude and Base to control depth scale (start at 0.02–0.05 amplitude in world units).
For tessellation-based displacement in HDRP, enable it in the Surface Options and set the tessellation parameters. HDRP's tessellation is GPU-hardware dependent; for broader compatibility, Pixel Displacement (parallax) works on all hardware.
Tiling and UV Setup
Grix textures tile seamlessly. In Unity, tiling is controlled in the material itself — the Tiling fields in the texture slot (or the main Tiling fields at the top of the material for URP). A tiling value of 2 means the texture repeats twice across the UV space; 4 means four repeats.
For world-space tiling on large terrain or environment meshes, use a custom shader or Shader Graph: add a WorldPosition node and feed it through a divide (scale control) into the texture UV input. This tiles the texture in world space regardless of UV layout, which eliminates visible tiling seams on large meshes like terrain, floors, and walls.
Building a Unity Material Library with Grix
The most efficient approach for a Unity project is to batch-generate your full material set in a dedicated session. For a standard environment level, you might need 20-40 unique tileable materials: concrete variants, brick, dirt, gravel, wood planks, stone, plaster, various metals. Sourcing these from photo libraries takes hours; generating them with Grix takes an afternoon.
At the Light tier ($8/mo), you have enough credits to build a substantial library each month. Organize your Unity project with a consistent folder structure: Assets/Materials/Stone, Assets/Materials/Metal, Assets/Materials/Organic, etc. Name textures consistently — T_ConcreteWeathered_Albedo, T_ConcreteWeathered_Normal — so Unity's asset database stays clean as the project scales.
Once you've set up one URP or HDRP material correctly, duplicate it for each new Grix-generated texture set and swap the texture references. You're not rebuilding the material from scratch each time — the shader wiring stays identical, only the textures change.
Comparing AI Texture Tools for Unity Projects
For Unity developers specifically, the key questions when evaluating any AI texture tool are: does it output real PBR map sets (not just images), and does the albedo avoid baked-in lighting?
Meshy is strong for texturing specific 3D models but is less suited for tileable environment surface materials. Poly.cam's material generator outputs a PBR set and has Blender/Unreal/Unity integration. TexturesFast outputs six maps (adding AO, which Grix lacks) at up to 8K resolution, but at $39/mo entry it's significantly more expensive than Grix's $8/mo — and TexturesFast requires account creation before any generation, while Grix's /try page works without login.
For a full breakdown of all current AI PBR tools, see the 2026 AI PBR texture generator comparison. For Blender and Unreal Engine-specific workflows, see the Blender guide and Unreal Engine guide.
Quick Reference: Unity PBR Import Checklist
For every Grix texture set imported into Unity:
- Albedo: Texture Type = Default, sRGB = on
- Normal: Texture Type = Normal map (required — Unity applies correct conversion)
- Roughness, Metalness, Height: Texture Type = Default, sRGB = off
- URP quick: albedo + normal + sliders for Metallic/Smoothness + height in Parallax
- URP proper: pack Metallic(R)/Smoothness(A) texture, import sRGB off
- HDRP: pack Mask Map (R=Metal, G=AO, B=Detail, A=Smoothness), import sRGB off
The /try page gives three complete generations per day with no account. For a full material library, Grix's paid tiers start at $8/mo. Start testing at grixai.com/try — generate a material, import it into Unity with the checklist above, and confirm the pipeline works before committing to any subscription.