How do I create a textures atlas of tiled and non tiled textures?

Hello there,

I’m really trying to reduce the amount of draw calls in our project and thought a texture atlas would do the trick.

However I’m really struggling to find a tutorial or direction in how to do this.

Do I make the texture atlas in Photoshop then align the UVs in Max? If so how do I tile just a part of a texture atlas?

Or do I apply my textures and materials and then create the atlas?

Any help would be greatly appreciated

Thanks for reading

Here is an image with the tileable sections marked out. You’re on the right path. You can create your PSD in Photoshop, lay out where you want your tileable sections to be, and then apply it to the mesh in 3ds Max and adjust your UVs accordingly. Pretty easy workflow.

In this second image you can see the sections that horizontally tile and the parts that do not tile and are unique, like the doors and storefront windows. It’s perfectly okay to tile both horizontally and vertically in a single texture or to only tile horizontally or vertically in a single texture. You can actually tile just about any part of either of these textures if you simply set up your geometry and layout UVs to fit a section, duplicate that geometry, snap it to the edge of the current section and weld the vertices up.

2 Likes

Thank you very much for the reply. The part that still puzzles me is how do I layout UVs in 3D max to a select part of the texture. So if I wanted a side of a box to have tiled bricks. I can’t tile the UVs because eventually the other parts of the texture will show. If I unwrap the model and place the side on the part of the texture that has bricks how do I scale the size/amount of tiling of the bricks without the other parts creeping in?

Thank you very much for your time :slight_smile:

Ok, so the way I’ve been doing this is by cropping the placement of the texture in the material editor in Max. This still means I have a LOT of materials (albeit using the same texture) around 30 of them for my environment. I’m wondering if that is defeating the point of using an Atlas but I don’t know how else to do this.

I wouldn’t know how to have a single material with parts of the texture tiled and parts not tiled on a model. :confused:

I really hope someone can help me with this, really need to reduce drawcalls :frowning:

1 Like

You should actually use a UVW Modifier from the stack on the geometry you want to UV. You then use a series of projections to “project” UVs and create them. The most commonly used one for generic purposes is the Planar projection. I would highly suggest using YouTube and watching some free tutorials on creating UVs in 3ds Max and then videos on tiling UVs or tileable textures usage in 3ds Max. In your scenario it’s doable with the brick tiling, whilst the brick is part of a greater texture sheet. This will simply require more geometry cuts to make up for the lost UVW space. You’ll find as you go along that it’s always going to be a tradeoff between geometry and texture/texel space.

Here is a good basics video for creating and modifying UVs.

https://www.youtube.com/watch?v=YTP4AMCJTbY

1 Like

Thanks very much for the replies. I can see that I’m not going to be able to do this. I just can’t get it to work. I was really happy that I figured out the crop texture feature in 3D Max’s material editor but then crushed to see Unity not import those settings so I just ended up with my whole atlas tiled rather than just the part of it I wanted tiled.

I think I’ll have to put up with having tiled materials as separate materials and just keep solid colours and non-tiled materials on the same atlas. You can see attached my atlas texture and the parts that didn’t tile correctly.

2769082--200161--campus_atlas.jpg
2769082--200162--atlas_fail.jpg

1 Like

There are custom shaders which can allow tiling within a texture atlas but these come with their own issues.

My understanding is that James was proposing that you subdivide your mesh to achieve the tiling.

Picture a wall with a brick texture you would like to repeat 8 times horizontally and 6 times vertically at 1m intervals. Instead of creating a single quad of 8x6m and assigning a tiled brick texture, you actually subdivide the wall into 8 quads horizontally and 6 quads vertically and stack the uvs of each of these squares and offset them to fit the bit of the texture which is brick.

You are, thus, trading vertex count for draw calls, which, depending on your hardware could certainly be worth it.

Note: you will have to leave some padding between your different textures in the atlas to minimize “texture bleeding” and try to put similarly coloured tiles next to each other on the atlas. Again, this will make bleeding less noticeable.

And yes, creating different materials will totally defeat the purpose of atlasing as you will incur a new draw call per material.

I know this is an old question but I hope this info helps.

1 Like

IF YOU STILL NEED HELP WITH THIS The way to use ‘part’ of a texture, and get it sized, rotated and where you want it, is a standard Max modifier called: ‘UVW Xform’. You do a ‘mesh select’ select the Element or Faces you want a segment of the texture on, then add a UVW Xform then when you change the sliders, you can see how it MOVES the Texture, Rotates the textures, and if you change the ‘tile’, change the size as well. Everything you need to get a texture, or part of a texture right how and where you wan t it. For a different piece, add another Mesh Select, Select the other piece then align/edit to taste!

This process can be automated… Get a free trial of Texture Packer, (then download and use ‘RunAsDate’ to make the 5 day trial last forever,… ahem…)

Use Texture Packer XML file and Texture output with this script in 3ds Max:
‘Tools_MapToAtlas.ms’: https://www.sendspace.com/file/kw1hqk
Put script in 3dsmax root/scripts/startup

  1. Run the MAX Utility ‘Resource Collector’ and COPY the Textures to a distinct folder (and/or be 100% certain what textures go to a given model, no more no less) -
  2. drag the textures in Texture Packer, adjust overall size,etc. Usually BASIC settingS are enough (at bottom right) Advanced can work or have small problems, (Though, if it puts a *“To Use ProFeatures…” ‘*watermark’ annoyance texture in a single Atlas Slot on the atlas, you can just repair it in Photoshop replace with the correct texture! BUT if you use Basic this never happens.
  3. Select Generic XML output (it will automatically save a eponymous image in same folder, 4)select PNG or JPG etc then PUBLISH Texture Atlas,.

In MAX Load object, select, MAKE SURE IT IS AN EDITABLE POLY NOT EDITABLE MESH!
Make sure ‘Tools_MapToAtlas’ floatingwindow opened with max (may not work in every max, I keep a nice copy of max 2014 it is very non-buggy and glorious. Any FBX im-ort problems with textures, etc. that Max 2018 has, Max 2014 does NOT have problems,. Etc. )
Tools_MapToAtlas may (will…) have trouble with tiled textures, BUT you can make a ‘faux tiled’ image in photoshop, manually tiling the area to fit,
OR render out the object with the tiled surface as perpindicular to the viewport as possible then use the RENDER as a Texture! (
OR You can also use the ‘RENDER TO TEXTURE’ feature in MAX to do this,. Choose Render to texture, render a diffuse, or self illumination etc map,
then in Photoshop, crop the area that fixes the ‘tiles’ into a nice texture and slap onto the same area that used to have tiles!!
I have worked in 3D Studio and Max since rellease 1 for DOS!!! :slight_smile: My Motto is: “There are 100 way do anything in MAX” :slight_smile:
Anyways, turn the tiles into a TEXTURE and apply before Texture Packing (be sure to copy new textures into Texture Packer! (don’t worry, any savings you got from tiling will be returned many times over by turning 10 or 50 materials and Textures, into ONE! :))

Tell Map to Atlas script floater where XML and texture atlas are and it will do all those Mesh Selects and UVW Xform entries by itself in a instant. Turn 50 Multi Sub materials into ONE!
Last step, in a new material, put the Atlas as a Diffuse map and apply to object!

It should have 90%-100% of the textures correct and anything more you can manually edit w/ new Mesh Select and UVW Xform modifier layers!!

I did a small video about using these tools,. I’ll go try to find it…

WOW! My video is the very first Google search result if you search: ‘3DS MAX QUICK TEXTURE ATLAS’

Really? NO ONE OTHER THAN ME HAD DONE ANYTHING ABOUT THIS SINCE, 2015 when I uploaded?? WOW<…

https://www.youtube.com/watch?v=QkWsRpJv_r4

Perhaps you might like to subscribe, I will be uploading massive 3ds max tricks and tips like this in the near future. Tips like:
How to Use a huge amount of Facial Bones like MORPH TARGETS with Weighted Sliders controlling the relative positions of the bones, (one slider for ‘AA’ one for ‘M/B’ one for SMILE , for BLINK etc,…) and that can be controlled in the MAX Track View modifier system open to being recorded with Noise, Sound, Motion Capture! MidiKeyboard!
With my new tool and method, anyone can have AAA level Character Animation and not Have to include 50 copies of their head as Morph Targets or even worse, GIGABYTES of Streaming Point Cache files! THIS IS THE SOLUTION!!
OR How to artistically record layers of animation onto a characters (or anything else…) using the Motion Capture utility and ‘carving’ a performance out of your character in realtime with the audio in the background, it make it possible to record the most believable character animation, avoid the uncanny valley because you can re-record any portion from eyebrows raising / timing to blinking and head turning, this is amazing, amazing and THE FASTEST WAY THERE IS TO GET REAL BELIEVABLE PERFORMANCES OF OF CG CHARACTERS> I have a short video about that too on my channel.