Difference between revisions of "PyPRP:Creating a Swim Region"

Line 11: Line 11:
 
[[Image:WaterTex.jpg]]
 
[[Image:WaterTex.jpg]]
  
In Plasma it looks pretty cool:
+
In Plasma it looks pretty cool. And I told you about the fancy tiles didn't I? ;) ;) To bad the water is still static. Imagine my little pool with a cool water shader.
  
 
[[Image:PoolAge.jpg]]
 
[[Image:PoolAge.jpg]]
Line 19: Line 19:
 
== Step 2 - Adding a Swim detection region ==
 
== Step 2 - Adding a Swim detection region ==
  
== Step 3 - Adding AlcScript for no-current swimming ==
+
== Step 3 - Adding AlcScript: 3 types of currents ==
 +
 
 +
At the moment Plasma support three kind off currents:
 +
 
 +
* No current
 +
* Straight current
 +
* Circular current
 +
 
 +
We'll start with the No current one since we have everything in place to make it work. For the other two to work we will add an empty later on, to give our region an anchor point. In case of the Circular current this will be the center of the current.
 +
 
 +
Let's move on to some basic AlcScript for a No current swim region. Remember the names of our regions? Our swim region is called RgnSwimPool and our swim detection region is calle RgnSwimDetection. Now have a look at the AlcScript I added for both:
 +
 
  
  

Revision as of 15:07, 30 January 2008

Although adding swimregions looks pretty straight forward I actually had some problems implementing then. I decided to start with a no current region which actually still isn't functioning ;)

Anyway it will eventually and therefor this tutorial will start with start with this seamingly simplest swim region.

Let's have a look at our working model first. I must admit that creativity was at an absolute minus zero when I thought up this little age. Nothing mystical, no fantasy element, nothing. Just the first thing that came to mind when I thought about swimming ;) Still I did try to have it look a bit fancy, with nice tiles and stuff. At lease give me some credit for that!?!

Model.jpg

If you look at the model you can see that I have a plane selected. This plane is my water mesh. I gave this mesh a transparent texture. Or actually a semi transparant texture. I wanted a pool blue color with caustics, transparant enough to show the tiles in my pool but also show some color.

WaterTex.jpg

In Plasma it looks pretty cool. And I told you about the fancy tiles didn't I? ;) ;) To bad the water is still static. Imagine my little pool with a cool water shader.

PoolAge.jpg

Step 1 - Adding your actual "water"

Step 2 - Adding a Swim detection region

Step 3 - Adding AlcScript: 3 types of currents

At the moment Plasma support three kind off currents:

  • No current
  • Straight current
  • Circular current

We'll start with the No current one since we have everything in place to make it work. For the other two to work we will add an empty later on, to give our region an anchor point. In case of the Circular current this will be the center of the current.

Let's move on to some basic AlcScript for a No current swim region. Remember the names of our regions? Our swim region is called RgnSwimPool and our swim detection region is calle RgnSwimDetection. Now have a look at the AlcScript I added for both:


Step 4 - Adding a current empty

Step 5 - Adding Alcscript for straight and circular currents