POV-Ray : Newsgroups : povray.general : Isosurface troble Server Time
6 Nov 2024 16:33:24 EST (-0500)
  Isosurface troble (Message 1 to 10 of 32)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Peter Popov
Subject: Isosurface troble
Date: 5 Aug 2002 11:27:19
Message: <0u5tkuoupvgafcrgfurg3g7a5btgo3sh9q@4ax.com>
I need some help with generating terrain with isosurfaces. Render
times are intolerably slow! I am getting a max_gradient of over 25000,
which is too high IMHO. The function in question is:

#declare F_Relief = function {
  pigment {
    image_map { tga "relief.tga" interpolate 2 }
    rotate 90*x
  }
}

#declare F_Terrain = function { y - F_Relief(x,y,z).gray }

Any idea why the max gradient would be that high? I ended up making a
mesh out of the tga in Rhino instead, but I want to learn to do this
right.

Any help will be greatly appreciated.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Isosurface troble
Date: 5 Aug 2002 11:34:13
Message: <Xns9261B21EFFCEDraf256com@204.213.191.226>
Peter Popov <pet### [at] vipbg> wrote in 
news:0u5tkuoupvgafcrgfurg3g7a5btgo3sh9q@4ax.com

> I need some help with generating terrain with isosurfaces. Render
> times are intolerably slow! I am getting a max_gradient of over 25000,
> which is too high IMHO. The function in question is:

1. maybe try bluring HF map ?
2. mabye there is problem with reding this map, i.e. if it was a 16-bit 
gray, *maybe* it can lead to strange results.

btw, it's a greate example for my iso-optimization future ;)


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Peter Popov
Subject: Re: Isosurface troble
Date: 5 Aug 2002 11:51:38
Message: <fk7tkus0s3vikru6khhkja2j97diatip1a@4ax.com>
On 5 Aug 2002 11:34:13 -0400, "Rafal 'Raf256' Maj" <raf### [at] raf256com>
wrote:

>1. maybe try bluring HF map ?

I want the detail - I didn't spent two hours generating a
high-resolution terrain in World Machine just to kill it with a 20
pixel gaussian blur :)

>2. mabye there is problem with reding this map, i.e. if it was a 16-bit 
>gray, *maybe* it can lead to strange results.

I don't think so - it reads just fine as a height field or image map.

>btw, it's a greate example for my iso-optimization future ;)

Looking forward to it (with a grain of salt, if you don't mind)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Isosurface troble
Date: 5 Aug 2002 11:57:23
Message: <Xns9261B60CE7FAAraf256com@204.213.191.226>
Peter Popov <pet### [at] vipbg> wrote in 
news:fk7tkus0s3vikru6khhkja2j97diatip1a@4ax.com

> I don't think so - it reads just fine as a height field or image map.
>>btw, it's a greate example for my iso-optimization future ;)
> Looking forward to it (with a grain of salt, if you don't mind)

well - now I'm just going to simulate this patch, because I don't like 
modyfing not my C code, especialy as huge as Pov's :)

patch coded into POV probalby willbe ready in 1..6 months (imho)

You may try to simulate it now - divide iso into several small iso's in 
union. Then, if You are lucky - some small iso's will have low 
max_gradient, and only few fragmeents will need high max_gradient.

But, if You have meany spikes all over the map - it will not help :/

send to me scene + .png (mailto:pov### [at] raf256com) maybe I can help

other idea is ofcourse to use standart HF. 
Or maybe - bound ISO with HF (maybe scalled a litle)


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Christoph Hormann
Subject: Re: Isosurface troble
Date: 5 Aug 2002 12:09:06
Message: <3D4EA321.B3401113@gmx.de>
Peter Popov wrote:
> 
> #declare F_Relief = function {
>   pigment {
>     image_map { tga "relief.tga" interpolate 2 }
>     rotate 90*x
>   }
> }
> 
> #declare F_Terrain = function { y - F_Relief(x,y,z).gray }
> 
> Any idea why the max gradient would be that high? I ended up making a
> mesh out of the tga in Rhino instead, but I want to learn to do this
> right.

Try 'interpolate 4'.  IIRC interpolate 2 does not lead to a continuous
function, therefore the high gradient.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 03 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Peter Popov
Subject: Re: Isosurface troble
Date: 5 Aug 2002 16:33:26
Message: <j5otkusk7i8inma9k1ve884iqup9c7rber@4ax.com>
On Mon, 05 Aug 2002 18:09:05 +0200, Christoph Hormann
<chr### [at] gmxde> wrote:

>Try 'interpolate 4'.  IIRC interpolate 2 does not lead to a continuous
>function, therefore the high gradient.

*slam*

/me stupid :( I completely forgot about that.

Thanks, I'll try that (for the sake of the experiment).

Now, any idea about some sane RMF parameters? I'm aiming towards a
water look.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Christoph Hormann
Subject: Re: Isosurface troble
Date: 5 Aug 2002 16:58:41
Message: <3D4EE701.AF500714@gmx.de>
Peter Popov wrote:
> 
> [...]
> 
> Now, any idea about some sane RMF parameters? I'm aiming towards a
> water look.
> 

Searching the newsgroups for 'f_ridged_mf or ridgedMF' finds:

Subject: Re: iso - ridged mf question
Date: Mon, 12 Mar 2001 19:35:40 +0200
Newsgroups: povray.unofficial.patches
From: Vahur Krouverk <vah### [at] aetecee>
news://news.povray.org/3AAD08EC.ED0A6178@aetec.ee
http://news.povray.org/3AAD08EC.ED0A6178@aetec.ee

Subject: How high? - Iso question
Date: Thu, 12 Apr 2001 15:12:37 +0100
Newsgroups: povray.unofficial.patches
From: "Tom Melly" <tom### [at] tomandlucouk>
news://news.povray.org/3ad5b7d6@news.povray.org
http://news.povray.org/3ad5b7d6@news.povray.org

Subject: water tunnel water source
Date: Mon, 30 Apr 2001 08:43:27 +0200
Newsgroups: povray.text.scene-files
From: Christoph Hormann <chr### [at] gmxde>
news://news.povray.org/3AED098F.811CBF30@gmx.de
http://news.povray.org/3AED098F.811CBF30@gmx.de

Subject: RidgedMF clouds
Date: Tue, 20 Jun 2000 22:26:11 -0700
Newsgroups: povray.text.scene-files
From: SamuelT <STB### [at] aolcom>
news://news.povray.org/395051F3.13CA5AB5@aol.com
http://news.povray.org/395051F3.13CA5AB5@aol.com

Subject: Re: ridgedMF-Mountain - params?
Date: Thu, 3 Aug 2000 14:34:55 +0200
Newsgroups: povray.newusers
From: "Marc-Hendrik Bremer" <Mar### [at] t-onlinede>
news://news.povray.org/39896757@news.povray.org
http://news.povray.org/39896757@news.povray.org

Subject: Isowater
Date: Sun, 5 Nov 2000 14:37:40 -0000
Newsgroups: povray.text.scene-files
From: "Kevin Ellis" <kev### [at] libertysurfcouk>
news://news.povray.org/3a0570b4@news.povray.org
http://news.povray.org/3a0570b4@news.povray.org

Subject: ridged multifractal w. slope-dependent texture
Date: Thu, 18 Jan 2001 04:18:47 -0600
Newsgroups: povray.text.scene-files
From: "Bob H."
<per### [at] aolcom?subject=PoV-News:%20&body=Relating%20to%20POV-Ray:>
news://news.povray.org/3a66c2b7@news.povray.org
http://news.povray.org/3a66c2b7@news.povray.org


And maybe try:

http://www-public.tu-bs.de:8080/~y0013390/pov/rmf.html


Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 03 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Slime
Subject: Re: Isosurface troble
Date: 5 Aug 2002 17:01:13
Message: <3d4ee799@news.povray.org>
> Try 'interpolate 4'.  IIRC interpolate 2 does not lead to a continuous
> function, therefore the high gradient.


interpolate 2 does lead to a continuous function. It doesn't have a
continuous derivative, but it is continuous, so there should be no infinite
max gadient.

Perhaps the high gradient is appearing at the very edge of the image? Check
that your isosurface's contained_by box doesn't exceed the edges of the
image.

Seeing the code may help, also... and perhaps the image too if that doesn't.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Christoph Hormann
Subject: Re: Isosurface troble
Date: 5 Aug 2002 17:06:55
Message: <3D4EE8EE.F73599A3@gmx.de>
Slime wrote:
> 
> > Try 'interpolate 4'.  IIRC interpolate 2 does not lead to a continuous
> > function, therefore the high gradient.
> 
> interpolate 2 does lead to a continuous function. It doesn't have a
> continuous derivative, but it is continuous, so there should be no infinite
> max gadient.

Do you write this because you have used 'interpolate 2' a lot with
isosurfaces and had no problems or because you *think* it has to be
continuous.  At least the last time i tested (some beta version of 3.5)
'interpolate 2' did not lead to usable results.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 03 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Warp
Subject: Re: Isosurface troble
Date: 6 Aug 2002 17:02:17
Message: <3d503959@news.povray.org>
Of course this raises the question why do you want to use an isosurface
to create a heightfield at all?
  The only thing I can think of is that you want to use non-linear
transformations on the heightfield. Creating a mesh instead of an isosurface
will lead to enormously faster render times, and you can move the vertex
points at will, which simulates non-linear transformations.
  I think there are macros in the official distribution for this (I don't
remember if they allow transformations, but if they don't, you can make
your own version of the macro with vertex transformations).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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