Notifications
Clear all

[Closed] Collect and Move Maps to Folder

haha, I feel the same way.

One function to rule them all… I guess I’ll continue writing special-case material fetching code.

Thanks for the response Soulburn. Glad I’m not the only one who has problems with this.

-Colin

I always used the utility “map path” something, can’t remember the name. Usually it worked…

This could be because the displace modifier has two slots, one for a texturemap, and another for a bitmap. The latter won’t collect when using getClassInstances bitmapTexture since it is not a bitmapTexture (just like bitmaps in render effects like the Blur effect).

getClassInstances bitmap doesn’t work either, probably because the word bitmap means different things in mxs (eg. ui control and bitmap constructor). It might also have to do with the fact that Bitmap is a base class like matrix3 or float. Calling getClassInstances on one of these wouldn’t make much sense either.

I’ve been struggling with this in the past as well, and wasn’t able to come up with a generic solution at the time. I used a combination of functions like Neil which worked but was painfully slow with large scenes. Traversing the subanim trees of all objects/effects/etc seems like the most robust way of collecting all bitmaps, but like I said it’s simply way too slow.

Martijn

1 Reply
(@artofsoulburn)
Joined: 11 months ago

Posts: 0

Yup, I’m aware of that, I still get random behavior when only using the texturemap slot, and ignoring the bitmap slot entirely.

Are you sure? Because the Map Mask in the blur render effect brings up a dialog to choose any sort of map, not a file dialog for me to pick a bitmap. Or were you refering to a different slot?

  • Neil

You’re right. This bitmap should be picked up by the getClassInstances call… Even getClassInstances bitmapTexture target:(getEffect 1) (assuming there’s a Blur effect containing a bitmapTexture at the first index) returns no results. An atmospheric effect with a bitmap (for example Fog) does return it’s bitmap with getClassInstances though. Sounds like a bug to me!

Martijn

Yup, there are a lot of them in this chunk of the code I remember having a lot of problems with maxscript not being able to find some bitmaps, or finding the same map again and again. From my recollection, I had a discussion with the developper in charge of maxscript at the time (max 3 or 4 I believe), and he said there wasn’t much he could do about this sort of thing because the material related maxscript calls rely heavily on the SDK, and so it was the material tree code that needed the fix, not maxscript, and they hadn’t had a developper go into that code for quite some time. Maybe that sort of stuff will get a fix if they go in and rip out the system in order to put a schematic material editor in there

  • Neil

wtb integrated Node based material editor please.

PS. anyone write a script so I can link the coordinates for some of my materials? If it was node based, I could just link the coords so if I update the real-world-mapping scale in the bitmap material, it would affect the diffuse,opacity,reflection so I don’t forget to accidently set the coord scale.

I will write one if no-one knows of one.

hi thatoneguy

does this script also update the material slots so they point to the where the files have been copied to?

Just curious if anyone has looked into using atsops in Max 8+ to get/set/replace/remap bitmaps and bitmapstextures? You can easily access all files referenced by the scene and get access to their full paths. So you should be able to easily move the files and then update the path in the ATS. You would just need to filter out file types you don’t want remapped, such as xref files.

Just a thought,
-Eric

Just a quick personal plug:

I wrote a relink bitmaps script that doesn’t provide the exact functionality you’re looking for, but could be an asset at a later time, I know it’s helped me time and again.

The script identifies missing bitmaps the scene and allows the user to recursively search for them in any directory the user specifies and will update the bitmaps accordingly (relinking them in the material editor etc to reflect the new paths to answer your question Soloman)

The script has some features the asset browser and photometric bitmap paths doesn’t include:

  1. Recursive Directory searching
  2. Saveable Quick Paths allowing the user to easily search common texture library directories
  3. Interactive Mode – When on, allows the user to click the missing bitmap to select the object it is assigned to. Double-clicking the missing bitmap will put the object in isolation mode.
  4. It’s fast, I can search my entire maps directory (12,000+ textures) in under 30 seconds

The script is always updated on scriptspot here:

http://www.scriptspot.com/3ds-max/relink-bitmaps

Hope it helps,
Colin

Page 2 / 4