Displacement issue in V-ray

General discussion on V-Ray for SketchUp

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 11:52 am

VfSU Manual wrote:The Amount value may possibly be the most important value within the rollout, as this value will
determine the scale of all displacement. The Amount value is the number of scene units of an
object with the texture multiplier set to 1.
This means that one could adjust the affect of
displacement through either the Amount value or the texture multiplier, but because the Amount
value affects all displacement, it is recommended that it be left constant and the texture
multiplier be used to adjust the displacement of an individual material.


From this I'd expect that if my scene units where millimeters then a multiplier of 100 would give me a displacement of 100mm.
However, that's not what happens.

Attached is an example. The cube us 1000x1000x1000mm. If the manual was true I should have to set the multiplier to 1000. But that makes it way too big. V-Ray uses inches instead. As with the Override Focal Length property and the mapping units when you don't have SU UV mapping.
So to get 1000mm displacement: 1000 / 25.4 = 39.37
Result is the attached image.


Damien has previously mentioned that V-Ray uses the SU scene units. But I don't see that from my experience. If anything, it might be using SU's internal unit which is always in inches.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby nomeradona » Tue Apr 14, 2009 12:06 pm

hi thomthom, thanks to that. i think i need to see now between the units. i remember also last time that you share how SU map the UV in inches, therefore i have resized my maps into 4X4 inches or 2x2 inches and it really works. as for the displace the graph was measured in pixel against cm graph so its a kinda based on the visual result and the pure black color has that ratio, the rest are not and these depends on the gradient from white to black. i myself still lokkin on the mapping issue and hope you could further shed some lights here to how displacemnent works. but the UV i beleive vray is using its own 1x1 inch unit.
0

nomeradona 
 

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 12:32 pm

nomeradona wrote:i myself still lokkin on the mapping issue and hope you could further shed some lights here to how displacemnent works.

What mapping issue?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby nomeradona » Tue Apr 14, 2009 1:21 pm

thomthom wrote:
nomeradona wrote:i myself still lokkin on the mapping issue and hope you could further shed some lights here to how displacemnent works.

What mapping issue?
how the displacement maps work in Vray. How the gray scale will be displace. its a kinda small test im doing here. i am setting 11 colors from white to black (9 grays in between from white to black) i have also list down the RGB numbers. I am planning to measure how the displacement behave.

i just plan base on visual, but i know you have your test in mathematical forms. so if you have some thoughts to shed lights on this, i will appreciate.
0

nomeradona 
 

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 1:55 pm

Seems to be exponential. Wonder if it's possible to make it linear. Need to experiment. Maybe ask Damien.

I noted that turning off the filtering of the displacement map made it smoother. When it was on MipMap I got some weird artefacts.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby nomeradona » Tue Apr 14, 2009 5:40 pm

i made a similar test, and i found out a lot of things how vray behave with the grayscale. its smilar with yours thom thom. i will post later my images..

but these are the following facts.

1. that the pure white with the multiplier 1 will be displace one inch perpendicular to the face.
2. vray works in inches. not centimeters
3. if you want to remove artifacts, use non filter and add blur in your displacement map. I found using Normal map seems better. i can prove it yet. but the amount of detail is excellent.
see this post viewtopic.php?f=81&t=18336
0
Last edited by nomeradona on Wed Apr 15, 2009 11:26 am, edited 1 time in total.

nomeradona 
 

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 6:16 pm

I was wondering if there was any of the other settings that would make V-Ray treat the grayscale values linear instead of exponential. But I've yet to find it.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 6:17 pm

hmm.... could it be because I use 24bit images... Wonder if HDRI images will differ in behaviour...
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 6:38 pm

I was correct in my suspicion.

When I converted the 8bit/color image to 32bit/color the medium 8bit gray (RGB 128,128,128) did not convert to 32bit medium gray (RGB 0.5, 0.5, 0.5) Instead it came out as RGB 0.216, 0.216, 0.216.

When I created a new grayscale image. This time in 32bit per channel, going from 0.0 to 1.0 with 0.1 increment I got a steady displacement.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby thomthom » Tue Apr 14, 2009 6:40 pm

But I wonder why I got the strange streaks in the displacement. I saw them in the 8bit version before I turned of filtering...
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby nomeradona » Wed Apr 15, 2009 11:21 am

thomthom wrote:But I wonder why I got the strange streaks in the displacement. I saw them in the 8bit version before I turned of filtering...
i guess that one could not be perfected, that is why blurrying a bit the displacement is a key one. but even you do this streaks will still be there. waht about vray max? any idea.
0

nomeradona 
 

Re: Displacement issue in V-ray

Postby thomthom » Wed Apr 15, 2009 11:25 am

Don't have V-Ray for Max. :(
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby nomeradona » Wed Apr 15, 2009 11:28 am

ah ok. anyone? let me find also in the Filipino forum.
0

nomeradona 
 

Re: Displacement issue in V-ray

Postby thomthom » Mon Oct 05, 2009 10:53 pm

FYI, the reason the 8-bit image has a curve is because the default V-Ray settings is to apply a 2.2 gamma correction.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby thomthom » Wed Oct 14, 2009 9:09 pm

thomthom wrote:FYI, the reason the 8-bit image has a curve is because the default V-Ray settings is to apply a 2.2 gamma correction.

The 2.2 correction stems from the General Switches I think. You can override the displacement gamma for that material with the inverse gamma - in the case of 2.2 you would have to enter 0.4545 in order to make the 8-bit displacement linear.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: Displacement issue in V-ray

Postby thirty6 » Fri Aug 19, 2011 9:35 pm

ThomThom

Brilliant piece of info

Possible use as disp for roof tiles, if you can calculate the increase in height of the plane?
0

thirty6 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to V-Ray

Who is online

Users browsing this forum: No registered users and 7 guests

Visit our sponsors: