# Fast Displacement Tutorial - Maya-\>MentalRay

**URL:** https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263
**Category:** Maya
**Tags:** mental-ray
**Created:** [November 23, 2004, 5:11pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263 "2004-11-23T17:11:57Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [November 23, 2004, 5:11pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/1 "2004-11-23T17:11:57Z")

</div>

Just posted this at zbrush central:

[http://206.145.80.239/zbc/showthread.php?t=22176](http://206.145.80.239/zbc/showthread.php?t=22176)

An alternate quicker method for MR displacements.

cheers,  
-sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 23, 2004, 6:12pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/2 "2004-11-23T18:12:32Z")

</div>

Just one question? Why on earth woudl people want thiskind of tutorials... I mean what so hard in setting up displacement using maya and mentalray? You do it like you would for every other maya shader.

By the way you could have gotten the polysmooth for free inside mentalray! Wihout needing to clutter the viewports.

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [November 23, 2004, 7:22pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/3 "2004-11-23T19:22:09Z")

</div>

As far as I can see, this method gives a much faster displacement than using the approximation editors for a decent result.

Setting this up isn't terribly difficult, but for many people (on the zbc forums) displacement in maya is a question, and has a running thread where there are always questions. I'd been asked by the moderators to post a quick tutorial, so there it is.

You'd be surprised - I was - at how fast this method is. I don't know how mental ray operates in stand alone, or through xsi, but in maya, this has been the quickest way I've found.

It goes against accepted knowledge about using approximation editors, but from my stand point this method works faster, and relatively effectively.

Give it a shot. There's a downloadable file and a texture.

regards,  
-sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 23, 2004, 7:31pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/4 "2004-11-23T19:31:10Z")

</div>

Offcourse its fast because it uses thse relatively low maya displacement approximation settings, the approx editor can do this too. Only most people realy dont understand anything about the approximation editor settings so they allwasy crank them too high.

And yes i know there are a lot of people running on pirtated versions of maya who never ver have even opened a manual or ever had any tuteage, who couldnt do anything if it wasnt for people writing all kinds of tutorials that demosntrate facts you can find by reading the manuals in firstplace.

Im not saying its wrong but the motives are a bit hazy.

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [November 23, 2004, 7:47pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/5 "2004-11-23T19:47:17Z")

</div>

Right....As far I can tell, you can't get these results using an approximation editor. With this speed, that is. Feel free to prove me wrong. It's not the most accurate application of the displacement, but it works, and for those of us looking for good ways to utilize zbrush with maya, this is a good alternative.

I don't know who you're talking about when you talk about never having opened a manual. The point of tutorials is to make easily accessible those facts that you can read. I was surprised when I discovered that this method worked faster, so I wrote a tutorial.

you can always give it a try. I've worked for many years in film doing this kind of stuff. It's not as if I come from an unskilled background.

cheers,  
sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 23, 2004, 8:36pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/6 "2004-11-23T20:36:44Z")

</div>

I cant acces the file (im not realy keen on registering to all the possible forums on the net) but i can easily recreate a similliar situation....

i can get many settings that are 10-15 secs faster...

But yes the default maya one is the same approximation as

spatial  
fine   
viewdependent  
length 1.   
sharp 0.833333  
minsub 0  
maxsub 5

Wich is pretty optimal, alias guys arent stupid theyve chosen THE best method, with generaly acceptable settings.

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 23, 2004, 8:40pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/7 "2004-11-23T20:40:35Z")

</div>

as atestament to the smartness of this setting i usualy set my override to, any other tesselation methods besides spatial fine are stupid to use.

spatial   
fine   
viewdependent   
length 0.5-2   
sharp 0-0.85   
minsub 0   
maxsub 5-6

read maya manual under [http://localhost:4446/Maya6.0/en\_US/RefGui....html#SECTION85](http://localhost:4446/Maya6.0/en%5C_US/RefGui....html#SECTION85) for:

"  
Fine Approximations3.1  
Standard approximations as described in the previous section work under the assumption that as few triangles as possible should be used to approximate a surface to achieve a user-defined quality. mental ray 3.1 also supports a new approximation mode called fine approximation, which addresses the problem from a different angle: it is capable of efficiently expending very large numbers of triangles to faithfully approximate even very complex surfaces, especially displaced surfaces, without excessive memory consumption.

This is done by reducing the granularity of mental ray's cache manager. In mental ray 3.0, it operated on entire objects, which could become very large when tessellated. mental ray 3.1 applies cache management to smaller units formed by splitting objects into smaller sets, which can be individually tessellated without excessive memory requirements. This is especially useful for extremely detailed displacement maps.   
"

ine general on optimizing renders or other mentalray issues refeer to:

[http://localhost:4446/Maya6.0/en\_US/RefGuide/index.html](http://localhost:4446/Maya6.0/en%5C_US/RefGuide/index.html)

Wich is HIDDEN pretty well in the maya manual

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [November 23, 2004, 8:59pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/8 "2004-11-23T20:59:10Z")

</div>

Ah, excellent - good to know what the defaults are.

regards,  
sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 23, 2004, 9:15pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/9 "2004-11-23T21:15:56Z")

</div>

The chapter Flagged Approximations3.2 iin the page i refeered to is pretty good reading for possible further optimizing of rendertimes.

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [November 23, 2004, 9:53pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/10 "2004-11-23T21:53:24Z")

</div>

i realize my initial prejudice against the displace approx started when i couldn't figure out why the subdivision approx overrode the displace approx, rather than working in conjunction with it (if you have any ideas...).

ah well, i'll update the tutorial,  
thank you for your comments,

cheers,  
sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 24, 2004, 7:35am UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/11 "2004-11-24T07:35:40Z")

</div>

Well because it acts like your smooth inside maya.

you could probably replace your smooth witha aparametrig subdiv approx with a small speed penalty, if you wished to avoid clutter.

Aslo you could accelerate a few seconds by uisng pure tris. and use less memory.

read: [http://localhost:4446/Maya6.0/en\_US/index.html](http://localhost:4446/Maya6.0/en_US/index.html)[http://localhost:4446/Maya6.0/en\_US/index.html](http://localhost:4446/Maya6.0/en%5C_US/index.html)

one can easily shave of most mentalray renders by playing a few accel tricks without loosing much or no quality. Usualy the acceleration you acchieve form a well set up render by 10-50% of the original time. Offcourse using wrong settings can give you rendertimes of 10 times the standard. And tis does not only apply to the maya implementation.

So allmost any production would benefit form a renderwrangler, as a good onw can save you weeks or even months of rendering.

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [November 24, 2004, 12:28pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/12 "2004-11-24T12:28:26Z")

</div>

This thread has also been going at cgtalk:

> [@](#):
>
> In reply to:"maya's approximation editor can do subd approx and/or displace approx. as i  
> mentioned in an earlier email, the two do not work together correctly. maya  
> exports these lines:
> 
> approximate subdivision surface parametric 2. "Triangles"  
> approximate displace fine view length 0.25 0 4 "Triangles"
> 
> but it should be done in one line like this:
> 
> approximate subdivision surface view length 0.25 0 4 "Triangles"
> 
> this is because in mental ray 3.3 when the two are used in conjunction "The  
> displace approximation is ignored, and the regular approximation is used.  
> Subdivision surfaces are refined during displacement in a single integrated  
> pass...""

It sounds like there's no way to use the two in conjunction - not having the standalone, i don't know if editing the .mi file will work better. as far as i can see the (checking in the .mi) there's no way to utilize the displacement, without maya adding a line separate from the subd approx...

cheers,  
-sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 24, 2004, 1:54pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/13 "2004-11-24T13:54:55Z")

</div>

ill consult the manual on this...

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [January 31, 2005, 3:12pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/14 "2005-01-31T15:12:40Z")

</div>

> [@](#):
>
> In reply to:ill consult the manual on this...

Any further thoughts...? Am I right in thinking that the subdivision approx. will override the displacement approx. because of alias' implementation?

cheers,  
sunit

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 31, 2005, 3:43pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/15 "2005-01-31T15:43:42Z")

</div>

oh yeah sorry about tha, okay here goes:

As far as ive tested and read in the manual MR chooses one of them, so if the surface is displaced then it chooses the displacement, if not then it chooses surface. As such there may be 2 of theese declarations as mr chooses the displacement if the surface displaces and ignores it if not, therebuy choosing the surfface approx.

Also you can define seperate displacements for raytraced beams as opposed to view beams if you wish (can be usefull optimization).

---

<div class="post-metadata">

### Author: ![sunit](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@sunit](https://forum.highend3d.com/u/sunit)
#### Post date: [January 31, 2005, 7:05pm UTC](https://forum.highend3d.com/t/fast-displacement-tutorial-maya-mentalray/46263/16 "2005-01-31T19:05:50Z")

</div>

it seems as though, with maya-mr, once you've got a subdiv. approx. attached to your mesh or converted your mesh to a subdiv., then no matter whether displacement exists or not, mr will render with the subdiv. approx. settings. the moment i have a subdiv. approx. attached to my object, my displacement approx. ceases to have any effect. i would love to be able to use mr subdivisions and also take advantage of the displacement approximations, but this doesn't seem possible.

cheers,  
sunit
