PDA

View Full Version : Is there a script to "instantiate" the common maps ?


Abraham
05-30-2003, 08:26 AM
Hi :) I'm desperatly lookin' for a script that would automatically do the following operation : in a Multi/Sub-object material check if more than one sub material use the same map and if so automatically change the way this map is used to "instance" of the first use (I know, it's maybe hard to understand what I mean :()

Exemple

Multi/sub-object
Material #1
Diffuse Color Map #1 (c:\maps\amap.jpg)
Material #2
Diffuse Color Map #2 (c:\maps\bmap.jpg)
Material #3
Diffuse Color Map #3 (c:\maps\amap.jpg) - this one should be changed in order to use an instanciation of the map used in the first material

This would spare a lot of memory, especially when a map is repeated a lot inside a mesh

If you ever saw such a script plese, give me a link to the place where it can be found :) Thanks in advance

Ab

magicm
05-30-2003, 10:44 AM
Abraham,

In this case, instancing won't lower memory usage, because 3dsmax doesn't load identical bitmaps twice.. so, if amap.jpg is already used in one map, it won't load it again if you assign the same bitmap to another map/material.

A little test with taskmanager opened:

After starting max, memory usage was : 329572
After assigning a bitmap (9mb tga) : 342700
Assigning the bitmap again in a new material : 342696
again : 342720

so only the first bitmap occupies memory:

329572
----------
342700 [ +13128 ]
342696 [ - 4 ]
342720 [ + 24 ]

Abraham
05-30-2003, 10:51 AM
Thanks a lot for the info :) I really thought it did. I made some test and seemed so
Anyway, I would still be very happy to have such a script, would make editing much easier :)

Ab

CGTalk Moderation
01-15-2006, 06:00 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.