Author Topic: North Face (Updated 22 May 07)  (Read 11260 times)

Harvey Birdman

  • Guest
North Face (Updated 22 May 07)
« on: May 17, 2007, 08:34:12 PM »
-
« Last Edit: April 27, 2008, 11:02:59 AM by Harvey Birdman »

Harvey Birdman

  • Guest
Re: North Face - V3
« Reply #1 on: May 18, 2007, 12:41:13 AM »
-
« Last Edit: April 27, 2008, 11:03:35 AM by Harvey Birdman »

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: North Face
« Reply #2 on: May 18, 2007, 02:25:11 AM »
Hi Harvey

Had a quick look at this and it's definitely a lot easier to use. There appears to be a slight problem with the shading though.

The attached image uses a black and white level of 0 and 1 respectively, so it should be shaded from white to nothing (underlying grey). Instead, it appears that there is a sharp cut off half way between the black and white levels.  I'll have a closer look on the weekend while I'm brushing up my maths for animating populations linked to camera position/orientation... icky geometry  ;)  At least the angles are working correctly, so you're pretty close.
« Last Edit: May 18, 2007, 02:57:24 AM by bigben »

Harvey Birdman

  • Guest
Re: North Face
« Reply #3 on: May 18, 2007, 02:37:31 AM »
It probably has to do with checking/unchecking the clamp white/clamp black boxes in the color adjust node at the output. Also note that altitude and slope constraints are added at the next step (same as you did it, I just don't include the final distribution shader in the face mask).

<edit>

Also note that the effect of the black level and white level is much more pronounced, since it affects the whole 360 degree circle, instead of just one quadrant.

</edit>
« Last Edit: May 18, 2007, 02:41:27 AM by Harvey Birdman »

Harvey Birdman

  • Guest
Re: North Face
« Reply #4 on: May 18, 2007, 01:40:13 PM »
-
« Last Edit: April 28, 2008, 03:44:42 PM by Harvey Birdman »

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: North Face
« Reply #5 on: May 20, 2007, 02:01:20 PM »
I was thinking along similar lines but using a circular gradient image with a curves adjustment (or just an increase in gamma) as a displacement function.  It's very hard to judge the effect of the edge of the mask on a normal terrain.  Got a bit side tracked so I haven't had a close look at your setup yet.

I fixed a problem with mine, but it's worth persisting with this as it makes selecting the angle of the face possible. Mine is more simplified, with only 4 direction options... and I exclude flat surfaces. If you're going to include flat surfaces it may help to leave them out until the end so that you can exactly see which parts of the terrain the functions are actually including.

Harvey Birdman

  • Guest
Re: North Face
« Reply #6 on: May 20, 2007, 07:59:26 PM »
-
« Last Edit: April 28, 2008, 03:45:08 PM by Harvey Birdman »

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: North Face
« Reply #7 on: May 20, 2007, 08:56:23 PM »
Most of my population masking is going to be linked to the camera for animations so the math will be a little easier in that it will involve calculating the angle between two coordinates. One will be an fov mask, similar to the mask generated by a through camera mask, but extending back to the camera position (and a wee bit wider than the camera's fov).  I've used an image map successfuly for this but it doesn't allow for changing fov. 

The circular masks I use are derived from camera distance (both spherical and non-spherical) but I'm sure people will find a use for a similar mask that they can place around a specific object (as one example) without having to add another camera.

You can nest conditional nodes nodes...  something like this: http://forums.planetside.co.uk/index.php?topic=1493.msg15004#msg15004 

Harvey Birdman

  • Guest
Re: North Face
« Reply #8 on: May 20, 2007, 09:56:08 PM »
-
« Last Edit: April 27, 2008, 11:04:12 AM by Harvey Birdman »

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: North Face
« Reply #9 on: May 20, 2007, 11:33:29 PM »
Hi Harvey

It's getting close.  I ran a few tests on my "bump" map (included in the zip from my current version).  The face range works really nicely. I think you'll find TG works with radians rather than degrees. All you need is to divide the input by 2Pi. I added this in but there still seems to be a small error in there. Try using face range settings of black = 0.499 and white = 0.5, and check out the results for 0,90,180 and 270.   Below are the first few images I tested (default face range).
« Last Edit: May 20, 2007, 11:36:28 PM by bigben »

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: North Face
« Reply #10 on: May 21, 2007, 12:21:48 AM »
Hi Harvey

I just fixed another glitch that we both had regarding flat surfaces.  It didn't make sense that my mask was showing flat surfaces, even though they were apparently in the correct direction.  This was because my reference "bump" was placed at the origin.

When the surfaces are flat the Y vector = 1 (and X,Z = 0) and the resulting colour of the mask is the angular vector of the position from the origin, not the vector of the normal in the XZ plane.

I added a condition setting the scalar to 0 if Y = 1 which fixed this in mine.  If you move the bump away from the origin with you setup you get the same thing.
« Last Edit: May 21, 2007, 12:26:01 AM by bigben »

Harvey Birdman

  • Guest
Re: North Face
« Reply #11 on: May 21, 2007, 12:27:57 AM »
Re flat surface - that's just how I check. I don't check for Y = 1, but I check sqrt(x^2 + Z^2) ; when that equals zero it's flat.

Re rads - crap. Figures. I really need to get some test terrain going before I muck with it more. How did you do yours?

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: North Face
« Reply #12 on: May 21, 2007, 12:42:11 AM »
You can use mine.

http://forums.planetside.co.uk/index.php?action=dlattach;topic=1520.0;attach=4122.

It's just a small image map (radial fill with curves adjustment) fed into the function of a displacement shader.

Harvey Birdman

  • Guest
Re: North Face
« Reply #13 on: May 21, 2007, 12:49:06 AM »
Cool - thanks. I'll play with this for a bit and see if I can debug it.

Harvey Birdman

  • Guest
Re: North Face
« Reply #14 on: May 21, 2007, 03:03:41 AM »
-
« Last Edit: April 27, 2008, 11:04:56 AM by Harvey Birdman »

 

anything