POV-Ray : Newsgroups : povray.advanced-users : I don't like limits :-( : Re: I don't like limits :-( Server Time
29 Jul 2024 10:31:19 EDT (-0400)
  Re: I don't like limits :-(  
From: David Wallace
Date: 5 Jun 2002 11:53:45
Message: <3cfe3409@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3CFBC9CD.9539E2E1@gmx.de...
>
>

> >
> > I tried to write IC_Mesh for iso_csg library but failed at "More than
65535
> > constants in all functions are not supported" error. But IC_Triangle
works
> > pretty fine.
>
> Maybe wait for RC6... ;-)
>
> IC_Mesh sound pretty complicated, at least it will be awfully slow i
> suppose...
>
Even the simple code is slow:

--- start code ---

#declare pigSea = pigment {
 bozo
 turbulence 1.5
 sine_wave
 color_map {
  [ 0 rgbf <0, 1, 0, 1> ]
  [ 1 rgbf <0, 0, 1, 1> ]
 }
 scale 50
}

#declare matSea = material {
 texture {
  pigment { pigSea }
  normal { bozo scale 50 }
  finish {
   reflection { 0.1, 0.7
    metallic 0.4
   }
   conserve_energy
   phong 0.645
   phong_size 130
   metallic 0.4
  }
 }
 interior {
  ior 1.3
  caustics 0.5
  media {
   absorption <1.0, 0.7, 0.2>*.01
   method 3
   samples 3,25
   intervals 1
  }
 }
}

// Sky
#declare Sky1 = pigment { image_map { png "skyday9.png" interpolate 2 }
scale .5 }

#declare Sky = sky_sphere { pigment { Sky1
 warp { spherical orientation z dist_exp 1 }
  rotate x* 180
} }

sky_sphere { Sky }

// Ocean

#declare fnpSea0 = function { pigment {
 waves
 turbulence 0.4
 color_map { [ 0 rgb 0 ] [ 1 rgb 1 ] }
} }

#declare fnpSea1 = function { pigment {
 ripples
 turbulence 0.9
 color_map { [ 0 rgb 0 ] [ 1 rgb 1 ] }
} }

#declare fnpSea2 = function { pigment {
 bozo
 turbulence 0.7
 color_map { [ 0 rgb 0 ] [ 1 rgb 1 ] }
} }

#declare fnSea = function {
fnpSea0(x*.1,0,z*.1).gray*4+fnpSea0(x*3,0,z*3).gray*2-fnpSea2(x,0,z).gray }

#declare Sea = union {
 isosurface {
  function { y - fnSea(x*.01,y,z*.01) }
  contained_by { box { <-3000, -1, -3000>, <3000, 8, 3000> } }
  accuracy 0.01
  max_gradient 10
 }
 box { <-3000, -750, -3000>, <3000, -1, 3000> }
}

object { Sea pigment { pigSea } }

--- end code ---

And it gets worse if you replace pigSea with matSea.

Isosurface optimizations, anyone?


Post a reply to this message

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