The medium that camera rays start out in must be specified before world block. However, in order to specify a volume with some transform (which is of particular interest for heterogeneous volume), it must be placed after WorldBegin, since only objects there are allowed to have attributes and hence incorporate transformation information.
This leads to a situation where a medium is referenced (for camera ray) before its definition. With such an incorrectly-defined scene file, PBRT displays weird behavior: sometimes it is able to run the file, other times it would output "xxx medium is not defined". This random crashing behavior seems to be related to some caching mechanism.
Any help / information regarding this aspect would be very much appreciated!
The medium that camera rays start out in must be specified before world block. However, in order to specify a volume with some transform (which is of particular interest for heterogeneous volume), it must be placed after
WorldBegin
, since only objects there are allowed to have attributes and hence incorporate transformation information.This leads to a situation where a medium is referenced (for camera ray) before its definition. With such an incorrectly-defined scene file, PBRT displays weird behavior: sometimes it is able to run the file, other times it would output "xxx medium is not defined". This random crashing behavior seems to be related to some caching mechanism.
Any help / information regarding this aspect would be very much appreciated!