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:
I guess, in this thread:
https://planetside.co.uk/forums/index.php/topic,17370.msg168424.html#msg168424
you could maybe find some solution?
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)
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!
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....
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
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.
Thanks, Jon. But I am not entirely convinced. There are some strange hard edges and soft areas with certain angles.
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'.
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.
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.
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.
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.
That's too bad. A 'visualize normal' (from a sideline) may be handy in that case.
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.
I second that, and I would love to be able to use it on object as well. Ideally something to get the curvature of the object, which could then be warped and plugged back to mix materials.... No sure you could do that without raytracing though :/
Quote from: KyL on December 23, 2019, 12:03:15 PMI second that, and I would love to be able to use it on object as well. Ideally something to get the curvature of the object, which could then be warped and plugged back to mix materials.... No sure you could do that without raytracing though :
You can warp these processes already. The issue was limiting the facing to a general north slope, which we were thinking would need a smoothed version of the terrain. Or are you talking about looking at one model to be applied to another?
Quote from: Hetzen on December 23, 2019, 12:46:03 PM... talking about looking at one model to be applied to another?
I think that's it. Least for me. There is a lot of flexibility cut out with these limitations. Certainly a lot of creativity.
True, but there are usually work arounds. I'm wondering if the best way to define a northern slope more accurately would be to animate a light travelling in the arc of the sun from morning to evening. Then render a series of top down views of your landscape, with all other lighting switched off, so you create a black and white mask of where the sun hits the terrain. Then combine say 12 sequential frames of the suns positions, to use as a mask for your snow / planting / weathering areas.
Quote from: Hetzen on December 23, 2019, 01:02:07 PMTrue, but there are usually work arounds. I'm wondering if the best way to define a northern slope more accurately would be to animate a light travelling in the arc of the sun from morning to evening. Then render a series of top down views of your landscape, with all other lighting switched off, so you create a black and white mask of where the sun hits the terrain. Then combine say 12 sequential frames of the suns positions, to use as a mask for your snow / planting / weathering areas.
That's not a bad idea, certainly a unique approach. Perhaps not the most effecient lol.
Probably not, maybe just one render of the sun in a position that gives you what you need for that image.
It would be cool to be able to use a sideline with those sun shadows, use the last node to get a greyscale mask and apply to main line. But then you can still only use actual sun angle. Normals would be better. Smoothed normals...
If you need to render a mask first, want render should that be? Ortho, I presume. But that wouldn't get you complete coverage. Normal render would hide areas, where those 'certain-slope' veggies would not grow then.
Something I don't understand. When taking a (smoothed) vector and using one component to color an angle, adding a later(!) Pf still messes up that angle with 'subangles'. Smoothing a basic finely displaced terrain shader also doesn't work with the smoothing shader. At least not in this 5 minute test.
Coloring angles with a visualize normal works, but I couldn't separate the colors to masks.
Anyway, here's something to play with. I have to devote my time to some biggish commissions now, so won't be able to pursue this much.