Planetside Software Forums

General => Terragen Discussion => Topic started by: N-drju on December 17, 2019, 03:35:32 PM

Title: How to displace an object (object's shader) through a displacement function?
Post by: N-drju on December 17, 2019, 03:35:32 PM
I realized that I might need to displace a few surfaces in the objects I wish to make. However, my first trials indicate that Terragen fakes displacement and instead of displacing the object per se, it simply applies "fake displacement". The surface does look as if it was rough / indented but in fact it's just a flat surface with some depth effects applied...

My question would be, how to make real displacements on a surface in a way that it actually changes an object's shape. Or should that be done while actually building an object in, say, Blender not in Terragen?
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: WAS on December 17, 2019, 03:39:47 PM
Quote from: N-drju on December 17, 2019, 03:35:32 PMI realized that I might need to displace a few surfaces in the objects I wish to make. However, my first trials indicate that Terragen fakes displacement and instead of displacing the object per se, it simply applies "fake displacement". The surface does look as if it was rough / indented but in fact it's just a flat surface with some depth effects applied...

My question would be, how to make real displacements on a surface in a way that it actually changes an object's shape. Or should that be done while actually building an object in, say, Blender not in Terragen?

Are you using force ray tracing? That would mean the displacement is read as bump. For actual displacement alterations to the objects, you'll probably need to use the Mesh Displacer.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: N-drju on December 17, 2019, 04:11:29 PM
Imported objects do not have mesh displacer.

Also, I'm not sure what ray tracing has to do with it.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: WAS on December 17, 2019, 04:40:59 PM
Quote from: N-drju on December 17, 2019, 04:11:29 PMImported objects do not have mesh displacer.

Also, I'm not sure what ray tracing has to do with it.

It's only in Creative/Pro, I believe (Pro for sure). I'm not sure why. Though as you can see, a wine glass is most certainly an imported object. :P

When an object is Ray Traced (Force Ray Tracing) the displacement of shaders is done in Bump Mapping, which has no real displacement. It's simulated displacement by lighting alone.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: N-drju on December 17, 2019, 04:51:19 PM
Well, I can't find either the "mesh displacer" nor the "force ray tracing" options... Guess I'm off to Blender then... ::) ::)
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: WAS on December 17, 2019, 04:55:31 PM
It's under the object settings.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: Dune on December 18, 2019, 02:39:51 AM
You have to choose Force Displacement for an (imported) object to be really displaced. Ray tracing (default) can't handle displacement, but only does bump, as WAS wrote. But beware that force displacement can tear an object apart. Make sure it has enough subdivisions.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: WAS on December 18, 2019, 03:19:01 AM
Quote from: Dune on December 18, 2019, 02:39:51 AMYou have to choose Force Displacement for an (imported) object to be really displaced. Ray tracing (default) can't handle displacement, but only does bump, as WAS wrote. But beware that force displacement can tear an object apart. Make sure it has enough subdivisions.
Yeah it can. Even subtle warp destroyed lighting against terminators on that wine glass. And the roughness of 0.5 I believe seems more rough than usual.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: N-drju on December 18, 2019, 03:27:25 AM
Quote from: Dune on December 18, 2019, 02:39:51 AMYou have to choose Force Displacement for an (imported) object to be really displaced. Ray tracing (default) can't handle displacement, but only does bump, as WAS wrote. But beware that force displacement can tear an object apart. Make sure it has enough subdivisions.

This is probably the answer I look for, because I have no mesh modifiers. Which sucks. >:( Must be the pro version thing, like WAS mentioned.

I'll try it out after I finish the current render. I'll experiment with subdivison amount too!
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: Dune on December 18, 2019, 03:47:48 AM
Is mesh modifying limited to pro? You can simply plug any fractal in and it distorts an object, no real 'mesh modifiers' necessary. If you can get that to work, you just need to set reasonable values in the PF.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: KlausK on December 18, 2019, 04:18:18 AM
Yes, "Custom mesh deformation on objects" is only available in the Pro version (look at the TG4 Comparison chart on the planetside homepage).

But you can also disable "Ray Trace Objects" on the "Advanced" tab of the "Render" node. The renderer then uses micropoly rendering on objects as well. That affects all objects in the scene. Increase Micropoly Detail accordingly. You can read about that in the Wiki.

CHeers, Klaus
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: Hannes on December 18, 2019, 04:36:42 AM
Is the render method ("force displacement") only available in the pro versions as well, or only the mesh deformation?
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: KlausK on December 18, 2019, 05:01:23 AM
Can`t tell.
But with "Raytrace Objects" turned off you do not need that.
But: in my tests shadows of displaced imported objects do not reflect the displacement.
Can`t remember if that is always the case, regardless of the method to deform the object (Mesh Displacer, Force Displacement etc).

CHeers, Klaus
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: Hannes on December 18, 2019, 05:24:38 AM
Did a quick and dirty (ugly) test. I used the same imported sphere. The left one uses a PF for mesh deformation and the right one is set to "force displacement" using another PF in the displacement slot of the default shader.
As you can see deformation produces a correct shadow, whereas displacement doesn't.

By the way, the sphere is quite high poly.
Title: Re: How to displace an object (object's shader) through a displacement function?
Post by: N-drju on December 18, 2019, 12:44:22 PM
Quote from: Hannes on December 18, 2019, 05:24:38 AMAs you can see deformation produces a correct shadow, whereas displacement doesn't.

Spot on. But having such a tiny thing as a "premium" feature just sucks.

As for your previous question, "force displacement" render method is available in Creative, but I don't think it will be of use since it's the mesh that is a central point of the problem...