From: Svend Tang-Petersen (svend++at++copen.sgi.com)
Date: 04/18/2000 01:17:08
devrim wrote:
>
> Hi,
>
> I need to represent a huge fire on a wide area. I have checked the
> Volume rendering sample and I need to say that I haven't fully
> understood what is going on there, but before studying the example in
> detail I would like to ask some questions:
>
> 1. Is it possible to use texture animation ( a set of prerendered fire
> textures using Maya ) instead of the hardcoded textures ? If so, what
> are the constraints that I shall inform our artists about ?
You keep a reference to the Texture in shared memory and update it
every frame or so thus creating the animation effect.
The main constraint is the size of the textures to reduce download time.
Eg in your shared data structure:
typedef struct
{
uint *frames[500];
pfTexture *Data;
} SharedData;
SharedData *Shared;
then load the image data into Shared->frames[]
and in your main loop:
current_frame = ( current_frame + 1 ) % ( frame_delay + 1);
if (current_frame == 0) {
Shared->current_frame = ( Shared->current_frame + 1 ) %
frames_loaded;
Shared->Data->setImage( Shared->frames[Shared->current_frame],
Shared->comp, Shared->ns,
Shared->nt, Shared->nr );
Shared->Data->load();
}
>
> 2. On our Onyx2 IR2, the sample volren slowed down when the window is
> enlarged to fit full screen. As the fire is not the only element in the
> world I will render, what is the rationale behind the performance hit ?
You are filling more pixels to the framebuffer and thus you just became
limited by the fillrate of the RM(s). How many do you have for each pipe
?
This is not unusual, especially when you are doing volumerendering.
>
> Thats all for now, many to come when I dive into coding.
>
> Thanks.
--Regards Svend
******************************************************************* Svend Tang-Petersen, MSc Email: svend++at++copen.sgi.com AGD, Europe Silicon Graphics Fax: (+45) 46579440 Hovedgaden 451 Phone: (+45) 46555660 2640 Hedehusene VNET: 540-0422 Denmark http://reality.sgi.com/svend_copen *******************************************************************
This archive was generated by hypermail 2b29 : Tue Apr 18 2000 - 01:18:02 PDT