POV-Ray : Newsgroups : povray.general : Granite with limits? Server Time
26 Nov 2024 22:51:36 EST (-0500)
  Granite with limits? (Message 1 to 10 of 10)  
From: SharkD
Subject: Granite with limits?
Date: 10 Sep 2009 04:31:05
Message: <4aa8b949$1@news.povray.org>
Is there a way to create a granite-like pigment that is limited to 
certain limits? I would like no new "cells" to be created if they will 
extend beyond the limits. Sorry if I didn't explain this well enough...

-Mike


Post a reply to this message

From: Chris B
Subject: Re: Granite with limits?
Date: 10 Sep 2009 06:06:49
Message: <4aa8cfb9@news.povray.org>
"SharkD" <mik### [at] gmailcom> wrote in message 
news:4aa8b949$1@news.povray.org...
> Is there a way to create a granite-like pigment that is limited to certain 
> limits? I would like no new "cells" to be created if they will extend 
> beyond the limits. Sorry if I didn't explain this well enough...
>

I think you should be able to achieve this using either layered textures or 
texture_map transitions. The optimum approach depends on exactly the result 
you're trying to achieve.

If you want a plain texture with a granite-like pigment appearing within a 
certain zone you can use a multi-layered texture where the top layer 
contains a transparent 'hole' of the desired shape that lets the required 
parts of the granite layer beneath show through. You can readily create 
well-defined edges of any shape you want using the object pigment.

If you want fuzzy/blurred edges you would probably need to use pigments that 
support color_map transitions, such as gradient or onion, but you can use 
multiple layers to create some reasonably sophisticated 'holes'. For example 
you could use 4 copies of a gradient texture rotated through 90 degrees each 
time to create a blurry-edged square hole.

If you want a granite-like texture within the required limits and everything 
to be totally transparent beyond those limits, you can use a pigment_map or 
a texture_map to transition between the granite texture and a totally 
transparent texture.

OTOH The bit of the question about new "cells" not being created implies you 
might wish to avoid chopping through discrete splodges of texture in the 
granite pattern. For example, cutting around the bright areas and avoiding 
cutting through any dark patches. I can't think of an easy way of doing that 
using only POV-Ray, although it's conceivable you could use the eval_pigment 
function to chart a route through the bright bits without venturing into the 
dark bits. You could then build a prism object to follow that route and use 
it as an object pigment to create a top layer with a transparent hole of the 
required shape. Lots of work though!

Regards,
Chris B.


Post a reply to this message

From: SharkD
Subject: Re: Granite with limits?
Date: 10 Sep 2009 12:35:40
Message: <4aa92adc@news.povray.org>
Chris B wrote:
> OTOH The bit of the question about new "cells" not being created implies 
> you might wish to avoid chopping through discrete splodges of texture in 
> the granite pattern. For example, cutting around the bright areas and 
> avoiding cutting through any dark patches. I can't think of an easy way 
> of doing that using only POV-Ray, although it's conceivable you could 
> use the eval_pigment function to chart a route through the bright bits 
> without venturing into the dark bits. You could then build a prism 
> object to follow that route and use it as an object pigment to create a 
> top layer with a transparent hole of the required shape. Lots of work 
> though!
> 
> Regards,
> Chris B.

I was thinking of maybe applying black hole warps and turbulence to a 
more simple and plain pattern. I know I can control the placement of the 
black holes, and the turbulence should help it look more grainy.

-Mike


Post a reply to this message

From: Chris B
Subject: Re: Granite with limits?
Date: 10 Sep 2009 15:05:30
Message: <4aa94dfa$1@news.povray.org>
"SharkD" <mik### [at] gmailcom> wrote in message 
news:4aa92adc@news.povray.org...
> Chris B wrote:
>> OTOH The bit of the question about new "cells" not being created implies 
>> you might wish to avoid chopping through discrete splodges of texture in 
>> the granite pattern.
>
> I was thinking of maybe applying black hole warps and turbulence to a more 
> simple and plain pattern. I know I can control the placement of the black 
> holes, and the turbulence should help it look more grainy.
>

Interesting idea. I've played around a little with black hole warps in the 
past and you can get some interesting effects. I've put together a minimal 
test scene along the lines of what I think you might be getting at:

camera {location <1.5, 1.5,-3> look_at 0}
light_source {<1,50,-100> color rgb 1}

box {<-1,-1,-0.01>,<1,1,2>
  pigment {gradient z
    pigment_map {
      [0   granite scale 0.1]
      [0.5 granite scale 0.1]
      [0.5 gradient z]
      [1   gradient z]
    }
    turbulence 0.01
    warp {black_hole <0,0,-0.1>,1}
  }
}

This pigment_map creates layers of different pigments in the z-direction 
with a granite layer that starts a short distance back from the front 
surface of the box (you can see this transition along the top and side of 
the box). The warp pulls a circle of the granite pigment towards the surface 
sufficiently for it to break through the plain white part of the pigment. 
The small amount of turbulence creates a jagged edge to the circle.

Regards,
Chris B.


Post a reply to this message

From: Reactor
Subject: Re: Granite with limits?
Date: 10 Sep 2009 15:30:01
Message: <web.4aa9531890b339e233c8dce40@news.povray.org>
SharkD <mik### [at] gmailcom> wrote:
> Is there a way to create a granite-like pigment that is limited to
> certain limits? I would like no new "cells" to be created if they will
> extend beyond the limits. Sorry if I didn't explain this well enough...
>
> -Mike

I think Rune made something that could do that, see here:
http://runevision.com/3d/povgoodies/#216

It basically generates a bunch of map entries, allowing you to control how the
pattern behaves.  Adapted for your purpose, it would make each cell larger and
larger until they blend together into one solid color.

-Reactor


Post a reply to this message

From: Alain
Subject: Re: Granite with limits?
Date: 10 Sep 2009 17:57:29
Message: <4aa97649$1@news.povray.org>
Chris B a écrit :
> 
> "SharkD" <mik### [at] gmailcom> wrote in message 
> news:4aa8b949$1@news.povray.org...
>> Is there a way to create a granite-like pigment that is limited to 
>> certain limits? I would like no new "cells" to be created if they will 
>> extend beyond the limits. Sorry if I didn't explain this well enough...
>>
> 
> I think you should be able to achieve this using either layered textures 
> or texture_map transitions. The optimum approach depends on exactly the 
> result you're trying to achieve.
> 
> If you want a plain texture with a granite-like pigment appearing within 
> a certain zone you can use a multi-layered texture where the top layer 
> contains a transparent 'hole' of the desired shape that lets the 
> required parts of the granite layer beneath show through. You can 
> readily create well-defined edges of any shape you want using the object 
> pigment.
> 
> If you want fuzzy/blurred edges you would probably need to use pigments 
> that support color_map transitions, such as gradient or onion, but you 
> can use multiple layers to create some reasonably sophisticated 'holes'. 
> For example you could use 4 copies of a gradient texture rotated through 
> 90 degrees each time to create a blurry-edged square hole.
> 
> If you want a granite-like texture within the required limits and 
> everything to be totally transparent beyond those limits, you can use a 
> pigment_map or a texture_map to transition between the granite texture 
> and a totally transparent texture.
> 
> OTOH The bit of the question about new "cells" not being created implies 
> you might wish to avoid chopping through discrete splodges of texture in 
> the granite pattern. For example, cutting around the bright areas and 
> avoiding cutting through any dark patches. I can't think of an easy way 
> of doing that using only POV-Ray, although it's conceivable you could 
> use the eval_pigment function to chart a route through the bright bits 
> without venturing into the dark bits. You could then build a prism 
> object to follow that route and use it as an object pigment to create a 
> top layer with a transparent hole of the required shape. Lots of work 
> though!
> 
> Regards,
> Chris B.

If you want a single square hole, you can use the boxed pattern.

pigment{boxed color_map{[0.0 rgb 1][0.01 granite]}}

Will give you a square area with a granite pigment, and the rest been 
white. There is a narrow transition. Set both to 0.0 to get no transition.

pigment{boxed color_map{[0.0 rgb 1][0.3 granite]}}

Same, but with a mush broader transotion.

If you want a circular hole, replace the boxed by spherical.

A stripe can be obtained with the planar or cylindrical patterns.


Alain


Post a reply to this message

From: Warp
Subject: Re: Granite with limits?
Date: 10 Sep 2009 18:11:45
Message: <4aa979a1@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:
> pigment{boxed color_map{[0.0 rgb 1][0.01 granite]}}

  I think you mean pigment_map?

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: Granite with limits?
Date: 10 Sep 2009 18:58:16
Message: <4aa98488$1@news.povray.org>

> Alain <aze### [at] qwertyorg> wrote:
>> pigment{boxed color_map{[0.0 rgb 1][0.01 granite]}}
> 
>   I think you mean pigment_map?
> 
Oups! Yes.


Post a reply to this message

From: SharkD
Subject: Re: Granite with limits?
Date: 10 Sep 2009 20:21:55
Message: <4aa99823$1@news.povray.org>
Chris B wrote:
> This pigment_map creates layers of different pigments in the z-direction 
> with a granite layer that starts a short distance back from the front 
> surface of the box (you can see this transition along the top and side 
> of the box). The warp pulls a circle of the granite pigment towards the 
> surface sufficiently for it to break through the plain white part of the 
> pigment. The small amount of turbulence creates a jagged edge to the 
> circle.

I plan on using the pigment as a density map to create clouds, so I 
don't think this method would work correctly.

In fact, I would like the black hole warps to create something out of 
nothing. I.e. the basic pigment would be black everywhere except where 
the black hole warps are. I tried to do this with a planar pattern, but 
it required that a thin strip of white appear in the middle. *Maybe* the 
warps affected it enough for gaps to appear in the strip.

-Mike


Post a reply to this message

From: Chris B
Subject: Re: Granite with limits?
Date: 12 Sep 2009 03:00:15
Message: <4aab46ff$1@news.povray.org>
"SharkD" <mik### [at] gmailcom> wrote in message
news:4aa99823$1@news.povray.org...
> I would like the black hole warps to create something out of nothing. I.e.
> the basic pigment would be black everywhere except where the black hole
> warps are. I tried to do this with a planar pattern, but it required that
> a thin strip of white appear in the middle.

I don't think that any of the warps can create something out of nothing,
they really just push and pull pigment around in 3D space or wrap pigments
around on themselves. There's no sort of hyperspace, or 4th dimension that
they can pull color from if they're not present to start with.

> I plan on using the pigment as a density map to create clouds, so I
> don't think this method would work correctly.

You may be right. I haven't done that sort of thing. It might be worth 
starting a new thread mentioning interior or media in the title in case 
those versed in the dark arts of density maps are no longer following this 
thread :o)

Regards,
Chris B


Post a reply to this message

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