Textmap coordonate default mode "Spherical" for "screen" mode with a MaxScript

Hi everybody !
I want to change the default mode "Spherical" for "screen" mode with a MaxScript !
it is possible ?
Where can I find a code, for doing that?
I'm trying with this code, but it d'ont work!

Code:
envmap = bitmapTexture filename:bimppath
envmap.coords.mappingType = 1
envmap.coords.mapping = 3

anybody know a good thread about it ?
tank's

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
baronstudio's picture

Solved

Hi barigazy
thanks' for your answer.
I got a answer from cgsociety forum
http://forums.cgsociety.org/showthread.php?t=1132247

Normally it working... but I use the Max 2014 ;)

Actually it working went I add the TextMap on Material slot in Material editor with MaxSript!
like this:
(
bimppath = @"C:\sample.png"
envmap = bitmapTexture filename:bimppath
envmap.coords.mappingType = 1
envmap.coords.mapping = 3

(meditMaterials[1]).diffusemap = envmap
meditMaterials[2] = envmap
)

barigazy's picture

...

I not know which version of max U use but

envmap = bitmapTexture filename:bimppath
-- this will change maping type to "Environment" mode
-- and by default set mapping to first one (Spherical...)
envmap.coords.mappingType = 2
-- BTW this dropdown list is zero-based which means
envmap.coords.mapping = 0 -- Spherical Environment
envmap.coords.mapping = 1 -- Cylindrical Environment
envmap.coords.mapping = 2 -- Shrink-wrap Environment
envmap.coords.mapping = 3 -- Screen

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.