|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to make three hemispheres with different colors, and have
their overlap be a mixed color. The first image is something I made in
gimp that illustrates the effect I want. The second image is one of my
better attempts to make it. I'm sure I could make it with seven
different csgs, but that would make some of the more complicated stuff I
would like to do Much more complicated. With the image I rendered uses
media, I had to vary the diameters of the hemispheres to avoid a
coincidence surface. I thought that media wouldn't get that bug. Any
ideas of how to do this simply.
--
Dan Johnson
http://www.geocities.com/zapob
Post a reply to this message
Attachments:
Download 'colormerge.gif' (5 KB)
Download 'spherical_triangle.jpg' (8 KB)
Preview of image 'colormerge.gif'
Preview of image 'spherical_triangle.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I'm trying to make three hemispheres with different colors, and have
> their overlap be a mixed color.
That's pretty hard to do using textures, as there's not really any way to
make the colour values add together (which is what I think you're after). I
suggest you use 3 different coloured light sources (red green and blue)
shining on a white sphere, that way the colours add up nicely.
'course, that'll mean anything else in the scene will get lit that way
too... :(
--
Tek
http://www.evilsuperbrain.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
looks great all the same, i have no suggestions as to how you could do this
better (if al all!)
--
Rick
POV-Ray News & Resources - http://povray.co.uk
Kitty5 WebDesign - http://kitty5.com
Hi-Impact web site design & database driven e-commerce
TEL : +44 (01625) 266358 - FAX : +44 (01625) 611913 - ICQ : 15776037
PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is this what you were after?
Done like this...
#declare XM = (15/20)*cos(degrees(60));
#declare ZM = (15/20)*sin(degrees(60));
#declare F1 =
function
{
ceil((-((x-(15/20))^2 + y^2 + z^2) + (1^2)))
}
#declare F2 =
function
{
((ceil((-((x+(XM))^2 + y^2 + (z-(ZM))^2) + (1^2)))))
}
#declare F3 =
function
{
((ceil((-((x+(XM))^2 + y^2 + (z+(ZM))^2) + (1^2)))))
}
#declare RGBPig =
pigment
{
function
{
(if((F1),1,0) +
if(F2,2,0) +
if(F3,4,0))/7
}
scale 20
colour_map
{
[0/7 rgb <0,0,0>]
[1/7 rgb <1,0,0>]
[2/7 rgb <0,1,0>]
[3/7 rgb <1,1,0>]
[4/7 rgb <0,0,1>]
[5/7 rgb <1,0,1>]
[6/7 rgb <0,1,1>]
[7/7 rgb <1,1,1>]
}
}
difference
{
union
{
sphere
{
<15,0,0>
19.99
}
sphere
{
<-20*XM,0,20*ZM>
19.99
}
sphere
{
<-20*XM,0,-20*ZM>
19.99
}
}
box
{
<-50,0,-50>
<50,50,50>
}
texture { pigment {RGBPig} finish { diffuse 1}}
}
Post a reply to this message
Attachments:
Download 'colouradd.png' (6 KB)
Preview of image 'colouradd.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ewww, sorry for that terrible coding. Here is the three hemispheres thing you
wanted, this time done using standard pigments (and pigment_pattern).
#declare Spherical_Red_Pigment =
pigment
{
spherical
colour_map
{
[0 rgb 0]
[0 rgb <3,0,0>]
[1 rgb <3,0,0>]
}
}
#declare Spherical_Green_Pigment =
pigment
{
spherical
colour_map
{
[0 rgb 0]
[0 rgb <0,3,0>]
[1 rgb <0,3,0>]
}
}
#declare Spherical_Blue_Pigment =
pigment
{
spherical
colour_map
{
[0 rgb 0]
[0 rgb <0,0,3>]
[1 rgb <0,0,3>]
}
}
#declare Hemispherical_Red_Pigment =
pigment
{
pigment_pattern
{
planar
translate <0,1,0>
}
pigment_map
{
[0 colour rgb 0]
[0 Spherical_Red_Pigment]
[1 Spherical_Red_Pigment]
}
}
#declare Hemispherical_Green_Pigment =
pigment
{
pigment_pattern
{
planar
translate <0,1,0>
rotate <0,0,-90>
}
pigment_map
{
[0 colour rgb 0]
[0 Spherical_Green_Pigment]
[1 Spherical_Green_Pigment]
}
}
#declare Hemispherical_Blue_Pigment =
pigment
{
pigment_pattern
{
planar
translate <0,1,0>
rotate <-90,0,0>
}
pigment_map
{
[0 colour rgb 0]
[0 Spherical_Blue_Pigment]
[1 Spherical_Blue_Pigment]
}
}
#declare Combined_Hemisphere_Pigment =
pigment
{
average
pigment_map
{
[1 Hemispherical_Red_Pigment]
[1 Hemispherical_Green_Pigment]
[1 Hemispherical_Blue_Pigment]
}
}
sphere
{
<0,0,0>
0.999
texture
{
pigment { Combined_Hemisphere_Pigment }
finish
{
diffuse 1
}
}
rotate <0,30,0>
rotate <-30,0,0>
}
Post a reply to this message
Attachments:
Download '3hemis.png' (11 KB)
Preview of image '3hemis.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mark James Lewin wrote:
> Ewww, sorry for that terrible coding. Here is the three hemispheres thing you
> wanted, this time done using standard pigments (and pigment_pattern).
>
All these people telling me it can't be done, and then you prove that not only
can it be done, but it can be done simply. It would be nice if I had all the
docs together instead of one for povray official, and one for megapov features,
maybe I would have noticed pigment_pattern. Do you know if a pattern like this
can be used on media? Why are their three entry's in all of the color maps?
> colour_map
> {
> [0 rgb 0]
> [0 rgb <3,0,0>]
> [1 rgb <3,0,0>]
> }
>
I would also like to mention you are my hero.
--
Dan Johnson
http://www.geocities.com/zapob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
pigment_pattern should work with media. <3,0,0> is nessecary because you are
averaging three pigments. Each of the colours is divided by three then added
together (or all are added together, then divided by three, depending on which way
you see it). If you had <1,0,0> in the initial colours, you would get <1/3,0,0>
finally, which does not give nice full colours. Glad to help.
MJL
Dan Johnson wrote:
> Mark James Lewin wrote:
>
> > Ewww, sorry for that terrible coding. Here is the three hemispheres thing you
> > wanted, this time done using standard pigments (and pigment_pattern).
> >
>
> All these people telling me it can't be done, and then you prove that not only
> can it be done, but it can be done simply. It would be nice if I had all the
> docs together instead of one for povray official, and one for megapov features,
> maybe I would have noticed pigment_pattern. Do you know if a pattern like this
> can be used on media? Why are their three entry's in all of the color maps?
>
> > colour_map
> > {
> > [0 rgb 0]
> > [0 rgb <3,0,0>]
> > [1 rgb <3,0,0>]
> > }
> >
>
> I would also like to mention you are my hero.
>
> --
> Dan Johnson
>
> http://www.geocities.com/zapob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
As for the three entries (sorry, misread as "3" entries), these make sure that the
spherical pattern gives a pigment that is a full colour inside the sphere, and no
colour outside it.
MJL
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|