About Store Forum Documentation Contact



Post Reply 
Dynamically create water areas
Author Message
mystara Offline
Member

Post: #1
Dynamically create water areas
Hello!

I'm wondering if anyone has any ideas of how I can create water areas dynamically (i.e. in-game)?

I noticed that WaterArea used to have a create() function, but this no longer seems to be present, and it's not obvious from the documentation as to how one might create a WaterArea without using the editor.

Specifically what I'm trying to do is create a portal with a water/ripple effect. I can create the mesh for the portal itself dynamically. But I'm at a loss as to how to produce an animated ripple/water effect on the mesh.

Obviously I want to avoid using the Water class, since that seems to cover an entire plane rather than a single mesh.

Thoughts?
07-30-2011 11:52 AM
Find all posts by this user Quote this message in a reply
kulesz Offline
Member

Post: #2
RE: Dynamically create water areas
Wasn't there some global container for lakes/ rivers (just like grass etc) ? Or it was just in the roadmap?
(This post was last modified: 08-01-2011 08:28 AM by kulesz.)
08-01-2011 08:28 AM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #3
RE: Dynamically create water areas
hmmm, interesting.

There *is* a "WE Water" file, forming part of the Edit namespace.

It does contain a Lake object, which contains a WaterArea. Though I'm not sure if this is available for use. Obviously there are no examples :/
08-01-2011 08:32 AM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #4
RE: Dynamically create water areas
@Esenthel:

Any chance you could let us know how to manually apply the water shader to a mesh? I think it's necessary to set a bunch of parameters, but I don't know what they're all called or do smile

I figure that if I can do that, it would give the effect I'm looking for
08-01-2011 05:55 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Dynamically create water areas
do you need the portal to be vertical? (standing) or horizontal (laying down)
water shader supports only laying down orientation.
08-02-2011 12:30 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #6
RE: Dynamically create water areas
Yeah, I need them to be vertical (standing).

Dang.

Any ideas how I might best produce what I'm looking for?
08-02-2011 12:31 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Dynamically create water areas
You can make your own blend shader, as in tutorials, and add ripple effect manually.
I know you have some problems with running the shader tutorials on Mac. Please give me some time to investigate this (at the moment I don't know why CG is producing incorrect results for you), I will need to check this.
08-02-2011 12:33 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #8
RE: Dynamically create water areas
hrm, does that involve some clever use of RippleFx, or would I basically need to write my own shader from scratch?

When you say blend shader, do you mean Shader Combinations?
08-02-2011 12:37 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Dynamically create water areas
RippleFx is builtin 2d effect, so it won't help you.
Yes you will need to write your own shader.
I think 1st shader tutorial uses blend shader (also "shader parameters for different instances" tutorial)
08-02-2011 12:40 PM
Find all posts by this user Quote this message in a reply
Post Reply