|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I still go on with my animation and I've got another question.
I want to use the function trace in an animation. The thing is that I want to
calculate the intersection between one object and 10.000 spheres. This costs a
lot but I need to do it just once (I mean, that all the frames will use the
same trace results).
So I thought it would be a good idea to declare an array with all the trace
results like
#declare P[i]=trace...
but as I just need to do this once I thought this would work:
#declare P=array[dim]
#if (frame_number=1)
#while (i<dim)
P[i]=trace...
#end
#end
and then use the value of P[i] for the rest of the animation. But it seems not
to work. From one frame to another it doesnt save the array.
Can you think of a solution without writting an external file with the values of
P[i]
Thanks in advance!!!!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
kike napsal(a):
> I still go on with my animation and I've got another question.
>
> I want to use the function trace in an animation. The thing is that I want to
> calculate the intersection between one object and 10.000 spheres. This costs a
> lot but I need to do it just once (I mean, that all the frames will use the
> same trace results).
>
> So I thought it would be a good idea to declare an array with all the trace
> results like
>
> #declare P[i]=trace...
>
> but as I just need to do this once I thought this would work:
>
> #declare P=array[dim]
>
> #if (frame_number=1)
> #while (i<dim)
> P[i]=trace...
> #end
> #end
>
> and then use the value of P[i] for the rest of the animation. But it seems not
> to work. From one frame to another it doesnt save the array.
>
> Can you think of a solution without writting an external file with the values of
> P[i]
>
> Thanks in advance!!!!
>
>
no information is stored between individual frames except for what you
save by yourself. Thus the only alternatives would be more complicated
and impractical (I can think of some incomplete solutions and other
ideas - one of each).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jan Dvorak <jan### [at] centrumcz> wrote:
> no information is stored between individual frames except for what you
> save by yourself. Thus the only alternatives would be more complicated
> and impractical (I can think of some incomplete solutions and other
> ideas - one of each).
Ah, the days of persistent variables. I certainly abused that feature. But it
really shouldn't be too hard to write to a file. Just look it up in the docs.
Or else you can always run the whole simulation up to the current frame if it
doesn't take too long.
- Ricky
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>>no information is stored between individual frames except for what you
>>save by yourself. Thus the only alternatives would be more complicated
>>and impractical (I can think of some incomplete solutions and other
>>ideas - one of each).
Actually, it would be nice to have "meta-elements" for
scenes in SDL so you could write something like this:
#macro PARAMETRIZED_SCENE(i)
scene
{
global_settings {...}
camera {...}
light_source {...}
...
}
#end
#local i=0;
#while (i < 10)
#local filename = concat(...);
#local extra_options = +FN
#render filename extra_options
PARAMETRIZED_SCENE(i)
#end
#local i=i+1;
#end
Not just for animations, but also for creating sets of
structurally identical images (e.g., button graphics for
web sites, games, or similar).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Actually, it would be nice to have "meta-elements" for
> scenes in SDL so you could write something like this:
Yeah!, that was exactly what I was talking about!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
kike wrote:
> Can you think of a solution without writing an external file with the values of
> P[i]
What's wrong with writing the values to a separate file? I've done that
before with other data generated in a POV-Ray script. It isn't hard at
all to write the file so that it's an .INC file that POV-Ray can parse.
Then you use a simple #include statement to bring all of the data in
as painlessly as possible.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |