2 Qs:how to limit ocean dist/how to ignore plane ang. light?

gamekill

24-05-2007 14:23:05

Hi...

Now that I managed to correctly paint textures on my terrain (really nice!), I thought it would be a good idea to put stuff on it.

Then I ran into two problems that I believe are pretty simple to solve, but I can't figure out how:



1 - I imported the ocean material from the sample scene, and applied it to a plane on my scene. I wanted the ocean effect to appear ONLY on the plane (it is supposed to be a lake) but it goes far to the horizon. How can I limit it to only appear inside the plane's dimensions?

2 - The trees leaves are composed of a group of planes with a PNG texture (it has an alpha channel for the proper viewing effect). But depending on the angle of the planes, they are brighter or darker, because of the light sources around the scene. And this ruins the illusion that's supposed to be created. How can I make all planes show the exact same amount of bright, no matter what angle they are in relation to the light source? I'd still like them to be influenced by light (brighter or darker, depending on the lights distance and power). But they should NOT take in consideration their angle in relation to the light source. I would also like to maintain color influence from light (red light source would make them look red etc). I believe that setting a fixed diffuse or luminance level in the material file (or something like that) would be a quick dirty solution, but it would not allow me to use real-time lighting (day and night) on the same scene.

:) :? :shock: :?: :o

Lioric

29-05-2007 16:18:02

1. The shader is an "Ocean" shader, it was created to produce an ocean, and you need a water shader. In any case there are parameters to modify the size and scale of the ocean plane in the vertex shader, you can modify them to suit your case

Or use a "water" shader

2. Mesh light is inherent to the angle of the light, what you need is to define all of the normals of the tree to point up (in the mesh or in your shader) that way all the light will be uniform, or use the "simple ambient vertex" (or a similar name) to use the ambient light only, with this you can modify the ambient light (the day time) in your application and the trees will use the ambient light and color

Evak

29-05-2007 18:10:17

A nice sample reflecting water shader like the fresnel demo showing how to use the realtime reflection material in Ofusion would be very nice. Don't know if that feature exists in the CE version though.