XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Another new feature in 2010: Scripted texture maps

04-07-2009, 06:36 PM
Scripted texture maps like the Dalmation texturemap from the mxs manual now render in mental ray too. It's not a real new feature, since it basicly was broken, but now it's fixed. So finally everyone can create his own interpretation of a solid color map ;)


04-07-2009, 07:07 PM
Glad to see they finally fixed that.


04-07-2009, 07:19 PM
oh I just setPixels() to a highres bitmap's buffer to create my own maps ;)

04-07-2009, 11:07 PM
I'm not aware of the ability to script texture maps... how does that work? (already tried to look it up in the maxscript reference, and didn't see anything)

04-07-2009, 11:12 PM
Information is found in "Scripted TextureMap Plug-ins" and "How To... Create a Dalmatian TextureMap Plug-in". Like all scripted plugins it allows you to extend an existing Max texturemap and replace the UI. Prior to 2010 mental ray wouldn't render scripted maps, and would generate an error.

My scripted Solid Color Map that found the issue during beta testing 2010:plugin textureMap Solid_Color
name:"Solid Color"
classID:#(0x373cef4d, 0x716b0336)

parameters main rollout:params
scColor type:#color default:(color 255 255 255) ui:color1
on scColor set val do delegate.color1 = val
rollout params "Solid Color Map Parameters"
colorpicker color1 "Color" align:#center fieldwidth:48

04-07-2009, 11:45 PM
Ah, gotcha. Thanks.

04-08-2009, 08:47 AM
oh I just setPixels() to a highres bitmap's buffer to create my own maps ;)

Holy moly, what i just saw here...
Talk about dropping one-liner bombshells...

Thanks, Richard :)

04-08-2009, 09:16 AM
Atm, i tried extending a bitmapTexture class, and save the bitmap buffer to a temp file on disk, which then gets assigned to the bitmaptexture.bitmap .

Is there a better way to pipe the bitmap buffer into the mateditor, without saving it out first?
Not that it's bad, at all, as the rendertimes would be pretty fast, even with large textures (at the expense of the maxscript time taken to generate it, ofc), but i wonder if i'm doing it right...

04-08-2009, 09:35 AM
nah - it seems to impose the restriction that whatever is in the buffer has a file associated with it.. even if modifying the buffer doesn't modify the file on disk.

04-08-2009, 09:44 AM
Eh, for once i didn't miss something glaringly obvious :P
Thanks for taking the time, Richard.

CGTalk Moderation
04-08-2009, 09:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.