POV-Ray : Newsgroups : povray.binaries.images : Cracked Sphere (~41kbbu) Server Time
4 Nov 2024 17:29:37 EST (-0500)
  Cracked Sphere (~41kbbu) (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Richard Dault
Subject: Cracked Sphere (~41kbbu)
Date: 12 Sep 2000 11:26:08
Message: <39be4b10@news.povray.org>
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.


Post a reply to this message


Attachments:
Download 'brokensphere.jpg' (41 KB)

Preview of image 'brokensphere.jpg'
brokensphere.jpg


 

From: Josh English
Subject: Re: Cracked Sphere (~41kbbu)
Date: 12 Sep 2000 11:33:04
Message: <39BE4CC1.7171BE8A@spiritone.com>
If you are using a normal pattern it won't show up inside the sphere, just the
surface. To simulate a crack you might be able to find an isosurface than can be
sutracted from the glass. Failing that, you need to cut the globe into two
pieces like to did before, but leave them right next to eachother so the broked
surface runs through the entire globe.

It does look good. It reminds me of some marble images someone posted a long
time ago

Josh

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]

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

From: Richard Dault
Subject: Re: Cracked Sphere (~41kbbu)
Date: 12 Sep 2000 12:14:11
Message: <39be5653@news.povray.org>
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 }
}


Post a reply to this message

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

Goto Latest 10 Messages Next 3 Messages >>>

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