Jump to content

Ways to make Displacement Mapping faster


martinfdc

Recommended Posts

  • Vectorworks, Inc Employee

1) It is one of the slowest things you can do in Renderworks, other than perhaps Lit Fog from multiple sources.

2) It can be mitigated, a bit.

Normally I set the detail in the texture itself to Medium, and the quality of Displacement Mapping (DM) in the Renderworks style no higher than High. The difference visually between High and Very High is negligible in most cases but the time increase is significant.

Do not combine DM with other time consuming shaders like Metal or Blur at high blur qualities. When youre setting up your DM texture, turn off pretty much everything else like Blurriness, Caustics, Blur and Indirect Lighting unless its controlling the light for the entire scene, so that your test renders that include DM are showing what you need to align and calibrate, but nothing else fancy. Inversely, disable Displacement Mapping when you are working on the others in test renders, only enabling Displacement Mapping AND Blur etc at the same time for your final rendering attempts.

In the Bump shader, if you don't have a lot of stark light (Like sunrise, sunset or hard lighting at night) in your scene, disable "Self Shadowing" for your displacement mapped textures, usually in well lit scenes you won't see the shadows anyway, but they will still be calculated and increase rendering time.

If you use DM, make sure you aren't using more Reflections in your renderworks style than you need. I often go with 2-3 for final renders, MAYBE 4 for very shiney rooms like bathrooms or large curtain wall offices, but for test renders 0-1 reflections is plenty. The main reason Reflection count matters is that DM creates thousands or hundreds of thousands of polygons and each of them needs to reflect light differently, the math gets crazy quite quickly, resulting in Renderworks needing to calculate millions of tiny reflections in even a simple scene that renders in seconds without DM enabled if the texture is complex.

When using DM, ONLY use it where the camera is staring directly at it. So if you have a huge brick wall, with the camera very close to one end of it, you might want to use DM textures near the camera, but not in the distance if it will be tiny or otherwise out of focus or frame. No matter what you have IN the frame, any texture you have DM included in will be calculated and generated, even if its behind the camera or on another floor above you. This is because Renderworks doesn't have a way of knowing what objects out of frame need to be included in light calculations/bounces until it finishes the math.

It looks really good, but Displacement Mapping can dramatically affect render times if overused or used inefficiently.

Link to comment

On top of everything Jim said, you can also use Parallax mapping in the bump shaders instead, to get the same effect without much time. However, Parallax won't make the geometry stick out like displacement does. For example, if you were to look at a brick wall from the side, you would be able to see the bricks elevated with Displacement mapping, but you'd see a flat surface with parallax. 
 

Use parallax on every surface you want the illusion of displacement but don't need to see the actual geometry distorted. It will not affect the render time and it looks pretty realistic. You can set it using the new 'Parallax Offset' setting in all bump shaders.

Link to comment

@SelinWould it be possible to have a tutorial video about parallax mapping and how to best use it. My biggest question would be: can it be used instead of the bump shader or as a combination of both. Also, which image does it use to take it's calculations from. I have noticed that it doesn't work if there is no image in the colour shader. Am I right on that?

 

Many thanks 

Link to comment

It works as part of a bump shader. It's essentially a cheap (time-wise) improvement on bump mapping. It takes an image if you have an image bump, or takes the bump pattern from the other bump shaders. It shouldn't matter if you have a Color image shader or not. Maybe try to bump up the offset value or the bump strength? 

I'll see if we can post a tutorial on that.

Link to comment

@Selin

 

Can't really seem to understand this. If you use the Parrallax shader on its own using a bump shader image then nothing happens. (Centre Pic) If I  use it with a little bit of bump applied as well then it seems to have an effect. If you use it on its own with an image in the colour shader then it works fine although the bricks look rather like sugar lumps! (Right PIC)5a73333909da5_ScreenShot2018-02-01at15_28_43.thumb.png.dc97e4a1f970b534e58680830f6fa15e.png

 

I've included the file as well. I would be really grateful if you could take a look and tell me how best I can use it. What I want to achieve is simple blue painted bricks.(Left Pic) Maybe its not meant for this kind of use?

 

Many thanks

 

Mark

 

 

Parrallax_shader.vwx

Link to comment

Hey @markdd, the reason you're not seeing any effects from Parallax in Parallax-Bump is that you have the Bump strength set to 0. So Parallax doesn't even start to work there. Like I said, it's just an enhancement on bump mapping to fake realism. Just by bringing the bump strength to 30% like the bump only texture, I get more realism with parallax like so:

5a734d1a855f4_ScreenShot2018-02-01at12_17_51.thumb.png.8ea279b9ef6e486ed84af8e894eeb85d.png

What I would do is, load the same image in both Color and Bump channels, put some bump strength and parallax on it.

 

Now, the reason you see a little bit of Parallax when you have a Color image even though the Bump strength is set to 0, is that the Color shader controls the intensity of other shaders. So, Parallax gets a greater than 0 value from the Color channel instead of the Bump channel. Essentially, Parallax mapping is controlled by both Bump channel and Color channel.
This is not clear from the VW UI I know, but each setting inside each shader is controlled by both the Color channel and the corresponding channel. For example, the reflectivity of each reflectivity shader (Metal, Glass etc.) is controlled by both the Reflectivity shader settings and the Color shader settings. This is why choosing a black color in the Color shader makes them look better, because black means zero and that means no intervention from the Color shader, all reflection values come from Reflectivity shader.

 

I hope this makes sense.

 

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...