My friend who is designing bunch of virtual sets right now asked me to help him out with a problem they’re facing. They construct the look of scene in 3dMax or XSI and then when all textures are baked and object modelled export them from these apps. Next thing they do is importing objects into Viz. Everything’s great so far. But here comes trouble. Do you know what it is? Well viz doesn’t apply textures on imported objects by default. It’s not a huge issue when you have like four or five different objects – you can do this manually. But what if number of different objects reaches 200 or even 500?

Luckily with viz3 comes Viz3 Script and new possibilities to make our lifes easier. :-) So I sat down and had a look on files 3dMax exports. I noticed that textures – which by the way are exported as separate files – have name of the object they belong to in their file name. 3dMax adds prefix and suffix to these names depending on render options set. So here’s what I came up with:

Texturizing Tool

Texturizing Tool Plugin

Texturizing Tool Plugin

We import 3d objects into viz. Next we create new viz folder for textures and import all images into this folder. I wrote a small Scripting Plugin you should put somewhere in your scene tree. I called it Texturizing Tool ( because why not? :-) ). After placing all needed 3d objects (models) in your scene you go to Texturizing Tool Settings. Below is the list of all parameters you can modify:

Texturizing Tool Settings

Texturizing Tool Settings

Texture Path – viz folder containing texture images (without last \ character)
Texture Prefix – texture image prefix
Texture Suffix – texture image suffix
Target – container which subtree will be processed (drag and drop container on this parameter)
Environment settings – EnvironmentType setting
Mapping settings – MapType setting
Quality settings – QualityType setting
Wrap settings – WrapType setting

When everything is set all you have to do is press “Apply textures” button… and you’re done. :-)

How does it work?

This scripting plugin goes through all groups under selected target container and compares its name to one of textures names placed in TexturePath viz folder. If they match – texture is applied to this group with provided parameters.

Texturizing Tool allows you to perform three types of actions:

Apply textures – processes textures and settings within Target‘s subtree
Apply settings only – processes only settings within Target‘s subtree
Clear textures – clears textures within Target‘s subtree

Instalation

Important!
Texturizing Tool is now part of VizToolkit Scripting Library

I put Texturizing Tool in Download section. It’s avaible for all registered users. So if you haven’t done this already, sign up now. It’s free and quick.

  1. Download installer package
  2. Close viz|artist/engine 3.x if it’s running
  3. Run downloaded installer package (select viz3 instalation folder as destination)
  4. When Texturizer Tool is installed it should appear in Built Ins/FP/VizToolkit

Have fun playing with this plugin. Hope you’ll find it usefull.

GHTime Code(s): cf386 f68fb