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 Tools Search this Thread Display Modes
  05 May 2012
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 ?


  05 May 2012
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 + --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.

  05 May 2012
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
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
Society of Digital Artists

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

All times are GMT. The time now is 09:02 AM.

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