POV-Ray : Newsgroups : povray.binaries.images : Cracked Sphere (~41kbbu) Server Time
1 Oct 2024 09:23:04 EDT (-0400)
  Cracked Sphere (~41kbbu) (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Christoph Hormann
Subject: Re: Cracked Sphere (~41kbbu)
Date: 12 Sep 2000 12:27:37
Message: <39BE59B8.306FFCBC@schunter.etc.tu-bs.de>
Richard Dault wrote:
> 
[...]
> 
> isosurface {
>   function {
>     ball(x,y,z)
>     - crack(x,y,z)
>   }
[...]

That probably does not create what i would call a crack - a surface inside the
sphere where light is reflected and refracted.  

I would suggest two intersections between a sphere and an isosurface (the second
with sign -1) that are put together.

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Richard Dault
Subject: Re: Cracked Sphere (~41kbbu)
Date: 12 Sep 2000 13:57:31
Message: <39be6e8b@news.povray.org>
> That probably does not create what i would call a crack - a surface inside
the
> sphere where light is reflected and refracted.

Yeah, I realize it's kind of 'cheating', but even in this case, the light
should be reflecting and refracting in the 'crack' created by the marble
inside the object since it's transparent.  So it would still give the
illusion of a crack.

> I would suggest two intersections between a sphere and an isosurface (the
second
> with sign -1) that are put together.

Hmm... I'll give that a try.


Post a reply to this message

From: Mike Williams
Subject: Re: Cracked Sphere (~41kbbu)
Date: 13 Sep 2000 01:49:31
Message: <fTH8JAAnTxv5EwWM@econym.demon.co.uk>
Wasn't it Richard Dault who wrote:
>They are isosurfaces.  It's a marble function pattern removed from a sphere.
>That's why I'm surprised the crack doesn't appear on the inside.
>
>Here's a snippet of code:
>
>#declare ball = function { x*x + y*y + z*z - 2*2 }
>#declare crack = function {
>    pigment { marble turbulence .7
>      color_map {[0 rgb 1][.5 rgb 1][.5 rgb 0][.505 rgb 0][.505 rgb 1][1 rgb
>1]}
>      scale 4
>    }
>  }
>
>isosurface {
>  function {
>    ball(x,y,z)
>    - crack(x,y,z)
>  }
>  max_trace 3
>  method 2
>  accuracy 0.001
>  threshold 0
>  max_gradient 20
>  contained_by { sphere { 0 2.3 } }
>  texture { pigment { rgbf <.95,.95,1,.95> } finish { reflection .1
>roughness .001 specular .8 ambient 0 diffuse 0 } }
>  interior { ior 1.5 }
>}

There may be two things going on here:-

1. You're lying about the max_gradient value. In this case the max_gradient is
about 24. If you don't actually know the max_gradient value you should use
"eval" instead, otherwise the result will be incorrect.

2. This may be causing you to hit the contained by sphere. The crack()
function takes a value of 1 almost everywhere, and the ball() function takes
the value "R^2-4", where R is the distance from <0,0,0>. So the resulting
sphere ought to be given by "R^2-4-1 = 0", i.e. having radius sqrt(5), which
is about 2.236, so when you get the max_gradient right that ought to just be
OK.

Using "eval" and increasing a slightly larger contained_by sphere gives a
result with a crack that can be seen to just indent slightly.

3. The maximum depth of the crack ought to be obtained when crack() evaluates
to zero. I.e. when "R^2-4 = 0", i.e. when R=2. So the maximum possible depth
of the crack is 0.236 units. However, because the crack is so narrow, you will
almost never see down to this depth.

You could try increasing the depth of the crack by inverting the colour map,
like

  color_map {[0 rgb 0][.5 rgb 0][.5 rgb 1][.505 rgb 1][.505 rgb 0][1 rgb 0]}

and changing your main function to

  function { ball(x,y,z) + crack(x,y,z)*6 -1 }

*Adding* the inverted crack to the sphere. "crack()*5-1" takes the value "-1"
almost everywhere (thus retaining the overall sphere radius of sqrt(5)), but
now the maximum value of "crack()*5-1" is +4, which allows the crack to reach
down to where "R^4-4+4=0", which is right through the sphere.

Combining all those changes does produce a pair of sheet-like cracks that can
be seen to go right through the sphere. It's a bit slow though, and the
max_gradient shoots up to over 10000 for some reason.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: SomeGuy
Subject: Re: Cracked Sphere (~41kbbu)
Date: 13 Sep 2000 12:46:10
Message: <39BE6F39.62C487CC@earthlink.net>
Looks more like a cracked ball bering...?

Richard Dault wrote:

> This is similar to the other sphere I posted a week ago, but it's a whole
> sphere instead.
>
> The marble pattern only appears on the surface, you don't see the crack
> 'inside' the sphere.  Anyone know why?  I tried to increase the max_trace to
> 3 (global max_trace_level is 25) and it didn't do much, but it's still nice
> nevertheless.  Because of this, it doesn't really look like glass.
>
>  [Image]


Post a reply to this message

From: Libellule
Subject: Re: Cracked Sphere (~41kbbu)
Date: 14 Sep 2000 11:06:56
Message: <39C0E9D3.C9E82E0F@insectes.net>
I decided to try something similar, I was able to get similar results in much
much less time by using

difference{
sphere{}
isosurface{}
...
}
for one half. I tried differencing that from another sphere to get the other
half (and also scaling that sphere by 0.999 to not have coincident surface), but
it seems the isosurface is randomized somewhat at each call (I guess this is
because the isosurface has agate in it?) The broken surface uses the
Cracks(x,y,z)/4 macro from Samuel T Benge's isosurface tutorial, which contains
agate.

If I use noise3d I can matching halves, but it looks blobby rather than crisp
broken edges which one would expect from broken glass. I tried also ridged MF,
ehrm, didn't get very far :^)
Here is what I got (IIRC it took 51 minutes or so)


Post a reply to this message


Attachments:
Download 'crackedsphere.jpg' (20 KB)

Preview of image 'crackedsphere.jpg'
crackedsphere.jpg


 

From: Richard Dault
Subject: Re: Cracked Sphere (~41kbbu)
Date: 14 Sep 2000 12:38:20
Message: <39c0fefc@news.povray.org>
Wow, thanks for a very detailed explanation.

> There may be two things going on here:-
>
> 1. You're lying about the max_gradient value. In this case the
max_gradient is
> about 24. If you don't actually know the max_gradient value you should use
> "eval" instead, otherwise the result will be incorrect.

I did use eval at one point, but it is possible that I changed something
(more patterns) and forgot to re-eval it.

> You could try increasing the depth of the crack by inverting the colour
map,
> like
>
>   color_map {[0 rgb 0][.5 rgb 0][.5 rgb 1][.505 rgb 1][.505 rgb 0][1 rgb
0]}
>
> and changing your main function to
>
>   function { ball(x,y,z) + crack(x,y,z)*6 -1 }
[snip]
> Combining all those changes does produce a pair of sheet-like cracks that
can
> be seen to go right through the sphere. It's a bit slow though, and the
> max_gradient shoots up to over 10000 for some reason.

I tried this and got a similar result.  The max_gradient was something like
12000.

It still didn't give me the result I wanted, but that's okay, I decided to
move on since these renders take WAY too long.


Post a reply to this message

From: Richard Dault
Subject: Re: Cracked Sphere (~41kbbu)
Date: 14 Sep 2000 12:38:21
Message: <39c0fefd@news.povray.org>
I tried doing a difference as well, and it was much faster, but still didn't
look right.

You're image is nice, but kind of hard to see.  It's because of the
reflections/refractions of the floor.

The pattern is quite nice.  If you render it in a clear pigment with slight
blue and white tint, it could look like ice.


Post a reply to this message

From: Chris Huff
Subject: Re: Cracked Sphere (~41kbbu)
Date: 14 Sep 2000 17:36:24
Message: <chrishuff-97AFF5.16381914092000@news.povray.org>
In article <39C0E9D3.C9E82E0F@insectes.net>, Libellule 
<lib### [at] insectesnet> wrote:

> I tried differencing that from another sphere to get the other half 
> (and also scaling that sphere by 0.999 to not have coincident 
> surface), but it seems the isosurface is randomized somewhat at each 
> call (I guess this is because the isosurface has agate in it?) 

It might just be the ordinary inaccuracies in the solving algorithm. You 
might try differencing a thinner, sheet-like isosurface from a single 
sphere instead. Or making a hollow isosurface like a single, infinitely 
thin sheet, and clipping it to fit inside the sphere(kind of a "false 
surface" inside the sphere). This last one couldn't simulate a gaping 
crack, but it might be useful for hairline cracks in glass.

Hmm, did you say you differenced the difference of a sphere and 
isosurface from another sphere? Try just making another difference of 
the sphere with the same isosurface(using "sign -1" to flip the "inside" 
of the isosurface to the other side) instead...and separate the halves 
by a small amount to avoid coincident surface problems, of course.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Libellule
Subject: Re: Cracked Sphere (~41kbbu)
Date: 15 Sep 2000 09:45:00
Message: <39C2282B.2654497E@insectes.net>
> You're image is nice, but kind of hard to see.  It's because of the
> reflections/refractions of the floor.

Yeah, I don't know why they're showing up at the top half of the sphere, it
looks rather strange

> The pattern is quite nice.  If you render it in a clear pigment with slight
> blue and white tint, it could look like ice.

Maybe I'll try that :o)


Post a reply to this message

From: Libellule
Subject: Re: Cracked Sphere (~41kbbu)
Date: 15 Sep 2000 09:48:20
Message: <39C228EF.7D5EB223@insectes.net>
> It might just be the ordinary inaccuracies in the solving algorithm. You

This sounds reasonable, I tried making two identical halves next to each
other, and though they looked very similar, they were visibly not the same.
Maybe I could just decrease the accuracy value (to increase the accuracy ;)

I'll try your sign -1 suggestion as well


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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