POV-Ray : Newsgroups : povray.general : [feature idea] blob pattern Server Time
28 Dec 2024 20:04:52 EST (-0500)
  [feature idea] blob pattern (Message 1 to 7 of 7)  
From: ingo
Subject: [feature idea] blob pattern
Date: 12 Jul 2022 13:15:00
Message: <web.62cdab3128d2013917bac71e8ffb8ce3@news.povray.org>
Maybe I can get somebody inspired to implement it in POV-Ray.

I simulated a "blob texture". Created a 10x10x10 virtual grid and put a random
point in each cell. That's the centre of a "blob item", that is, I used the blob
equation from the docs to calculate grey values. The radius is randomized
between 0.5 and 2.5. The strength is kept at 1.0 and the threshold is not used.

The worley noise is based on the same principle and also calculates the minimum
distance between the points to find the nearest neighbour. The crackle pattern
uses this and probably more. So the basics for such a pattern may be there. The
minimum distance could be used as radius, or strength.


Post a reply to this message


Attachments:
Download 'blobtexture_8.png' (131 KB)

Preview of image 'blobtexture_8.png'
blobtexture_8.png


 

From: ingo
Subject: Re: [feature idea] blob pattern
Date: 12 Jul 2022 14:45:00
Message: <web.62cdc0d99db63f2b17bac71e8ffb8ce3@news.povray.org>
"ingo" <nomail@nomail> wrote:
> Maybe I can get somebody inspired to implement it in POV-Ray.
>
> I simulated a "blob texture".

30x30x5 grid. Random values for strength -1.0 to 1.0, then all brought into the
0-1 range for the image. No gamma.


Post a reply to this message


Attachments:
Download 'blob30.png' (163 KB)

Preview of image 'blob30.png'
blob30.png


 

From: jceddy
Subject: Re: [feature idea] blob pattern
Date: 12 Jul 2022 16:20:00
Message: <web.62cdd6fe9db63f2b864166f75d51d79c@news.povray.org>
> I simulated a "blob texture". Created a 10x10x10 virtual grid and put a random
> point in each cell. That's the centre of a "blob item", that is, I used the blob
> equation from the docs to calculate grey values. The radius is randomized
> between 0.5 and 2.5. The strength is kept at 1.0 and the threshold is not used.
>

Is this similar to a bunch of spherical pattern components added together?

I guess it is:

strength * pow((1 - pow((distance / radius), 2), 2)

For each defined blob component from a sample point, then added together, which
isn't exactly the same?

As it is, I think you could do this for blobs with up to 13 or 14 components
using user-defined functions, but you would need a separate function for each
number of components, or have a "component count" parameter and then have
ignored parameters off the right side.

But either way, probably not ideal.


Post a reply to this message

From: ingo
Subject: Re: [feature idea] blob pattern
Date: 13 Jul 2022 01:48:27
Message: <XnsAED34F6A73994seed7@news.povray.org>
in news:web.62cdd6fe9db63f2b864166f75d51d79c@news.povray.org jceddy wrote:

> strength * pow((1 - pow((distance / radius), 2), 2)
> 

strength * pow((1 - pow((min(radius, distance) / radius), 2), 2)

But yes. That's it. I just used brute force (using Nim).
By limiting the radius (max 1.5 cell ~2.6) and strength one can probably 
limit the amount of cells/blobs to sum to 48(?)

ingo 

-- 
https://ingoogni.nl


Post a reply to this message

From: jceddy
Subject: Re: [feature idea] blob pattern
Date: 13 Jul 2022 08:55:00
Message: <web.62cec07e9db63f2b864166f75d51d79c@news.povray.org>
> strength * pow((1 - pow((min(radius, distance) / radius), 2), 2)
>
> But yes. That's it. I just used brute force (using Nim).
> By limiting the radius (max 1.5 cell ~2.6) and strength one can probably
> limit the amount of cells/blobs to sum to 48(?)
>

So one could definitely create an internal function for this.

Maybe I'll create a patch for it as a diversion from the kind of frustrating
things I am working on now. XD


Post a reply to this message

From: jceddy
Subject: Re: [feature idea] blob pattern
Date: 16 Jul 2022 00:25:00
Message: <web.62d23d8a9db63f2b864166f75d51d79c@news.povray.org>
> But yes. That's it. I just used brute force (using Nim).
> By limiting the radius (max 1.5 cell ~2.6) and strength one can probably
> limit the amount of cells/blobs to sum to 48(?)
>

Poking around, this actually already exists: the potential pigment

for example:

box {
  <-0.5, -0.5, 0>, <0.5, 0.5, 0>
  texture {
    pigment {
      potential {
        blob {
          threshold 0.6
          sphere { <.75, 0, 0>, 1, 1 }
          sphere { <-.375, .64952, 0>, 1, 1 }
          sphere { <-.375, -.64952, 0>, 1, 1 }
          scale 0.25
        }
      }
      color_map {
        [0.0 color rgb 0.0 ]
        [1.0 color rgb 1.0 ]
      }
    }
    finish {
      ambient 1.0
      diffuse 0.0
    }
  }
}

I rendered this with an orthographic camera and attached the output.


Post a reply to this message


Attachments:
Download 'test_blob_pattern.png' (13 KB)

Preview of image 'test_blob_pattern.png'
test_blob_pattern.png


 

From: ingo
Subject: Re: [feature idea] blob pattern
Date: 16 Jul 2022 04:48:44
Message: <XnsAED66DFB68413seed7@news.povray.org>
in news:web.62d23d8a9db63f2b864166f75d51d79c@news.povray.org jceddy wrote:

> the potential pigment
> 

How did I miss that?

It works different than what I had in mind. Moving a 3d x*y*z "cache" 
through space and depending in what "cell" one is fill the cache with the 
approriate deterministic random data and calculate the result with that.

But, time to investigate the potential of potential.

Thanks,

ingo

-- 
https://ingoogni.nl


Post a reply to this message

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