POV-Ray : Newsgroups : povray.newusers : Iso surface Server Time
22 Dec 2024 00:07:54 EST (-0500)
  Iso surface (Message 1 to 8 of 8)  
From: avant
Subject: Iso surface
Date: 29 May 2014 07:10:00
Message: <web.5387146f807dc52e9ed2167c0@news.povray.org>
Hello,
I have written the following simple code for isosurface. It looks fine but the
surface is not smooth.

//code starts here
camera{location<0,170,0> look_at<0,0,0>}
background{White}
light_source {<-100,400,-400> color White}
box{<-100,-10,-14>,<100,10,14> texture{pigment{color rgb<0.7,1,1> transmit 0.7}}
no_shadow}

isosurface{
  function{ z - (1+sin(x*2*pi/200))*6}
  threshold -14
  contained_by{box{<-100,-10,-14>,<100,10,14>}}
  texture{pigment{ color Gray transmit 0.5}} no_shadow }
}
object{sphere{<-100,-10,-14>,5 texture{pigment{color Blue}}}}
object{sphere{<100,10,14>,5 texture{pigment{color Red}}}}
//code ends

I have difficulty in  making smooth iso-surface. Thanks in advance
Avant


Post a reply to this message

From: MichaelJF
Subject: Re: Iso surface
Date: 29 May 2014 10:25:01
Message: <web.538742a8375f9333e247f39b0@news.povray.org>
"avant" <avant> wrote:
> Hello,
> I have written the following simple code for isosurface. It looks fine but the
> surface is not smooth.
>

Do you use anti aliasing?

Best regards,
Michael


Post a reply to this message

From: MichaelJF
Subject: Re: Iso surface
Date: 29 May 2014 14:40:01
Message: <web.53877dd2375f9333e247f39b0@news.povray.org>
"MichaelJF" <mi-### [at] t-onlinede> wrote:
> "avant" <avant> wrote:
> > Hello,
> > I have written the following simple code for isosurface. It looks fine but the
> > surface is not smooth.
> >
>
> Do you use anti aliasing?
>
> Best regards,
> Michael

Sorry, I was in a hurry as I posted the first time and I wanted to give you a
quick hint. I rendered your example without anti aliasing (aa) and with the
aa-standard shipped with the Windows version. The first test yielded annoying
"steps" at the curved surface, the second a much more smooth result.  If you are
a Linux user, you should use an ini-file to specify the aa-settings. Something
like this should help:

Antialias=on

Antialias_Threshold=0.3
Antialias_Depth=9
Input_File_Name=isotest.pov

Width=1920
Height=1080


Best regards,
Michael


Post a reply to this message

From: Alain
Subject: Re: Iso surface
Date: 29 May 2014 18:07:44
Message: <5387afb0@news.povray.org>

>
>
> Hello,
> I have written the following simple code for isosurface. It looks fine but the
> surface is not smooth.
>
> //code starts here
> camera{location<0,170,0> look_at<0,0,0>}
> background{White}
> light_source {<-100,400,-400> color White}
> box{<-100,-10,-14>,<100,10,14> texture{pigment{color rgb<0.7,1,1> transmit 0.7}}
> no_shadow}
>
> isosurface{
>    function{ z - (1+sin(x*2*pi/200))*6}
>    threshold -14
>    contained_by{box{<-100,-10,-14>,<100,10,14>}}
>    texture{pigment{ color Gray transmit 0.5}} no_shadow }
> }
> object{sphere{<-100,-10,-14>,5 texture{pigment{color Blue}}}}
> object{sphere{<100,10,14>,5 texture{pigment{color Red}}}}
> //code ends
>
> I have difficulty in  making smooth iso-surface. Thanks in advance
> Avant
>
>
>

Try antialiasing if the roughness is along the edges.

You should also check the message after the render. You may have a 
warning about max_gradient. If the message state a found gradient larger 
than the default with a mention of possible holes, add:
max_gradient <value reported in the message>
Doing the same if the reported value is smaller than the used one will 
make your render faster.
The exact location is not crutial, but placing it just after the 
threshold statement is a good location.

In this case, the default value for max_gradient look to be OK.


Post a reply to this message

From: avant
Subject: Re: Iso surface
Date: 30 May 2014 08:00:01
Message: <web.53887280375f93339ed2167c0@news.povray.org>
"MichaelJF" <mi-### [at] t-onlinede> wrote:
> "MichaelJF" <mi-### [at] t-onlinede> wrote:
> > "avant" <avant> wrote:
> > > Hello,
> > > I have written the following simple code for isosurface. It looks fine but the
> > > surface is not smooth.
> > >
> >
> > Do you use anti aliasing?
> >
> > Best regards,
> > Michael
>
> Sorry, I was in a hurry as I posted the first time and I wanted to give you a
> quick hint. I rendered your example without anti aliasing (aa) and with the
> aa-standard shipped with the Windows version. The first test yielded annoying
> "steps" at the curved surface, the second a much more smooth result.  If you are
> a Linux user, you should use an ini-file to specify the aa-settings. Something
> like this should help:
>
> Antialias=on
>
> Antialias_Threshold=0.3
> Antialias_Depth=9
> Input_File_Name=isotest.pov
>
> Width=1920
> Height=1080
>
>
> Best regards,
> Michael

Hello Michael,
Thanks for the help. I will try using antialiasing. Were you able to get smooth
surface with your code?

Regards
Avan


Post a reply to this message

From: avant
Subject: Re: Iso surface
Date: 30 May 2014 08:05:01
Message: <web.538872f9375f93339ed2167c0@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> >
> >
> > Hello,
> > I have written the following simple code for isosurface. It looks fine but the
> > surface is not smooth.
> >
> > //code starts here
> > camera{location<0,170,0> look_at<0,0,0>}
> > background{White}
> > light_source {<-100,400,-400> color White}
> > box{<-100,-10,-14>,<100,10,14> texture{pigment{color rgb<0.7,1,1> transmit 0.7}}
> > no_shadow}
> >
> > isosurface{
> >    function{ z - (1+sin(x*2*pi/200))*6}
> >    threshold -14
> >    contained_by{box{<-100,-10,-14>,<100,10,14>}}
> >    texture{pigment{ color Gray transmit 0.5}} no_shadow }
> > }
> > object{sphere{<-100,-10,-14>,5 texture{pigment{color Blue}}}}
> > object{sphere{<100,10,14>,5 texture{pigment{color Red}}}}
> > //code ends
> >
> > I have difficulty in  making smooth iso-surface. Thanks in advance
> > Avant
> >
> >
> >
>
> Try antialiasing if the roughness is along the edges.
>
> You should also check the message after the render. You may have a
> warning about max_gradient. If the message state a found gradient larger
> than the default with a mention of possible holes, add:
> max_gradient <value reported in the message>
> Doing the same if the reported value is smaller than the used one will
> make your render faster.
> The exact location is not crutial, but placing it just after the
> threshold statement is a good location.
>
> In this case, the default value for max_gradient look to be OK.


Hello Alain,
As you pointed max_gradient is set to the the one calculated after rendering,
still there is no change. Will try using antialiasing.

Regards
Avant


Post a reply to this message

From: MichaelJF
Subject: Re: Iso surface
Date: 30 May 2014 15:45:01
Message: <web.5388df79375f9333b49c6e3c0@news.povray.org>
"avant" <avant> wrote:
> "MichaelJF" <mi-### [at] t-onlinede> wrote:
> > "MichaelJF" <mi-### [at] t-onlinede> wrote:
> > > "avant" <avant> wrote:
> > > > Hello,
> > > > I have written the following simple code for isosurface. It looks fine but the
> > > > surface is not smooth.
> > > >
> > >
> > > Do you use anti aliasing?
> > >
> > > Best regards,
> > > Michael
> >
> > Sorry, I was in a hurry as I posted the first time and I wanted to give you a
> > quick hint. I rendered your example without anti aliasing (aa) and with the
> > aa-standard shipped with the Windows version. The first test yielded annoying
> > "steps" at the curved surface, the second a much more smooth result.  If you are
> > a Linux user, you should use an ini-file to specify the aa-settings. Something
> > like this should help:
> >
> > Antialias=on
> >
> > Antialias_Threshold=0.3
> > Antialias_Depth=9
> > Input_File_Name=isotest.pov
> >
> > Width=1920
> > Height=1080
> >
> >
> > Best regards,
> > Michael
>
> Hello Michael,
> Thanks for the help. I will try using antialiasing. Were you able to get smooth
> surface with your code?
>
> Regards
> Avan

Yes indeed, I stated this above (the second test). The aa-feature ist explained
within the pov docs exhaustively
(http://wiki.povray.org/content/Reference:Tracing_Options#Anti-Aliasing_Options).

Best regards,
Michael


Post a reply to this message

From: Alain
Subject: Re: Iso surface
Date: 31 May 2014 14:47:58
Message: <538a23de@news.povray.org>

>
> "MichaelJF" <mi-### [at] t-onlinede> wrote:
>> "MichaelJF" <mi-### [at] t-onlinede> wrote:
>>> "avant" <avant> wrote:
>>>> Hello,
>>>> I have written the following simple code for isosurface. It looks fine but the
>>>> surface is not smooth.
>>>>
>>>
>>> Do you use anti aliasing?
>>>
>>> Best regards,
>>> Michael
>>
>> Sorry, I was in a hurry as I posted the first time and I wanted to give you a
>> quick hint. I rendered your example without anti aliasing (aa) and with the
>> aa-standard shipped with the Windows version. The first test yielded annoying
>> "steps" at the curved surface, the second a much more smooth result.  If you are
>> a Linux user, you should use an ini-file to specify the aa-settings. Something
>> like this should help:
>>
>> Antialias=on
>>
>> Antialias_Threshold=0.3
>> Antialias_Depth=9
>> Input_File_Name=isotest.pov
>>
>> Width=1920
>> Height=1080
>>
>>
>> Best regards,
>> Michael
>
> Hello Michael,
> Thanks for the help. I will try using antialiasing. Were you able to get smooth
> surface with your code?
>
> Regards
> Avan
>
>
>
That should give prety smooth results in most cases. Using 
Antialias_Depth=9 is very probably overkill, a value of 3 or 4 is usualy 
enough. There is a default value that will be used if you don't set 
Antialias_Depth.

To get smoother results, reducing Antialias_Threshold is normaly all 
that you need. Keep it larger than 0.0 or your render time will 
skyrocket as each pixel will get uselessly antialiased...


Alain


Post a reply to this message

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