Images within this thread
1.jpg2.jpgdisplace.jpgthe_area.jpg1.jpg2.jpg3.jpg4.jpg5.jpg
   
1 of 2
1

Displacement methods
Posted: 24 April 2008 02:55 PM
Occupation: 3D Visualisation
Platinum member
Avatar
RankRankRankRank
Location: BELGIUM
Total Posts:  622
Joined  2007-10-09

Hi, is there someone who can enlighten me with the difference of the “displacement” map in the arch&design shader for example, or when putting a displacement on an object by the displacement modifier?

I’m having issues using either of them, i can’t seem to understand how the displacement modifier works, it has a map / texture slot, the modifier seems to work pretty well on a sphere, but on a box, it doesn’t?

when using the displacement map in a shader, when trying to apply it to a box, fairly quick i’m getting black edges, i understand where it’s comming from, you’re alternating geometry, but is there a way to counter these edges? (was thinking about leaving the edges of the displacement map pure white, would that do the trick?)

and last but not least: when using the displacement map in the arch & design shader, it takes time to load when rendering cause it has to calculate the geometry? doesn’t the displacement modifier do the same? and when using the modifier, you immediately see the changes in the vieuwport, however, you don’t when using the map-displacement in a shader?

If anyone can supply a tutorial or explaining pdf or something they’ve found on the web, much thanks for posting it for me smile

greetings.

 
 
 

Posted: 28 April 2008 12:16 PM   [ # 1 ]
Occupation: Artist
Administrator
Avatar
RankRankRankRank
Location: Corte Madera CA
Total Posts:  318
Joined  2006-08-11
Boomerang - 24 April 2008 02:55 PM

Hi, is there someone who can enlighten me with the difference of the “displacement” map in the arch&design shader for example, or when putting a displacement on an object by the displacement modifier?

When you use mr’s displacement in the material, you are using something called subpixel displacement. Basically, the render engine at rendertime will dice up the object into tiny tiny faces, and then displace the object. The displace modifier will take the map you provide and displace the vertexes of the object to match the map. Since the modifier does not dice up your mesh, the accuracy of the displacement map is complete dependent on how many faces the original object you’re displacing has. More faces means more accurate displacement.

Boomerang - 24 April 2008 02:55 PM

when using the displacement map in a shader, when trying to apply it to a box, fairly quick i’m getting black edges, i understand where it’s comming from, you’re alternating geometry, but is there a way to counter these edges? (was thinking about leaving the edges of the displacement map pure white, would that do the trick?)

Could you post a pic or scene showing these black edges? What’s probably happening is your geometry is being turned inside out by the displacement.

Boomerang - 24 April 2008 02:55 PM

and last but not least: when using the displacement map in the arch & design shader, it takes time to load when rendering cause it has to calculate the geometry?

Yup, it has to dice the geometry.

Boomerang - 24 April 2008 02:55 PM

doesn’t the displacement modifier do the same?

No.

Boomerang - 24 April 2008 02:55 PM

and when using the modifier, you immediately see the changes in the vieuwport, however, you don’t when using the map-displacement in a shader?

Yup, the shader is render only, the modifier affects the view and the render.

Hopefully that answers your questions.

- Neil

 
 
 

Posted: 29 April 2008 02:50 AM   [ # 2 ]
Occupation: 3D Visualisation
Platinum member
Avatar
RankRankRankRank
Location: BELGIUM
Total Posts:  622
Joined  2007-10-09

well I understand what you’re saying, but I was hoping for a “why”

why does max work that way, the one is pixel-rendering, the other one is quality-defined by the number of segments on the object, doesn’t make alot of sense to me i guess.

anyhow; these are two examples which should explain where I’m coming from, the first is a render with a mr_skylight and mr_photographic exposure control with final gather

the second one is without any lighting (default lights from max) and no exposure controll, but i left the final gather on.

now, i usually test bumps and displacements in a small scene before placing them in a house-scene or something, for fast rendering and just figuring out which values I want for these bumps and such, but I use default lighting and no exposure control to be faster.

however, appearantly, this is not the way to go when using displacement since i’m getting black edges when usiing exposure control?

greets

Image Attachments
1.jpg2.jpg
 
 
 

Posted: 29 April 2008 08:27 AM   [ # 3 ]
Occupation: Artist
Administrator
Avatar
RankRankRankRank
Location: Corte Madera CA
Total Posts:  318
Joined  2006-08-11
Boomerang - 29 April 2008 02:50 AM

well I understand what you’re saying, but I was hoping for a “why”

why does max work that way, the one is pixel-rendering, the other one is quality-defined by the number of segments on the object, doesn’t make alot of sense to me i guess.

It’s just two different but similar techniques. The displace modifier was written first, and at the time discreet did not have the technology to do subpixel displacement. So it just allowed you to displace the geometry that was already in your scene. Then later they added the Disp Approx modifier (which is similar to mentalray’s subpixel displacement), this would dice your mesh up into tiny, tiny triangles, and then displace the result. However, your videocard cannot display as many polygons as you can get in your final render at high tesselation rates, and so it’s a render only effect. If you want an approximation of your final result, look up the “mesher” in the help file, but be careful, since you can potentially crash max for having too many polys in your viewport. Remember, the viewport in max is just an approximation of your final render, the same way you can’t display your final materials in realtime in the viewport, you can’t display your final subpixel displacement either.

Boomerang - 29 April 2008 02:50 AM

anyhow; these are two examples which should explain where I’m coming from, the first is a render with a mr_skylight and mr_photographic exposure control with final gather. the second one is without any lighting (default lights from max) and no exposure controll, but i left the final gather on.

Afraid I can’t help you with this one, it looks like mr’s displacement is behaving badly with the skylight or exposure control, but I don’t know enough about those two systems to know why it’s failing. One thing to try, try turning your box into an editable poly, and then chamfer the edges slightly, so if that fixes the problem (or use a Chamfered box instead of a box, to see if it’s the sharp edges that are causing the problem).

- Neil

 
 
 

Posted: 29 April 2008 10:03 AM   [ # 4 ]
Occupation: 3D Visualisation
Platinum member
Avatar
RankRankRankRank
Location: BELGIUM
Total Posts:  622
Joined  2007-10-09

alright smile thanks for the assistance, and the history lesson, always easier to understand max when you know where things come from!

(started working with max since version 9 so)

greetings, thanks again,

Boomerang

 
 
 

Posted: 29 April 2008 10:20 AM   [ # 5 ]
Platinum member
Avatar
RankRankRankRank
Location: Minneapolis, MN, USA
Total Posts:  707
Joined  2007-10-30

I did an interesting test, similar to your example.  But I cranked up the displacement amount.  The geometry actually SEPARATED due to the displacement.

Pretty crazy stuff…

Image Attachments
displace.jpg

Max 2008 64-bit & Max Design 2009 64-bit
HP xw4600 Workstation, Core2 Quad @ 2.4GHz, nVidia Quadro FX 1700, 8 GB RAM, Win XP 64-bit
Minneapolis, MN, USA

 
 
 

Posted: 30 April 2008 05:44 PM   [ # 6 ]
Occupation: Artist
Administrator
Avatar
RankRankRankRank
Location: Corte Madera CA
Total Posts:  318
Joined  2006-08-11
Boomerang - 29 April 2008 10:03 AM

alright smile thanks for the assistance, and the history lesson, always easier to understand max when you know where things come from!

(started working with max since version 9 so)

Ah, that would explain it. I’ve been working since 3dstudio DOS v2, so I know more of the back story.

- Neil

 
 
 

Posted: 30 April 2008 05:45 PM   [ # 7 ]
Occupation: Artist
Administrator
Avatar
RankRankRankRank
Location: Corte Madera CA
Total Posts:  318
Joined  2006-08-11
Chris Medeck - 29 April 2008 10:20 AM

I did an interesting test, similar to your example.  But I cranked up the displacement amount.  The geometry actually SEPARATED due to the displacement.

I think I’ve seen this bug before on cgtalk. Try applying a smooth modifier to your object, and set the angle to a really high number so all the faces look smooth. Then try the same thing and see if it breaks.

- Neil

 
 
 

Posted: 01 May 2008 02:05 AM   [ # 8 ]
Occupation: 3D Visualisation
Platinum member
Avatar
RankRankRankRank
Location: BELGIUM
Total Posts:  622
Joined  2007-10-09

these are my results, adding a smooth-modifier helps, in the way that the cracks are getting rid of, but however, there’s edges being bent.

btw, Neil, what do you mean, referring to a bug? Isn’t this just an anomaly? or is it really something Max is doing wrong?

thanks for the assistance smile

Image Attachments
the_area.jpg
 
 
 

Posted: 01 May 2008 05:57 AM   [ # 9 ]
Occupation: Freelance Artist
Gold member
Avatar
RankRankRank
Location: Columbia, SC
Total Posts:  78
Joined  2006-08-21

In older versions the smoothness option in the displacement settings could be disabled to prevent tearing like what you’re seeing.  In newer versions, this seems to have less impact/control on the tearing.

See my 12/25/2006 blog entry for an example:
click on the link

 
 
 

Posted: 01 May 2008 08:54 AM   [ # 10 ]
Occupation: Artist
Administrator
Avatar
RankRankRankRank
Location: Corte Madera CA
Total Posts:  318
Joined  2006-08-11

What Jeff said smile

In the meantime, until the bug gets fixed, I’d recommend chamfering the edges, and smoothing the result, that should probably avoid the splitting and also reduce the “bulging effect” that’s caused by smoothing the 6 sided box.

- Neil

 
 
 

   
1 of 2
1
 

Forum theme Quick Jump
RSS 2.0 RSS 2.0 Atom Feed Atom Feed