POV-Ray : Newsgroups : povray.general : Isosurface help Server Time
2 Nov 2024 16:54:36 EDT (-0400)
  Isosurface help (Message 1 to 3 of 3)  
From: Anthony D  Baye
Subject: Isosurface help
Date: 22 Jun 2009 11:15:00
Message: <web.4a3f9ed3c397323eccc08f5a0@news.povray.org>
I'd like to convert the following isosurface into a height_field with a
function, but I'm having trouble getting the effect to work.  As it is, it
renders INCREDIBLY slowly.

#declare P1 =
function {
pigment {
crackle
color_map { [0.0 rgb 0 ] [0.08 rgb 1 ] }
turbulence 0.2
}
}

#declare P2 =
function {
pigment {
crackle
color_map { [0 rgb 0] [0.025 rgb 1] }
}
}

#declare P3 =
function {
pigment {
wrinkles
color_map {
[0 rgb 0]
[0.025 rgb 0.8]
[0.05 rgb 0.07]
[0.25 rgb 0.02]
[0.275 rgb 1.0]
[0.32 rgb 0.0]
}
turbulence 0.8
}
}

#declare Scale1 = 1.5*ft ;
#declare Scale2 = 0.3*ft ;
#declare Scale3 = 3.0*ft ;
#declare Height1 = 0.6*ft ;
#declare Height2 = 0.3*ft ;
#declare Height3 = 0.5*ft ;

isosurface {
function { y - P1(x/Scale3,0,z/Scale3).x*Height3 -
P3(x/Scale3,0,z/Scale3).y*Height3 - P2(x/Scale2,0,z/Scale2).x*Height2 }
//max_gradient 10
evaluate 1.2 4, 0.7
accuracy 0.01
threshold -(Height1+Height2)
contained_by { box { <-1e9, -3.0, -1e9>  <1e9, Height3, 1e9> } }
all_intersections
}

And no, a patterned texture won't do.

A.D.B.


Post a reply to this message

From: Reactor
Subject: Re: Isosurface help
Date: 23 Jun 2009 15:30:01
Message: <web.4a412cc6fb628f71519388640@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> I'd like to convert the following isosurface into a height_field with a
> function, but I'm having trouble getting the effect to work.  As it is, it
> renders INCREDIBLY slowly.


Isosurfaces do that, but sometimes the speed can be improved.  The part that
caught my attention was this:

> evaluate 1.2 4, 0.7
> accuracy 0.01
> threshold -(Height1+Height2)
> contained_by { box { <-1e9, -3.0, -1e9>  <1e9, Height3, 1e9> } }
> all_intersections
> }

You didn't post the camera portion, so I can't tell whether or not this is
exactly what you want, but do you really need all intersections?  Are you using
evaluate for every render?  Once you've found a good max gradient that works,
specify it.  Is that much of the object actually in view?  If not, why does the
containing shape need to be so large?

It is hard to know what you wanted without knowing more about:
the camera - this may change the shape and size of the container shape, which
can greatly influence rendering times.
the isosurface texture - if it is partially transparent, the use of all
intersections would be important, so that you could see interior faces that
would not be visible otherwise.


> And no, a patterned texture won't do.
>
> A.D.B.

I'll take your word for it, I guess?


-Reactor


Post a reply to this message

From: Thomas de Groot
Subject: Re: Isosurface help
Date: 4 Aug 2009 10:27:14
Message: <4a784542@news.povray.org>
Maybe the attached code can be of help?

Thomas


Post a reply to this message


Attachments:
Download 'Iso-HF_test2.pov.txt' (5 KB)

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