Boolean Add for object intersections

Started by treddie, September 20, 2017, 03:04:40 PM

Previous topic - Next topic

treddie

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".

Oshyan

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

treddie

Thanks Oshyan.  Are there such plans in the near future?

Oshyan

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

treddie


Dune

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....

treddie

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.

Dune

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.

treddie

#8
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:

[attach=1]

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.



Dune

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.

treddie

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?

Dune

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.

Hetzen

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.

pokoy

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.

treddie

QuoteIs 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.


QuoteThat'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.