Author Topic: Boolean Add for object intersections  (Read 553 times)

Offline treddie

  • Member
  • *
  • Posts: 149
Boolean Add for object intersections
« on: September 20, 2017, 07:04:40 PM »
Is there a way to find the intersection of objects in a scene?  For instance, I am trying to create a contour, or rather, an intersection edge for a terrain and a lake, but there seems to be no way to get to the lake's mesh coordinates, let alone the terrain's.  I want to find the intersection between the two that I can then add a thickness to, to make a contour shape mask around land masses in an ocean.  If I could apply a Boolean Add to the two meshes, that would work, but again, the Lake node does not allow access to its surface mesh (there are no functions you can connect a Lake object to).

So, so far,...Oh, I can't resist...this problem is..."dead in the water".

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11679
  • Holy snagging ducks!
Re: Boolean Add for object intersections
« Reply #1 on: September 20, 2017, 09:33:59 PM »
Unfortunately there is no such functionality to detect intersections or distances between things in Terragen at present (aside from specific things like the Distance Shader, which is based on the camera location).

- Oshyan

Offline treddie

  • Member
  • *
  • Posts: 149
Re: Boolean Add for object intersections
« Reply #2 on: September 20, 2017, 09:39:30 PM »
Thanks Oshyan.  Are there such plans in the near future?

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11679
  • Holy snagging ducks!
Re: Boolean Add for object intersections
« Reply #3 on: September 20, 2017, 09:40:55 PM »
It's something we have talked about having in the future, but I don't know if Matt has any specific plans or time frame for it. I can say it has not been discussed as something that would be added soon, though.

- Oshyan

Offline treddie

  • Member
  • *
  • Posts: 149
Re: Boolean Add for object intersections
« Reply #4 on: September 20, 2017, 10:54:59 PM »
Thanks for the info.

Offline Dune

  • Member
  • *
  • Posts: 12608
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Boolean Add for object intersections
« Reply #5 on: September 21, 2017, 06:14:05 AM »
I suppose the lake is flat, so the intersection edge for a terrain and a lake would be based on the altitudes of the terrain at lake level. So why not use the 'displacement to scalar' and make a mask out of that? Or perhaps I misunderstand your problem....
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline treddie

  • Member
  • *
  • Posts: 149
Re: Boolean Add for object intersections
« Reply #6 on: September 23, 2017, 10:29:37 PM »
No, you have it right Dune.  In fact, I was working on the idea, and haven't gotten it to work just yet.  So little time with my taxi driving schedule!

Problem seems to be getting TG to give me a contour of the terrain at just one altitude.  Have been looking at the Contour Shader, and Distribution Shader, but no luck yet.  Feeling that I am getting close, though.

Offline Dune

  • Member
  • *
  • Posts: 12608
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Boolean Add for object intersections
« Reply #7 on: September 24, 2017, 07:28:52 AM »
I still don't understand the problem, even a surface shader or distribution shader can give you a contour at one altitude if you restrict the altitudes.
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline treddie

  • Member
  • *
  • Posts: 149
Re: Boolean Add for object intersections
« Reply #8 on: September 26, 2017, 12:15:40 AM »
This graphic is probably the best way to describe where I am at, and where I am trying to go.

I can accomplish everything easily on the left hand side, but I am trying to achieve what you
see on the right hand side:

EDIT:  I had made a slight mistake in the image.  This is corrected now:

76460-0

The only method I can think of to make this work is to do an ortho camera view from way above the scene at a high enough resolution, turn that into the mask you see on the left side,
then take that image into Photoshop and create a "bloated" boundary like you see on the right, THEN, bring that back into TG as a mask.

But I would really like to do it all in TG.


« Last Edit: September 26, 2017, 05:14:20 PM by treddie »

Offline Dune

  • Member
  • *
  • Posts: 12608
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Boolean Add for object intersections
« Reply #9 on: September 29, 2017, 01:24:57 PM »
So what you really want is a thicker range, if I'm correct. So if you take a displacement to scalar function from the terrain, add a color adjust and set some altitude range in the black and white sliders, then add a difference scalar, where the second input has some added scalar (distance between the two altitudes), you should get a broad band around the water level.
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline treddie

  • Member
  • *
  • Posts: 149
Re: Boolean Add for object intersections
« Reply #10 on: September 29, 2017, 10:43:15 PM »
Wouldn't that just give the example on the left, since a vertical cliff would have the same plan view, regardless of altitude?  Terrain that always has a decent slope, no matter where would always give a reasonable broadness to the band, although not necessarily the same thickness around.  A vertical cliff thrown in there would result in no thickness to that band, but only where the cliff is, no?

Offline Dune

  • Member
  • *
  • Posts: 12608
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Boolean Add for object intersections
« Reply #11 on: September 30, 2017, 07:14:15 AM »
You're right. The only thing I could then think of is to have two 'identical' terrains, where one has smooth slopes around the water for the band, the other as real terrain. But it would be hard or nearly impossible, I'm afraid.
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline Hetzen

  • Member
  • *
  • Posts: 1520
Re: Boolean Add for object intersections
« Reply #12 on: September 30, 2017, 12:06:17 PM »
Is the idea to create a beach extrusion around a water edge? I'm not really understanding what you want to do with this band.

Offline pokoy

  • Member
  • *
  • Posts: 140
    • mswee.net
Re: Boolean Add for object intersections
« Reply #13 on: September 30, 2017, 01:03:43 PM »
That's actually a good case to show why it would be beneficial to have an ambient occlusion node, it could be used as a mask, color variation on terrain, distribution area for objects/plants etc. It wouldn't be tied to certain edge cases but help in a wide range of situations.

Offline treddie

  • Member
  • *
  • Posts: 149
Re: Boolean Add for object intersections
« Reply #14 on: September 30, 2017, 11:05:57 PM »
Quote
Is the idea to create a beach extrusion around a water edge? I'm not really understanding what you want to do with this band.

Actually, a mask for beach surf, or anything "beach", like the wet only portion of the beach sand.  Right now, I'm just experimenting with the idea of power-fractaling the mask to let white surf to show through.


Quote
That's actually a good case to show why it would be beneficial to have an ambient occlusion node, it could be used as a mask, color variation on terrain, distribution area for objects/plants etc. It wouldn't be tied to certain edge cases but help in a wide range of situations.

And a good complete set of Boolean surface operators.