PDA

View Full Version : Problems painting textures in ZBrush and importing back into LW


gameboy
09-20-2004, 11:00 AM
I've been trying to use ZBrush to paint textures onto models that have been exported out of Lightwave and then reimporting them back into Lightwave. The test object is a simple table that is made of only rectangles.

I've been using masking to hide parts of the table in Edit mode before "dropping" them down onto the canvas in ZBrush, and in Projection Master have the "FADE" option turned off, and usually turn off the "Double Sided" option as well, when I'm trying to paint only one side of an object. I usually set the texture size to 1024 x 1024, although I also tried 2048 x 2048. For painting I used the Single Layer brush (also tried this using the Simple brush too), with a solid square Alpha, and a Drag Rectangle stroke, with rgb intensity set to 100.

My problem is that after painting textures in ZBrush, (and remembering to Flip them vertically before export) by the time I import the model back into Lightwave, and apply the texture to it, I see colors "bleeding" onto other parts of the model I had hidden during painting, and also some fading of colors around the edges of the rectangles, even though I turned the FADE feature off in Projection Master. :cry:

It seems no matter if I create the UV maps first in Lightwave before exporting them as part of the .OBJ file or try to create them in ZBrush using AUVTiles or GUVTiles, I still get the same problem (although I've noticed if I try to use GUVTiles, some unwanted rectangles seem to get painted even though I had hidden them before painting, e.g. part of the "side" of the table box got painted when I had only tried painting the "top" of the table box), and this is noticable even in ZBrush. :banghead:

I remember reading a recent interview with one of the DOOM3 modelers, and he said he tried using ZBrush for texturing, but had to give up because ZBrush's UV mapping wasn't accurate enough. Is this the problem? What's going on here? And, is there a workaround or fix? :shrug:

I was hoping to use ZBrush to paint and texture 3D models created in Lightwave, which are then exported to DirectX out of Lightwave for a game engine. But I guess from what I've read in other places that using ZBrush's AUVTiles would be rather inefficient for texture maps for a game engine. But I'm still having problems even if the UV maps are created first in Lightwave, and exported along with .OBJ file from Lightwave, and then selected for use in ZBrush. :sad:

guardonduty
09-20-2004, 04:20 PM
What version of Xbrush are you using. Also check out this link for Lightwave to Zbrush and back


http://www.stevewarner.com/Tutorials/zBrush/zBrushTut.html

gameboy
09-20-2004, 06:35 PM
I'm using version 2.0

Thanks for the link gardonduty, but I've seen that tutorial, and I'm not looking to create a displacement map or change the model's geometry at all, since the game engine I'm using does not support displacement or normal maps. I'm just trying to paint onto the model.

MrWyatt
09-21-2004, 08:03 AM
post some screenshots so we can see what might be the problem.

gameboy
09-21-2004, 10:06 AM
Here's a shot in Lightwave of the table object that has been imported from ZBrush 2.0:

http://server4.cgtalk.com/attachment.php?attachmentid=59567&stc=1

MrWyatt
09-21-2004, 10:11 AM
in the surface options try out if unchecking pixelblending and texture antialiasing helps.

gameboy
09-21-2004, 10:25 AM
Unchecking Pixel Blending has no effect, and in modeler I don't see an option for texture antialiasing anywhere in the Surface Editor panel in Lightwave 8.

MrWyatt
09-21-2004, 10:36 AM
http://mrwyatt.250free.com/screngrab_0000.jpg
here is where you find texture antialiasing.

gameboy
09-21-2004, 10:55 AM
Sorry, but I don't see that option. I am using LW 8.0.1.

http://server4.cgtalk.com/attachment.php?attachmentid=59568&stc=1

By the way, how do you get pictures to appear inside the message instead of a link like mine? (This is the first time I've tried attaching any images).

MrWyatt
09-21-2004, 10:59 AM
in that window set pixelblending to off and mip mapping (formerly known as textire antialias) to off

gameboy
09-21-2004, 11:02 AM
Well, it has absolutely no effect. Thanks for the suggestions, though. I'm beginning to think there is a problem with the way LW interpolates its UV coordinates compared to the way ZBrush does - perhaps it's due to some kind of 'rounding' errors or such. Perhaps that DOOM3 modeler was correct about ZBrush's UV mapping not being accurate enough. :sad:

aurick
09-21-2004, 04:23 PM
ZBrush coordinates are accurate. In most cases, seams and bleeds such as this are caused by differences in the way that various programs interpolate UV coordinates. For some applications, UV coordinates may need to be shifted by .5 pixel to the left/right/up/down in order to achieve perfect registration.

ZBrush allows this offset to be done using the following procedure:


Import the mesh into ZBrush
Import the texture or create a new texture with the exact dimensions that will be used in your other applications. This step is important because it allows ZBrush to calculate the correct value which will result in a .5 pixel offset.
Adjust the AdjU and AdjV in the Tool>Texture menu (the offset should be .5 or -.5 in the U and/or V axis) and then press Apply UV Offset.
Export the mesh to your other application and execute a test render.
Repeat steps 3 and 4 until you find the correct offset.
Make a note of the required offset and apply these to other models as needed.
This should resolve your problem. If it doesn't, please post the question at ZBrushCentral in the Questions and Troubleshooting forum. Be sure to include the sample mesh and texture.

gameboy
09-21-2004, 10:29 PM
When you say "... or create a texture", do you mean one that is created in ZBrush?

I'm getting somewhat frustrated with ZBrush's incapability to paint a simple rectangle...
If I understand you right, I can do the following steps:

1. Import the model into ZBrush.

2. Press the Tool > GUVTiles button to create a UV map.

3. Select as the current texture the imported texture, or the one created in ZBrush.

4. Press the Tool > "UV > Txr" button to assign UV coordinates to the texture.

5. Color (paint) the model to your heart's content using Projection Master (I have problems with the UV map wrapping around edges it shouldn't be).

I've been using the SingleLayer brush, solid rectangle alpha, DragRectangle stroke, Z Intensity 100.

6. Press Tool > Texture > AdjU and AdjV to try and get rid of the wrapping around edge problem - but I can't - the UVs don't seem to have sized themselves to fit around the rectangles of the simple box.

It almost seems as if the GUVTiles option does not create accurate UV maps. :curious:

http://www.cgtalk.com/attachment.php?attachmentid=59604

gameboy
09-22-2004, 04:39 AM
OK, I was able to get rid of the bleeding and shifted surface textures. But the only way I was able to do it was to bring up UV Edit Pro and scale down the uv tiles after the object was imported back into Lightwave. I just could not get ZBrush to quite do the job, even though I tweaked down to a tenth (.1) of a pixel adjustment using AdjU and AdjV.

Not sure if is worth using ZBrush if I have to edit every single uv tile every time I import a model back into Lightwave. :sad:

jasonfox
09-22-2004, 08:52 AM
Seeing as you are only colouring the polygons in flat colours, isn't there an easier way to do this ?

I think that the problem is your UV map isn't of a high enough resolution to get the hard edges you require !

The only way you could probably achieve this with a 'low-res' bitmap is to space the polygons out in the UV map so there is a gap between them. This way the point where you go from one colour to the next on the bitmap is not where you go from one polygon to another.

In fact if I was you, I'd do the above, but then rather than bringing the model into Zbrush, I'd just take your UV layout into Photoshop and paint it in there !

MrWyatt
09-22-2004, 09:21 AM
http://mrwyatt.250free.com/ProblemswithGUVTiles.jpg

The problem is that your model has to few polys as the way Zbrush does the GUV tiles is by making every poly a square of same size. this means that the poly that represents the top of the table is the same size as the poly representing the small poly underneath the tableleg. on top of that the poly of the tabletop isnīt square in reality, itīs rectangular. now look at the iconic representation of your uvmap. the guv tiles are really small in comparison of the real proportions of the table, i mean the small tiles you have tn your uvmap might be big enough for the endpoly of a tableleg but when you have to colour the top of the table with a UV tile that has about 20 by 20 pixel there is a big chance that the image information isnīt enough for that region and that is the reason you have messed up boarders. I would rather do the uvīs for the colourmap in Lightwave making sure you keep the overall proportions of the polygon size and form. the other way is to increase the outputsize of the colourmap from zbrush dramatically to compensate for the lack of uv size. thirdly you could do it all over by devidinf the model in lightwave first, so you have more polys to represent the bigger polys. this way there is not one single miniscule uv tile that makes your table top but instead you have a bunch of miniscule uv tiles which multiply the uv space you assign to the same area of your model. see below
http://mrwyatt.250free.com/screngrab_0002.jpg

ThE_SP
09-22-2004, 02:33 PM
I had the same issue with bad seems and such going from Z to Maya. So this may or may not apply. To fix the seams, I went into Texture>AdjU and AdjV, made sure they were set to 0. After I generated the AUV I set the FSBorder to 0 and hit the Fix Seam button, I still have some display issues in Maya, but that's a different story.

Hope that helps,

Cheers,
Shawn

gameboy
09-23-2004, 01:27 PM
I was painting a simple rectangle as a test of ZBrush. I need to create textured objects for a game engine, so increasing the polygon count just to "help" out the texture painting software is not an option. :eek:

The engine I'm working with requires all models to have their polygons converted to triangles before loading them up into the game engine anyway.

In other tests using more complex models, I've tried using both GUVTiles created in ZBrush 2, as well as importing models with non-overlapping UVs created outside of ZBrush, but no matter what I try tweaking (AdjU/AdjV, FSBorder/Fix Seam) I cannot get the models exported from ZBrush 2.0 to render in Lightwave 8 without seams and fading artifacts.

It appears that at this time, after all my testing, that ZBrush 2 is not quite ready for my purposes, as least for texture painting. :sad: Other software I've tried using with Lightwave, such as BodyPaint 3D, work flawlessly, although I must say I liked the "feel" using ZBrush 2 overall more than BodyPaint 3D (I found BodyPaint's interface rather more awkward and confusing to use compared to ZBrush, which goes against what I thought I would find, as ZBrush's interface is rather different from most other 2D/3D applications out there, but the built-in ZScript tutorials really helped out a lot). ZBrush's local pivot point rotation is very useful - I haven't figured out how to do that in BodyPaint (not sure you can). It's a shame ZBrush won't do the trick for now - maybe a future upgrade will have better UV coordinate compatibility with other applications.

Thanks however, for all your help and suggestions. :)

guardonduty
09-23-2004, 04:25 PM
Why not supply the model for someone else to test.

aurick
09-23-2004, 04:35 PM
It may be the order in which you're doing the steps for assigning the UV's.

Here's what you should do:

1) Import the mesh
2) Create a texture of 1024x1024
3) Press AUVTiles
4) Use Pojection Master to texture the mesh.

This should give excellent results. If you are not getting clean results, please post the mesh in the Questions and Troubleshooting forum ZBC. We'll test this with your mesh to see where the problem is.

CGTalk Moderation
01-19-2006, 07:00 AM
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.