Planetside Software Forums

Support => Terragen Support => Topic started by: KyL on May 27, 2016, 08:17:50 PM

Title: object displacement shadows
Post by: KyL on May 27, 2016, 08:17:50 PM
Hey folks,

I am having an issue with object displacement (RTO off).
Scrolling through some old thread I learned some tips and tricks but couldn't get an answer to my issue. First let's start with a picture.
[attach=1]

Here the edges of the objects are exploding because there is not offset in the displacement, so everything is displaced upwards. This is a normal behavior.

However when I change my displacement to have a correct offset and fix this issue, this happens:
[attach=2]

The edges are correct, but now something is definitly wrong with the shadows. I tried to see if I could change the shadow bias of something related to the displacement bounds but I couldn't fix it.

The object is correct, vertices, normals, more faces at the edges.... everything looks good. I assume this is normal behavior caused by some limitation in the displacement of imported meshes, as I could remember from reading old threads, but maybe there is a workaround?

Here is the object if anybody wants to take a look
[attach=3]


Cheers!


Title: Re: object displacement shadows
Post by: Oshyan on May 29, 2016, 03:11:24 AM
How *much* are you displacing? Remember displacement is measured in *meters*.

- Oshyan
Title: Re: object displacement shadows
Post by: KyL on May 29, 2016, 03:55:41 PM
I depends on the texture, but I am displacing with a value that makes sense in real life. For this one I am displacing at 0.08, so 8cm. The offset is -0.04 so I have the middle point of my displacement map at the level of the undisplaced surface.
Title: Re: object displacement shadows
Post by: Oshyan on May 30, 2016, 02:55:09 AM
And how big is the object?

- Oshyan
Title: Re: object displacement shadows
Post by: KyL on May 30, 2016, 08:48:14 AM
A bit more than 2m tall, you can check the .tgo I joined in the first post!
Title: Re: object displacement shadows
Post by: Matt on June 05, 2016, 09:44:37 PM
It's the same problem as in this thread:

http://www.planetside.co.uk/forums/index.php/topic,20213.msg200683.html#msg200683

It goes dark with negative displacement because the shadows are cast from the non-displaced object. This is because the ray tracer (which is used for shadows) doesn't support displacement on imported objects yet. It requires a big change to the renderer to support this, but it is on the roadmap for the future.

Matt
Title: Re: object displacement shadows
Post by: KyL on June 06, 2016, 12:40:38 AM
Ok that's what I thought.
So even with RTO off, shadows are still raytraced. Good to know. I can imagine why this limitation is not trivial to remove...

Thanks for the link and the help Matt!