Vector Displacement Shader : The offsets

Started by fleetwood, June 05, 2013, 11:52:15 AM

Previous topic - Next topic

Matt

Quote from: fleetwood on June 07, 2013, 08:00:15 PM
Thanks, Matt for the insights


I am using an EXR format map which is built on a plane object in C4D.
The background of the EXR is gray in a viewer.
I have been using the colour setting  Data is Linear in every render.
I did try the most straight forward connections first  :) Just can't find one that works.

I am trying your suggestion of one Add Vector of -0.25,-0.25,-0.25.
I have placed it directly between the Image Shader and the Vector Displacement.
It is producing the same "block" effect I want to get rid of.

Then I don't understand how you got rid of the block effect in your other image  :o Your nodes would still have that effect because they operate on everything, they're not restricted to just the image projection. What am I missing?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Right this second I've just added some offset parameters to the Image Map Shader which should be useful in a future version.

Does C4D have any offset options on the displacement map export?

In the mean time, you could try multiplying your offset vectors by a mask (a white image with the same projection settings).

Matt
Just because milk is white doesn't mean that clouds are made of milk.

fleetwood

#17
I don't see any offset options on the C4D side.

My hunch is that the nodes I came up with work because  they cause offsets to balance in the middle.

I think that is the reason that the value 0.25 works instead of the more logical 0.5.
It seems that the vectors from the image are lowered by 0.25 while the planet is lifted by 0.25 (verified that Alt is 2.5m in the flat in the preview window, plus it can be seen in the render by the position of the Blue sphere located at 2.5 meters altitude).

I do know that my method only works with the individual X,Y,and Z vectors fed into the Build Vector.
I wonder if what happens inside the Build Vector when it is fed vectors is key.

Attached is the TGD with the EXR file I'm using if anyone would like to fool with it.

Dune

Is this the answer to your problem? In the experiments I did with VDisp by image map I had a black background, not gray.

fleetwood

#19
Yes that's it !
Thanks Dune  :D

Using the Vector Displacement as the child of a surface shader and blending back in a single Add Vector using blend as coverage allowed eliminating all of the extra nodes and keeps the planet at 0 altitude.

Just need one Add Vector now as Matt said. ( I have the Add Vector is set -0.46,-0.46,-0.46, which seems a little strange but that is
the exact amount needed to bring the displacement level. At least it is far closer to the expected -0.5)

A Plus is that the displacement has fewer distortions from what was modeled .

Matt

#20
Quote from: fleetwood on June 07, 2013, 09:04:38 PM
I don't see any offset options on the C4D side.

My hunch is that the nodes I came up with work because  they cause offsets to balance in the middle.

I think that is the reason that the value 0.25 works instead of the more logical 0.5.
It seems that the vectors from the image are lowered by 0.25 while the planet is lifted by 0.25 (verified that Alt is 2.5m in the flat in the preview window, plus it can be seen in the render by the position of the Blue sphere located at 2.5 meters altitude).

I do know that my method only works with the individual X,Y,and Z vectors fed into the Build Vector.
I wonder if what happens inside the Build Vector when it is fed vectors is key.

Attached is the TGD with the EXR file I'm using if anyone would like to fool with it.

Ah, I see what's happening now. Your vectors are being converted into scalars automatically when you plug them into the Build Vector. Now, because you subtracted 0.25 from them, this produces some negative values, but when these negative vectors are converted into a scalar they become positive again. This is similar to taking the absolute value (where negative values are reflected to become positive). It's a very unexpected way of solving the problem but it works in this case! :) However, you have to be careful with this method. If any of the values in the displacement map are below 0.25 then they will get clamped and reflected back in the other direction.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

#21
Quote from: fleetwood on June 08, 2013, 01:08:32 PM
Yes that's it !
Thanks Dune  :D

Using the Vector Displacement as the child of a surface shader and blending back in a single Add Vector using blend as coverage allowed eliminating all of the extra nodes and keeps the planet at 0 altitude.

This isn't right. You need to mask it with a value of 1 wherever the image is. That's why I suggested masking/blending with a second image map shader with a white image. If you mask by the original vector, you're distorting the values.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

fleetwood

#22
Thanks Matt for looking into this.

Using a pure white image mask as a blender is working perfectly to show all the displacement including the lowest portions
and the amount subtracted from the original vector is the now the anticipated -0.5, -0.5, -0.5.
 

Thanks again for all the information and help.

Matt

Just because milk is white doesn't mean that clouds are made of milk.

Dune

A simple shape shader of 10x10 will as well as a blender.

Matt

Quote from: Dune on June 09, 2013, 03:14:10 AM
A simple shape shader of 10x10 will as well as a blender.

Only if you can guarantee that the border blending will be the same ;)
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Yes. In this case it was, and when I made it a circle of 10x10 it also worked as that was obviously slightly smaller than the max map size (apparently).


Mid-Knight Acchan

#27
Hello. I am studying with a very wonderful Tpic.
When connecting to the Surface layer, problems will occur in shadows.
Am I doing something wrong?

>> That's why I suggested masking/blending with a second image map shader with a white image.
The mask image is a blank image map.
I started 3D landscape with "Bryce" and am currently editing Japanese Wiki as a Terragen user. I am riding the Kawasaki ZEPHYR1100. I am a reader.

Dune

You are masking by an image map. It's not included, so it's hard to see what's going on, but I guess it cuts off the displacement. Better check its location and settings, or include it in a zip.