snow against side of, say trees

Started by Dune, December 21, 2019, 08:19:00 AM

Previous topic - Next topic

Dune

Nice challenge for you guys and girls. I've tried a lot f things, like rotation of slope, camera projection, and get normal and such, but I can't get a decent mask on one side of an object.
Like so:

Hannes


WAS

Yeah I was just about to say, the NSWE masks would probably be the best bet. I'd imagine the tricky part is blending this with your terrain/snow.

https://planetside.co.uk/forums/index.php/topic,25781.msg255686.html#msg255686 (To save you some setup)

Dune

Thanks guys. I had forgotten about that thread (even found my own solution there, back then). But I now see what I probably did wrong; I think the get normal needs a compute terrain, and I often delete that. Have to check!

Dune

Works without plugging in a compute terrain, but I can't seem to rotate Y, even when using a get normal in texture. Or rotating vector first, but maybe it needs to build a vector first from something. Well, experimentation is always nice....

Hetzen

Here's a mask that works with degrees to set the angle on a XZ projection. It uses a sine curve wrapped around 360 degrees, the peak is the angle you set, the black and white points can be adjusted to tailor the tightness of the mask.

XZ Angle Mask.jpg

WAS

Quote from: Hetzen on December 22, 2019, 12:04:05 PMHere's a mask that works with degrees to set the angle on a XZ projection. It uses a sine curve wrapped around 360 degrees, the peak is the angle you set, the black and white points can be adjusted to tailor the tightness of the mask.

XZ Angle Mask.jpg

Wow, great share Hetzen. That single handily solves the blending issues I was having without even changing anything.

I'm trying to imagine what else this could be helpful for.

Dune

Thanks, Jon. But I am not entirely convinced. There are some strange hard edges and soft areas with certain angles.

Dune

So I've made another setup. Very simple, but works.

The only thing I'd like to know (and I remember having mentioned this way earlier); would it be possible to get an angle mask over larger areas, kind of smoothing terrain first? Then you'd really get the North slope of a mountain and not all tiny 'North slopes'.

Hetzen

Quote from: Dune on December 23, 2019, 02:29:44 AMThanks, Jon. But I am not entirely convinced. There are some strange hard edges and soft areas with certain angles.

Not sure what's going on. The only thing I can think of, are rounding errors when the surface is flat. The mask on the cone is correct.

Hetzen

Quote from: Dune on December 23, 2019, 02:33:42 AMSo I've made another setup. Very simple, but works.

The only thing I'd like to know (and I remember having mentioned this way earlier); would it be possible to get an angle mask over larger areas, kind of smoothing terrain first? Then you'd really get the North slope of a mountain and not all tiny 'North slopes'.

That works. I think smoothing a terrain would be the way to go.

Dune

You're right, cone works. I'll experiment a bit with smoothed terrain, but I wonder where the get normal gets its information from; last node or compute terrain? Because you'd need a separate line for the smoothed terrain, for the get normal to relate to, not the normal line.

Hetzen

The Get Normal samples 3 points at render time to work out which way the facet is facing. You may have to render out a smoothed terrain mask. I don't think the Get Normal will read one terrain to be applied to another.

Dune

That's too bad. A 'visualize normal' (from a sideline) may be handy in that case.

WAS

#14
I really wish the get normal/get altitude etc nodes worked with compute terrains in their main inputs. Same for contour. It can only contour main final terrain limiting it's uses. TG should be able to handle hidden pipeways of terrains and handle them as if they were a main terrain on a planet somehow.