POV-Ray : Newsgroups : povray.advanced-users : Slicing media - is it possible ? : Re: Slicing media - is it possible ? Server Time
28 Oct 2024 04:48:45 EDT (-0400)
  Re: Slicing media - is it possible ?  
From: Alain Martel
Date: 25 Sep 2024 11:58:57
Message: <66f43341@news.povray.org>
Le 2024-09-24 à 13:40, yesbird a écrit :
> Hi,
> I am trying to apply CSG operations to objects filled with media without
> any success (results also attached):
> https://povlab.online/?scene=dicom.pov
> 
> Who knows if it's really possible or I am only wasting the time trying
> to force it to work ?
> 
> Thanks in advance.
> -- 
> YB

I see that your code use intervals 60.
That's REAL bad.
This will render faster with better results :

#declare themedia = interior{
media{
	samples 100
	// stating method 3 is not needed as it's the default
	// ratio is not used with method 3
	// confidence and variance are also not used
	emission 1/20 //OK
	absorption 1/1000 //OK
	scattering {1, -0.3} //OK
	density{
		<density items>
		// As interpolate 0 mean no interpolation,
		// you can omit it
		}
	}
}

Using intervals with any value >1 massively increase the rendering time 
and can introduce artifacts and glitches.

Then. Change your container as follow :
difference{
	box{	0, 1
		translate -0.5
		scale 200
	}// NO pigment
	box{	0, 1
		translate -0.5
		scale <100, 100, 201>//400 is uselessly large
	}//still no pigment
	hollow //apply to the difference as a whole
	pigment{rgbf 1}
	interior{ theinterior}
	}


Using the default method 3, you need to avoid using intervals 
altogether. Using intervals is a huge performance killer.
Then, the parameters ratio, confidence and variance are specific to 
method 1 and 2 and are used to control how many samples are to be used 
for each intervals. As you work with only 1 intervals, they have no effect.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.