POV-Ray : Newsgroups : povray.binaries.images : cube meadow : Re: cube meadow Server Time
30 Jul 2024 02:15:08 EDT (-0400)
  Re: cube meadow  
From: nemesis
Date: 26 Feb 2013 22:50:01
Message: <web.512d818e2528e3a1b7c04fc90@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 26.02.2013 23:47, schrieb nemesis:
> > Alain <kua### [at] videotronca> wrote:

> >>> "nemesis" <nam### [at] gmailcom> wrote:
> >>>> just cubes, a bit of translation and rotation, lit by pure radiosity and a good
> >>>> measure of DOF love :)
> >>>
> >>> BTW, didn't like the overlapping, so instead I unioned all cubes, then
> >>> differenced from the union of the "flowers".  Takes a lot more rendertime and
> >>> sadly leaves artifacts that don't go away, but liked it better
> >>>
> >> Coincident surfaces.
> >> Did you try randomising the depth of the flowers? Just something like 1%
> >> variation of the depth will do the trick...
> >>
> >>
> >> Alain
> >
> > you're amazing, Alain :)
> >
> > half an hour on this one on 4 cores of a i5.  But i think I should've added a
> > bit more radiosity samples:  count 8 error_bound 1 pretrace_end .003 :p
>
> As for rendering times, I /think/ one (rather counterintuive) trick
> might be to difference the whole bunch of flowers from each cube
> individually, i.e.
>
> #declare AllFlowers = union {
>    object { Flower transform { A } }
>    object { Flower transform { B } }
>    ...
> }
>
> #declare AllBlocks = union {
>    difference {
>      object { Block transform { A } }
>      object { AllFlowers }
>    }
>    difference
>      object { Block transform { A } }
>      object { AllFlowers }
>    }
>    ...
> }

that's seems rather bizarre

the problem with the first render (though it was fast) is that each cube
differentiated was added one atop the other, causing ugly overlapping.  unioning
all cubes and then differencing the union of the flowers got rid of it, at the
cost of rendertimes.  wouldn't your union of differences end up with the same
problem from the first approach?

well, I just finished another render and am calling it quits.  here's the scene
if anyone's wishing to play with it and try clipka's method. :)


BTW, in the tips and tricks about focal blur it reads like this:

The focal blur is very grainy. Can I get rid of the graininess?

Yes. Set variance to 0 (or to a very small value, like for example 1/100000) and
choose a high enough blur_samples. The rendering will probably slow down quite a
lot, but the result should be very good.


but that's not the only way:  I could achieve a very smooth focal blur with just
blur_samples 12 and confidence .8 by also adding +AM2 +A0.1 +R3 to the
antialiasing settings.  nothing mindblowing, although it does slow down a good
deal and I got a 53 min render on i5 4 cores...




/* render settings: +AM2 +A0.1 +R3 +H720 +W1280 */

#version 3.7;



#local best = 1; // turn all on
#local GI = (best | 1);
#local DOF = (best | 0);

#local DBG = 0;

#local CAD = 0;  // helpful while designing the scene
#if (CAD)
    #local loc = <1,1,-1>; // don't change here
#else
    #local loc = <1,1.3,-1>;
#end
#local look = 0; // look here
#local far = 23; // how far away is the camera from loc
#local dof = 2;  // how much dof?
#local focus = .1; // focus how far from look?  from 0 to 1


global_settings {
    assumed_gamma 1

    #if (GI)
    ambient_light 0
    radiosity { count pow(2,4) brightness 1.2 error_bound 1
    gray_threshold .5 pretrace_end #if (DBG) .03 #else .002 #end adc_bailout .1
}
    #end
}



#local tclay = texture {
    pigment { rgb .7 }
    finish { diffuse .7 ambient .1 }
}



#local twist = 7;
#macro arrange( ob, n, m, nf, mf )
    #local i = -n; #while (i<n)
    #local j = -m; #while (j<n)

        object { ob
          translate <nf*i, 0, mf*j>
          rotate y*abs(i+j)*twist // little twist
        }

    #declare j = j+1; #end
    #declare i = i+1; #end
#end
#macro arrangeb( ob, n, m, nf, mf )
    #local i = -n; #while (i<n)
    #local j = -m; #while (j<n)

        object { ob
          translate <nf*i, sin(i+j)/100, mf*j>
          rotate y*abs(i+j)*twist // little twist
        }

    #declare j = j+1; #end
    #declare i = i+1; #end
#end
#macro arrangec( ob, n, m, nf, mf, ii, jj )
    #local i = -n; #while (i<n)
    #local j = -m; #while (j<n)

      #if ((ii=i)&(jj=j))
        object { ob
          translate <nf*i, 0, mf*j>
          rotate y*abs(i+j)*twist // little twist
        }
      #end

    #declare j = j+1; #end
    #declare i = i+1; #end
#end

#macro encircle( ob, r, n )
union {
    #local i = 0; #while (i<n)

        object { ob translate z*r rotate y*i*(360/n) }

    #declare i = i+1; #end
}
#end


#local flower = merge {
encircle( box { -1,1 scale .2 translate y }, .5, 7 )
encircle( box { -1,1 scale .1 translate y }, .7, 7 )
}
#local ob3 = box { -1,1 }



// scene
union {
#local a = 5;
#local b = 5;
#local as = 2.3;
#local bs = 2.7;
    union {
        #if (DBG)
        union {arrange( difference { object{ob3} object{flower}}, a, b, as, bs
)}
        #else
        difference { union {arrange( ob3, a, b, as, bs )}
                     union {arrangeb( flower, a, b, as, bs )}}
        #end
        // two separate "flowers"
        arrangec( object{flower pigment{rgb x}}, a, b, as, bs, 0, 3 )
        arrangec( object{flower pigment{rgb y}}, a, b, as, bs, 0, -3 )
        texture{tclay}
    }
    // floor
    plane { y, -1 texture {tclay}}


// sky
  sphere { 0, 1
    pigment { rgb <.5,.6,1>}
    finish { diffuse .8 emission 2 }
    hollow
    scale 10000
  }

  translate y*5+x
}



camera {
    angle 60
    #if (CAD)
    //orthographic
    angle 50
    #end
    location loc*far

    look_at look
    #if (DOF) aperture dof blur_samples 12 confidence .8 focal_point
look+((loc*far-look)*focus) #end
    right x*image_width/image_height
}


Post a reply to this message


Attachments:
Download 'cubemeadow2.png' (455 KB)

Preview of image 'cubemeadow2.png'
cubemeadow2.png


 

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