Author Topic: Object and terrain interactions  (Read 500 times)

Offline iaminonsiner

  • Member
  • *
  • Posts: 121
    • alteration-universe.com
Object and terrain interactions
« on: February 06, 2019, 06:03:58 PM »
Hello !

I have question about objects :

How can I link an object and the ground on which it is placed? I'm not sure how to illustrate this, but I'd like to do it in the future with buildings and pretend that the building is a "piece" of the terrain and not an object ON the terrain... In my mind, I want to see a building with the same colour / textures of the terrain ( not the effects like power fractal or twist, just the " surface ").

Image for illustrate :




I think I've already seen this on the forum but I can't find the topics.

Thank you guys.

EDIT : as if I had made an "extrusion" from the ground and not an import from an external object
alteration-universe.com

Offline archonforest

  • Member
  • *
  • Posts: 3965
  • !AMIGA RULEZ!
Re: Object and terrain interactions
« Reply #1 on: February 06, 2019, 06:20:13 PM »
Just connect the PF that covers the ground to the surface layer of the object. Then you will have the same coverage.
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram
Amiga 1200 8Mb ram, 8Gb ssd

Offline iaminonsiner

  • Member
  • *
  • Posts: 121
    • alteration-universe.com
Re: Object and terrain interactions
« Reply #2 on: February 06, 2019, 06:27:28 PM »
Just connect the PF that covers the ground to the surface layer of the object. Then you will have the same coverage.

How ? and what's the "PF" ?
alteration-universe.com

Offline iaminonsiner

  • Member
  • *
  • Posts: 121
    • alteration-universe.com
Re: Object and terrain interactions
« Reply #3 on: February 06, 2019, 06:30:01 PM »
I tried to connect the " base colour " of a default scene to the sphere object and I think it works.

Do you think can I do the same for the terrain geometry ?


« Last Edit: February 06, 2019, 07:15:05 PM by iaminonsiner »
alteration-universe.com

Offline archonforest

  • Member
  • *
  • Posts: 3965
  • !AMIGA RULEZ!
Re: Object and terrain interactions
« Reply #4 on: February 06, 2019, 06:38:15 PM »
Just connect the PF that covers the ground to the surface layer of the object. Then you will have the same coverage.

How ? and what's the "PF" ?

Ahh...sorry. PF is the short version of Power fractal. Take a look of the attached file. Is this what u need?
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram
Amiga 1200 8Mb ram, 8Gb ssd

Offline iaminonsiner

  • Member
  • *
  • Posts: 121
    • alteration-universe.com
Re: Object and terrain interactions
« Reply #5 on: February 06, 2019, 07:40:18 PM »
Power fractal obviously and yes this is something like that.

Do you think can I do the same for the terrain geometry ? ( You can see the image above )


alteration-universe.com

Offline archonforest

  • Member
  • *
  • Posts: 3965
  • !AMIGA RULEZ!
Re: Object and terrain interactions
« Reply #6 on: February 06, 2019, 07:53:18 PM »
Power fractal obviously and yes this is something like that.

Do you think can I do the same for the terrain geometry ? ( You can see the image above )
I am not sure about the question...Can u explain?
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram
Amiga 1200 8Mb ram, 8Gb ssd

Offline iaminonsiner

  • Member
  • *
  • Posts: 121
    • alteration-universe.com
Re: Object and terrain interactions
« Reply #7 on: February 06, 2019, 08:01:07 PM »
Power fractal obviously and yes this is something like that.

Do you think can I do the same for the terrain geometry ? ( You can see the image above )
I am not sure about the question...Can u explain?

On your image ( and mine ), I have the same color ( object and terrain ) but the object is too smooth and I was wondering if the geometry of the terrain could also "apply" to the object like color? Like an extrusion, like if the object IS the terrain and not just an imported object.
« Last Edit: February 06, 2019, 08:02:55 PM by iaminonsiner »
alteration-universe.com

Offline archonforest

  • Member
  • *
  • Posts: 3965
  • !AMIGA RULEZ!
Re: Object and terrain interactions
« Reply #8 on: February 06, 2019, 08:19:57 PM »
Got it. Not sure if this is possible since the PF will look different on the small sphere. Perhaps you can just attach a PF to the sphere's displacement input and play with the setting until it looks more on less than on the planet...

I will think about this tomorrow. Perhaps someone will come up with a good idea. I am not a power TG user at all.
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram
Amiga 1200 8Mb ram, 8Gb ssd

Offline Dune

  • Member
  • *
  • Posts: 15071
    • www.ulco-art.nl
Re: Object and terrain interactions
« Reply #9 on: February 07, 2019, 05:09:38 AM »
If it's a low poly object, displacements won't work well. You'd have to set the object to 'force displacement' anyway. So you need objects with a high poly number, and feed your last terrain shader through a transform shader set to final/world position. But don't expect very much of it, especially not in terms of big displacements; the object will probably be torn apart.
For just a sphere, better use the internal sphere.

Offline digitalguru

  • Member
  • *
  • Posts: 420
Re: Object and terrain interactions
« Reply #10 on: February 18, 2019, 11:25:56 PM »
If you delete the UVs on your poly object it will shade any power fractals in the same space as the terrain.You won't see any scaling / texture placement differences and it will appear to blend in better.

You could also try to convert your mesh into a displacement map, (preferably a vector displacement map) and then use a displacement shader to place it on your terrain - it would look like it's growing out of the terrain.

some posts on a Blender forum:
https://blender.stackexchange.com/questions/1161/how-to-make-a-displacement-map-from-existing-3d-geometry
« Last Edit: February 18, 2019, 11:59:24 PM by digitalguru »

Offline digitalguru

  • Member
  • *
  • Posts: 420
Re: Object and terrain interactions
« Reply #11 on: February 19, 2019, 12:44:28 AM »
This works with a teapot stripped of UVs  :)
88180-0
[ Specified attachment is not available ]




Offline Dune

  • Member
  • *
  • Posts: 15071
    • www.ulco-art.nl
Re: Object and terrain interactions
« Reply #12 on: February 19, 2019, 06:11:00 AM »
If you don't want to strip your object of UV's, it can be done with UV'd objects too, just pull your shaders through a transform shader set to world/final position.

Offline digitalguru

  • Member
  • *
  • Posts: 420
Re: Object and terrain interactions
« Reply #13 on: February 19, 2019, 01:06:03 PM »
If you have the professional version of Terragen, you can create a displacement map from an object:
Original geometry:

Object shape displaced from terrain


You can render the geo with an orthographic camera and output the tgSurfPos (surface position) as a Render Element. The green channel of the tgSurfPos is the vertical position, equivalent to displacement values (render as 32bit EXR). You can then pipe this onto your surface using a Displacement shader and a Green to Scalar to extract the vertical channel. The downside is that it won't work with complex geometry like the teapot in the previous example (that would need vector displacement) but for simple geo that has no undercuts it works quite well.

When you render the render element for the tgSurfPos file, make sure the object is on a flat undisplaced terrain or you'll get that baked into the map.

example TG scene:
https://www.dropbox.com/s/nnkgl0m204y1f6m/object_displacement.zip?dl=0

I did try a render with the teapot with UVs and the transform shader, but I get displacement cracks where the UV shells are:
« Last Edit: February 19, 2019, 01:14:24 PM by digitalguru »

Offline Dune

  • Member
  • *
  • Posts: 15071
    • www.ulco-art.nl
Re: Object and terrain interactions
« Reply #14 on: February 19, 2019, 01:41:41 PM »
Strange. So the UV-mapping is really disturbing the displacement somehow. I wonder why that is so. In the default shader UV is automatically assigned, so maybe when using a surface shader it won't happen... Have to try that, as I can imagine people won't like to get their objects stripped of UV's. In fact I wouldn't know how to purge the UV mapping (unless in LW or so). I don't think you can delete UV's in Poseray.