Hello everyone.
I've been searching for hours and got no result so I tought about asking here.
Im in need of a script that could save me tons of hours, what Im looking for is a 3ds max script that creates a texture atlas based on single objects with single texturas, per example:
Lets say I have 13 3D objects with his respective UVs mapped into single 0-1 uvs.
2 textures of 512, 7 textures of 256 and 4 textures of 128
And I would like to create a texture atlas on 3ds max that should look like this (the order of the textures dosnt matter):
The script itself should move the UV's and Texture data (assigned a standard material with a bitmap on it) of each single object that I have selected in the scene to create a similar atlas described on the picture.
--
The best I could find was this script that pretty much does everything.
http://puu.sh/bNtAt/ab34749ad4.ms (Credits to IO on this thread:
http://forums.cgsociety.org/showthread.php?t=1053652)
But there are some things that dosnt work the way I want:
It only accepts textured items that share the same resolution (4x512, 4x256, 16x256 and so on) and I need different resolutions.
And it collapses the meshes in a single big mesh (would be amazing if it just moved uvs and create the texture atlas)
The thing is, can someone help me modify that script to my needs or knows a program / script that would work well for my project?
Thank you so much!! <333
Replies
If you use Texture Packer free version to output a Generic XML and atlas, you can use my script to adjust the UV's of the selected objects to match the atlas.
https://www.dropbox.com/s/mi74dqppaos34up/Tools_MapToAtlas.ms?dl=0
Then manually apply a material with your atlas texture to all the objects.
It dosnt seem to work or Im doing something wrong, can you please do a mini-tut?
Thanks!
1. Create an atlas in texture packer with GenericXML selected in the Data Format.
2. Run the script, select the XML file. Select one or more objects with individual textures applied to the model (not the atlas texture). Run the script by pressing Map Selected to Atlas.
3. The textures on the object will look messed up. The script finds the texture names applied in the XML file and moves the UVs to that location using UVW Xform modifiers. If you have multiple textures you'll see multiple UVW Xform modifiers. At the top of the stack will be an Edit Poly that gives everything one material ID. You can press Un-Map to remove all the modifiers the script added.
4. Create and apply a new material with the atlas as a texture and apply it to your object.
We also have more texture atlas tutorials and links here on the wiki.
http://wiki.polycount.com/wiki/Texture_atlas
It works perfectly.
I don't need it simpler (What could make it simpler than create the atlas and press 2 buttons?)
Thanks thanks thanks thanks thanks! we need this on the wiki!
HEY MONSTER!
This looks like a truly life changing tool for MAX Artists. I have worked in 3D Studio since release 1 for DOS and only one of the old greats like Peter Watje could make something this helpful!
I did have some trouble with it though, It ran without complaint, I applied the material, and some things are the same but other are drastically different,.. I will post Before and ASfter pics, I only followed ther steps you laid out above, no changes..:
http://s9.postimg.org/r97kz16tb/BEFORE.jpg
http://s9.postimg.org/5o7k8jge7/AFTER.jpg
I hope you can help me, I am at the end of a year long odyssey to try to find a simple way to unwrap a character into a nice simple Texture Atlas.with minimal accessories and use it in UNITY.. Seems almost iunpossible from my pov after trying every tool, utility, script and routine I can find out there and they all fail. Yours has come the sloest to being perfectly useful by far so I have great hope,. PLEASE reply,
Second question is about Opacity channel The script isn't placing the Diffuse yet I know but after that is figured out, How would I apply the opacity map? It is in the Atlas, but in a different spot... Wouldn't this script make the opac misaligned or?? How would I deal with re-applying opac's? Maybe I could offset the mapping for that bitmap in MAX's material editor, but I doubt UNITY would know to accept that.. I had already invented this PEREFECT Atlas making scheme I would pull all may materials into photoshop and 'pack' them together manually, and then all I had to do was apply that Bitmap with MAX Material Bitmap 'CROPPING' to that Same Map in a MultiMaterial, so that different parts of the same map were cropped to be appropriate for each material id,
BUT Unity didn't accept 'cropped' textures in materials so it never worked out that way,. This has been to biggest bear of my career and I have worked in 3D Studio since release 1 for DOS!
Thanks again for the amazing tool, If I can figure out what I'm inputting that it doesn't like, (or?) this would be a huge deal for my work,. :~)
Bravo..
Never mind!, the second time I tried it, (being more careful to do a resource collection first) it seemed much happier this time. I guess I can make a separate littler map just for opacity, it save me a lot of big maps a little grayscale extra few is just fine! Maybe I could use your routine to 'trick' the program into making a Texture atlas of all the OPACITY maps as a separate atlas (in grayscale light format) I could make material copies of the original but with all the opac in the diffuse slot temporarily, then make an atlas with packer then replace with your script, but apply the map to the opac channel with the first atlas put into diffuse, I guess I could even copy the placements in Photoshop and make the second atlas myself, and wouldn't have to run the script twice,. hmmm. lots of possibilities!! Best Atlas Script on Earth!
Seigisato is working on a cool looking Atlas generator as well. Maya, unfortunately.
Max lacks of a flawless atlasing tool (among other things...)
Dvonio sent me a copy and I made another link here:
https://www.sendspace.com/file/0wd6b7
I wonder what happened at the DROPBOX site? I have never once had luck with DropBox, either it wants a user name and password or it crashes my computer... Never just 'works' like Sendspace...
Sorry for the trouble. The link works fine for myself. I verified the SendSpace link you posted is the same version.
BTW, You may want to check if your host file is modified and is sending dropbox.com to other websites.
also: make and apply a material by hand using the Texture Packer Texture Altas output? ,.. (last step there is a doozy v:) All the Script does is SHIFT the UVW''s to coordinate with the corresponding texture's position in the Packed Atlas ... Then when you do use that new Atlas texture, it should all align!
I just want to say THANK YOU for this script ! Works perfectly for our case.
@SiftoN
maybe this will help with tiled textures: http://www.scriptspot.com/3ds-max/scripts/texture-atlas-generator . From what I read it's a bit hard to use though.