Wavesets, can we play?

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: Wavesets, can we play?

Postby D'Lanor » Thu May 15, 2008 5:17 pm

Ok, I followed Nadnerb's tutorial and I think I understand how it works now. There must be geometry below the object center. Not a plane but something bumpy I guess. And the texture has to be an envmap set to static or anim.

The object still won't show up though, but then this computer has never shown the water in Er'cana either. To be continued...
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Wavesets, can we play?

Postby Nadnerb » Thu May 15, 2008 5:21 pm

wait......
what?
you followed my tutorial?
I haven't released a tutorial!
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Wavesets, can we play?

Postby D'Lanor » Thu May 15, 2008 5:28 pm

Well, maybe not a tutorial then but whatever you call it that you put up the wiki here: http://guildofwriters.com/wiki/Wavesets
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Wavesets, can we play?

Postby Paradox » Thu May 15, 2008 5:36 pm

The best way to describe it is to simply quote MF...

1.3.1 Using Depth
Because the height of the water will be computed, the z component of the vertex position might go unused. We could take advantage of this to compress our vertices, but we choose rather to encode the water depth in the z component instead. More precisely, we put the height of the bottom of the water body in the vertex z component, pass in the height of the water table as a constant, and have the depth of the water available with a subtraction. Again, this assumes a constant-height water table. To model something like a river flowing downhill, we need an explicit 3D position as well as a depth for each vertex. In such a case, the depth may be calculated offline using a simple ray cast from water surface to riverbed, or it can be explicitly authored as a vertex color, but in any case, the depth must be passed in as an additional part of the vertex data.

We use the water depth to control the opacity of the water, the strength of the reflection, and the amplitude of the geometric waves. For example, one pair of input parameter for the system is a depth at which the water is transparent and a depth at which it is at maximum opacity. This might let the water go from transparent to maximum opacity as the depth goes from 0 at the shore to 3 feet deep. This is a very crude modeling of the fact that shallow water tints the bottom less than deep water does. Having the depth of the water available also allows for more sophisticated modeling of light transmission effects.

Attenuating the amplitude of the geometric waves based on depth is as much a matter of practicality as physical modeling. Attenuating out the waves where the water mesh meets the water plane allows for water vertices to be "fixed" where the mesh meets steep banks. It also gives a gradual die-off of waves coming onto a shallow shore. Because we constrain our vertices never to go below their input height, attenuating the waves to zero slightly above the water plane allows waves to lap up onto the shore, while enabling us to control how far up the shore they can go.

1.3.2 Overrides
For the most part, the system "just works," processing all vertices identically. But there are valid occasions for the content author to override the system behavior on a per-vertex basis. We encode these overrides as the RGB vertex color. Left at their defaults of white, these overrides pass all control to the simulation. Bringing down a channel to zero modulates an effect.

The red component governs the overall transparency, making the water surface completely transparent when red goes to zero. Green modulates the strength of the reflection on the surface, making the water surface matte when green is zero. Blue limits the opacity attenuation based on viewing angle, which affects the Fresnel term. An alternate use of one of these colors would be to scale the horizontal components of the calculated per-pixel normal. This would allow some areas of the water to be rougher than others, an effect often seen in bays.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Wavesets, can we play?

Postby D'Lanor » Thu May 15, 2008 5:47 pm

No sorry, that MF article is gibberish to me. It doesn't tell me what to do in Blender.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Wavesets, can we play?

Postby Nadnerb » Thu May 15, 2008 5:54 pm

I call that "Not Released" I haven't put a link up to it, and I'm still in the process of writing it.

Also, the article is very clear, it talks about what the waveset looks for. Things like vertex heights, and what the colors do, and such.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Wavesets, can we play?

Postby D'Lanor » Thu May 15, 2008 6:03 pm

Your tutorials are clearer. Whether released or not. ;)

btw, anything you save to the wiki shows up under recent changes. If you don't want people to find unreleased articles you should probably use preview mode.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Wavesets, can we play?

Postby Marcello » Fri May 16, 2008 7:22 am

I'm probably asking too much, but looking for the article I noticed a chapter on caustics too. Are there settings to calculate and project caustics or do we use animated textures for those?
User avatar
Marcello
 
Posts: 374
Joined: Sun Nov 04, 2007 8:59 am
Location: Haarlem, The Netherlands

Re: Wavesets, can we play?

Postby Nadnerb » Fri May 16, 2008 8:53 am

Wavesets are simply specially rendered surfaces, and don't generate additional lighting effects. If you want caustics, you'll probably have to figure them out yourself with some animated textures and/or projection lamps. (which might be a pretty good idea: Create an area lamp that covers the pool surface and shines below it, and give it an animated layer, affecting both the bottom and the avatar.)
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Wavesets, can we play?

Postby D'Lanor » Fri May 16, 2008 1:50 pm

Yay! I got it working! Ok, it was so faint that I nearly missed it but it is a start.

When I tried this with a large complex mesh the waves disappeared after a few seconds, just like most of the Er'cana water does on my computer.

It also reflects my avatar but not where it is standing (I remember that effect from the yellow water in the Er'cana pellet room if you "fall in"). Maybe I have to tweak the envradius setting.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

PreviousNext

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 15 guests

cron