Mental Ray Displacement Problem

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2013   #1
Mental Ray Displacement Problem

Hi CGTalk,

I recently followed the "Mastering Displacement Maps in Maya" tutorial by Digital Tutors, and thought I've got it all figured out. And when I use simple shapes with displacement all works fine.

But now that I want to make a hedge with displacement, it doesn't look quite as good.
What I first discovered was that the problem was caused by the smoothing-part of the approximation editor. I am forced to use this option because if I choose to use the Displacement Tesselation only, the results are not nice because of the round corners.

So I've edited and mapped the model so that it would still look good after smoothing. But even though it looks perfectly fine in the viewport, when I render it looks stretched at places without much polygons and narrowed on places with more polygons.
Is it really necessary to have more or less evenly distributed polygons throughout the model?
Because if I do that, it looks way better (see second image), but I don't want to have to do that.

I'm used to 3ds max and vray, and using displacement there is a piece of cake.
Now in maya and mental ray not so much :(

Please look at this image (click for full resolution):


Here you can see the difference very clearly. You can see the evenly distributed part looks good and the low-poly part doesn't.

However, the reason I want to use displacement is to use simple lowpoly models and make them look good. Just like I was used to do in 3ds max with vray displacement.

Thanks for your time!!
__________________
Ferry Passchier [2D/3D Visualizer + Fan Photographer]
Facebook - Twitter - Instagram
^
Most updates here

Last edited by FerryP : 01 January 2013 at 12:37 PM.
 
Old 01 January 2013   #2
Hi,

It looks like the resolution is lower and thus poor displacement because of the way the UVs are probably distributed. Since you have large polygons covering a broad area, the UVs are probably stretched or elongated to match the ratio of the polygon. This results in low resolution of the displacement texture because the UVs are not allowing enough of the texture resolution to be mapped to the polygons. I'd need to see your UV layout, but it looks to me that the UVs are not allowing enough of the displacement texture to be mapped to the polygons.

When you evenly divide the geometry, you are getting more detail in displacement. I think this is because it's dividing the UVs and thus allowing more of the texture resolution to be mapped to the polygons. When creating UVs, you'll want to try and make sure that the UVs roughly match the aspect ratio and size of the polygons.

You don't need to divide the entire mesh so evenly, but it would help to add a few edge loops in areas where a single polygon is covering a very broad area. When rendering displacements, splitting a poly (add edge loop) can actually help reduce render times even though you are technically adding more resolution with the split. The reason being, you can then tell the approximation node to not have to divide the edges so much in the Length parameter of the approx. node. If you have a single long edge, it will need to divide much more than shorter edges. This can then force the subdivision to greater levels over the entire model when perhaps most of your model doesn't need it. It's having to compensate for the long edge length of a few polygons.

Can you send me your scene and I'll take a look.

Cheers,

WEs
 
Old 01 January 2013   #3
This looks like a simple UV issue. Run an AutoUV from 6 sides, and it should solve the issue.
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
Old 01 January 2013   #4
Quote:
Originally Posted by InfernalDarkness
This looks like a simple UV issue. Run an AutoUV from 6 sides, and it should solve the issue.


Thanks, but that's not it.

Quote:
Originally Posted by WesMcDermott
Hi,

It looks like the resolution is lower and thus poor displacement because of the way the UVs are probably distributed. Since you have large polygons covering a broad area, the UVs are probably stretched or elongated to match the ratio of the polygon. This results in low resolution of the displacement texture because the UVs are not allowing enough of the texture resolution to be mapped to the polygons. I'd need to see your UV layout, but it looks to me that the UVs are not allowing enough of the displacement texture to be mapped to the polygons.

When you evenly divide the geometry, you are getting more detail in displacement. I think this is because it's dividing the UVs and thus allowing more of the texture resolution to be mapped to the polygons. When creating UVs, you'll want to try and make sure that the UVs roughly match the aspect ratio and size of the polygons.

You don't need to divide the entire mesh so evenly, but it would help to add a few edge loops in areas where a single polygon is covering a very broad area. When rendering displacements, splitting a poly (add edge loop) can actually help reduce render times even though you are technically adding more resolution with the split. The reason being, you can then tell the approximation node to not have to divide the edges so much in the Length parameter of the approx. node. If you have a single long edge, it will need to divide much more than shorter edges. This can then force the subdivision to greater levels over the entire model when perhaps most of your model doesn't need it. It's having to compensate for the long edge length of a few polygons.

Can you send me your scene and I'll take a look.

Cheers,

WEs


Thanks. This makes much sense. I gave it a try by testing different approximation settings and different poly distributions, and I noticed the difference in both quality and render times.
Thanks for the explanation!

Still too bad it doesn't just work like in Vray, because that was just perfect.
Now I sometimes decide not to use displacement because of the pain in the ass it gives me.
__________________
Ferry Passchier [2D/3D Visualizer + Fan Photographer]
Facebook - Twitter - Instagram
^
Most updates here
 
Old 01 January 2013   #5
I agree with a few others that it resembles a UV and not a rendering problem. Mostly because we do not have this problem with mental ray.

The texture stretches right where the surface is less uniform.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 01 January 2013   #6
Quote:
Originally Posted by Bitter
I agree with a few others that it resembles a UV and not a rendering problem. Mostly because we do not have this problem with mental ray.

The texture stretches right where the surface is less uniform.


As you can see in my viewport screenshot, the texture looks normal without any stretching. It's just that MR doesn't only seem to "listen" to UV's, but also to the mesh itself. So you need waaaaay more subdivs when an object has few polys. That is not how Vray works...I liked vray :(
__________________
Ferry Passchier [2D/3D Visualizer + Fan Photographer]
Facebook - Twitter - Instagram
^
Most updates here
 
Old 01 January 2013   #7
You're dealing with Maya translation, Vray has to handle that too and has similar stretching in Maya with UVs. You used Vray in Max, Max is much friendlier with UVs and exports differently.

Can you export the Maya model?
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 01 January 2013   #8
looking at your model wireframe that you posted it looks like it is the topology that is causing the issue.

Generally (depending how you set up you displacement) you would want your topology to be evenly spaced squarish quads as much as possible with higher detailed areas of the displacement having the densest coverage. Since your whole mesh is needing high detail you would want that fairly even all over.

This is because what ever geo is there will get tessellated at render time based on the original topology.

So looking at your mesh you will get nice detailed squared tessellation on the left side and larger elongated tessellation on the right side.

one way to see what is happening is bake the displacement as a test and took at the resulting geo.
modify>convert>displacement to poly

So clean topology combined with good UV's will get you where you need to be.

Cheers.
__________________
 
Old 01 January 2013   #9
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:56 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.