POV-Ray : Newsgroups : povray.beta-test : memory problem with radiosity : Re: memory problem with radiosity Server Time
3 Jul 2024 16:46:03 EDT (-0400)
  Re: memory problem with radiosity  
From: Ken Willmott
Date: 13 Feb 2010 21:35:01
Message: <web.4b776050a32fb1c6a1983ea0@news.povray.org>
Thanks for the comments... there are good suggestions there. I prepared a test
file so that any of you could try it out. I verified that both OS and beta are
running 64 bits. I discovered that there are problems even with radiosity
commented out. Namely, CPU usage is not 100%, and control does not come back to
the GUI after the render is complete. With radiosity (using default values)
enabled, the task levels off at 7.89GB. I think it is only because I simplified
the scene. Many minutes elapse before it releases the memory, and returns
control (or I lose patience and kill the app). Here is the source code:

#include "functions.inc"
#include "colors.inc"


global_settings
{
        ambient_light 0.001
        radiosity
        {
        }
}

#declare valley_radius = 8.0;

camera {
        location <valley_radius*100, -45, 0>
        up <0, 1,  0>
        right x*1600/1200
        angle 60
        look_at <valley_radius*100,-100,4000>
}

light_source
{
        < -60, 30, -30>
        color rgb <255/256, 229/256, 123/256>
        parallel
}

fog {fog_type 1 distance 2000 color Gray}

#declare P1=function
                {pattern{wrinkles turbulence 0.3}}
#declare P2=function
                {pattern{crackle turbulence 0.3}}
#declare P3=function
                {pattern{bozo turbulence 0.3}}

#declare ROCK_TEXTURE_SCALE = 0.5;
#declare RockTexture = function
                {
                P1(x,0,z)*1/4*ROCK_TEXTURE_SCALE
                +P2(x,0,z)*3/4*ROCK_TEXTURE_SCALE
                }

#declare RockTexture2 = function
                {
                P3(x*2,0,z*2)*1/4*ROCK_TEXTURE_SCALE
                +P3(x,0,z)*3/4*ROCK_TEXTURE_SCALE
                }

#declare  F_valley_sides = function {exp(-(2-2*abs(x))*(2-2*abs(x)))}
#declare  F_valley_contour = function {exp(-(x*x*x*x/4))}
#declare  F_river_contour = function {exp(-(x*x*x*x*4096))}

#declare ValleySurface =
function
{
        y
        + F_valley_contour(sqrt(x*x+z*z)-valley_radius, y, 0) //SOR of valley
        - F_valley_sides(sqrt(x*x+z*z)-valley_radius, y, 0)*RockTexture(x,0,z)*2
//SOR of valley sides
        + F_river_contour
                        (
                                sqrt(x*x+z*z)
                                -valley_radius
                                +(0.5-f_bozo(x*2, 0, z*2))/2,
                                y,
                                0
                        )/8 //SOR of river w/ meander
        - F_river_contour
                        (
                                sqrt(x*x+z*z)
                                -valley_radius
                                +(0.5-f_bozo(x*2, 0, z*2))/2,
                                y,
                                0
                        )*RockTexture(x*64,0,z*64)/8 //SOR of river
        - RockTexture2(x*8,0,z*8)*0.02
}

//Valley
isosurface
{
        function
        {
        ValleySurface(x,y,z)
        }
        max_gradient 8
        contained_by{box{<-80,-10,-20>,<80,3,20>}}
        texture
        {
                pigment {colour rgb <171/256, 23/256, 15/256>}
                finish {specular 0.5  diffuse 0.5}
        }

        scale <100, 50, 100>
}

// some water...
plane
{
        y, -51
        hollow on
        pigment { rgbt <0.1, 0.6, 0.5, 0.8> }
        normal
        {
                bozo 1.6
                scale <0.5, 1.0, 0.5>
        }
        finish
        {
                ambient 0.05
                diffuse 0.2
                reflection 0.1
        }
        interior
        {
                ior 1.3
                media { absorption <1.8, 1.0, 0.8>/2 }
        }
}


Post a reply to this message

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