ZBrushCentral

how to preserve object surfaces from Lightwave?

Ok, I’ve looked into Zwave and searched the forum, but can’t find this addressed anywhere:

How do I preserve my carefully made object surfaces, created in lightwave, when I send the model through ZBrush? It comes back with DefaultMat being the only surface! I’ve tried assigning UV maps to the surfaces in LW, to try to get the obj format to keep the surfaces, but it doesn’t work. It takes my various UV maps and turns them into one map for the whole figure, and the surfaces assigned in LW are wiped out.

This is a big issue for me. I know how to work with just the image map, but needing to work with the model itself in ZBrush, and preserve the surface groups makes this a problem. Am I missing something?

thanks for any help,
NJ

I assume that LightWave’s surface groups are different from object groups, and are also known as material zones? If so, then one option is to load the model into UVMapper after exporting from LightWave. There’s an option there to export the material zones. Later, after exporting the model from ZBrush again, you can reapply the material zones to the model.

I don’t know if “surfaces” are different from “object groups”. In Lightwave, it is a way of selecting polygons and giving that group of polys a name, which is used for assigning surfaces and many other things. All I know is, when I get the object bac from ZBrush, they’re all gone, and just one overall surface called DefaultMat is left. How would I check whether they made it into ZBrush from Lightwave?

I’ll try UVmapper and see if that works.

thanks!
NJ

Aurick, please help – i need a bit more information on how
to use UV mapper to preserve my surface goup names from Lightwave. I’ve tried your suggestion, I loaded my obj from Lightwave into UVMapper, and saved the model with “export materials” checked. Then loaded that model into ZBrush. In ZBrush, of course, i have no idea how to access that material zone info, or if i need to. After working with the model a bit, I exported an obj, and loaded it into UVmapper.

Ok, so now what? I needed to take these “material zones” that i used UVM to preserve on the way into ZB. But how do I get this from ZB into Lightwave?

Please explain. Thanks,
NJ

Okay, what you’re describing is a bit different from material zones, and so UVMapper may not do the job. What you’re describing is essentially polygon selections. It’s not a true object group; it’s just a selection of a portion of the object’s surface.

That info may not even export from LightWave. IF it does, then you would load the model from LightWave into UVMapper and do File>Export UV’s. After working with the model in ZBrush you would load it back into UVMapper and do File>Import UV’s. At this point you load your previously saved UV file. You should now be able to File>Save the model and import it back into LightWave.

What about Tools>Polygroups>Uv Groups?
If I assign a UV map (in LW) to each of my polygon groups, this function seems to promise to utilze these groups in ZB. Which might mean I can use them and export texture for them, which would be excellent.

.Uv-Groups.jpg

The problem is, it doesn’t seem to work. At least, I press the button and nothing happens. Do I need to do something texture-wise beforehand to get this to work? I click on frame and there are not different color groups, as the help file said there should be. Also, telling me to “shift ctl click” to show a group is greek to me, as this is what you use to hide polys outside the dragged rectangle…

I am hopelessly confused…

NJ

Texture Regions are defined as UV ranges in whole numbers. For example, one texture region can be values 0,0 to 1,1. The next 1,0 to 2,1. etc. Each region would have a separate map.

You can then use the Tool>Polygroups>Uv Groups button to automatically assign a separate group in ZBrush for each UV region.

ZBrush will not display all textures at one time (since ZBrush will only display one texture per model). But you can use partial mesh visibility to hide the groups you aren’t working on. Simply Ctrl+Shift+Click on the group that you wish to work with.

This grouping will export with the model when you export the model again. It is NOT the same as surface selection groups – each group that ZBrush assigns using this method will be a discreet object group in LightWave.

Hope that makes sense. :slight_smile:

Incidentally, have you read the FAQ>Texturing section of ZBC?

Yes I have read the FAQ section. It says the following:

“For rendering engines that support it, a single model can have dozens of textures without any overlapping coordinates. This kind of mapping has an added benefit in ZBrush in that you can use it to assign polygroups to make life easier for texturing and sculpting. Press Tool>Polygroups>Uv Groups, and ZBrush will assign each region to its own mesh group.”

Please also refer to the help info I screen-capped above about “The Uv Texture to Groups button” (so I wouldn’t have to retype it here)

I would very much like to do this as described!

I have a test object, to try out this process, where I have very carefully assigned different UV maps to different (non-overlapping) surface groups in Lightwave, and exported the obj. According to these instructions, I should be able to press “the Uv Texture to Groups button”, and it should “assign UV groups correctly only if each of the model’s texture has been assigned a separate UV space by the original program”. Right?

However, the following does not occur:
“If pressing this button results in multiple colored groups in the polymesh, this is the case and no further grouping is necessary”

Also, the instructions go on to say “It is simple to view and modify one texture at a time by Shift-Ctrl_clicking each group and selecting its texture.”

This would be great!

Pressing UV check in ZBrush, I can see that my model shows a red mess. And when I load the same obj I saved in LW back into LW, I can see that the separate UV maps have not been preserved, even though I have assigned them to a material channel for each surface in LW (which seems to work for a single map).

Conclusion: It seems that the Lightwave export obj process piles all the separate UVs onto one UVmap, and this is the problem. I don’t know if this is a limitation of the obj format, or a LW issue.

Does anyone have a workaround for this? If so, you deserve a shiny gold medal from Lightwave users…

:frowning:
NJ

You should not use multiple UV maps occupying the same UV space (0,0 to 1,1). Instead assign each UV map a specific UV range. 0,0 to 1,1 for one UV map, 1,0 to 2,1 for the next UV map and so on.

However, I cannot remember if lightwave supports UV coordinates outside the 0,0 - 1,1 range.

There is another way to assign groups for use in Zbrush. By simply applying surfaces in Lightwave you can define the groups. After you export from Lightwave open the .obj in a text editor. Search for each instance of usemtl and replace it with the letter g. For example:

usemtl TankBody
f 1//1 20//20 3//3 2//2
f 20//20 23//23 4//4 3//3
f 2//2 3//3 6//6 5//5

turns into:

g TankBody
f 1//1 20//20 3//3 2//2
f 20//20 23//23 4//4 3//3
f 2//2 3//3 6//6 5//5

An editor with a “Find and Replace” function will speed things up nicely.

At some time I will post a Zplugin that will preprocess the .obj before importing into Zbrush.

wow, thanks for the tip! (notepad to the rescue)

Interesting, because when you load the notepad-fixed obj back into Lightwave, the groupings come back as PARTS rather than surfaces. Meaning, if one was to convert surfaces to parts in LW, they would translate to ZBrush… Then back in LW later, one would have to convert parts to surfaces, which is more cumbersome. Actually, a plugin to do both without having to go piece by piece would be excellent.

So I loaded the new object into ZBrush, and i THINK I’m seeing different colors on the groups in frames mode (they’re mighty close colors)…but is there a way to get a list of groups in ZBrush, or to show/hide surfaces by groups? or colors, or SOMETHING? Even on a simple object, it’s virtually impossible to show/hide just the polys you want with the shift-ctrl-drag method. I’ve read the reference to “shift-ctrl-click to select poly groups”, but i must be missing something because all that does for me is to “show all”.

I’ve spent a LOT of time looking for answers on this, and getting mighty frustrated…sure wish there was a manual to look these things up. I have the practical guide, but it’s a pain and very time-consuming to have to go through miles of tutorials to get simple information, which is not in FAQs or the Help file either.

thanks for your advice,
NJ

Ctrl+Shiftl+Click on the polygon belonging to the group you wish to isolate. This will hide all other groups. Ctrl+Shift+Click an empty part of the canvas to view all groups again.

The colors assigned to Polygroups are random, you might have been unlucky and gotten very similar colors or the Polyfill Color Opacity is set too low (Preferences > Draw > Pfill).

Regarding exporting back to Lightwave I noticed that as well. One option would be to let the plugin add group definitions to the .obj before importing in to Zbrush and changing the groups to material definitions when exporting from Zbrush. Does Lightwave convert material definitions to surfaces when importing an .obj?

There is no way to select Polygroups from a list. When the SDK is released I am sure it will be possible through Zscripting though.

Check the Zbrush Help, Modeling 3D Object > Partial Mesh Visibility, and this Hiding/Showing thread for further info on selecting Polygroups.

THANKS!
for telling me WHERE to “Ctrl+Shiftl+Click”. Actually, I tried that before, but it seems you to have to click on a POINT rather than a polygon, or it does nothing. Eureka.

“Does Lightwave convert material definitions to surfaces when importing an .obj?”.
As far as I have been able to tell, everything out of ZBrush comes into LW as one “DefaultMat” surface, unfortunately. And when I query a polygon inLW, material definition does not seem to come through in any other way, either.

I will check out that corner of the helpfile, thanks. But one more question, since you are good at understanding what I’m asking. :slight_smile: When I isolate my group surface, is it possible to make a UVmap for JUST that surface. From what I’ve read, it’s supposed to be possible, but when I try, ZB makes a UV for the whole object. If you could point me to where that is explained (like, how to do it), it would be very helpful.

thanks again!
NJ

I am able to get ZBrush to recognize LightWave assigned polygroups from Modeler by first creating and naming surfaces with the “q” key, then creating a unique UV map for each surface named, and then assigning to each surface the corresponding uv map via the surface editor in modeler.
One hitch I’ve found though is that you cant paint an RGB map on a subdivided object with an imported UV map in projection master. Crashes every time!

Zoid, I did exactly that, and the separate UV maps came into ZBrush as one UV map, with all my separate ones layered, overlapping, on it. It has only worked for me when I saved one UV map out of LW.

Can you tell me what you did, exactly, (and in what order)after importing the LW object into ZBrush?

thanks,
NJ

First of all, I feel your pain because I have been struggling with this for a while myself.

Your question has many aspects to it, and I havent conquered the whole process yet myself, but at this point I am able to get ZBrush to recognize the different imported surface zones to make use of the poly group selection method which is great for modeling, and makes fantastic displacement maps which are as you experienced, exported as one whole map, but as I said, I am also having some problems with image texture maps and imported UVs. Right now I’m not sure if this PolyGrouping feature in ZBrush was intended for rexporting separately textured UV maps. I hope I’m wrong though.

How are you making your UV maps, and are you using the surface editor in Modeler to assign them before exporting your object?

When I isolate my group surface, is it possible to make a UVmap for JUST that surface.
No, I don’t think so. For general purposes each tool can only have 1 UV map and that map is in the 0,0 to 1,1 UV range. The Multi Displacement zplugin can use multiple UV tiles but that is it. For now at least.

I could not find a tutorial I seem to remember seeing some time ago so I put together the info I gathered from it (or at least what I can remember:)). You probably know most of this but if you have more questions we should both be on the same page.

[attach=9081]UVtiles.gif[/attach]

Did you also try exporting an .obj from Lightwave and then immediately importing it back into to Lightwave? Are the material definitions in the .obj (usemtl) converted to surfaces in Lightwave?

Attachments

UVtiles.gif

Thanks TVeyes and Zoid for your contributions to this…I’m scratchin my head here as I do more experiments, this is wierd but maybe with some community think we can figure it out.

TV, I’m not sure what you mean by your “UV tiles” in your example, and what app you’re using, but it’s maybe the same thing I’m doing in Lightwave. perhaps these pics will tell.

What I’m doing here is, as Zoid also describes,

  1. selecting surfaces and naming them in LW
  2. making a UV map per surface with “make UVs” from selected surface, in LW.
  3. and assigning that UV map to the corresponding surface in LW

The pic shows just one UV and its corresponding surface, but there is one like it for each of the surfaces you can see listed in the surface editor list.

UV_illust.jpg

So I’m not sure what this means, practically, but maybe some clues are here. Especially if you know how to read obj files. Since you seem to know something about this, I’m zipping up both the obj file and the before and after lwo files for the test object – maybe you can see something in there that makes sense. Of course running the obj through ZBrush and seeing what that does to it would be useful as well.

I’m thinking of purchasing Ultimate Unwrap 3D, as it seems to have a lot of options and opens both lwo and obj files directly. No way to tell if it will help from the demo as it is save-disabled. Anyone know if this is a good program for these issues?

What I would really like to be able to do is to use ZB’s GUV tile UVs for displacement maps, and more comprehensible UVs from using the UV tools in Lightwave, for the texture mapping – so I can do some work on the ZB textures I make for them in Photoshop or Painter. I don’t know if you can have a different UV map for displacements and textures (that cover the same polys)-- it seems you can’t do that with textures alone. I’m determined to find a workflow for all this that’s not TOO painful…

thanks much,
NJ

Attachments

UV_illust_after.jpg

UV_illust_allsides.jpg

Objects.zip (10.8 KB)

Hi Illusory,

You seem to be as determined to figure this out as I am. I want to use ZBrush and Lightwave together in the same way as you describe and a solution to this does seem crackable. Your uploaded object appears to be mapped and grouped in the same way that I am doing, but I didnt see any UV groups in ZBrush when I loaded it.
I then took your ZBrush exported object into Modeler and named and mapped the Top surface only, the way I usually do and it showed up as a group, sort of. Here’s your remapped object
When I get some time (soon I hope) I will post a step by step of my process.

BTW, I own UV Mapper and it’s great, but before you buy it check out Blender’s LSCM mapping feature. It’s amazing, and it’s free. http://www.blender3d.org/cms/Model_Material_Light.397.0.html

So was there ever any resolution to this issue?

I dont think Lightwve can make UV maps beyond the 0,1 space. I did a search on the NewTek forum on the subjects, 'UV range" and ‘multiple UV maps’ and got no useful information. Maybe LW 9 ???