POV-Ray : Newsgroups : povray.binaries.images : Liquid Oils Server Time
14 May 2024 00:34:43 EDT (-0400)
  Liquid Oils (Message 1 to 7 of 7)  
From: Sven Littkowski
Subject: Liquid Oils
Date: 24 Dec 2015 20:09:23
Message: <567c9743@news.povray.org>
Hi,

first of all, the attached image was NOT created with POV-Ray.

But I am posting here to find out, if you all think, POV-Ray could
create such images that look like various colorful oils (some even with
"things" in them) as seen in this image. I like that image quite a lot,
and wonder if POV-Ray could create such art. Maybe even random-generated.


Post a reply to this message


Attachments:
Download '- skype.jpg' (69 KB)

Preview of image '- skype.jpg'
- skype.jpg


 

From: Michael Scharrer
Subject: Re: Liquid Oils
Date: 29 Dec 2015 17:15:00
Message: <web.5683057ce6d2dc96c0047e8e0@news.povray.org>
Hello,

I'm certain POV-Ray is able to produce such an image, but the scene description
file will be difficult to write. As a start you shoud probably look at the
various media features here: http://www.povray.org/documentation/view/3.6.1/419
If that isn't enough, try MegaPOV.
The attached image is something I made using media.

Michael Scharrer
https://mscharrer.net


Post a reply to this message


Attachments:
Download 'michael_scharrer_energy_pulse.jpg' (57 KB)

Preview of image 'michael_scharrer_energy_pulse.jpg'
michael_scharrer_energy_pulse.jpg


 

From: Nekar Xenos
Subject: Re: Liquid Oils
Date: 30 Dec 2015 14:25:03
Message: <web.56842f5fe6d2dc962dc16e600@news.povray.org>
Sven Littkowski <jam### [at] yahoocom> wrote:
> Hi,
>
> first of all, the attached image was NOT created with POV-Ray.
>
> But I am posting here to find out, if you all think, POV-Ray could
> create such images that look like various colorful oils (some even with
> "things" in them) as seen in this image. I like that image quite a lot,
> and wonder if POV-Ray could create such art. Maybe even random-generated.

I don't have a lot of time available on my pc. You can try playing around with
this:

// Begin Code
//
// PoVRay 3.7 Scene File " ... .pov"
// author:  ...
// date:    ...
//--------------------------------------------------------------------------
#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 }}
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
// camera ------------------------------------------------------------------
camera {perspective angle 75               // front view
                            location  <0.0 , 1.0 ,-3.0>
                            right     x*image_width/image_height
                            look_at   <0.0 , 1.0 , 0.0>}

// sun ----------------------------------------------------------------------
light_source{< 3000,3000,-3000> color rgb 1}
// sky ----------------------------------------------------------------------
sky_sphere { pigment { gradient <0,1,0>
                       color_map { [0.00 rgb <0.6,0.7,1.0>]
                                   [0.35 rgb <0.1,0.0,0.8>]
                                   [0.65 rgb <0.1,0.0,0.8>]
                                   [1.00 rgb <0.6,0.7,1.0>]
                                 }
                       scale 2
                     } // end of pigment
           } //end of skysphere
// ground -------------------------------------------------------------------
plane{ <0,1,0>, 0
       texture{ pigment{ checker color rgb<1,1,1>*1.2 color
rgb<0.25,0.15,0.1>*0}
              //normal { bumps 0.75 scale 0.025}
                finish { phong 0.1}
              } // end of texture
     } // end of plane
//---------------------------------------------------------------------------
//---------------------------- objects in scene ----------------------------
//---------------------------------------------------------------------------

#declare Shape= // ==>> Insert your shape here ==>>
sphere{0,1 translate y}


#declare Pig=<0,1,1>;
#declare Pig1=<1,0,1>;
#declare Pig2=<1,1,0>;


#macro Pigm(Col1, Col2, Col3)  // ==>> Insert your main pigment here ==>>
    bozo  // pattern modifier
  // (---turbulence warp---)
  // turbulates similar to 'turbulence'
  scale .3
  warp {
    turbulence 1     // amount of turbulence
    //octaves 2          // optional turbulence modifiers

  }

      color_map {
                [0 color rgb Col1]
                [0.3 color rgb Col2]
                [0.5 color rgb Col1]
                [.7 color rgb Col3]
                [1 color rgb Col1]
              }
#end



#declare Pigmt=pigment {
      Pigm(Pig1,Pig,Pig2)
    }


#declare OuterMat= // ==>> Insert your Outer Material here (at least one
material should have transparency) ==>>
material{texture{pigment{rgbt 1}//Pigmt transmit 1}
                 finish{}//specular .1 reflection{0,.1 metallic}}
                 }
       /* interior{ior 1.3
                media {
                      // (---general values---)

                      scattering {1, rgb 1 }
                      //emission .5
                      method 3               // adaptive sampling
                      density { Pigm(Pig*Pig1,Pig,Pig*Pig2) }
                      }
                }  */
        }

#declare Pigmt1=pigment {
      Pigm(Pig1,Pig1*Pig2,Pig1*Pig)
    }

#declare InnerMat1=  // ==>> Insert your Inner Material here (at least one
material should have transparency) ==>>
material{texture{pigment{Pigmt1 filter .5 transmit .5}
                 finish{specular .1 metallic reflection{0,1 metallic}}
                 }
        interior{ior 1.5
                media {
                      // (---general values---)
                      /*intervals 10           // number of intervals used for
sampling [10]
                      samples 1,1            // minimum and maximum number of
samples taken per interval [1,1]
                      confidence 0.9         // statistic parameter
higher->better quality [0.9]
                      variance 1.0/128       // statistic parameter
lower->better quality [1.0/128]
                      ratio 0.9              // distribution between lit and
unlit areas [0.9]
                      */
                      scattering {1, rgb 2 }

                      method 3               // adaptive sampling
                      density { Pigm(Pig1,Pig1*Pig2,Pig1*Pig) }
                      }
                }
        }

#declare Pigmt2=pigment {
      Pigm(Pig2*Pig,Pig2*Pig1,Pig2)
    }


#declare InnerMat2=  // ==>> Insert your Inner Material here (at least one
material should have transparency) ==>>
material{texture{pigment{Pigmt2 filter .5 transmit .5}
                 finish{specular .1 phong 1 metallic reflection{0,1 metallic}}
                 }
        interior{ior 1.5
                media {
                      // (---general values---)
                      /*intervals 10           // number of intervals used for
sampling [10]
                      samples 1,1            // minimum and maximum number of
samples taken per interval [1,1]
                      confidence 0.9         // statistic parameter
higher->better quality [0.9]
                      variance 1.0/128       // statistic parameter
lower->better quality [1.0/128]
                      ratio 0.9              // distribution between lit and
unlit areas [0.9]
                      */
                      scattering {1, rgb 2 }

                      method 3               // adaptive sampling
                      density { Pigm(Pig2*Pig,Pig2*Pig1,Pig2) }
                      }
                }
        }


// end of custom declares

/////////////////////////////////////////////////////////////////



#declare fn_Pigm=function {pigment{Pigm(<1,1,1>,<.5,.5,.5>,<0,0,0>)}}

#declare Threshold1=0.4; // changes the area in the texture where the inner
material starts in the main pigment
#declare Threshold2=0.6; // changes the area in the texture where the inner
material starts in the main pigment

#declare Threshold1a=0.1; // changes the area in the texture where the inner
material starts in the main pigment
#declare Threshold2b=0.9; // changes the area in the texture where the inner
material starts in the main pigment


#declare IsoShape1=
isosurface {
  function{fn_Pigm(x/2, y/2, z/2).gray}

  threshold Threshold1
  contained_by { box {min_extent(Shape),max_extent(Shape) } }
  accuracy 0.003
  max_gradient 5 // <<== Check max Gradient in messages after a test render <<==
***

} // end of isosurface ------------------------------

#declare IsoShape1a=
isosurface {
  function{fn_Pigm(x/2, y/2, z/2).gray}

  threshold Threshold1a
  contained_by { box {min_extent(Shape),max_extent(Shape) } }
  accuracy 0.003
  max_gradient 5 // <<== Check max Gradient in messages after a test render <<==
***

} // end of isosurface ------------------------------


#declare IsoShape2=
isosurface {
  function{fn_Pigm(x/2, y/2, z/2).gray}

  threshold Threshold2
  contained_by { box {min_extent(Shape),max_extent(Shape) } }
  accuracy 0.003
  max_gradient 5 // <<== Check max Gradient in messages after a test render <<==
***

} // end of isosurface ------------------------------


#declare IsoShape2b=
isosurface {
  function{fn_Pigm(x/2, y/2, z/2).gray}

  threshold Threshold2
  contained_by { box {min_extent(Shape),max_extent(Shape) } }
  accuracy 0.003
  max_gradient 5 // <<== Check max Gradient in messages after a test render <<==
***

} // end of isosurface ------------------------------


#declare Shape1= intersection{
                object{Shape}
                difference{
                            object{IsoShape1}
                            object{IsoShape1a}
                            }
                            }


#declare Shape2=intersection{
                object{Shape}
                difference{
                            object{IsoShape2b}
                            object{IsoShape2}
                            }
                            }

union{

    object{Shape1
                material{InnerMat1}
                hollow
                }



    object{Shape2
                material{InnerMat2}
                hollow
                }
   /*
    difference{object{Shape}

                object{Shape1}
                object{Shape2}


                material{OuterMat}
                hollow
                }
             */
    }
/////////////////////////////////////////////////////////////
// End Code


Post a reply to this message

From: Mike Horvath
Subject: Re: Liquid Oils
Date: 31 Dec 2015 03:50:25
Message: <5684ec51$1@news.povray.org>
On 12/24/2015 8:08 PM, Sven Littkowski wrote:
> Hi,
>
> first of all, the attached image was NOT created with POV-Ray.
>
> But I am posting here to find out, if you all think, POV-Ray could
> create such images that look like various colorful oils (some even with
> "things" in them) as seen in this image. I like that image quite a lot,
> and wonder if POV-Ray could create such art. Maybe even random-generated.
>

Maybe borrow some code from this:

https://haxiomic.github.io/GPU-Fluid-Experiments/html5/?q=UltraHigh


Post a reply to this message

From: Thomas de Groot
Subject: Re: Liquid Oils
Date: 31 Dec 2015 03:59:26
Message: <5684ee6e@news.povray.org>
A few notes about media in version 3.7:

- method 3 is default
- *always* use intervals 1
- samples has only one parameter (not two; second not taken into 
account) which you can increase without too much render slowing down

-- 
Thomas


Post a reply to this message

From: Alain
Subject: Re: Liquid Oils
Date: 31 Dec 2015 17:37:48
Message: <5685ae3c@news.povray.org>

> A few notes about media in version 3.7:
>
> - method 3 is default
> - *always* use intervals 1
> - samples has only one parameter (not two; second not taken into
> account) which you can increase without too much render slowing down
>

Increasing intervals beyong 1 (default value) result in a huge slowdown, 
and can cause artefacts.
With method 3, you should use at least 3 samples and the default is 10. 
samples 100 not that slow, and way faster than intervals 10 samples 3,1.

confidance and variance are used to adjust the number of samples per 
intervals and are totaly and silently ignored when using method 3 as 
there is only 1 interval.

All in all, you only need to adjust samples.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Liquid Oils
Date: 6 Jan 2016 22:35:44
Message: <568ddd10$1@news.povray.org>
Thanks for this code. I am trying to render it, but it is slow. Thanks
also to everyone else, all comments are well appreciated! :-)


Post a reply to this message

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