Skip to content
Forum Archive

Surface fading

11 posts

Deamon#

Surface fading

I got a question.

How to make a surface fade in the distance?

I use the following code to make a surface:

d=d/((y*2.2+3)*2)
Now this works perfectly, but if i make the last 2 bigger (for example 5) it gets a little messy in the further parts of the surface.

Is there an easy way to make a sort of fade or smog in that distance? Any help would be greatly appreciated,

Thanks in advance,

Deamon
shreyas_potnis#
ok, since something about movement is started, i wanted to ask a question, but didnt want to start a new thread for it, because it is probably stupid.
in static movment for polar coord d=0..1. then how does d=-d work.
does avs convert polar into rectangular coords?
anubis2003#
It reverses the distance from the center of the screen for each pixel. This effectively rotates it about the origin(I believe).
shreyas_potnis#
so id d=-1 then does avs convert it into rect coords so:
x=sin(r)*d;
=sin(r)*-1
y=cos(r)*d;
=cos(r)*-1;
i think this will rotate the thing, otherwise how can distance be negative?
Jaheckelsafar#
Arg, my reply didn't post. 😠

Imagine a series of lines all going through origin (d=0). Each point on the screen is identified a distance down the line. When d is negative, it goes down the line in the opposite direction.
UnConeD#
Shreyas: ALWAYS start a new thread if it's about something else. Adding stuff to non-related threads makes the forum harder to search.