POV-Ray : Newsgroups : povray.binaries.images : hard_object, soft_object pattern 3.7.2 patch branch. : hard_object, soft_object pattern 3.7.2 patch branch. Server Time
26 Apr 2024 06:03:12 EDT (-0400)
  hard_object, soft_object pattern 3.7.2 patch branch.  
From: William F Pokorny
Date: 3 Mar 2017 05:43:15
Message: <58b948c3$1@news.povray.org>
The three attached images were created using two new patterns called 
hard_object and soft_object. They can be found in the patch branch off 
master (3.7.2) at:

https://github.com/wfpokorny/povray/tree/feature/soft_objectAndhard_objectPatterns

Associated demo scenes can be found in the scenes/textures/patterns 
directory of the branch. Both new patterns are aimed first at making the 
object to isosurface-object path easier. However, both work as pure 
patterns too with gradual 0 to 1 value changes from the object surface 
inward.

The hard_object pattern is a more complete implementation of the 
ObjectAsIso idea I was playing with - mostly in SDL - back in 2008 or 
2009. Hard because the method replicates an input object's sharp features.

The soft_object pattern is based upon a subset of the density file 
pattern updates and ideas I was playing with last year. See: 
http://wiki.povray.org/content/User:Wfpokorny/DensityFile. Soft because 
the method uses exponential blobbing. In this implementation a virtual 
"df3 grid" is created on the fly.

The essential sdl for hard_object looks like:

  #declare FnHardObj = function {
     pattern { hard_object { ObjectText }
         radius 0.08
         recursion_limit 10
         samples 22
         warp { turbulence VarTurb octaves 3 lambda 3 }
     }
}

and for soft_object it looks like :

#declare FnSoftObj = function {
     pattern { soft_object { ObjectText }
               spacing 0.009
               strength 1.00
               warp { turbulence VarTurb lambda 5 }
     }
}

If you'd like to give these patterns a try, feel free to grab the branch 
off github. I'm still seeing what they can do - and not do - myself.
Bill P.

Further notes.
---------------

- Both patterns are sampling based.

- The hard_object demo uses one text object ("Water") for simplicity. 
The soft_object demo is made faster making each letter was its own 
isosurface due bounding and inside object test efficiency. Both methods 
are sensitive to how quickly the inside object tests can be done.

- Objects used must have a defined inside.

- Further documentation on the options can be found in the associated 
git commit messages.

- If using as a pattern the soft_object is often faster than hard_object 
for a smooth result. The reverse tends to be true if using the patterns 
in an isosurface.

- When using hard_object in a pattern low recursion_limit values and 
high samples are usually best. If using the hard_object pattern in an 
isosurface low samples and higher recursion tends to be better.

- The hard_object method works exceptionally well with convex, 
outwardly-pointy object features. The method struggles with concave, 
inward-crevasse portions of the object - though where samples high 
enough the distance from surface measure is decent. As the spherical 
sampling moves further inside the original object fewer and fewer of the 
spherical samples are usable in estimating the distance within - and 
results get noisy. Such noisiness is both shown and used for effect in 
this TinaCHeP image:

http://www.tc-rtc.co.uk/imagenewdisplay/stills/754/10.html

- Aggressive AA settings in combination with these patterns should be 
avoided until final renders. The relative slowness of the patterns 
compounds with AA.


Post a reply to this message


Attachments:
Download 'hard_object.jpg' (65 KB) Download 'hard_objecta.jpg' (129 KB) Download 'soft_object.jpg' (81 KB)

Preview of image 'hard_object.jpg'
hard_object.jpg

Preview of image 'hard_objecta.jpg'
hard_objecta.jpg

Preview of image 'soft_object.jpg'
soft_object.jpg


 

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