POV-Ray : Newsgroups : povray.advanced-users : Applying noise to geometry Server Time
21 Dec 2024 10:42:35 EST (-0500)
  Applying noise to geometry (Message 8 to 17 of 17)  
<<< Previous 7 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: Applying noise to geometry
Date: 27 Feb 2023 19:10:00
Message: <web.63fd45ba2d7275891f9dae3025979125@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:
> On 28/02/2023 01:26, Cousin Ricky wrote:
> > I haven't tried it out for myself, but there is an Object Collection
> > module that might be helpful for this method:
> >
> >
https://github.com/LeForgeron/PovContributions/tree/master/findsurface/maggot%201.0
> Thanks a lot, this is exactly what I was expected !
> It works fine, I need only to play with covering object's orientation a
> little.
> --
> YB

I haven't looked any of this over, but look over this thread, and see if any of
that helps you:

http://news.povray.org/povray.binaries.images/message/%3Cweb.603d82a3a906d8e31f9dae300%40news.povray.org%3E/#%3Cweb.603
d82a3a906d8e31f9dae300%40news.povray.org%3E

-BW


Post a reply to this message

From: yesbird
Subject: Re: Applying noise to geometry
Date: 27 Feb 2023 19:28:55
Message: <509e7f25-9981-680f-2c96-07e945f03104@gmail.com>
On 28/02/2023 03:07, Bald Eagle wrote:
> I haven't looked any of this over, but look over this thread, and see if any of
> that helps you:
> 
>
http://news.povray.org/povray.binaries.images/message/%3Cweb.603d82a3a906d8e31f9dae300%40news.povray.org%3E/#%3Cweb.603
> d82a3a906d8e31f9dae300%40news.povray.org%3E
Thanks, Bald, I will try it...

"Curiouser and curiouser!"
--
YB


Post a reply to this message

From: ingo
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 02:00:00
Message: <web.63fda6072d72758917bac71e8ffb8ce3@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:
> thanks for ideas and examples. Although fist method works fine, second
> looks more attractive, as, I suppose, will allow 'decorate' imported
> mesh, which gives me more control on the object's shape.

I.i.r.c. Poseray https://sites.google.com/site/poseray/ can do mesh displacement
based on uv vectors and images. Never tried it myself.

ingo


Post a reply to this message

From: yesbird
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 02:47:04
Message: <ff679b9e-7a8f-d0e1-8acb-022204f0c765@gmail.com>
On 28/02/2023 09:58, ingo wrote:
> I.i.r.c. Poseray https://sites.google.com/site/poseray/ can do mesh displacement
> based on uv vectors and images. Never tried it myself.
Mmm, Poseray ...
I have one, but it's almost the same as importing mesh from ZBrush.
Your first advice about using 'meshmaker' seems more attractive to me...
--
YB


Post a reply to this message

From: ingo
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 03:30:00
Message: <web.63fdbb802d72758917bac71e8ffb8ce3@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:
> On 28/02/2023 09:58, ingo wrote:

> Mmm, Poseray ...
> I have one, but it's almost the same as importing mesh from ZBrush.
> Your first advice about using 'meshmaker' seems more attractive to me...


A long time ago I wrote an unfinished tool to convert mesh2 to obj files.
Something like that could be made to write a bunch of pov-ray arrays to a file.
Then you have full control over the mesh and can transform it by using uv
information and functions.
Or, ask FlyerX to add such an option to Poseray, if they are still working on
it.

https://news.povray.org/povray.binaries.utilities/thread/%3CXns94F5A773245Aseed7%40news.povray.org%3E

ingo


Post a reply to this message

From: yesbird
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 04:11:45
Message: <187e6d9f-5718-273a-e80e-62604d14708c@gmail.com>
On 28/02/2023 11:29, ingo wrote:
> A long time ago I wrote an unfinished tool to convert mesh2 to obj files.
> Something like that could be made to write a bunch of pov-ray arrays to a file.
> Then you have full control over the mesh and can transform it by using uv
> information and functions.
> Or, ask FlyerX to add such an option to Poseray, if they are still working on
> it.
Thanks for another idea, but I would like to stay 'inside' POV as long 
as possible, avoiding external tools. Now, after a few experiments, I 
see, that adding some arbitrary 'extensions' to geometry (as in the 
attached image, for ex.) is not too complicated.

Maybe I will try to shift the mesh's vertices according to some noise 
function too.
--
YB


Post a reply to this message


Attachments:
Download 'play_spline.png' (151 KB)

Preview of image 'play_spline.png'
play_spline.png


 

From: Thomas de Groot
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 08:14:53
Message: <63fdfe4d@news.povray.org>
Op 28-2-2023 om 07:58 schreef ingo:
> yesbird <sya### [at] gmailcom> wrote:
>> thanks for ideas and examples. Although fist method works fine, second
>> looks more attractive, as, I suppose, will allow 'decorate' imported
>> mesh, which gives me more control on the object's shape.
> 
> I.i.r.c. Poseray https://sites.google.com/site/poseray/ can do mesh displacement
> based on uv vectors and images. Never tried it myself.
> 
> ingo
> 
> 
See attachment.
-- 
Thomas


Post a reply to this message


Attachments:
Download 'displacement mapping - howto.pdf' (527 KB)

From: yesbird
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 09:20:00
Message: <web.63fe0cd42d7275898ec57efd10800fb2@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> See attachment.
Thanks :)


Post a reply to this message

From: yesbird
Subject: Re: Applying noise to geometry
Date: 28 Feb 2023 13:16:53
Message: <63fe4515@news.povray.org>
On 27/02/2023 21:32, yesbird wrote:
> Hi,
> while working on Yes-project, I am trying to find the way of making
> the objects less 'geometrical', giving them more natural and 'noisy'
> shapes (like in this attachment, for example). The only way I found in
> manual is to play with normals, but I'd like to have an influence on
> geometry, to apply more relief.

Thanks to all your comments, advice and links, a solution was finally
found. Script is working by making a path of spheres along a spline and
applying relief elements to each sphere. It's left only to make some
randomization and push code to the parameterized macro.

Thanks a lot to everyone !
--
YB


Post a reply to this message


Attachments:
Download 'play_spline_pins.png' (290 KB) Download 'play_spline_spheres.png' (304 KB)

Preview of image 'play_spline_pins.png'
play_spline_pins.png

Preview of image 'play_spline_spheres.png'
play_spline_spheres.png


 

From: Chris R
Subject: Re: Applying noise to geometry
Date: 16 May 2023 16:40:00
Message: <web.6463e9ae2d727589a39f4a525cc1b6e@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:
> Hi,
> while working on Yes-project, I am trying to find the way of making
> the objects less 'geometrical', giving them more natural and 'noisy'
> shapes (like in this attachment, for example). The only way I found in
> manual is to play with normals, but I'd like to have an influence on
> geometry, to apply more relief.
>
> It's possible to pass a noisy hi-res mesh from ZBrush, as I'm doing now,
> but this is not 'pure' POV-way and import takes some 'non-zero' time.
>
> Maybe anyone can advise something about such arbitrary geometry
> modifications ?
> Thanks in advance.
> --
> YB
My preferred method for doing this, albeit introducing some longer render times,
is to use isosurface objects.  I usually start with a function that defines the
non-perturbed shape of the object, e.g.:

#local _shape_fn = function(x,y,z) {
   sqrt(x*x+y*y+z*z) - 1
}

for a 1-unit radius sphere.

I then use one of several techniques to do the perturbations.  For example,

#local _shape_fn = function(x,y,z) {
   sqrt(x*x+y*y+z*z) - (1+0.1*f_snoise3d(x,y,z))
}

or
#local _pattern_fn = function {
   pigment {
      bozo
      color_map {
         [0.0 rgb 0]
         [1.0 rgb 1]
      }
   }
}
#local _shape_fn = function(x,y,z) {
   sqrt(x*x+y*y+z*z) - (1 + 0.1*_pattern_fn(x,y,z).gray)
}

or, if your shape function is well-behaved, (i.e. returns a value representing
the distance from a point to the surface of your object), you could do it this
way instead:

#local _shape2_fn = function(x,y,z) {
   _shape_fn(x,y,z) - 0.1*_pattern_fn(x,y,z).gray
}

The attached image is a pretty complex example, where the basic shape of the
wood-part of the blocks is basically f_rounded_box, but patterns are applied for
the wood grain, dents in the wood, cracks in the wood, etc.

-- Chris R.


Post a reply to this message


Attachments:
Download 'blocks-2023-05-04-1.png' (1276 KB)

Preview of image 'blocks-2023-05-04-1.png'
blocks-2023-05-04-1.png


 

<<< Previous 7 Messages Goto Initial 10 Messages

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