PDA

View Full Version : Mudbox to Renderman For Maya Displacement seams


tingles
04-29-2009, 03:57 AM
Hi guys,

Got recommended to post here for my mudbox woes.
Basically getting a few issues with getting displacement to work seamlessly in Renderman for Maya. Getting really prominent seams on the model ( the rest displaces quite nicely actually, see picture) Basically the closer the camera gets to the model, the seams go away, so i increased the shading rate to .2 and it helped it, but not solved it, as well as it increased render times. I never got these kinda seams with Zbrush, so i am a little concerned.
I shouldn't have to paint over the seams in photoshop either to fix the issue. I just wanted to check it's not Mudbox's settings that i may have exported incorrectly ( new to it, so i dont' know all the ins and outs!).
Basically smooth target model ticked on low res mesh. added high res model. Samples is Closest to target mesh, search distance is best guess and image size is 4k. And i'm just spitting out 16 bit RGBA ( Black and white gave me awful results, and couldn't get it to work properly in Maya).
Images are below ... displacement map looks good, UV's are straight because renderman has issues with displacing properly if the UV's are to curvy, so straight is the best option, and the render.

http://img201.imageshack.us/my.php?image=seams.jpg
http://www.turboimagehost.com/p/1659843/displacement.jpg.html
http://www.turboimagehost.com/p/1659844/UVs.jpg.html

Anyways, thanks guys, hope i can get some feedback!

Marc

irobert
04-29-2009, 05:56 AM
What type of displacement map are you using? Renderman works best with 16 bit floating point tiffs (prman support 32 bit yet I dont think). Mudbox wont export 16 bit floating point either which is why I usesomething like cyslice to create proper maps if im using renderman.

tingles
04-29-2009, 06:12 AM
Hey mate,

Thanks for the reply. Using 16 bit RGBA displacement maps out of mudbox directly. You can use 32 bit tiff displacement maps out of Zbrush 3.1, accept it is really slow and Renderman has heaps of issues with it, although it DOES work.
Any other possible ideas ? Would rather not have to add a step of buying a 3rd party program just to get usable displacement maps. It has 32 bit floating point disp maps, i'll give that a whirl and see what the results are. Cause other than the seams, the displacement looks great.

irobert
04-29-2009, 07:43 AM
Yeah those rgba maps suck for disp maps. I dont know why it is even there. They should have floating point 16 bit maps. 16 bit float doesnt have as nice of a range as the 32, but it is still much better than a standard RGBA map. I would test out 32bit float map out of mud and see how that works out for you. Remember prman loves 2k maps, anything more than that is not effecient and could be causing your slowness. Multiple 2k maps is a million times better than a single 4k 32 bit map. Many of my characters have 5+ 2k maps.

Cheers,

Robert

tingles
04-29-2009, 08:00 AM
Hi Rob,

Thanks for that mate, will be getting onto some experimenting very soon, i'll post up my results to for everyone else ( in case they have the same issue! )
Yeah unfortunately I'm road testing mudbox to integrate into our pipleline at work, so 4k maps are a must, as the detail needs to be there for close up shots etc. We already use multi UV regions to.
Thanks very much though mate, appreciate the help, hope all goes well :)

Marc

tingles
04-30-2009, 08:30 AM
totally failed. Still couldn't get anything to work decently ... hmm ... Back to Zbrush until Mudbox has a working workflow into Renderman for Maya. Or until a guide comes out that shows the settings that work to get it all working.

Thanks anyways!

Wayne
04-30-2009, 01:00 PM
Does renderman smoth the UV's at rendertime? if so you may want to play around with that setting in mud. Sorry I can't be of more help but renderman is a little out of my price range. :)

Wayne...

tingles
05-01-2009, 12:28 AM
Hi Wayne,

Yeah i figured Renderman is a bit of a niche product, not everyone uses it, so it's got to have a very specific way of getting it all to work. Renderman actually DOESN'T smooth Uv's at rendertime ... so it's got to have the maps to be based off the low poly UV's ( Or so i'm told!! )
I Dunno, i've been fooling around with still no luck ... posting on CG society, there's a shitload of renderman egg heas on there, so i'll see how that turns out. Might actually post a workflow once i've gotten it all to work, as there doesnt' seem to be any decent tutorials on the matter at the moment.

Marc

irobert
05-01-2009, 12:38 AM
@ Weta we used renderman and had the ability to have UV smoothing on or off depending on the mesh. Typically we did hard surface off and organic stuff on. As long as the map is generated with no uv smoothing and your renderer isnt smoothing the uvs, then it should be good to go. The renderman for maya works with the mud displacements perfectly so it am having a hard time finding out why you have so many problems with the maps.

tingles
05-01-2009, 12:55 AM
Rob,

So where is this UV Smoothing button then ? Cause this may be what is causing the issue, or at least i am hoping. The UV's are generated with no smoothing, so low poly mesh. Perhaps renderman is / isn't smoothing the UV's which is part of the issue.
I'm just going off the Zbrush workflow for the moment trying to adapt, hence why i am in the dark a little bit. All i know is that with Renderman, for the most part, the UV's had to be straight lines where possible as you would get massive seams during animation in tough areas ( i.e. tops of legs ). Usually form there i spit out 16 bit displacements form Zbrush and it works with none of these messed up seams ...
I've tried both types of UV's currently. Tried unwrapping my usual way, with large seams, then i just tried automatic mapping, and it did turn out a little better, but i still got quite a few artifacts over the mesh along seams. Also tried 16 bit rgba / b&w, 32 bit RGBA / B& W. What settings in Renderman did you use to get it working from Mudbox and what maps did you spit out from Mudbox ?
Currently basically i just create a blinn, make a displacement node, plug that into the shader, apply to mesh. Add renderman displacement bounds on the displacement shader node. If the maps are black as 0 then i make Default color black and Alpha Gain 1, with Alpha offest 0. Chuck a subdiv scheme on the mesh and render.

Marc

irobert
05-01-2009, 05:26 AM
Thanks for more detail. I did some test in mental ray and renderman and I think I see the same problem you are getting. Check out this image below. Ill have a play with some things tomorrow when I have time and see if we can get to the bottom of this seam issue.

irobert
05-01-2009, 05:43 AM
I noticed when rendering in renderman you sometimes have to turn off the filter under the displacment file. Let me know if that helps.

tingles
05-01-2009, 05:45 AM
Hey Rob,

Well least i'm not loosing my mind :/
That'd be awesome if you could, at the moment i'm just kind of flying blind and hoping. I'm sure there's a particular setting that we need to change to make it work. I hope :/

Marc

tingles
05-01-2009, 05:47 AM
You me the Pre Filter in the file node ? i never have that on anyway.

irobert
05-01-2009, 06:05 AM
Under in the texture node attrs, filter type, default is set to Quadratic, if that is on, try setting that to off.

tingles
05-01-2009, 06:23 AM
hey dude, that didn't seem to work ... still seeing some seams :\

irobert
05-01-2009, 06:33 AM
Sorry that didnt work. While looking into this I would suggest that you taking some screenshots of what your dealing with and possibly a test file a well and heading over to the Autodesk - Mudbox site and making a thread there. There are a lot of guys there that use mud/renderman/maya every day and you might be able to get more input.

tingles
05-01-2009, 07:17 AM
Don't apologize, i appreciate the help!
Already posted it up on CG Soceity in the hope that someone knows what the heck is going on with this thing.
I'll post results as soon as i know, or i'll keep checking here incase you or i stumble across an answer.

Cheers,

Marc

soulburn3d
05-04-2009, 06:07 PM
Hey there. I've done extensive prman testing, so hopefully I'll be able to help.

The artifacts you're seeing are probably due to the smoothing uvs issue. Prman by default smooths it's uvs on subdivs, not sure about Renderman for maya, but my guess is that it does the same. The uv smoothing inside mudbox is incompatible with the uv smoothing in prman. So the only way to export a disp map from mudbox for use in prman is to turn that feature off (its off by default). However, now you're using linear mudbox uvs with smoothed prman uvs, which doesn't work. SO you need to figure out the switch that lets you turn off smooth uvs in Renderman for maya. I know the rib code to do it, but not sure if it's exposed in the interface. If you have linear uvs in mudbox and linear uvs in prman, you shouldn't get those artifacts.

Check out these two pages for more info. They deal with exporting a mesh into 3dsmax, not prman, but they explain in more detail a lot of these uv issues...

http://www.neilblevins.com/soulburnscripts/wishlist/3dsmax/wishlist_linear_uvs_in_turbosmooth.htm
http://www.neilblevins.com/cg_education/mudbox_to_max/mudbox_to_max.htm

- Neil

soulburn3d
05-04-2009, 06:15 PM
Actually, looking at the artifacts, there's one more thing it could be. At far distances, you can sometimes get sampling problems where you need a larger bleed value when you're creating your displacement map.

Currently you can edit this value which is called "Edge Bleeding" in the file Mapper.xml in your mudbox templates directory. Then restart mudbox, and create a brand new displacement extracxtion (this value only affects new disp extractions). Don't change the value "extedgebleed" in Preferences.xml. That value isn't hooked up to anything. Change the value from 4 to say 10 and see if the problems go away.

- Neil

tingles
05-06-2009, 03:29 AM
Hi Neil,

First of all thanks so much for the response and your tutorial on the workflow for MB09. I managed to actually successfully displace in RfM!!!
Basically i think it was a combination of following the tutorial you did as well as changing the edge bleed in the script AND turning off filter type form Quadratic to Off.

Basically this is how this i got this result ( pretty damn close!! )
Start by changing the Edgebleed to 10 instead of 4 (In Mapper.xml file as per soulburn3ds instructions), i noticed before i changed the edgebleed turning filter type to off didn't solve my issue, but improved it.

1. Made a mesh all quads ( obviously! )
2. UV's are straight lines where possible ... this may not be a contributing factor in it working, but i have found that in RfM it has some issues when you animate around areas like legs, so avoid seams on high use areas ( instead of seams at the hips, make it above the knees!)
3. Export and chuck it into MB09.
4. divide up, and sculpt some shit into it, whatever you like really, but i would recommend packing some good deatil in for testing purposes as well as some big silhouette displacement might really test it out.
5. import your low res mesh again while keeping your high res at full divided geo.
6. Extract Displacement map. Settings i used were :
Select low res mesh that you imported after sculpting, hit add selected.
select hi res mesh hit add selected.
Smooth Target model is on, Smooth target UV's is OFF. Dont' smooth source models.
Choose samples is Closest to target mesh. Search distance best guess is usually great, but as Neil suggested, just jacking it up a bit can't hurt ( say from 1.6 to 1.8 should do it )
Normalize to search distance, select your res you want it at and i selected tiff 16 bit black and white for the map.
7. Export that out, jump into Maya and create your disp shader as normal.
8. Turn Filter Type in your file node to Off instead of Quadratic.
9. Default color color gain and offset all stay as default. Change Alpha gain to 2.2 and Offest to -1.1 for a starter and adjust from there, remembering the zbrush > maya technique of adjusting the alpha offest to minus half of the alpha gain.
10. Add displacement bounds on the displacement node and chuck it to 5 or whatever ( can't hurt adding this just incase! )
11. Add a renderman subdivision scheme and hit render.

Here are my results:

http://img503.imageshack.us/img503/7987/picture1c.png (http://img503.imageshack.us/my.php?image=picture1c.png)

http://img503.imageshack.us/img503/779/picture2gmz.png (http://img503.imageshack.us/my.php?image=picture2gmz.png)

http://img516.imageshack.us/img516/7716/displaced.jpg (http://img516.imageshack.us/my.php?image=displaced.jpg)


Thanks guys for the help, and Neil thanks very much for your help on the subject as well, it helped me solve the issue!

Marc