POV-Ray : Newsgroups : povray.advanced-users : And Again: var-ior Server Time
26 Nov 2024 11:38:45 EST (-0500)
  And Again: var-ior (Message 1 to 3 of 3)  
From: Jan Walzer
Subject: And Again: var-ior
Date: 9 Jun 2000 16:47:32
Message: <394157e4@news.povray.org>
Now OK ... following to the discussions we had I'd made first
test ... not very satisfiing..

The issue of creating objects with variable optical densities
inside the object.
My first idea was to create different objects inside the
Master-object.

My machine is still on render, but I tried it first with a method
in pure pov.
I'll post it when it's done ... maybe someone of you is faster
...

This was easy to do with iso-surfaces, manipulating the
threshold-value.

this is the current scene, I'm using to test..

-------- var_ior_tst.pov ----------------
//POV ... give Var_ior a 1st try ...
#version unofficial MegaPov 0.5;    // do I need this ??? dont
know .... but, why not ...

global_settings {
        max_trace_level 512       // Important, if you don't
want to see
        max_intersections 512     // black holes ...
        }


////////////////////
// Standard stuff following ...
// Just to see something ..

camera {
 location <-5,25,-30>
 look_at <0,5,0>
 angle 25
        }

light_source {<0,17,13> color rgb <0.5,0.5,0.6>}      // Maybe 6
lightsources are to much ... (aren't they ???)
light_source {<5,17,-10> color rgb <0.6,0.5,0.5>}
light_source {<-15,17,6> color rgb <0.5,0.6,0.45>}
light_source {<0,3,23> color rgb <0.5,0.5,0.6>}
light_source {<50,5,-10> color rgb <0.6,0.5,0.5>}
light_source {<-15,3,-46> color rgb <0.5,0.6,0.45>}


plane { y,0                                    // the typical
checkered plane .... (I can't get without this)
        pigment {
                checker color rgb 1, color rgb 0.5
                }
        }

sphere {0,2.5
        translate <4,1,5>                      // A blue sphere
right behind our object ....
        pigment {color rgb<0,0,1>}
        finish {brilliance 10 phong 5 phong_size 50 reflection
0.3}
        }

sphere {0,1.5
        scale <3,1,1>                          // and a stretched
red one left behind it ...
        rotate y*-30
        translate <-4,1,5>
        pigment {color rgb<1,0.1,0>}
        finish {brilliance 10 phong 5 phong_size 50 reflection
0.3}
        }

//////////////////////////////////////
// Here is the interesting part ...



#declare M_density=0.04;   // How fine should it be ???
Bigger->faster .... Smaller->slower, finer ...
/*
can create a Rendering error: Too many nested refracting objects
...
so keep it big enough ...
*/

// Maybe a union{} of the following will speed this a bit ???
Don't know ..

#declare I=4;
#while (I>0)
#declare I=I-M_density;
isosurface {
        function { sin(x)+sin(y)+sin(z)} //This will make it
really slow ...
        //function { "sphere",<4>}       // I just tested with a
simple sphere ... But I think I need a cray ....

        contained_by {sphere{0,5}}
        threshold -I                     // This is a the
interesting piece ...
        translate <0,5,0>
        pigment {
                checker color rgbt <1,0.9,0,0.9975>, color rgbt
<0.9,1,0,0.9975>
                }
        interior{ior 1+I*0.025}          // And this is the other
part ...
        hollow
        }
#end

//EOF

-----------------------------------------------------------------
Of course, when testing, I use the sphere, not the other function
When setting M_density lower (to create more objects) there comes
the
 - to many nested refracting objects -
message ...
How can I get around this without patching in the source ???

Now I'll try other methods for realizing the main problem, but I
think therefore I have to read through the source (and understand
it) ... Maybe there can something be done in the media-code.

BTW: how can I to a isosurface from a crackle-pattern, or a
marble, or some other patterns ??? And with the use of a
turbulence ???


--

 ,',    Jan Walzer      \V/  http://wa.lzer.net     ,',
',','   student of      >|<  mailto:jan### [at] lzernet ',','
  '   ComputerScience   /A\  +49-177-7403863         '


Post a reply to this message

From: Mike Williams
Subject: Re: And Again: var-ior
Date: 10 Jun 2000 09:04:19
Message: <7oOFXCA+3aQ5EwZC@econym.demon.co.uk>
Wasn't it Jan Walzer who wrote:

>BTW: how can I to a isosurface from a crackle-pattern, or a
>marble, or some other patterns ??? And with the use of a
>turbulence ???

Do you mean something like this? Declare the basic shape to which you
want to apply the pigment function, declare the pigment function, and
then add them together to create the isosurface.

Note: adding the pigment function to the sphere causes the crackles to
eat into the surface (because the same threshold value is now achieved
for smaller values of x,y,z). If you want the crackles to stand proud of
the sphere you need to subtract it and increase the size of the
contained_by object.


#declare Sphere4=function{"sphere",<4>}
                    
#declare Crackles=function{pigment{
  crackle 
  turbulence 0.1
  color_map { [0 rgb 1] [1 rgb 0] }
  scale 0.5
  }
}

isosurface {
  function { Sphere4(x,y,z) + Crackles(x,y,z)*0.3 }
  method 2
  eval
  accuracy 0.0001
  contained_by{sphere{0,4}}
  pigment {rgb .9}
  finish {phong 0.5 phong_size 10}
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Warp
Subject: Re: And Again: var-ior
Date: 10 Jun 2000 15:46:09
Message: <39429b01@news.povray.org>
Jan Walzer <wal### [at] informatikuni-hallede> wrote:
: Now I'll try other methods for realizing the main problem, but I
: think therefore I have to read through the source (and understand
: it) ... Maybe there can something be done in the media-code.

  Please understand that variable IOR is a lot more complicated than media.
I suppose you read the VFAQ.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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