POV-Ray : Newsgroups : povray.binaries.images : Probably I'm just in fact too stupid... : Re: Probably I'm just in fact too stupid... Server Time
5 Nov 2024 01:25:19 EST (-0500)
  Re: Probably I'm just in fact too stupid...  
From: BitViper
Date: 25 Nov 2009 22:47:44
Message: <4b0dfa60$1@news.povray.org>


> ...to make use of more advanced raytracing techniques such as media -
>  and may have to content myself for the rest of my life with
> beginner's scenes!
> 
> I'm still not able to produce planetary rings through which light is
>  scattered also to the unlit side... here is the code (no, it's just
> a test scene, not a real Saturn!), and below two scenes showing the
> lit and unlit side of the rings!

Well I couldnt figure out how to change the density of it for the 
different rings, but did figure out how to accurately manage the color 
locations with an unexpectedly beautiful result.

---- code start ----
#include "colors.inc"

global_settings {
	max_trace_level 100
}

light_source {
	1000
	White
}

camera {
	right x * image_width / image_height
	location < -5, 2, 5 >
	look_at 0
}

#declare planet = object {
	sphere { 0, 2 }
	texture { pigment { color Yellow } }
}

#declare m_rings = media {
	scattering {
		1, 1 // type, color
		extinction 1 // default = 1
	}
	density {
		cylindrical
		density_map {
			[ 0.000 rgbt < 1, 0, 0, 1 > ]
			[ 0.175 rgbt < 0, 1, 0, 0 > ]
			[ 0.250 rgbt < 0, 0, 1, 1 > ]
			[ 0.250 rgbt < 0, 0, 0, 1 > ]
			[ 1.000 rgbt < 0, 0, 0, 1 > ]
		}
		scale 4
	}
}

#declare rings = object {
	difference {
		cylinder { < 0, -1, 0 >, < 0, 1, 0 >, 4 }
		cylinder { < 0, -2, 0 >, < 0, 2, 0 >, 3 }
	}
	scale y * 0.1
	hollow
	texture { pigment { rgbt 1 } } // completely transparent
	interior {
		media { m_rings }
	}
}

union {
	object { planet }
	object { rings }
}
---- code end ----


Post a reply to this message

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