POV-Ray : Newsgroups : povray.binaries.images : hard_object, soft_object pattern 3.7.2 patch branch. : Re: hard_object, soft_object pattern 3.7.2 patch branch. Server Time
8 May 2024 08:25:20 EDT (-0400)
  Re: hard_object, soft_object pattern 3.7.2 patch branch.  
From: William F Pokorny
Date: 4 Mar 2017 13:22:23
Message: <58bb05df$1@news.povray.org>
On 03/04/2017 10:32 AM, William F Pokorny wrote:
>>
>> Sounds to me like an extension of the mechanism could be used for
>> proximity patterns.
>
> Yes, a variation of the hard_object method would essentially be what
> many here have called proximity patterns - that are really local
> density-of-object(s) patterns. Jérôme has this:
> http://wiki.povray.org/content/User:Le_Forgeron#proximity_pattern and
> several have done things in SDL(1).
>
> I think any real proximity pattern would shoot sample rays outward from
> any sample point in space. Meaning it would be valid at a distance from
> objects, perhaps even in a way not associated with particular objects at
> all.
>
> (1) - Including me. Somewhere I have a local density of object(s)
> pattern written with functions for which performance was pretty good in
> my use. I'll see if I can find it.
>

I've posted the full code for an example to p.b.scene-files. The 
resultant image is attached. It shows too some of the shortcomings of 
density-based vs what a real proximity pattern might do.

FYI - In finding the code again, the functions could I think be 
encapsulated in a macro for a general local-density capability. I 
defined a radius variable and a falloff variable.

In this implementation the starting radius with a relatively few samples 
is shrunk by a falloff - (currentRadius/falloff) for each step - from 
the starting radius smaller for 22 steps. The sampling vectors  were 
randomly rotated at each step. The number of samples inside of all the 
samples is then normalized to a 0-1 value as the final functional result.

Bill P.


Post a reply to this message


Attachments:
Download 'denfnctexample.jpg' (34 KB)

Preview of image 'denfnctexample.jpg'
denfnctexample.jpg


 

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