.PHONY: touch_videos touch_pngs BRLCAD_NOVIDEO = perpendpart BRLCAD_VIDEO=ronja1 ronja head headcut tetrax holder par_welded_we \ par_welded_cut par_welded chimney mast railing2 perpends heel perpend \ perpendcut parallel railing corner pipe front_cap rear_cap hood flange lens \ hardware ronja_new plazmatron comparison ronja_new1_chimney SHOWN_IN_ALL=comparison ronja1 ronja_new ronja head headcut plazmatron \ par_welded_we par_welded_cut par_welded chimney mast railing2 perpends \ perpendcut parallel railing corner pipe hood front_cap rear_cap BRLCAD=$(BRLCAD_NOVIDEO) $(BRLCAD_VIDEO) # 3d/$(BRLCAD PBRLCAD=$(patsubst %,3d/%,$(BRLCAD)) PBRLCAD_VIDEO=$(patsubst %,3d/%,$(BRLCAD_VIDEO)) PBRLCAD_NOVIDEO=$(patsubst %,3d/%,$(BRLCAD_NOVIDEO)) # Change this when you change the size in rt_script BRLCAD_SIZE=1536 SBRLCAD=$(PBRLCAD:=_) $(PBRLCAD:=_s) NBRLCAD=$(SBRLCAD:=0) $(SBRLCAD:=1) $(SBRLCAD:=2) $(SBRLCAD:=3) $(SBRLCAD:=4) BRLCAD_VIDFILES=$(patsubst %,3d/%.y4m.bz2,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.ogg,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%_mpeg4_asp.avi,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.gif,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.drc,$(BRLCAD_VIDEO)) GENERATED+=$(NBRLCAD:=.png) 3d/rawppm_header \ $(PBRLCAD:=.php) 3d/index.php $(PBRLCAD:=.dxf) 3d/lib/hex \ 3d/testcard.png \ 3d/testcard2.png \ 3d/testcard2_4x.png \ 3d/testcard_4x.png \ 3d/all.ogg \ $(BRLCAD_VIDFILES) TEMPORARY+=$(NBRLCAD:=.png.temp) \ $(patsubst %,3d/%.vsize,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.frames,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.eyept,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.orient,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.wmv.y4m,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%_dirac.yuv,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.rv10.y4m,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.mpeg4_asp.y4m,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.pix,$(BRLCAD_VIDEO)) \ $(patsubst %,3d/%.pix.*,$(BRLCAD_VIDEO)) \ 3d/testcard.png: utils/pix-y4m $< -testcard | pix-png -w 640 -n 480 > $@ 3d/testcard2.png: utils/pix-y4m $< -testcard2 | pix-png -w 640 -n 480 > $@ 3d/testcard_4x.png: 3d/testcard.png convert $< -sample 400% $@ 3d/testcard2_4x.png: 3d/testcard2.png convert $< -sample 400% $@ $(patsubst %,3d/%.rtanim,$(BRLCAD_VIDEO)): %.rtanim: $(wildcard %.view*) \ utils/key-chans utils/key-chans $* $(patsubst %,3d/%.gif,$(BRLCAD_VIDEO)): $(patsubst %,3d/%.y4m.bz2,$(BRLCAD_VIDEO)): 3d/%.y4m.bz2: 3d/%.g grx/crack/%.png \ utils/render_animation utils/pix-y4m utils/double_mask ${SHELL} utils/render_animation 3d/$* $* $(patsubst %,3d/%.ogg,$(BRLCAD_VIDEO)): %.ogg: %.y4m.bz2 3d/loop_7.2.wav cat $< | bzip2 -d | theora_encoder_example -o $@ 3d/loop_7.2.wav - # BBC Dirac $(patsubst %,3d/%.drc,$(BRLCAD_VIDEO)): %.drc: %.y4m.bz2 bzcat $< | y4mtoyuv >$*_dirac.yuv dirac_encoder -width 576 -height 576 -cformat YUV420P -fr 50 \ $*_dirac.yuv $@ rm -f $*_dirac.yuv $(patsubst %,3d/%_wmv.avi,$(BRLCAD_VIDEO)): %_wmv.avi: %.y4m.bz2 \ 3d/loop_7.2.wav bzcat $< > $*.wmv.y4m transcode -x yuv4mpeg -y ffmpeg -F wmv2 -i $*.wmv.y4m \ -p 3d/loop_7.2.wav -o $@ rm $*.wmv.y4m $(patsubst %,3d/%_rv10.avi,$(BRLCAD_VIDEO)): %_rv10.avi: %.y4m.bz2 \ 3d/loop_7.2.wav bzcat $< > $*.rv10.y4m transcode -x yuv4mpeg -y ffmpeg -F rv10 -i $*.rv10.y4m \ -p 3d/loop_7.2.wav -o $@ rm $*.rv10.y4m $(patsubst %,3d/%_mpeg4_asp.avi,$(BRLCAD_VIDEO)): %_mpeg4_asp.avi: %.y4m.bz2 \ 3d/loop_7.2.wav bzcat $< > $*.mpeg4_asp.y4m transcode -x yuv4mpeg -y xvid4 -i $*.mpeg4_asp.y4m -p 3d/loop_7.2.wav \ -o $@ rm $*.mpeg4_asp.y4m 3d/rawppm_header: echo -ne "P6\n$(BRLCAD_SIZE) $(BRLCAD_SIZE)\n255\n" > $@ $(PBRLCAD:=.dxf): %.dxf: %.g #g-dxf -r 0.5 -o $@ $< `echo "$(@:.dxf=)" | sed -e 's/^3d\///g'` touch $@ $(PBRLCAD:=_0.png): 3d/%_0.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 0 $* 0 $(PBRLCAD:=_1.png): 3d/%_1.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 1 $* 0 $(PBRLCAD:=_2.png): 3d/%_2.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 2 $* 0 $(PBRLCAD:=_3.png): 3d/%_3.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 3 $* 0 $(PBRLCAD:=_4.png): 3d/%_4.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 4 $* 0 $(PBRLCAD:=_s0.png): 3d/%_s0.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 0 $* 1 $(PBRLCAD:=_s1.png): 3d/%_s1.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 1 $* 1 $(PBRLCAD:=_s2.png): 3d/%_s2.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 2 $* 1 $(PBRLCAD:=_s3.png): 3d/%_s3.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 3 $* 1 $(PBRLCAD:=_s4.png): 3d/%_s4.png: 3d/%.g 3d/rawppm_header utils/rt_script bash utils/rt_script $@ $< 4 $* 1 touch_videos: touch -c $(BRLCAD_VIDFILES) 3d/all.avi touch_pngs: touch -c $(NBRLCAD:=.png) clean_3d_php: rm -f $(PBRLCAD:=.php) $(PBRLCAD_VIDEO:=.php): %.php: %.g .density makefiles/Makefile.3d echo '
\n' >> $@ echo -ne ' | \n' >> $@ echo -ne ' | \n' >> $@ echo -ne ' |
\n' >> $@ echo -ne ' | \n' >> $@ echo -ne ' |
|
\n' >> $@ echo -ne ' | \n' >> $@ echo -ne ' | \n' >> $@ echo -ne ' |
\n' >> $@ echo -ne ' | \n' >> $@ echo -ne ' |
|
Density file [g/cm^3],\ code 0 means empty space (or air).\ ' >>$@ 3d/lib/hex: 3d/lib/hex.c $(CC) $(CFLAGS) $(CPPFLAGS) -lm -o $@ $< #Disabled because mencoder doesn't fit the audio to the video properly #3d/all.avi: video/jingle.y4m.bz2 video/title.y4m.bz2 \ # $(patsubst %,3d/%.y4m.bz2,$(SHOWN_IN_ALL)) # utils/video_script ../video/jingle ../video/title $(SHOWN_IN_ALL) \ # ../video/end_titles | \ # mencoder - -o $@ -audiofile audio/all.flac \ # -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:abitrate=192:vbitrate=1760 # Frames: 200 jingle, 300 title, 22x360=7920 total 8420=168.4s=2m48.4s # End titles 576x2201=1626 frames=32.52 sec. 3d/all.ogg: audio/all.flac video/jingle.y4m.bz2 video/title.y4m.bz2 \ video/end_titles.y4m.bz2 $(patsubst %,3d/%.y4m.bz2,$(SHOWN_IN_ALL)) rm -f 3d/all.ogg.wav flac -d $< -o 3d/all.ogg.wav utils/video_script ../video/jingle ../video/title $(SHOWN_IN_ALL) \ ../video/end_titles | theora_encoder_example \ 3d/all.ogg.wav - > $@ rm 3d/all.ogg.wav