I haven't been able to figure out a simpler method for doing this, and it is driving me bananas.... So here is the situation. I am given a scene with some decal cards for grass... easy enough. Except... there are lots, and lots of them. All different shapes and amount of tris but essentially the same sizes overall.
Here is the problem. The cards were not UV'ed when they were laid out. This is specifically why I always UV my things before I place them in the scene, but that was not up to me. Anyways, I need to UV these cards, and the only logical way I can think of to do this is stack the cards in UV space so I can have most, if not all of them, share the same texture. Does anyone know of a simpler way that I can unwrap these suckers (spread all over the place) so that laying them out to share the same UV space wont be as time consuming as shifting each one around and having to hand move every UV on top of each other.
Maybe I am going about this wrong. Any suggestions would be hugely appreciated.
Replies
Select them all, apply UVWMap (not UnwrapUVW), set it face and call it a day.
seriously though. That would work if all the grass object were ONE quad. The face mapping applies to each individual face, so that one might not work. There are other way of doing it in max though...
In maya, cant you select them all and do an auto unwrap? Its been a while since I used maya... Or will that acutally lay them out next to each other rather than on top?
Without seeing what you've got going on, I might suggest Based on Camera, then snapping all the lower border uverts to each other, then to the grid, and try a UV Unwrap on the remainder.
They are radically rotated in different angles so a camera based projection isn't going to work.
ctrl+righclick->layout uvs
or
shift+right click->layout uvs
-- the op box lets you set padding tex size etc- then export from the uv ed a snapshot (old school before psd networks)
---nevermind just saw that you're wanting a fast "stack" same thing just set layout uvs to do it individually and itll arrange the stacks a 0-1 individually and stack them one on top of the other.
As far as the fast unwrap, planar map set to "Best Plane" might work
$objs = `ls -sl -fl`;
for ($obj in $objs)
{
select $obj;
ConvertSelectionToFaces;
$buff = `ls -sl -fl`;
polyProjection -ch 1 -type Planar -ibd on -kir -md b $buff;
}
select $objs;
TextureViewWindow;
If they are all pointed in the same "up" direction in world space is there a way to orient them all the same way in the UV editor via a batch command like you posted.. or does that one already do it?
For example.. the bottom edge of each decal card being the bottom most edge in the UV editor.
Does that make sense?
Since they have different face counts and face mapping would map each face, you could remove the defined edges from all but the boarders making them all n-gons or single faces. There are scripts that help with this and ways to remove the longest edges. I can get into specifics if you want to.
Neil Blevins has a handy little object replacement script. It's not to hard to get an objects placement/alignment and move/align a new object to it through script. Like leechdemon alluded to this could be a better way to rather than trying to unwrap them all. If you have 3-4 variations you could add some simple checks to push the right variation out to the right spot or just do it one variation at a time.
Lastly if you're stuck and you need to just flat out re-place them manually, Maya has some object painter scripts that are just as good as SoulBurns object painter script.