how to add 6000 Texture to 6000 objects

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 05 May 2012   #1
how to add 6000 Texture to 6000 objects

I have 6000 textures for 6000 Planes as you can see in the picture, And I need a way that I can apply the textures to the planes automatically and not manually (because it take a lot of time to add manually textures to the material and then to the object itself)
is there an easy way to do that in 3ds max 2009 ?

thanks

shady
 
Old 05 May 2012   #2
It wouldn't be too difficult at all with scripting. A caveat that you name the objects the same as your textures will make the script simpler (Though isn't really necessary). It would go something like...

TexFolder = "C:\\project\\textures\\" --this is the folder where your textures are. The double-slashes are necessary. 
for a in selection do --for every selected object, do...
	(
		texturefilepath = (TexFolder + a.name) --defines the location of the texture based upon the given directory above + the object name
		newmap = bitmaptexture filename:texturefilepath --creates a bitmap to place into the new material
		newmaterial = standard diffusemap:newmap --creates a new material and assigns the above bitmap to the diffuse slot
		a.material = newmaterial --assigns the material to the object
	)--loops around and does the same for all the objects in the scene


Let me know if that works. You'll need the file extension in the name for that to work - ie texturemap0001.jpg as the object name. It also relies on all of the textures being location in the folder defined in the first line of the script - you'll need to change that so that it fits for your location. Again, you WILL need the double slashes.
__________________

 
Old 05 May 2012   #3
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:13 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.