POV-Ray : Newsgroups : povray.tools.general : How to "roundify" objects : Re: AFAIK it should be integrated in Povray Server Time
27 Jan 2022 11:50:19 EST (-0500)
  Re: AFAIK it should be integrated in Povray  
From: Le Forgeron
Date: 21 May 2015 13:06:18
Message: <555e108a$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 21/05/2015 10:05, Lars Rohwedder a écrit :
>> I have never found a satisfactory solution to the general
>> rounding problem. Isosurface blobs are good, but isosurfaces take
>> so long to render. Extensive macros for CSG, or hand-modelled
>> meshes seem the best value for time vs results...
> 
> My rough idea:
> 
> There is already a function that returns whether a vieving ray
> "hits" the surface of a given object's surface (and where it hits).
> I assume this function is used in the render core of Povray, too.
> 
> So it should be possible to provide another function that returns
> the point where the distance between ray and object is 0, but where
> it has a given distance 'd'.

- From the intersection point, assuming the normal is known at that
point (usually, but not always, brutal change of surface would remain
problematic), you can use a basic trigonometry with the angle between
the ray and the normal to compute the projection of d along the normal
on to the ray so as to get that point. As long as the ray is not
perpendicular to the normal at the intersection point.

So, run the first function, and adjust the intersection.

But with d>0, you will miss the part when the ray does not intersect
the object, yet is near enough that it would intersect with the
adjusted version.

It might be more usable with d<0, using that computation to make the
object appearing smaller. (and keeping the new intersection only if
the point is still "inside" the model object)



> 
> Rendering using that function should result in "puffed-up" objects,
> so you have to shrink your objects by 'd' before (which can be done
> by the Povray core automatically, too. AFAIK)

scale is not shrink.

Consider a torus (major = 4, minor = 1), shrink by d is another torus
(major = 4, minor = 1-d), that's something you cannot achieve via scale.


> 
> I think the question whether this is possible should go to the
> Povray core developer, not the tool developer. So: Wrong
> newsgroup... ;-(
> 
> Lars R.
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlVeEIsACgkQhKAm8mTpkW1X+wQAvTLp1oQcpdhSQwWYuXHUntpD
JAoN+8fCMopeseMiANL1wEE83di3qMgR4vS8votGjvd/Q1xSyJ7DibtgGZWAu0sW
+GJrd+3X6yT4mczi2BGOLnqlm+W25tn6W8pr0yzJzvdAFcaV7ZCt1OmKf8f7Jiwa
2BX7fCrL29+zSu/QmGU=
=dufP
-----END PGP SIGNATURE-----


Post a reply to this message

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