POV-Ray : Newsgroups : povray.binaries.images : A method creat uniform thick shell Server Time
31 Oct 2024 19:13:23 EDT (-0400)
  A method creat uniform thick shell (Message 26 to 35 of 45)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: And
Subject: Re: A method creat uniform thick shell
Date: 25 Jul 2018 05:30:01
Message: <web.5b584307dce0719a5341e80e0@news.povray.org>
Paolo Gibellini <p.g### [at] gmailcom> wrote:
> And wrote on 24/07/2018 14:36:
> > "And" <49341109@ntnu.edu.tw> wrote:
> >> I have written a macro which uses above technique to make an isosurface thin
> >> shell. I post it below. But I found that it is only for a small thickness or it
> >> don't have a constant thickness result. Furthermore, for many functions its
> >> result is not expect.
> >>
> >> So, don't take too much expect with it.
> >>
>
> Nice effect.
> Now, I'm curious to see the jar filled of water.
> ;-)
> Paolo

The rendering is very slow. I 'd rather sculpt one using mesh than using this
method.


Post a reply to this message

From: Thomas de Groot
Subject: Re: A method creat uniform thick shell
Date: 25 Jul 2018 07:02:23
Message: <5b5858bf$1@news.povray.org>
On 24-7-2018 14:36, And wrote:
> "And" <49341109@ntnu.edu.tw> wrote:
>> I have written a macro which uses above technique to make an isosurface thin
>> shell. I post it below. But I found that it is only for a small thickness or it
>> don't have a constant thickness result. Furthermore, for many functions its
>> result is not expect.
>>
>> So, don't take too much expect with it.
>>

I like it very much. As always, I shall note down the macro for future 
reference/use.

-- 
Thomas


Post a reply to this message

From: And
Subject: Re: A method creat uniform thick shell
Date: 25 Jul 2018 08:20:00
Message: <web.5b586a43dce0719a5341e80e0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 24-7-2018 14:36, And wrote:
> > "And" <49341109@ntnu.edu.tw> wrote:
> >> I have written a macro which uses above technique to make an isosurface thin
> >> shell. I post it below. But I found that it is only for a small thickness or it
> >> don't have a constant thickness result. Furthermore, for many functions its
> >> result is not expect.
> >>
> >> So, don't take too much expect with it.
> >>
>
> I like it very much. As always, I shall note down the macro for future
> reference/use.
>
> --
> Thomas

Oh, it's nice


Post a reply to this message

From: Mike Horvath
Subject: Re: A method creat uniform thick shell
Date: 28 Jul 2018 09:48:22
Message: <5b5c7426$1@news.povray.org>
I am trying to do the same, but am having trouble toning down the 
reflections. I can barely see through the glass, and the finish is 
reflecting too much and too brightly.

Mike


Post a reply to this message


Attachments:
Download 'offset_surface_save_01.png' (229 KB) Download 'utf-8' (4 KB)

Preview of image 'offset_surface_save_01.png'
offset_surface_save_01.png

From: Jim Holsenback
Subject: Re: A method creat uniform thick shell
Date: 28 Jul 2018 09:53:08
Message: <5b5c7544@news.povray.org>
On 07/28/2018 09:48 AM, Mike Horvath wrote:
> I am trying to do the same, but am having trouble toning down the 
> reflections. I can barely see through the glass, and the finish is 
> reflecting too much and too brightly.
> 
> Mike
just a guess .. diffuse and / or reflection too high


Post a reply to this message

From: Mike Horvath
Subject: Re: A method creat uniform thick shell
Date: 28 Jul 2018 10:23:27
Message: <5b5c7c5f$1@news.povray.org>
On 7/28/2018 9:53 AM, Jim Holsenback wrote:
> On 07/28/2018 09:48 AM, Mike Horvath wrote:
>> I am trying to do the same, but am having trouble toning down the 
>> reflections. I can barely see through the glass, and the finish is 
>> reflecting too much and too brightly.
>>
>> Mike
> just a guess .. diffuse and / or reflection too high

Diffuse is 0. I can't judge properly how high reflection is.


#declare F_Glass5 =
   finish {
     specular 0.7
     roughness 0.001
     ambient 0
     diffuse 0
     reflection {
       0.2, 1.0
       fresnel on
     }
     conserve_energy
   }


Post a reply to this message

From: Alain
Subject: Re: A method creat uniform thick shell
Date: 28 Jul 2018 11:42:26
Message: <5b5c8ee2$1@news.povray.org>
Le 18-07-28 à 10:23, Mike Horvath a écrit :
> On 7/28/2018 9:53 AM, Jim Holsenback wrote:
>> On 07/28/2018 09:48 AM, Mike Horvath wrote:
>>> I am trying to do the same, but am having trouble toning down the 
>>> reflections. I can barely see through the glass, and the finish is 
>>> reflecting too much and too brightly.
>>>
>>> Mike
>> just a guess .. diffuse and / or reflection too high
> 
> Diffuse is 0. I can't judge properly how high reflection is.
> 
> 
> #declare F_Glass5 =
>    finish {
>      specular 0.7
>      roughness 0.001
>      ambient 0
>      diffuse 0
>      reflection {
>        0.2, 1.0
>        fresnel on
>      }
>      conserve_energy
>    }

If you reduce the ior, then, the reflection will also go down.

The minimum reflection is to high at 0.2.
Try :
reflection{0, 1 fresnel}
or simply
reflection{1 fresnel}

Try this interior :
interior{
  ior 1.5
  dispersion 1.05
  fade_colour Col_Ruby fade_distance 0.1 fade_power 1001
}

Col_Ruby is the same as Col_Glass_ruby but without the filter component.

With this pigment :
pigment{rgbt 1}


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: A method creat uniform thick shell
Date: 28 Jul 2018 15:20:00
Message: <web.5b5cc18bdce0719a9cbeb2fe0@news.povray.org>
"And" <49341109@ntnu.edu.tw> wrote:
>...
> #local h=0.00001;
> #local normalized_function =
> function(var1,var2,var3)
> {
> input_function(var1,var2,var3)
> /sqrt(
> pow((input_function(var1+h,var2,var3)-input_function(var1,var2,var3))/h,2)
> +pow((input_function(var1,var2+h,var3)-input_function(var1,var2,var3))/h,2)
> +pow((input_function(var1,var2,var3+h)-input_function(var1,var2,var3))/h,2)
> )
> }
>...

And, there is a macro in math.inc that can create the gradient function for your
denominator: fn_Gradient()

Here's how you can use it:

#include "math.inc"

SetGradientAccuracy(h)
#local GradientFn = fn_Gradient(input_function)
#local normalized_function =
  function { input_function(x, y, z)/GradientFn(x, y, z) }


I suspect that this will be a little faster, since fn_Gradient() uses f_r()
instead of sqrt() and pow() and since the division by h (or 2*h in fn_Gradient)
is moved outside.

Here's the relevant documentation pages:
http://www.povray.org/documentation/view/3.6.1/460/
http://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_9_1_12_3

--
Tor Olav
http://subcube.com


Post a reply to this message

From: Mike Horvath
Subject: Re: A method creat uniform thick shell
Date: 29 Jul 2018 09:36:03
Message: <5b5dc2c3$1@news.povray.org>
On 7/28/2018 11:43 AM, Alain wrote:
> If you reduce the ior, then, the reflection will also go down.
> 
> The minimum reflection is to high at 0.2.
> Try :
> reflection{0, 1 fresnel}
> or simply
> reflection{1 fresnel}
> 
> Try this interior :
> interior{
>   ior 1.5
>   dispersion 1.05
>   fade_colour Col_Ruby fade_distance 0.1 fade_power 1001
> }
> 
> Col_Ruby is the same as Col_Glass_ruby but without the filter component.
> 
> With this pigment :
> pigment{rgbt 1}
> 
> 

The dispersion really causes the render times to increase. I don't know 
if I have the patience.

Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: A method creat uniform thick shell
Date: 29 Jul 2018 09:59:00
Message: <5b5dc824$1@news.povray.org>
On 7/28/2018 3:18 PM, Tor Olav Kristensen wrote:
> "And" <49341109@ntnu.edu.tw> wrote:
>> ...
>> #local h=0.00001;
>> #local normalized_function =
>> function(var1,var2,var3)
>> {
>> input_function(var1,var2,var3)
>> /sqrt(
>> pow((input_function(var1+h,var2,var3)-input_function(var1,var2,var3))/h,2)
>> +pow((input_function(var1,var2+h,var3)-input_function(var1,var2,var3))/h,2)
>> +pow((input_function(var1,var2,var3+h)-input_function(var1,var2,var3))/h,2)
>> )
>> }
>> ...
> 
> And, there is a macro in math.inc that can create the gradient function for your
> denominator: fn_Gradient()
> 
> Here's how you can use it:
> 
> #include "math.inc"
> 
> SetGradientAccuracy(h)
> #local GradientFn = fn_Gradient(input_function)
> #local normalized_function =
>    function { input_function(x, y, z)/GradientFn(x, y, z) }
> 
> 
> I suspect that this will be a little faster, since fn_Gradient() uses f_r()
> instead of sqrt() and pow() and since the division by h (or 2*h in fn_Gradient)
> is moved outside.
> 
> Here's the relevant documentation pages:
> http://www.povray.org/documentation/view/3.6.1/460/
> http://www.povray.org/documentation/3.7.0/r3_4.html#r3_4_9_1_12_3
> 
> --
> Tor Olav
> http://subcube.com
> 
> 
> 

I don't understand the syntax.

#local GradientFn = fn_Gradient(input_function)

I did not know one could pass one function to another in this manner. I 
thought it was necessary to pass x, y, z instead. I.e.

#local GradientFn = fn_Gradient(x,y,z)


Mike


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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