PDA

View Full Version : What does Maya/MentalRay think it's doing? (Surface vs Displace Approximations)


ZaonDude
02-27-2005, 02:07 AM
I'm horribly confused and frustrated by something going on during mental ray rendering that I hope y'all can shed some light on.

First, fact: In a scene with 1 object that has two mental ray rendering overrides set (one for surface approximation and one for displacement approximation), if that object has a maya displacement shader on it then mental ray uses only the displacement override tessellation setting and ignores the surface approximation settings. That is, you can set the nurbs surface approximation angle tessellation settings of min/max to min 0 and max anywhere from 1-4 (for example) and it in no way changes the number of polygons rendered in that scene (as reported by mental ray progress translation log) because the surface is being tessellated according to the displacement approximation override and no longer by the nurbs surface approximation override now that a displacement shader is on the object.

So, why does setting nurbs approximation override angle's max subdivisions one higher to '5' suddenly cause a runtime error and crash? Mental ray shouldn't even be looking at that override, right?

Interesting, if I lower the parametric Displacement UV subdiv override from 4/4 to 3/3, I can keep the surface override angle max subdiv at 5 without crashing.


Strange Memory info:
Have 1.5 physical ram.
Watching total commit charge during repeated memory tests I also get rather bizarre results:
With displace UV override at 4/4 and surface angle override at min/max 0/1 I get about 870megs mem usage.
With displace UV override at 4/4 and surface angle override at min/max 0/3 I get about 920megs mem usage, which stands to reason except that mental ray shouldn't even be affected by this setting!!

Even more strange: With displace UV override at 4/4 and surface angle override at min/max 0/0 I can see total commit charge memory quickly soaring high and sometime after 1.2gigs mem usage I get that same runtime error again. Which makes even less sense to me since even if MR pays attention to this surface override why would 0/0 for min/max tessellation cause memory usage to skyrocket to the point of crashing when 0/1 min/max is fine?

So what's up with all this? LOL.

Thanks guys!!

ZaonDude
02-27-2005, 02:27 AM
Hmm.. I just ran some tests on a basic sphere and it does seem to combine the those two overrides.. that is, the total polygons rendered will go up if you increase either setting (assuming you have displacement on it). Not sure why it wasn't increasing the poly count on my other object.

So maybe I'm just running into a physical memory problem.

However, I was under the impression mental ray could handle hundreds of millions (if not billions) of polygons, and so far i top out around 3 million with the best tessellation settings I'm able to use (higher ones cause crashing). Can it not manage memory better? Or is PRMan the only answer here?

I have MR physical memory attribute set to 1200 since I have 1.5 phyiscal ram.

Jackdeth
02-27-2005, 02:38 AM
3-4 millions is about the max with a 32-bit OS. 64-bit MR doesn't have that problem.

ZaonDude
02-27-2005, 02:41 AM
3-4 millions is about the max with a 32-bit OS.
Whoa! You serious? As in total tris in a scene (regardless of whether they're polys, tessellated nurbs, or tessellated displacements)?

Is this a mental ray limitation or a limitation of all renderers? I seem to recall people boasting about render tests in various programs like vray, etc., hitting the 1 billion mark.

Jozvex
02-27-2005, 02:58 AM
I'm pretty sure that using the Fine displacement mode will let you render lots more polygons than with any other mode, because it calculates each section (BSP voxel?) of displacement as it gets to it (or something like that?).

Are you tweaking the BSP settings to help with memory management?

ZaonDude
02-27-2005, 03:10 AM
I've tried Large BSP to no avail.. but haven't tried upping the number of polys per voxel setting yet.

Also, I'm investigating methods of having maya do the tessellation first so I can control degree of tessellation on a per object basis but I'm not yet familiar with where displacement settings are in maya (reading help files now) since I'm used to prman where tessellation is irrelevant.

francescaluce
02-27-2005, 03:51 AM
you don't need any displacement shader to get your objs displaced with mentalray.
just plug a scalar into the displacement port. same for the surface approx..
use just diplace approx in spatial mode. with 6.5 there's should be hidden in maya
also a 'nosmoothing' parameter to ctrl normals interpolation for fine approxs.
play with bsp if you run into memory problems.



ciao
francesca

ZaonDude
02-27-2005, 04:00 AM
you don't need any displacement shader to get your objs displaced with mentalray.
Yeah, I'm just using a basic Maya's displacement shader node between a file node and the shader engine node in hypershade is all.

Thanks for your other suggestions.. still learning and playing on a test sphere right now as we speak ;-)

Jackdeth
02-27-2005, 04:05 AM
Whoa! You serious? As in total tris in a scene (regardless of whether they're polys, tessellated nurbs, or tessellated displacements)?

Is this a mental ray limitation or a limitation of all renderers? I seem to recall people boasting about render tests in various programs like vray, etc., hitting the 1 billion mark.


Sorry, I meant that will full raytracing in a complex scene I've hit a RAM ceiling at 3-4 million polys while rendering on 32-bit Linux. For the opening shot in Day After, we had to write a dynamic scene builder that would throw our any object that wasn't visible to the camera. And on top of that, we had to break the ice berg up into slices (each berg was 4 million ploys, but broken into 10 slices) to let us un-load the slices as they leave the view of the camera. This lets optomize the BSP to manage your memory better. I've found that having one huge dense object is really bad for rendereing, so always keep you polys in smaller groups.

If you aren't ray-tracing then you can have a shit load more polys....But because we use it on every scene, I haven't benched-marked the non-raytraced poly limits.

CGTalk Moderation
02-27-2006, 05: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.