|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Timothy Groves asked in povray.advanced-users for suggestions on how to make
high speed in space visible, possible using many small objects flying past.
The animation here shows the effect of speed by making many small objects
fly past the camera in a cube area around the camera. The good thing is that
no matter how far the camera travels, the number of objects is constant - in
this case only 600 objects. To add richness to the feel of vast space, I
used a small cube with small objects and a bigger cube with bigger objects,
to both simulate close objects flying fast past the camera and bigger
objects that can be seen at a longer distance.
The savings in parse time and memory may not be very big in this small demo
animation, but for a longer animation, where the camera travels much
further, the savings will be huge by using this method.
Complete source code below:
#declare CameraLocation = vrotate(20*x,360*y*clock);
camera {location CameraLocation}
#macro Mod(A,B) mod(A,B)+B*(A<0?1:0) #end
#declare CubeSize = 30;
#declare C = 0;
#declare Seed = seed(123);
#while (C<300)
// Create Points
#declare ObjLoc =
<rand(Seed),rand(Seed),rand(Seed)>*CubeSize-CameraLocation;
#declare ObjLoc =
<Mod(ObjLoc.x,CubeSize),Mod(ObjLoc.y,CubeSize),Mod(ObjLoc.z,CubeSize)>;
#declare ObjLoc =
ObjLoc+CameraLocation-CubeSize*<1,1,1>/2;
// Make object
sphere {ObjLoc, 0.03 pigment {rgb 1} finish {ambient 1 diffuse 0}}
#declare C = C+1;
#end
#declare CubeSize = 10;
#declare C = 0;
#declare Seed = seed(123);
#while (C<300)
// Create Points
#declare ObjLoc =
<rand(Seed),rand(Seed),rand(Seed)>*CubeSize-CameraLocation;
#declare ObjLoc =
<Mod(ObjLoc.x,CubeSize),Mod(ObjLoc.y,CubeSize),Mod(ObjLoc.z,CubeSize)>;
#declare ObjLoc =
ObjLoc+CameraLocation-CubeSize*<1,1,1>/2;
// Make object
sphere {ObjLoc, 0.01 pigment {rgb 1} finish {ambient 1 diffuse 0}}
#declare C = C+1;
#end
Rune
--
http://runevision.com
Post a reply to this message
Attachments:
Download 'showspeed.mpg' (377 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rune wrote:
> Timothy Groves asked in povray.advanced-users for suggestions on how to make
> high speed in space visible, possible using many small objects flying past.
>
> The animation here shows the effect of speed by making many small objects
> fly past the camera in a cube area around the camera. The good thing is that
> no matter how far the camera travels, the number of objects is constant - in
> this case only 600 objects. To add richness to the feel of vast space, I
> used a small cube with small objects and a bigger cube with bigger objects,
> to both simulate close objects flying fast past the camera and bigger
> objects that can be seen at a longer distance.
>
> The savings in parse time and memory may not be very big in this small demo
> animation, but for a longer animation, where the camera travels much
> further, the savings will be huge by using this method.
>
Thanks!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Timothy Groves wrote:
Worked like a charm, except...
Well, I forgot the stupid speeds at which Honorverse ships move. I
expanded the containment boxes by a factor of 100, increased the sizes
of the spheres within by the same factor. That made the depth from
camera of the box 3000 units. 3000 meters, since that is the scale I
use for Honorverse ships.
At http://tailkinker.batcave.net/cruiser.avi you will find a rendered
animation of a Light Cruiser with your space junk macro in use, scaled
up as above. Note that by the time the Cruiser passes the camera, the
space junk is sailing past at speeds high enough to make them irrelevant
to the scene.
The reason for this is that the Cruiser is moving at 4207 m/s at the
time that it passes the camera. Further, the Cruiser was accelerating
at 52 G, which is 10% of max power.
Considering Fearless accelerates at 520 G for 70 minutes before the
start of her firefight with Sirius, that means she would be moving at
21,436 km/s.
So thank you for the lovely macro, I can probably find many other uses
for it - crud in the ocean, perhaps, if I ever do a sub animation, or
use it for slower moving spacecraft. Unfortunately, Honorverse ships
are just too fast for such references.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Timothy Groves <gro### [at] yahoocouk> wrote:
Hi all,
Since I'm a science fiction fan myself and always wanted to do something of
that sort, I'm really quite interested :-)
BUT:
<snip...>
> At http://tailkinker.batcave.net/cruiser.avi you will find a rendered
<snip...>
Sorry, but couldn't load that one. When trying, it jumps to
http://www.batcave.net/links.php
Have a nice sunday.
Karl
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Timothy Groves wrote:
> Note that by the time the Cruiser passes the camera, the
> space junk is sailing past at speeds high enough to make them
> irrelevant to the scene.
I'm not sure why you can't just scale it up even more then? Have you given
it a try?
Rune
--
http://runevision.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rune wrote:
> Timothy Groves wrote:
>> Note that by the time the Cruiser passes the camera, the
>> space junk is sailing past at speeds high enough to make them
>> irrelevant to the scene.
>
> I'm not sure why you can't just scale it up even more then? Have you given
> it a try?
There reaches a point at which you have 100 meter radius pieces of
"space junk" floating past the ship...scaling the containment box up
only helps if you also scale up the debris so it can be seen at a
kilometer away.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Well, I forgot the stupid speeds at which Honorverse ships move. I
> expanded the containment boxes by a factor of 100, increased the sizes of
> the spheres within by the same factor. That made the depth from camera of
> the box 3000 units. 3000 meters, since that is the scale I use for
> Honorverse ships.
>
> At http://tailkinker.batcave.net/cruiser.avi you will find a rendered
> animation of a Light Cruiser with your space junk macro in use, scaled up
> as above. Note that by the time the Cruiser passes the camera, the space
> junk is sailing past at speeds high enough to make them irrelevant to the
> scene.
A real camera does not take a snapshot of an instant in time, it takes an
average of what it sees over 1/25th second (or whatever). For most slow
animations it doesn't make too much difference, but for something like you
are trying to do you probably need to have motion blur to be able to see
anything like reality.
> The reason for this is that the Cruiser is moving at 4207 m/s at the time
> that it passes the camera.
Shouldn't pose a problem to using this method, objects 2 km away that are
large enough to be visible should take ~15 frames to cross the screen, most
certainly visible to the camera. Of course tiny objects are not going to be
visible that far away, or if they are too close to the camera and crossing
in less than 2 or 3 frames (in that case the motion blur would make them
almost invisible).
If I were you, I would replace the "objects" with fake motion blur ones,
like long stretched spheres/cylinders with varying length and transparency.
You can probably code how to calculate these values based on the distance
from the camera. For some slower moving (in view space, ie >10 or so frames
on-screen) objects, use real motion blur with more detailed geometry.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|