AI2TEX · DOCUMENTATION

Installation & User Guide

A practical guide to transferring Diffuse / Base Color from a Source model to a retopologized Target in 3ds Max.

01 · OVERVIEW

What ai2tex does

ai2tex transfers the visible color from an original Source model — for example a model generated by Hunyuan or Tripo — to a retopologized Target model with a usable UV layout. It bakes the color into a new texture that follows the Target UVs.

Internally, the tool 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 transfer texture between compatible models in general.

02 · TRANSFER SCOPE

What is transferred?

ItemTransferred?Details
Diffuse / Base ColorYesThe only bake map in the current version.
Physical Material Base ColorYesReads Base Color and its bitmap.
Standard Material DiffuseYesThe Standard Material is used as the source.
Multi/Sub-ObjectYesEach supported Standard / Physical sub-material is processed.
Normal / Roughness / Metallic / Opacity / Emission / AONoOnly color is baked.
Target UV unwrapNoThe existing Target UV layout is used; no unwrap is created.
GeometryNoNeither Source nor Target geometry is changed.
Target materialOptionalA new Standard Material named <Target>_BakedMat can be assigned.
03 · REQUIREMENTS

Before you start

  • 3ds Max 2025 or newer. Older versions may work because the underlying calls exist there, but they were not verified.
  • 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.
  • 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. In the renamed release package they are:

FilePurpose
ai2tex_Install.msInstalls a macro that can be placed on a toolbar or assigned to a hotkey.
ai2tex.msRuns the tool directly with Scripting → Run Script.

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. Create a retopologized / optimized version using your preferred method.
  3. Create the UV unwrap for the Target.
  4. Align Source and Target: same position, rotation and scale.
  5. Open ai2tex.
  6. Click Pick Source and select the original textured model.
  7. Click Pick Target and select the retopologized model. Ray offset is calculated automatically when objects are selected.
  8. Check the parameters. The defaults are normally sufficient, but UV channel must point to the Target channel containing the unwrap.
  9. Click Bake.
  10. After a successful bake, Explorer opens with the generated file selected. If Assign new material to Target is enabled, the Target receives a new material with the baked texture.
07 · PARAMETERS

Window parameters

ParameterValuesDefaultWhat it does
Pick SourceAny geometryNoneSelects the original model with the source texture.
Pick TargetAny geometryNoneSelects the retopologized model receiving the bake.
ClearButton—Clears Source and Target.
Bake mapsdiffuse mapdiffuse mapThe current version has one bake-map option.
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 map.
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.

08 · FUNCTIONS

What the script automates

  • Source and Target selection and clearing.
  • 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.
  • Output naming and saving with the _TexBake suffix.
  • Optional creation and assignment of <Target>_BakedMat.
  • 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.
09 · 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.

The filename uses <source texture name>_TexBake.<format>. If the Source has no texture file, the Target name is used instead.

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

Supported source materials

Source materialSupport
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.

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.

11 · TROUBLESHOOTING

Common baking artifacts

SymptomWhat 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.
12 · LIMITATIONS

Known limitations

  • Only Diffuse / Base Color is baked.
  • 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.
  • 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. Installation via macro and operation on versions older than 3ds Max 2025 were not verified.
13 · UNDER THE HOOD

What happens during a bake

  1. Selection and Target UV channel are checked.
  2. Source-map filtering, Source material and renderer are temporarily adjusted.
  3. Projection is added to the Target and connected to the Source with the chosen Ray offset.
  4. Render To Texture is configured with UV channel, padding, map size and output path.
  5. The bake is started.
  6. The created file is checked; the new Target material is created and assigned when enabled.
  7. Projection is removed and the Source material, renderer, source-map filtering and selection are restored.