Created
April 10, 2023 23:10
-
-
Save schnoddelbotz/6a1d11eb114f7cf327b3f5e804737a1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ada as rotating planet. A hack. Maybe wrong approach etc. | |
//EXAMPLE OF SPHERE | |
//Files with predefined colors and textures | |
#include "colors.inc" | |
#include "glass.inc" | |
#include "golds.inc" | |
#include "metals.inc" | |
#include "stones.inc" | |
#include "woods.inc" | |
//Place the camera | |
camera { | |
sky <0,0,1> | |
direction <-1,0,0> | |
right <-4/3,0,0> | |
location <0,0,11> | |
look_at <0,0,0> | |
angle 15 | |
} | |
//Ambient light to "brighten up" darker pictures | |
global_settings { ambient_light White } | |
light_source { <-9,-1,-9> color White*16 } | |
background { color Black } | |
sphere { <0,0,0>, 1 | |
// pigment { color rgb <0.005, 0.005, 0.005> } | |
pigment { image_map { gif "ada.gif" map_type 1 } } | |
finish { ambient 0.5 diffuse 10 reflection 0.9 } | |
rotate <0,65,0> | |
} | |
// Get ada.gif from https://twitter.com/adaplanet1 | |
// That is, I converted that png to gif. Or use tga |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for frame in $(seq 1 360); do | |
# I guess povray supports variables, thus I feel a bit stupid for this hack, but well ... | |
sed -ie "s@rotate <.*@rotate <0,$frame,0>@" ada.pov | |
povray Output_File_Name=ada_mov_f${frame}.png ada.pov | |
# povray Antialias=true Quality=10 Width=3200 Height=2400 Output_File_Name=ada_mov_f${frame}.png ada.pov | |
done | |
ffmpeg -f image2 -i ada_mov_f%d.png -pix_fmt yuv420p ada.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment