From guest  Tue Feb  1 14:14:40 1994
Return-Path: <abramsh@maestro.mitre.org>
From: abramsh@maestro.MITRE.ORG (Howard Abrams)
Message-Id: <9402011714.ZM15902@maestro>
Date: Tue, 1 Feb 1994 17:14:08 -0500
X-Mailer: Z-Mail (2.1.0 10/27/92)
To: info-performer@sgi.sgi.com
Subject: Snow/Rain
Cc: plevy@maestro.mitre.org
Status: O



	I was planing on creating a snow/rain effect on performer. Has
anyone had any success in doing this? I had planed on making several 
texture mapped polygons, and moving the texture or polygons to animate
the snow/rain. Does anyone know if this would be a good approach, and if
so, can I move the texture instead of the polygon?

	Also, I had heard that 1.2 will have smoke and dust effects. Will
it also have rain?

--Howard



From guest  Fri Feb  4 00:45:22 1994
From: "Dennis Pierce" <dpierce@sgimco.orlando.sgi.com>
Message-Id: <9402040344.ZM21670@sgimco.orlando.sgi.com>
Date: Fri, 4 Feb 1994 03:44:54 -0500
In-Reply-To: abramsh@maestro.MITRE.ORG (Howard Abrams)
        "Snow/Rain" (Feb  1,  5:14pm)
References: <9402011714.ZM15902@maestro>
X-Mailer: Z-Mail-SGI (3.0S.1026 26oct93 MediaMail)
To: abramsh@maestro.MITRE.ORG (Howard Abrams), info-performer@sgi.sgi.com
Subject: Re: Snow/Rain
Cc: plevy@maestro.mitre.org
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Status: OR

On Feb 1,  5:14pm, Howard Abrams wrote:
> Subject: Snow/Rain
>
>	I was planing on creating a snow/rain effect on performer. Has
>anyone had any success in doing this? I had planed on making several
>texture mapped polygons, and moving the texture or polygons to animate
>the snow/rain. Does anyone know if this would be a good approach, and if
>so, can I move the texture instead of the polygon?
>
>	Also, I had heard that 1.2 will have smoke and dust effects. Will
>it also have rain?
>
>--Howard
>
>-- End of excerpt from Howard Abrams


let's talk...

I built this function into an IG in a former life and since we
never patented the approach, it's now yours...

the main issue with rain is that unless its really heavy, at
night, or you're looking through binoculars, rain is pretty
much invisible - not so for snow unless you're in whiteout
conditions

so, the basic issue is to present enough of an illusion to fool
the eye into thinking that it is seeing some obstruction - this
means that very muted colors should be used for rain and snow

the approach taken was to place pseudorandom numbers into a
top array and side array, and to draw some occulting object
where the row, column indicated that the object should be
drawn - each frame, the rows are marched downward by shifting
a starting index into the column, and the columns can be
shifted sideways (for blowing rain or snow) by shifting
the starting index into the top row - this approach takes
absolutely trivial storage (two linear arrays) and works
amazingly well

now, the speed with which the rows are shifted gives the
speed of the rain - likewise for the blowing rain side
shifts - plus, you can "dance" the rain or snow by shifting
both directions in the row

the number pattern and interpretation of this pattern gives
the density of the rain or snow - I used 1's and 0's as
the numeric values, but you could expand the approach with
higher valued digits and build feathered edge objects by
building some sort of guassian ramp at various points in
the arrays

hard rain is set by something like the following:

   0 0 0 1 0 0 1 1 0 0 0 1
0
0
1
1
1
0
0


if you interpret this to mean that every 1,1 is drawn, the
resulting pattern is something like



        1       1 1        1
        1       1 1        1
        1       1 1        1


which, when moved at the correct vertical velocity (which is
controlled by the amount you change the column offset with
each frame), gives a nice set of streaks moving down the screen

snow is less streaky, and, possibly, wider - definately slower

if you use numbers other than 0 and 1, you can intepret the
addition range as colors and have light and dim drops or flakes

as I said earlier, the real magic here is the correct generation
of the row and column values, and the speed at which the items
move on the screen

as for implementation, the overlay planes are good, but instead
of clearing the entire plane, just erase the current pattern and
draw the new pattern during the vertical retrace interval - if
you're doing the entire screen, there may not be enough time in the
1.7 ms to accomplish this, so you may be forced into doing that
double buffer thing

couple this with a few wider blobs and you've got a pretty convincing
windshield

I've been wanting to put this into practice but just have not had
the time to play the way I should - maybe soon

I know this is skeletal, but if it seems like something that will
help and if you want to pursue it further, let me know and I'll
be more than happy to cobble a quickie or just present better
details

seeee ya...




-- 
Dennis Pierce, SGI, 900 Winderley Place, Ste 130, Maitland, FL 32751
email: dpierce@sgi.com    vmail: 8548              
tel  : 407.660.0073       late : 407.660.2789      
fax  : 407.660.8981       cell : 407.256.8447      





From guest  Fri Feb  4 14:39:17 1994
From: "Dennis Pierce" <dpierce@sgimco.orlando.sgi.com>
Message-Id: <9402041739.ZM7726@sgimco.orlando.sgi.com>
Date: Fri, 4 Feb 1994 17:39:02 -0500
In-Reply-To: steveh@k2.mss.ctaeng.com (Steve Hurt)
        "Snow and Rain" (Feb  4,  7:01am)
References: <9402041401.AA03171@k2.mss.ctaeng.com>
X-Mailer: Z-Mail-SGI (3.0S.1026 26oct93 MediaMail)
To: steveh@k2.mss.ctaeng.com (Steve Hurt), dpierce@sgi.sgi.com
Subject: Re: Snow and Rain
Cc: info-performer@sgi.sgi.com
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Status: OR

On Feb 4,  7:01am, Steve Hurt wrote:
> Subject: Snow and Rain
>
>I just red your message on snow and rain fx. In it you present
>some really good ideas, what kind of "occulting object" would
>you recommend?
>
>Thx.
>--------------------------------------------
>Steve Hurt CTA Incorporated.
>5670 Greenwood Plaza Blvd Suite 200
>Englewood, Colorado 80111
>
>303) 889-1286
>steveh@ctaeng.com
>--------------------------------------------
>
>-- End of excerpt from Steve Hurt


an occulting object is just a blob - in its most simple form, the
object is just a screen dot (pixel) - a more advanced form would
be an alpha blended gaussian distributed circle where the outer
edges are nearly transparent and the center is opaque - I didn't
want to sound so pedestrian by saying "pixel" because my old
system didn't have any transparency features and I think that it
would be quite beneficial to explore a more "correct" presentation
with this new fancy RE hardware

but...

please understand that ANY additional use of transformation and
fill hardware will be difficult to justify, so the simpler, the
better - and I think you'll find that a few streaks (for rain)
or a few floating pixel clusters (for snow) will be sufficient to
convey a reasonable presentation of precepitation - also, be
aware that the successful implementation of this will probably be
largely based on "fooling" the eye into thinking that more is being
shown than is actually being presented - I don't think there is
sufficient bandwidth in the RE to draw a physical model of rain
or snow PLUS do the real task of terrain, culture and models

the real novelty of the approach presented is that it solves the
problem of having dots fall in a controlled manner with two simple
linear arrays - contrast this with a full-up 1280x1024 array

this pseudo-random approach can also be used to generate random, but
repeatable ground features such as roads, tree patterns, bush clutter,
and the like - for some applications, the rapid generation of "good
enough" terrain and culture can be done procedurally instead of
actually modeling the features - this gives an "infinite" scape to
play on without having to actually build the model first - I'm sure
the approach has been implemented a couple of hundred times by the
real IG folks

hope this helps...

bye.



-- 
Dennis Pierce, SGI, 900 Winderley Place, Ste 130, Maitland, FL 32751
email: dpierce@sgi.com    vmail: 8548              
tel  : 407.660.0073       late : 407.660.2789      
fax  : 407.660.8981       cell : 407.256.8447      




From guest  Thu Jan  6 09:31:13 1994
From: "Marc SIMON Presales support" <smarc@girl.paris.sgi.com>
Message-Id: <9401061755.ZM7241@girl.paris.sgi.com>
Date: Thu, 6 Jan 1994 17:55:48 +0100
X-Mailer: Z-Mail-SGI (3.0S.1026 26oct93 MediaMail)
To: info-performer@sgi.sgi.com
Subject: smoke simulation
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Status: OR

Hi all,

It's not really a Performer question but i hope somebody could help me.

I would like to simulate an explosion and "dynamic" smoke .

I think one way will be to use texture (with alpha ) and change the
projection parameters ( mmode(MTEXTURE) ) to "animate" the smoke , but i'm
sure there is other ways to do that , so thanks in advance for any
suggestions.

Marc SIMON
smarc@paris.sgi.com





From guest  Thu Jan  6 10:19:18 1994
Date: Thu, 6 Jan 94 09:46:13 -0800
From: ib@ivan (Ivan Bach)
Message-Id: <9401061746.AA07406@ivan.asd.sgi.com>
To: "Marc SIMON Presales support" <smarc@girl.paris.sgi.com>,
        info-performer@sgi.sgi.com
Subject: Re:  smoke simulation
Status: O

> Marc SIMON <smarc@girl.paris.sgi.com> writes:
I would like to simulate an explosion and "dynamic" smoke.

------------------- copies of old articles ---------------------------- 
From guest  Thu Jan  6 10:25:34 1994
Message-Id: <9401061825.AA05457@surreal.asd.sgi.com>
To: "Marc SIMON Presales support" <smarc@girl.paris.sgi.com>
Cc: info-performer@sgi.sgi.com
Subject: Re: smoke simulation 
In-Reply-To: Your message of "Thu, 06 Jan 94 17:55:48 +0100."
             <9401061755.ZM7241@girl.paris.sgi.com> 
Date: Thu, 06 Jan 94 10:25:27 -0800
From: Jim Helman <jimh@surreal>
Status: O


In 1.2, libpfutil will have a simple smoke simulator which uses its
own point-rotate billboards and multiple, moving and spinning polygons
with transparent smoke and flame textures on them.

-jim






From guest  Thu Jan  6 11:23:26 1994
Message-Id: <9401061924.AA08756@Crazypete.AI.SRI.COM>
To: "Marc SIMON Presales support" <smarc@girl.paris.sgi.com>
Cc: info-performer@sgi.sgi.com
Subject: Re: smoke simulation 
In-Reply-To: Your message of "Thu, 06 Jan 1994 17:55:48 +0100."
             <9401061755.ZM7241@girl.paris.sgi.com> 
Date: Thu, 06 Jan 1994 11:24:36 -0800
From: Stephen Lau <lau@ai.sri.com>
Status: O


Some people from the Naval Postgraduate School have done some 3-D textures
for animating smoke that looks pretty good. It's not "photo-realistic" but
it get's the message across and is inexpensive in terms of rendering and
CPU time. I can put you in touch with them if you want.

Steve

-------------------------------------------------------------------------------
Stephen Lau                 lau@ai.sri.com| "No, no, not Orwellian, HUXLEY!
SRI International                         |    Brave New World."
333 Ravenswood Ave., Menlo Park, CA. 94025|   - George Coates, "Box Conspiracy:
(415) 859-2925              (415) 326-6200|     An Interactive Sho"
-------------------------------------------------------------------------------




From guest  Wed Jun  8 13:03:07 1994
From: "Darin C. Partridge" <darin@paradox.idec.sdl.usu.edu>
Message-Id: <9406081402.ZM15794@paradox.idec.sdl.usu.edu>
Date: Wed, 8 Jun 1994 14:02:48 -0600
X-Mailer: Z-Mail (3.1.0 22feb94 MediaMail)
To: info-performer@sgi.sgi.com
Subject: Clouds?...Sounds easy enough.
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Status: OR

I'm a beginner with performer, however, I've imported several satellite
terrain data sets.  I usually hack on the Wavefront loader and perfly
to accomplish this.  It's worked good so far but now I would like
to have clouds over the terrain.  Since clouds are not included in
the environment menu used in perfly I tried to add it.  I realize I
could be out to lunch since I still haven't got my man pages installed
correctly, but here is the perfly module I modified:

perfly/gui.c:

static pfuGUIString ESky_strs[] = {"Sky/Clear","Overcast","Sky/Grnd","Sky",
"Clear","PFES_SKY","Tag"};
static long ESky_vals[] = {
PFES_SKY_CLEAR,PFES_OVERCAST,PFES_SKY_GRND,PFES_SKY,
                           PFES_FAST, PFES_SKY, PFES_TAG};

common/env.c:

void
updateEnvironment(void)
{
    pfEarthSky          *es = ViewState->eSky;
    static long          eSkyMode = -1;
    static long          fogType = -1;
    static float         fogNear = 0.0f, fogFar = 0.0f;

    if ((eSkyMode == ViewState->earthSkyMode) &&
        (fogType == ViewState->fog) &&
        (fogNear == ViewState->nearFogRange) &&
        (fogFar == ViewState->farFogRange))
        return;

    if (ViewState->fog != PFFOG_OFF)
    {
        pfFogType(fog, ViewState->fog);
        pfFogRange(fog, ViewState->nearFogRange, ViewState->farFogRange);
        pfESkyFog(es, PFES_GENERAL, fog);
    }
    else
        pfESkyFog(es, PFES_GENERAL, NULL);

    if( ViewState->earthSkyMode == PFES_OVERCAST )
    {
      pfESkyMode(es, PFES_CLOUDS, ViewState->earthSkyMode);
      pfESkyAttr(es, PFES_CLOUD_TOP, 30.0f );
      pfESkyAttr(es, PFES_CLOUD_BOT, 20.0f );
      pfESkyColor(es, PFES_CLOUD_TOP, 0.1f, 0.1f, 0.2f, 1.0f);
      pfESkyColor(es, PFES_CLOUD_BOT, 0.2f, 0.2f, 0.1f, 1.0f);
    }
    else
      pfESkyMode(es, PFES_BUFFER_CLEAR, ViewState->earthSkyMode);

    /* update static values */
    fogType = ViewState->fog;
    fogFar = ViewState->farFogRange;
    eSkyMode = ViewState->earthSkyMode;
}

Thanks for any help,
Darin
(darin@paradox.idec.sdl.usu.edu)





