![]() |
|||||||||
| RSL Displacement |
In this Assignment we are trying to explore how to script a displacement shader to create some waves cycles. The Challenge is to match the waves to my reference waves that I have got.
|
|||
![]() |
|||
I gather some reference of some water of the internet. This is to allow me to match my cg work to some realistic water.
|
|||
MOUSE OVER IMAGE TO PLAY |
MOUSE OVER IMAGE TO PLAY |
||
Well here is the first round of tests that I did. It was hard to control the variables at first, as there were 2 levels of noise to control. 2 levels of frequency for the noise. 2 levels of waves frequency. 2 levels of waves variation using points variation. Hence, many different forms of blobby surfaces can be achieve just with these controls. I actually redid the whole script again starting from the basic and work my way up the layers to see what affects what. Only then was I able to gain control over the script. Phew. |
|||
|
|
|
|
Here I have placed in a water shader. Simply using a Specular shader. Just by using a texture map and framing up the mid point with a little help from the script the water shader is achieved. Adding a reflection funtion and normalizing N, so that the script will obey the laws of reflection. The image on the left is a test to see that my smooth step is working. I was trying to blend the tip color of the waves with the regular texture of the water. Subsequence images i gave it a more natural color and blend level.
|
|||
![]() |
|
||
![]() |
MOUSE OVER IMAGE TO PLAY |
||
So after many many rounds of tries and errors. I got the water looking about the same. However, I believe I still need to add some more levels of noise controls in order to achieve the exact level of accuracy.
|
|||
![]() |
![]() |
||
Above are 2 more random playing of values with the controls I have. The 1st image : The Camera Angle is giving some weird look on the water texture and the speckles are still too regular. The 2nd image seems to break the speckle lines. What I did was to increase the smoothstep range which will break the smooth lines.
|
|||
![]() |
![]() |
||
Above were more test with speckles that look right now. Now I am playing more with the surface noise to get a nice and realistic look for the water surface. Everytime I change one value I have to always pay attention to the other values. The Imgae above gives some weird snake looking displacement. However the far end is giving some nice wave results. I also decided to change the camera angle to get a better looking angle of the wave. |
|||
![]() |
![]() |
||
Above images are pretty much the final stages of the displacement shader after many rounds. One thing I realized about the speckle on the water. In order to prevent it to form a strong visible fading line, Smoothstep have to have a higher range. This allowed the speckles to be kind of issolated by itself. This renders above I have added 2 more layers of Noise. Named " OVnoise" = overlay noise :) FINAL WATER DISPLACEMENT CODE.
|
|||
MOUSE OVER IMAGE TO PLAY |
![]() |
||
I guess I have achieve another level of detail in my water shader animation. However it is an ongoing process. Problems to be solved: Speckles are giving black at times, as if it is flickering. I guess thats the most major problem. I have enjoyed this shader creation alot and it helped me to understand the Noise Funtion, Transform function, Output Varying Value and ultimately i think I have master the sine function :). Next step will be geting it to MAYA I guess, as thinks will turn out differently with the controls. My values are all varying from 0.01 on wards which is hard number for the artist to control hence when exporting to Maya, i have to change those sliders a little. |
|||