PDA

View Full Version : Ocean texture using nodes?



zeusalmighty
05-29-2008, 07:21 AM
Hi, I'm trying to create an ocean texture during daylight using the node editor. I think I've managed a few things on my own, but I'm kinda stuck. I used the Delta shader to get what I wanted, but I have a problem with a gradient which I want to set to Incident Light, but there is no such option. Is there another way to do it?

I've attached the srf file so you can see what I did. You can apply this to an object about 500mx500m to see the full scale of it. It also works best with an image world backdrop of a sky.

I keep feeling that I've taken a completely wrong approach to doing this. The effect I'm trying to create is exactly this:
http://upload.wikimedia.org/wikipedia/commons/c/c6/Fleet_5_nations.jpg

zardoz
05-30-2008, 03:16 AM
in this thread i have a render of a simple ocean only with a few bump layers
http://www.newtek.com/forums/showthread.php?t=84053

soon I will post the ocean and maybe it can help you.

zeusalmighty
05-30-2008, 05:39 AM
Excellent! Very nice ocean render! Please do elaborate on what you used to create this, I'm very interested.

All your other works are wonderful too!

prometheus
05-30-2008, 09:46 PM
canīt you add a color layer in the node editor and from there use the light
incidence layer.

In node editor..
Add layer/color layer...set gradient to light incidence.

Michael

zeusalmighty
05-31-2008, 03:24 AM
Hey, thanks! I totally forgot about the color layer! I'm still to manage creating a decent daylight sea, but I'm slowly getting there!

zeusalmighty
05-31-2008, 02:55 PM
After hours of tinkering, I think I've come pretty close to the result I want. I've mostly used nodes, but the render time pretty big. I'll post a quick image as soon as I can.

The Dommo
06-05-2008, 10:51 AM
Please do - the first iamge looked really good. :)

zeusalmighty
06-06-2008, 08:53 AM
Ok, sorry it took me so long, but I was busy doing a few other jobs. Here is a test render of the ocean, tell me what you think.

Notes: I'm quite happy with the lighting setup, since I'm using 5 lights and no GI, but my object geometry is not really the most optimum one...the sea renders at around 300.000 at this distance, since it uses the Advanced Pixel Subdivision feature, at Pixels Per Polygon setting (I used a weight map).

zardoz
06-06-2008, 10:11 AM
in my thread above you can download the ocean i created for my oil rigs scene
http://www.newtek.com/forums/showthread.php?p=707851#post707851

zeusalmighty
06-06-2008, 11:49 AM
Thanks! It looks quite good, but it doesn't give me exactly what I want. I "borrowed" one of your layers though, it really helps! I prefer the setup I have going on, since it gives the ability to adjust the color of the ocean regardless of what is reflected. Plus, both textures render at about the same time.

Maxx
06-06-2008, 05:02 PM
It's looking good. The only thing I'd add is put in a slope or y-distance gradient to force some whitecaps on the higher waves. I think it'll help with the overall scene and add to the believability of the ocean surface.

zeusalmighty
06-08-2008, 09:25 AM
Here is a newer version, I think I'll call this "final" as far as the general water properties go. I also want to add a wake and foam right around the ship.

@Maxx: Thanks for the tip, that's certainly a very good way to go, but I ended up using one of my bump procedurals' (crumble) color output to control the input of a gradient. I then added 3 bands of white color (around 0.65, 0.8 and 1.0), while the rest of the gradient is transparent. I prefer this approach better, since the white caps are controlled by the crumble bump alone, rather than the overall bump, which doesn't necessarily give all the peaks.

I'll keep posting as I add the wake, some minor wake disturbances and the foam around the ship.

PS: Does anyone know how I could create the foam around the ship without using an image alpha? I use an image alpha to control where foam is visible.

starbase1
06-09-2008, 05:20 AM
Looks good to me!

zeusalmighty
06-10-2008, 04:08 PM
Here's another small update:

- Waves size reduced by 40%
- Added the "foam" created by the ship at the back
- Added the small wake created by the front of the ship.

I'm quite satisfied by how this is turning out to be. I think the most challenging but will be creating the wakes around the base of the ship.

Feedback!!!

tribbles
06-11-2008, 08:43 AM
Looking pretty nice - not sure about the wake though - although it has been a while since I've seen pictures of it (I remember it on a ferry as not being quite so pronounced a difference to the normal sea).

zeusalmighty
06-13-2008, 12:23 AM
It is indeed a bit intense.

Eitherway, I just delivered the video, which I have to say I'm pretty disappointed with it. The deadline got pushed 2 days back and there was no time to render, and even though most of it it pretty good, I had some serious errors at places I didn't expect.

It seems that the speed of some of my deformation layers is too large, and the subdivision is bad at places. Again, I think I'm pretty happy with the textures, lighting and all, but because of the tight deadline, and the slow pc I'm working on, I didn't have the time to preview the actual geometry, which is pretty darn unacceptable for me. There is no changing anything now, it's too late to re-render. I'll upload the video very soon so you can rain your judgment on me...!

:thumbsdow:thumbsdow:thumbsdow

zeusalmighty
06-14-2008, 03:53 AM
Here it is, just the animation part, not the entire presentation:

http://www.youtube.com/watch?v=F8X66O8k8RU

bgolden
06-17-2008, 12:25 PM
The animation turned out nice. Can I ask how you produced the wake?

zeusalmighty
06-18-2008, 05:07 AM
There are three separate wakes,
1. The "stream" left behind by the ship
2. The distortion around the base of the ship
3. A "V" shaped wake that begins at the tip of the ship and extends backwards (no foam here).

(1 and 3 are clearly visible in the previous image I posted).

1 is controlled by an image alpha, whereas the tho lines extending backwards are the marble texture node, with a turbulence node controlling the position (this is equivalent to the old "displacement" in the layer texture system). Then there is a gradient from white to light green to give some color variation to the foam.

2 has again, an image alpha, and a more simple turbulence node that is controlled by a moving null.

3 is (surprise, surprise) an image alpha with the underwater texture node.

I could probably go on and on about this, but I'll just give you the surface file :)

A bit of warning though, it's a bit complicated and definitely not the most efficient way to produce this effect.

Surface explanation

There are 3 image image nodes all in all. Each one is named wake_x, where "x" corresponds to the three numbers I mentioned above.

I also kinda divided the space in the node editor so I could work with each part of the sea separately, so:

Lower area:
This controls the bump.

Middle area:
This mixes in the white caps and gives the color of the sea (which is also depended on the background image used)

Upper-left area:
Creates (colors) the wake_1


Upper-right area:
Creates (colors) the wake_2


Wake_3 has no color, only bump.

Of course these are accompanied by proper displacement maps, but for a stills or shots from afar, you can get away with no displacement at all.


Have fun!

zeusalmighty
06-18-2008, 05:10 AM
Oh, I forgot to mention the scale of the texture. If you see the previous image I posted, the scale of the ship is around 350m, so you can understand what scale this should be used for (I wanted to work with absolute values of scale, since modeling had to be done to scale).

bgolden
07-09-2008, 09:30 AM
Thank you for the detailed response. Much appreciated.