|
![](/i/fill.gif) |
I compiled it successfully in Solaris 7.
But a couple of things:
There are still some file names that have upper case letters in them.
You should convert them to lower case (since they are included in lower case).
It's ok to have a file name with upper case letters, but then you would
have to include it in the exact same way as well. Since all the includes
use lower case, the file names should use it too.
//-comments at lines 1409 and 1411 of lathe.c
What is oldmedia.c? It interfered my linking (it and media.c define the
same functions twice). I just removed it and it seems to work now.
The printing of "Sorting photons..." still outputs many newlines. It would
be nice if all of them went to the same line.
Has the photons interaction with media changed? I tried to render my
2-mirrors-and-lens scene, and there are no more reflected ray beams. It
worked with 0.4.
The scene is included at the end of the post.
Btw, I used the following makefile to compile the program. It assumes that
we are in the 'unix' directory under the 'source' directory. It only
works with gmake:
----8<--------------8<---------------8<----------------8<----------
CC = gcc
LD = gcc
INCLUDES = $(SRCINC) $(LIBPNGINC) $(ZLIBINC) $(XLIBINC)
CFLAGS = -O3 -ffast-math -ansi -c -DCOMPILER_VER=\".`uname`.$(CC)\" $(INCLUDES)
LFLAGS = $(LIBPNGLIB) $(ZLIBLIB) $(XLIBLIB) -lm
X11 = /usr/openwin
XLIBINC = -I$(X11)/include
XLIBLIB = -L$(X11)/lib -lX11
PNGDIR = /share/local5/include
LIBPNGINC = -I$(PNGDIR)
LIBPNGLIB = -L/share/local5/lib -lpng
ZLIBDIR = /share/local5/include
ZLIBINC = -I$(ZLIBDIR)
ZLIBLIB = -L/share/local5/lib -lz
SRCDIR = ..
SRCINC = -I$(SRCDIR) -I.
SRC = $(wildcard $(SRCDIR)/*.c) $(wildcard *.c)
HEADERS = $(wildcard $(SRCDIR)/*.h) $(wildcard *.h)
BIN = xmegapov
$(BIN): $(SRC:.c=.o)
$(LD) $^ -o $(BIN) $(LFLAGS)
include .makefile.dep
.makefile.dep:
- gcc $(INCLUDES) -MM $(SRC) > .makefile.dep
----8<--------------8<---------------8<----------------8<----------
Here is the scene that stopped working with 0.5:
----8<--------------8<---------------8<----------------8<----------
#version Unofficial MegaPov 0.5;
#include "colors.inc"
#include "textures.inc"
#declare UsePhotons=yes;
global_settings
{
max_trace_level 8
#if(UsePhotons)
photons
{ count 20000
autostop 0
media 100
}
#end
}
box
{ <-4,-3,-1.5>,<8,3,1.5> hollow
pigment { rgbt 1 }
photons { pass_through }
interior
{ media
{ intervals 10
scattering { 1, rgb .5 extinction .01 }
method 3
}
}
}
sphere
{ 0,70 inverse
pigment
{ bozo color_map { [0 rgb 0][1 rgb <1,.5,0>] }
scale <5,10,5>
}
}
camera
{ location -z*20 look_at 0 angle 35
}
light_source
{ <50,2,0> 1
spotlight point_at y*2 radius .5 falloff .6
}
light_source
{ <100,100,-100>*.3 .8 media_interaction off
#if(UsePhotons)
photons { reflection off refraction off }
#end
}
#declare MirrorBox=
union
{ difference
{ box { <-.5,-1.8,-1.8><.1,1.8,1.8> }
box { <-.1,-1.5,-1.5><.11,1.5,1.5> }
pigment { DMFWood4 }
}
box
{ <-.1,-1.5,-1.5><0,1.5,1.5>
pigment { rgb 0 }
finish { reflection 1 diffuse 0 ambient 0 }
#if(UsePhotons)
photons
{ target
refraction off
reflection on
ignore_photons
}
#end
}
}
object
{ MirrorBox
rotate z*-45
translate <-3,2,0>
}
object
{ MirrorBox
rotate z*45
translate <-3,-2,0>
}
box
{ <-.5,-1.5,-1.5><0,1.5,1.5>
pigment { Cherry_Wood scale .5 }
rotate z*180
translate <5,-2,0>
}
sphere
{ 0,1.3 scale <.3,1,1>
pigment { rgbf <.7,.9,1,.9> }
finish { specular .5 reflection .1 }
interior { ior 1.5 }
translate <2,-2,0>
#if(UsePhotons)
photons
{ target
refraction on
reflection on
}
#end
}----8<--------------8<---------------8<----------------8<----------
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |