PDA

View Full Version : Zbrush Like individual polys UVs in XSI?

 mjkennedy05-06-2008, 06:27 PMHi. Alright, I'm trying to produce a certain kind of texture map. I wont get into the particulars, not necessary. Anyway, I need a way to unwrap an object (of any shape) into a perfect grid. (like the way Zbrush unwraps things, so that every polygon is a equally sized square, and they all fit together into one big square map) I HAVE to get a map like this for what I'm trying to do. Does anyone know of a way to accomplish this in XSI? Thanks so much, Matt
Benr
05-06-2008, 08:57 PM
Probably the closest XSI method is Unique UVs with Individual Polygon Packing. But you won't get squares necessarily. If you have ZBrush you could just do it there and transfer. If you really need it in XSI, it wouldn't be the hardest custom tool to write since the projection method is so straightforward.

comanche
05-06-2008, 09:29 PM
I disagree. It's not possible to get a square map with equally sized square uv polys. You can't unwrap a 3D surface to a continuous 2D surface without stretching. Best is to split the uv mesh into groups and apply a relax modifier.

Andreas

ThE_JacO
05-06-2008, 09:47 PM
I disagree. It's not possible to get a square map with equally sized square uv polys. You can't unwrap a 3D surface to a continuous 2D surface without stretching. Best is to split the uv mesh into groups and apply a relax modifier.

Andreas

You're thinking of something different. What people mention in this thread isn't a perfectly square packing of the whole unwrapped surface (which btw IS possible, but only for some topological configurations).

What Zbrush does is the same of XSI's polypacking, except Zbrush also makes sure the polys, instead of being laid out like their 3Dworld surface, are also stretched to meet their bounding rectangle and places them based on a discrete space of the same number of subdivisions of the maps you're using (or a multiple or a fraction of it), so that they all pick up pixel edges and don't cross diagonally over any, this helps preventing some aliasing issues and reduces the need for pixel bleeding.

In XSI there isn't an unwrap that does the same exact thing, but unique UVs has a polypack operator that can be tweaked into giving similar results.

Once you have that in place it's trivial to script something that will walk every polygon and arrange its samples to meet their bounding rectangle, and that will do exactly what zbrush does.

@OP
please next time name your thread with something meaningful, "is this possible" isn't very useful to people to know what they're about to read, and even less useful for search engine relevance. I renamed it for you.

mjkennedy
05-07-2008, 12:14 PM
@OP
please next time name your thread with something meaningful, "is this possible" isn't very useful to people to know what they're about to read, and even less useful for search engine relevance. I renamed it for you.

Thank you, and good point. Duly noted.

But yeah, perhaps I should be a little more specific here in my needs.

My employer has asked me to do some reseach on Second Life (for use in simulation). In any case, I'm exploring the possibility of exporting XSI models into Second Life.

The only way I now how to do this is to use a special type of texture map. There's a tutorial demostrating the process in Blender here:

http://iramblesorry.blogspot.com/2007/05/how-i-learned-to-stop-worrying-and-love_28.html

Problem is, I need to find a way to produce texture UVs in a perfect grid in order for this method to work.

I'm open to using Blender as a middle man, and unwrapping in that. However, I can't get the unwrap to work properly in Blender either.

Thanks for your help so far... further help would also be greatly appreciated! ;)

Matt

ThE_JacO
05-07-2008, 02:05 PM
so you want every single poly to turn into a square, all of the same size regardless of their world surface?
that also requires the polycount to be the square of an integer if you need the whole texture space filled.
are all your polys guaranteed to be quads? if they aren't is the only other type triangles?
if you have triangles how do you want them packed? in twos to form a square or each taking it's own bounding square?
are there any particular requisites for the packing order, like ogl style tristripping, or can the stripping be in any order?

what you're asking for might be incredibly trivial to script (to the point it would take maybe 30m to whip something together in python), but it depends from the requisites.
all quads and no stripping is a triviality. All kind of Npolys and a pre-determined stripping and packing and it becomes a lot less trivial :)

mjkennedy
05-07-2008, 04:59 PM
so you want every single poly to turn into a square, all of the same size regardless of their world surface?
that also requires the polycount to be the square of an integer if you need the whole texture space filled.
are all your polys guaranteed to be quads? if they aren't is the only other type triangles?
if you have triangles how do you want them packed? in twos to form a square or each taking it's own bounding square?
are there any particular requisites for the packing order, like ogl style tristripping, or can the stripping be in any order?

what you're asking for might be incredibly trivial to script (to the point it would take maybe 30m to whip something together in python), but it depends from the requisites.
all quads and no stripping is a triviality. All kind of Npolys and a pre-determined stripping and packing and it becomes a lot less trivial :)

Well, I could model things with ALL quads, and with a square integer. That's no problem. On the other hand, what do you mean by stripping?

You see, I found a way to create a grid like unwrap in Blender, but it just takes every polygon and throws them together at random. So when I produce a texture from it, it's just a bunch of blocks, like a mosaic, and that doesn't work.

I need to produce a texture like the one in the tutorial I linked, where all the colors flow nicely thogether. I assume this is only possible when the polygons are arranged in a way where adjacent ploygons are next to each other.

All the same, I do have a co-worker who knows Python scripting (I don't), so maybe with a little more of your help, I could give him enough info for him to write me soemthing! :cool:

ThE_JacO
05-07-2008, 05:26 PM
Stripping is used to describe an operation where you isolate triangles, polys etc and strip them then lay them out a certain way and in a certain order in a different space. Triangle stripping for openGL and other similar things have precise schemas in how they work, and sometimes you might want to emulate it when you produce assets.

As for all the colours flowing nicely, that will only happen in contiguous areas, but you will still have seams all over the place where things won't be contiguous, and packing the polys in that way it might work fine for something topologically simple like a revolution or an extrusion where there are no singularities, as every point always connects four edges, but on anything else it won't be as nice.

Going by the blender example you posted, XSI can already do that by using an unwrap from corners, the only thing that's not guaranteed is that all polys will be square, but the layout will be like that, and at point again a script can sort it back into a grid layout easily.

You mentioned second life, but I have no idea what it is and what prerequisites it has. A link or an explanation would help.

josh3light
05-07-2008, 05:57 PM
The only way I know exactly how to do this in in Houdini, but it can do precisely what you want to do. It takes a few steps, but... it works.

The workflow would be this:

Make sure your original quad mesh (or mesh piece) is created with point numbers that are ordered consecutively from left to right and top to bottom. (There are a few ways to do this beyond the scope of this explanation)

Create a nurbs grid with the exact resolution (number of points in rows and columns) as your mesh. Set a UV texture node to be rows and columns. (this creates the evenly spaced uv coordinates you want) Use a point operator to move the vertices of the nurbs grid to your polygon mesh. Use an attribute transfer to transfer the uvs , or alternatively convert the nurbs grid to polygons and use that instead of your original mesh.

This can be done in the escape version... I don't know if its out of the budget for your project though.

CGTalk Moderation
05-07-2008, 05:57 PM
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.