PDA

View Full Version : Texture lookup in 3ds Max 2010


ruediger
April 15th, 2009, 20:54
Hi all,

since there have been several questions of how to use different map channels from 3ds Max along with mental mill shaders, I've created a workflow example that should help everybody trying to get this to work:

Whenever you create a texture lookup shader in mental mill, you need to feed its UV input with a state_texture_coordinate_2d node. This is currently necessary to help 3ds Max to connect the Map Channels to the shader's texture coordinates.

I recommend creating a tool Phenomenon which you store under your "commonly used" folder and use this node for all your future shader projects:


Create a "Texture_lookup_2d" node.
From the "state" folder create a "State_texture_coordinate_2d" node and connect it to the input of the texture lookup.
Select the 2 nodes, right click in the Graph View and select "Create new Phenomenon from selection"
Call this Phenomenon "max_texture_lookup_2d"
Open the Phenomenon by clicking the right box on the blue bar.
Right click on the parameter "texture" of the Texture_lookup_2d node and select "Add texture to max_texture_lookup_2d".
Right click on the parameter "texture_space" of the "State_texture_coordinate_2d" node and add the parameter to the interface as well.
Now you can minimize your Phenomenon again.
Right-click the blue bar. From the popup menu choose "Add to > commonly used > <Add here>"


Now you've created and added you Texture lookup Phenomenon. :cool:

All you need to do now, is to expose these interface parameters to the interface of the Phenomenon that finally wraps it to gain access to its parameters in 3ds max too. See the example that comes with this post.

Now to the UV mapping part in 3ds Max:

Assigning the UV Map Channels is simple, but might be confusing the first time, so here is how it works:
When you load your shader in 3ds Max, you see that in the material editor there is a section called "Max_Texture_Map_channel". Here you assign your map Channels from 3ds Max to the UV input of your shader. Currently there are 4 slots available, texture_space0 up to texture_space3. You can assign to any of those spaces any Map Channel from 3ds Max, also values larger than 3 :wink:
If you exposed the texture_space parameter to your Phenomenon, you can select which texture space it will use to make the lookup. The values 0 to 3 correspond to the texture_space# variables which themselves can have any Map Channel assigned.

Not that trivial, but not that difficult either ;)

And since image says more than 1000 words, see the attached files, they should make the written text much clearer...
The screenshot shows the mental mill shader from the attachment of this post in 3ds Max: I assigned Map Channel 1 to texture_space0 and Map Channel 2 to texture_space1. That way the bumpmap uses a different texture space.

I hope that made everything clear. If not, feel free to post your questions here!

Best Regards,
Ruediger