AI2TEX · DOCUMENTATION

Installation & User Guide

A practical guide to retopologizing an AI-generated Source model, preparing UVs, and baking Diffuse / Normal maps to a Target in 3ds Max

01 · OVERVIEW

What ai2tex does

ai2tex transfers the visible color and, optionally, geometric normal detail from an original Source model - for example a model generated by Hunyuan or Tripo-— to a lower-poly Target model with a usable UV layout. It can also create that Target automatically using the built-in 3ds Max Retopology modifier.

The optional Retopology button copies the Source, applies Autodesk's Retopology modifier to the copy, collapses the result to Editable Poly, and sets the new object as Target. The original Source is not changed. You then create the Target UVs and run the bake.

For baking, ai2tex automates the built-in 3ds Max Projection modifier and Render To Texture workflow. Rays are sent from the Target surface along its normals to find the Source geometry and sample its color.

The workflow is not limited to AI-generated models: the tool can retopologize and transfer maps between compatible models in general.

02 · TRANSFER SCOPE

What is transferred?

Item Transferred? Details
Diffuse / Base Color Yes Can be baked from the Source color texture
Physical Material Base Color Yes Reads Base Color and its bitmap
Standard Material Diffuse Yes The Standard Material is used as the source
Multi/Sub-Object Yes Each supported Standard / Physical sub-material is processed
Normal map Yes Can be baked from Source geometry
Roughness / Metallic / Opacity / Emission / AO No Not supported
Target UV unwrap No The existing Target UV layout is used; no unwrap is created
Geometry Optional The Retopology button creates a new retopologized Target copy; the original Source is not changed
Target material Optional A new Standard Material named <Target>_BakedMat can be assigned
03 · REQUIREMENTS

Before you start

  • 3ds Max 2023 or 2025. These versions were tested. The Retopology button requires Autodesk's Retopology modifier / Retopology Tools.
  • Windows. The script uses Windows paths and explorer.exe.
  • Any renderer. Corona, V-Ray and other renderers can be present; ai2tex temporarily switches to Default Scanline Renderer for the bake and restores the previous renderer.
  • Target UVs. The Target needs an existing UV unwrap without overlapping clusters in the channel you choose. If you use the Retopology button, create the UVs after retopology.
  • Matching placement. Source and Target should occupy the same position, scale and rotation.
04 · INSTALLATION

Two ways to install or run it

The distribution contains two MAXScript files. They can be used directly by dragging them into an open 3ds Max window.

File Purpose
ai2tex_Install.ms Installs silently when dragged into an open 3ds Max window. The macro can then be added to a toolbar or assigned to a hotkey.
ai2tex.ms Runs ai2tex immediately when dragged into an open 3ds Max window.

Install a toolbar button

1
Drag ai2tex_Install.ms into an open 3ds Max window. The macro is stored in usermacros; the installer file itself does not have to remain there.
2
Open Customize → Customize User Interface → Toolbars.
3
In Category, choose ai2tex. The ai2tex action appears in the Action list.
4
Drag the action to a toolbar. You can also create a separate toolbar with New….
5
Alternatively, assign a hotkey on the Keyboard tab using the Main UI group and ai2tex category.
Updating: drag the new ai2tex_Install.ms into Max again. The macro is replaced.
05 · LAUNCH

How to open ai2tex

  1. From the installed macro: click the toolbar button or use its hotkey. A floating ai2tex window opens.
  2. From the script file: use Scripting → Run Script… and select ai2tex.ms, or drag it into Max.

The actual bake starts with Bake. While the bake is running, 3ds Max is busy; do not work in the scene until it finishes.

06 · WORKFLOW

Step-by-step

  1. Import the original generated model into 3ds Max.
  2. Optional - create the Target inside ai2tex: click Pick Source, then click Retopology. ai2tex creates a copy named <Source>_retopo, applies the Retopology modifier, collapses the result to Editable Poly, and sets the copy as Target. The original Source is not changed.
  3. Or use your own retopology workflow: for example Quad Remesher or another method, then click Pick Target and select your retopologized model.
  4. Create the UV unwrap for the Target. The Retopology button does not create UVs.
  5. Align Source and Target: same position, rotation and scale.
  6. Open ai2tex and confirm the Source and Target.
  7. Check the parameters. The defaults are normally sufficient, but UV channel must point to the Target channel containing the unwrap.
  8. Choose the maps to bake: Diffuse, Normal, or Diffuse + Normal.
  9. Click Bake.
  10. After a successful bake, Explorer opens with the generated file(s) selected. If Assign new material to Target is enabled, the Target receives a new Standard Material with the baked maps.
07 · RETOPOLOGY

Built-in 3ds Max Retopology

ai2tex can optionally create a lower-poly Target using Autodesk's built-in Retopology modifier. This means you do not need a third-party retopology plugin just to use the basic ai2tex workflow.

Optional: if you already use Quad Remesher or another retopology solution, skip the Retopology button and pick your own Target.
  1. Pick the original textured Source
  2. Set Target faces and Quad tolerance % if needed
  3. Click Retopology.
  4. ai2tex copies the Source as <Source>_retopo, applies Retopology to the copy, collapses the result to Editable Poly, and sets it as Target
  5. Unwrap the new Target yourself
  6. Continue with the normal baking workflow

The original Source object is not modified

08 · PARAMETERS

Window parameters

Parameter Values Default What it does
Pick SourceAny geometryNoneSelects the original model with the source texture.
Pick TargetAny geometryNoneSelects the retopologized model receiving the bake.
RetopologyButton—Copies the Source as <Source>_retopo, applies the 3ds Max Retopology modifier, collapses the result to Editable Poly, and sets it as Target.
Target facesModifier value—Controls the target face count used by the Retopology modifier.
Quad tolerance %Modifier value—Controls the quad preference/tolerance used by Retopology.
Collapse to Editable PolyAutomaticOnApplies the Retopology result so the generated Target becomes editable geometry.
ClearButton—Clears Source and Target.
Bake mapsdiffuse / normal / diffuse + normaldiffuse mapSelects which maps are baked.
UV channel1–991Target UV channel used for the bake. If the channel has no unwrap, the script reports where an unwrap exists.
Padding px0–6416Extends color beyond UV cluster edges to reduce seams and gaps.
Ray offset≥ 0AutoDistance used when looking from the Target toward the Source. Depends on object size.
AutoButton—Sets a starting Ray offset from object size.
Map size512 / 1024 / 2048 / 4096 / 81922048Square output texture size.
Formatpng / jpg / tgapngOutput file format.
Assign new material to TargetOn / OffOnCreates and assigns a new Standard Material with the baked diffuse map and, when a normal map is baked, places it in the Bump slot.
Normal map: flip green (DirectX / Unreal)On / OffOffFlips the green channel of the normal map for engines that expect the opposite Y direction.
Export package after bakeOn / OffOffExports the Target as FBX and copies the baked textures into a new <target>_package folder. Requires Assign new material to Target.
Source maps: Blur 0.01 + Summed AreaOn / OffOnTemporarily reduces source-map filtering blur during baking.
Debug: ray misses = magentaOn / OffOffColors ray misses magenta for diagnosis.

Why Blur 0.01 + Summed Area?

Standard Bitmap settings commonly use Blur 1.0 and Pyramidal filtering. During a bake this can cause the source texture to be blurred and then blurred again in the resulting map. With this option enabled, ai2tex temporarily uses Blur 0.01 and Summed Area on source maps, then restores the original filtering settings after the bake.

09 · FUNCTIONS

What the script automates

  • Source and Target selection and clearing.
  • Optional Target creation with the built-in 3ds Max Retopology modifier.
  • Automatic Retopology setup and collapse to Editable Poly.
  • Automatic Ray offset calculation based on object size.
  • Target UV-channel validation.
  • Temporary source-map filtering changes, restored afterwards.
  • Temporary conversion of supported Physical / Multi/Sub source materials to Standard for baking, restored afterwards.
  • Temporary switch to Default Scanline Renderer, restored afterwards.
  • Automatic Projection modifier setup on Target and removal after the bake.
  • Render To Texture setup with the selected map size, padding and UV channel.
  • Diffuse and normal map baking, including optional green-channel flip for the normal map.
  • Output naming and saving with the _TexBake suffix.
  • Optional creation and assignment of <Target>_BakedMat.
  • Optional FBX + texture package export after baking.
  • Debug mode for ray misses.
  • Explorer opening, MAXScript Listener path output and success/error messages.
  • Temporary changes are rolled back after a normal completion or handled error.
10 · OUTPUT

Where the baked file is saved

  1. Beside the first Source texture found, if its folder exists.
  2. If Source has no file texture: the current scene folder.
  3. If the scene has not been saved: the 3ds Max Images folder returned by getDir #image.

Diffuse and normal bake files use the _TexBake naming pattern. If the Source has no texture file, the Target name is used instead. The normal map is always saved as PNG.

Export package

When Export package after bake is enabled, ai2tex creates a new folder named <target>_package next to the output and exports the Target as FBX together with copies of the baked textures. If the folder already exists, a number is added to its name.

No overwriting: existing files are never overwritten. Repeated bakes receive _1, _2, and so on.
11 · MATERIALS & FORMATS

Supported source materials

Source material Support
Standard MaterialSupported.
Physical MaterialSupported for Base Color and its map.
Multi/Sub-Object from Standard / PhysicalSupported; each supported sub-material is processed.
Corona / V-Ray / Arnold / Standard Surface and other renderer-specific materialsNot guaranteed. ai2tex does not convert these materials, and Scanline may not read them correctly. The result may be black or gray.

Source map filtering: only the standard 3ds Max BitmapTexture is handled. CoronaBitmap is not modified.

Normal map: the normal map transfers geometric detail from the Source through the projection bake. If the detail exists only in the Source's painted color texture and not in its geometry, the resulting normal map will be nearly flat.

Output formats

PNG is the default and lossless. JPG is baked at quality 100 for the operation. TGA is also supported. For texture accuracy, PNG or TGA is preferable to JPG.

12 · TROUBLESHOOTING

Common baking artifacts

Symptom What to try
Holes / black spotsRay offset is too small. Increase it and bake again.
Color from the back side or neighboring areasRay offset is too large. Reduce it.
Not sure whether black is a ray miss or black materialEnable Debug: ray misses = magenta. Magenta indicates a ray miss; black without magenta points toward a Source material problem.
No UV / “no unwrap in channel N”Use the UV channel where the Target unwrap actually exists.
Texture is empty or grayCheck the Source material type and supported map type.
Ray offset: Auto is only a starting estimate. The README specifies an initial value of approximately 2% of the object's maximum size; the correct final value can require manual adjustment.
13 · LIMITATIONS

Known limitations

  • Diffuse / Base Color and Normal can be baked. Roughness, Metallic, Opacity, Emission and AO are not supported.
  • One Source + one Target at a time. There is no batch processing.
  • Output textures are square.
  • Unsupported renderer-specific Source materials are not converted.
  • Ray offset may need manual adjustment.
  • Result quality depends on Source / Target alignment. Gaps or neighboring colors can appear when the models do not match closely.
  • If Assign new material to Target is enabled, the new material replaces the Target's previous material. Save the previous material or disable this option if it is needed.
  • If 3ds Max crashes during the bake, temporary scene changes may remain: Projection on Target, the temporary Source material and Scanline renderer. They can be restored manually.
  • JPG introduces compression; PNG or TGA is preferable for accurate texture work.
  • A Target without an existing UV unwrap cannot be baked. The Retopology button creates geometry but does not unwrap it.
  • The built-in Retopology workflow requires Autodesk's Retopology modifier / Retopology Tools. If you do not have it, use your own retopology method and pick the resulting Target.
  • MAXScript files should preferably be stored as UTF-8 with BOM if they contain Russian text, otherwise text in Max dialogs may display incorrectly.
  • The script was tested with Physical Material and Corona, and with 3ds Max 2023 and 2025.
14 · UNDER THE HOOD

What happens during a bake

  1. Selection and Target UV channel are checked.
  2. If Retopology was requested, the Source is copied, the Retopology modifier is applied, and the copy is collapsed to Editable Poly and assigned as Target.
  3. Source-map filtering, Source material and renderer are temporarily adjusted.
  4. Projection is added to the Target and connected to the Source with the chosen Ray offset.
  5. Render To Texture is configured with the selected maps, UV channel, padding, map size and output path.
  6. The bake is started.
  7. The created file(s) are checked; the new Target material is created and assigned when enabled.
  8. If package export is enabled, the Target is exported as FBX and the baked textures are copied to the package folder.
  9. Projection is removed and the Source material, renderer, source-map filtering and selection are restored.