Author Topic: Coastal waves/foam thru functions?  (Read 21751 times)

Offline Hetzen

  • Member
  • *
  • Posts: 1254
Re: Coastal waves/foam thru functions?
« Reply #30 on: April 19, 2009, 03:26:25 PM »
Excellent work Dune. I'd also like to have a look at where you have taken that file.

Online cyphyr

  • Member
  • *
  • Posts: 3297
    • richardfraser
Re: Coastal waves/foam thru functions?
« Reply #31 on: April 19, 2009, 05:21:29 PM »
I went to play with Hetzen's latest file, and changed some things, such as adding twist and shear on the waves, adding extra foam at sea as well as on the beach, etc. I also replaced some constants by fractals to get a more natural dispersement (is that the right word?) of waves. Also made some shiny sand with a reflective shader. Came up with the following image after a couple of hours of trials. The only thing I had to do was tilt it 0.5 degrees in PS (probably the whole water angled due to the twist and shear).
I will decrease the scale and displacement of the beach foam, it's a little too ridgy. And add some child layers here and there to get more diverse colouration.

This is certainly getting somewhere. But I'm still looking for a way to decrease foam at greater depths.

---Dune
wow :)
www.richardfraser.co.uk
/|\

i7 2600k @3.4Ghz, OC'd 4.4Ghz, 16Gb
i7 920 @2.6Ghz, OC'd 3.4Ghz, 8Gb

Offline jo

  • Planetside Staff
  • *
  • Posts: 1711
Re: Coastal waves/foam thru functions?
« Reply #32 on: April 20, 2009, 05:52:06 AM »
Hi guys,

This is looking pretty good :-). People ask me if I going to make WaterWorks for TG2 and my usual response is "Would like to if I had the time, but you can actually create the same effects as WaterWorks using the function networks" and there you go :-). Of course you can also do much more in TG2 as well.

Regards,

Jo

Offline Dune

  • Member
  • *
  • Posts: 6373
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Coastal waves/foam thru functions?
« Reply #33 on: April 20, 2009, 05:13:15 PM »
Waterworks would be more ideal though, instead of all these complicated connections, so if you will ever find the time, Jo  ;D

I did some more work, and came up with the following image (here 70% of 1600 pixels wide; 8 hours rendertime @ detail 0.5 and AA 5). I still need some changes in the beach foam though, it's too 'wormlike'. Added some morning veils of fog for fun.

If anyone can work out how to decrease the amount of foam towards deeper water, or get more realistic beach foam, I'd be happy to know.


---Dune

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 5583
    • CGScenery.com - Terragen Tutorials!
Re: Coastal waves/foam thru functions?
« Reply #34 on: April 20, 2009, 07:02:32 PM »
Hey Dune,

Thanks a bunch!
I agree with you that Waterworks would be ideal.
I'll see if I can make some adjustments to the foam and if so I'll post it here.

Martin

Offline moodflow

  • Member
  • *
  • Posts: 1245
    • moodflow.com
Re: Coastal waves/foam thru functions?
« Reply #35 on: April 20, 2009, 07:31:08 PM »
This is looking really nice, but I still think it needs a lot of work. 

The "foam" lines would actually taper off in deeper water since no waves would be breaking out there due to the water depth.  Many thanks for posting your file.  I'll see if I can make this work when I get some time (or maybe someone else may beat me to it!).

And Jo, yes, a waterworks-like option in the water shader would be incredible, especially for those like me who like to avoid using function nodes as much as possible!   ;D
http://www.moodflow.com
mood-inspiring images and music

Offline srb2001

  • Member
  • *
  • Posts: 12
Re: Coastal waves/foam thru functions?
« Reply #36 on: April 20, 2009, 07:33:31 PM »
If anyone can work out how to decrease the amount of foam towards deeper water, or get more realistic beach foam, I'd be happy to know.

Great work, Dune.

Could you use a greyscale gradient based on an aerial capture (quick lo-rez render) of the coastline, with a gradual falloff in black/white values away from the shoreline?  This could be easily prepared in Photoshop and then brought back into TG2 to have its luminosity control the density or opacity of the foam.

Just a thought ... I'm not savvy to TG shader construction yet.  But we use similar techniques in 3D cgi all the time (Lightwave & MAX).

Offline Hetzen

  • Member
  • *
  • Posts: 1254
Re: Coastal waves/foam thru functions?
« Reply #37 on: April 20, 2009, 08:19:04 PM »
Thanks Dune, will have a play tomorrow.

@SRB2001, yes, I'd think that could be a solution, but what's interesting about this approach, is that a node network should be able to determine distance from shore. For several reasons, like if I want to change camera angles through an animation, or want to apply these nodes to a different landscape, or whether I want to put a rock outcrop in the shore line.

What's really interesting here, is that the waves are concentric to the shore line. We just need to be able to blend this off through the function set up, which seems to be acting strangly the way this has proceeded. Ultimately, it would be good to work on things like wave overhang (curl), or have a constant that would change the wave spacing, or like Moodflow has put across, change the position compared to land for the breakers. It would be good to work this out without having to paint it manually.

Offline srb2001

  • Member
  • *
  • Posts: 12
Re: Coastal waves/foam thru functions?
« Reply #38 on: April 20, 2009, 09:07:54 PM »
@SRB2001, yes, I'd think that could be a solution...It would be good to work this out without having to paint it manually.

Got it, Hetzen.  Being a visual artist, I tend to think more in terms of graphic matte preparation for composite work rather than algorithmically, like the coders or shader tree developers.  It would be great to eventually get such complex dependencies as you've enumerated into some sort of preset macro for "plug & play" use by the TG community, should it be developed to that level of maturity.

I saw the Vue7 breakers demo, and they seem to have the issue licked.  Would TG's shoreline waves animate along this contour-concentric pattern you've accomplished?

Offline Hetzen

  • Member
  • *
  • Posts: 1254
Re: Coastal waves/foam thru functions?
« Reply #39 on: April 20, 2009, 11:27:02 PM »
The animation side of things shouldn't be two much of a problem, except I doubt it would look realistic without a whole lot of fudging. As I said a few posts back, I doubt I'd want to use TG for realistic caustic simulations. TBH, I'm not sure there's much out there that could handle such a complex set of particle conditions without throwing a lot of resource at it, Realflow for example. I think, at the moment, it would be a lot cheaper to film. But that's not the point here, I like the concept of breaking the limits of a program, to achieve something that is not meant to be possible, and may, like you suggest, be added as a feature in future updates of a shader, or give the program designers some steer that could be used to reach maybe a higher step in that simulation process.

But more importantly for me; to get a better idea on how this bloody program works. ;D

Offline jo

  • Planetside Staff
  • *
  • Posts: 1711
Re: Coastal waves/foam thru functions?
« Reply #40 on: April 21, 2009, 12:27:49 AM »
Hi guys,

For a falloff using functions instead of messing around with gradients etc. try using the bias node:

http://forums.planetside.co.uk/index.php?topic=3175

or the gain node:

http://forums.planetside.co.uk/index.php?topic=3176

These two functions give some nice curves for falloff and such.

These are actually what I used in WaterWorks, and that was part of the reason I added them to TG2. IIRC I applied it various ways. For example in Sorta Surf it faded off the density of the foam from the front to back of the wave. You could also use to fade off waves further from shore and so on and such like. Very handy functions.

Regards,

Jo



Offline Hetzen

  • Member
  • *
  • Posts: 1254
Re: Coastal waves/foam thru functions?
« Reply #41 on: April 21, 2009, 12:42:32 AM »
Thanks Jo. I used the bias function in that node setup to give a smoother edge into the cutoff point, to cap the wave depressions so that I had more distance between the sin peaks. What would be cool in this application, is identifying whether the sin function is in a positive rise or negative fall to give the sin a bias of .8 on its front end and say a .2 on it's exit. What did become weird, and it's quite probably me going into math head spin, is how all the scene altitudes went funny in the preview window. I had set up the function, as did Kranky, with the water altitude set at 100 meters, anything after that registered -390ish meters. Which didn't make a lot of sense.

Also, would it be possible to create a new node, that gives real time value feedback in the preview. Ie, I setup a "preview output node" in scaler/colour/vector at the end of some functions, so when I roll my mouse around the preview, it shows me it's output. Just as a debug tool. Would help to get some bearings on things, especialy when altitude drops by 400 metres for some reason.

Offline jo

  • Planetside Staff
  • *
  • Posts: 1711
Re: Coastal waves/foam thru functions?
« Reply #42 on: April 21, 2009, 02:11:35 AM »
Hi Hetzen,

Have you experimented with the Notifier node? You won't get the real time feedback from the mouse, but it may be possible to set it up so that it triggers when a certain point in the scene you're interested in is being evaluated.

Regards,

Jo

Offline mogn

  • Member
  • *
  • Posts: 335
Re: Coastal waves/foam thru functions?
« Reply #43 on: April 21, 2009, 02:27:27 AM »
@Jo Thanks for pointing out the notifier node, I did'nt know it existed.

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 8644
  • Holy snagging ducks!
Re: Coastal waves/foam thru functions?
« Reply #44 on: April 21, 2009, 02:52:56 AM »
One thing to consider is that, although there is a lot of node trickery involved at this point, in the future when we add "macro" support, you ought to be able to encapsulate an easily adjusted version of a complex node network in a simple package. So this would essentially be like a "waterworks", except that one of you might create it. ;D

I saw the Vue7 breakers demo, and they seem to have the issue licked.  Would TG's shoreline waves animate along this contour-concentric pattern you've accomplished?

Which demo is that?

- Oshyan