POV-Ray : Newsgroups : povray.programming : Rendering CDs (diffraction) Server Time
22 Dec 2024 12:46:41 EST (-0500)
  Rendering CDs (diffraction) (Message 1 to 6 of 6)  
From: Warwick
Subject: Rendering CDs (diffraction)
Date: 12 Jan 2005 05:25:00
Message: <web.41e4fa17439a08055c365a340@news.povray.org>
Hi folks.

I'm trying to work out how to render some complex surfaces with a CD-like
diffractive finish. I can't visualise it, so I can't cheat as I would if I
only wanted a CD: I want the computer to calculate it for me.

I can't find any mention of diffraction in the POV-Ray keywords; can someone
confirm that it's not supported? Is anyone working on something like this?

If not, the 'irid' keyword changes colour based on light/surface angle, and
I know diffraction is related to the incident angle (and wavelength, path
difference, etc), so I'm guessing I could start hacking things there and
mess about with photons?

Cheers,

Tim


Post a reply to this message

From: ABX
Subject: Re: Rendering CDs (diffraction)
Date: 12 Jan 2005 05:40:06
Message: <evu9u0dppbtdct1t6rrr8luedfftr0osjd@4ax.com>
On Wed, 12 Jan 2005 05:22:26 EST, "Warwick" <nomail@nomail> wrote:
> Hi folks.

Hi.

> I'm trying to work out how to render some complex surfaces with a CD-like
> diffractive finish. I can't visualise it, so I can't cheat as I would if I
> only wanted a CD: I want the computer to calculate it for me.

That's fine but please note that this is wrong group for discutting this. Your
question is about scene source code technic _for_ POV-Ray at run-time while
this group is about issues related to source code _of_ POV-Ray and building of
this application. This is a common misconception which could be avoided by
reading http://news.povray.org/%3C3D4C20DA.40C33E49%40pacbell.net%3E

> I can't find any mention of diffraction in the POV-Ray keywords

http://www.google.com/search?q=diffraction+site:povray.org

> can someone confirm that it's not supported? Is anyone working on something like
this?

http://runevision.com/show.asp?id=95

> If not, the 'irid' keyword changes colour based on light/surface angle, and
> I know diffraction is related to the incident angle (and wavelength, path
> difference, etc), so I'm guessing I could start hacking things there and
> mess about with photons?

One can argue whether using photons is a hack or not ;-)

ABX


Post a reply to this message

From: Warwick
Subject: Re: Rendering CDs (diffraction)
Date: 12 Jan 2005 20:00:01
Message: <web.41e5c677f6fe36175c365a340@news.povray.org>
ABX <abx### [at] abxartpl> wrote:
> That's fine but please note that this is wrong group for discutting this. Your
> question is about scene source code technic _for_ POV-Ray at run-time while
> this group is about issues related to source code _of_ POV-Ray and building of

No, I intended to ask in the source-code programming group: I expected to
have to flex my C programming muscles to achieve this. Sorry I didn't
make that clear.

My question about there being no POV-Ray keyword (primitive) to support
diffraction was just to make sure I'd not missed something - like 'irid'
for 'iridescence'. I had looked pretty carefully before posting, but one
can always miss something.

> > I can't find any mention of diffraction in the POV-Ray keywords
>
> http://www.google.com/search?q=diffraction+site:povray.org

Mm. I did this before I posted. There were a couple of 'It's too
difficult/slow', but I think I'm actually trying for one of the particular
effects of diffraction, rather than real diffraction, so I may be
successful.

> > can someone confirm that it's not supported? Is anyone working on something like
this?
>
> http://runevision.com/show.asp?id=95

This is interesting, and it'll be instructive to understand how it works,
but it's too impressionistic for my purposes.

> > difference, etc), so I'm guessing I could start hacking things there and
> > mess about with photons?
>
> One can argue whether using photons is a hack or not ;-)

Heh.

I'm going to fiddle around and see how far I get - iridescence uses
light/surface angle, and I believe I should be able to make some progress
combining that with camera/surface angle. I will need to work out how to
'brush' the CD tracks eventually though - I don't plan to keep them
circular - so I'll hopefully be back for suggestions before terribly long.

Cheers,

Tim


Post a reply to this message

From: Warwick
Subject: Re: Rendering CDs (diffraction)
Date: 16 Feb 2005 19:50:00
Message: <web.4213e831f6fe3617ec12ceb00@news.povray.org>
"Warwick" <nomail@nomail> wrote:
> I'm going to fiddle around and see how far I get - iridescence uses
> light/surface angle, and I believe I should be able to make some progress

So I've had a fiddle, and managed this - no photons involved, very fast
render.

http://www.baverstock.org.uk/tim/images/povdemo5.jpg

Kinda pretty.

Here's most of the hack - the rest is just trivially changing all the
do_irid()
function calls so they supply REye as the third parameter.

http://www.baverstock.org.uk/tim/images/lighting.cpp

Any good? I haven't a clue what the Travel_Diff *1000 scaling factor's
doing - what are POVRay's native units anyway?

I need to work out how to make Track_Field represent CD tracks on a flat
surface - it's currently just a constant vector.

Cheers,

Tim.


Post a reply to this message

From: Mike C
Subject: Re: Rendering CDs (diffraction)
Date: 2 Aug 2005 16:35:00
Message: <web.42efd7d8f6fe36173abed3590@news.povray.org>
"Warwick" <nomail@nomail> wrote:
> doing - what are POVRay's native units anyway?

If memeory serves me right, there are none -- if I use a box from <0,0,0> to
<1,1,1> in the SDL file, it could end up being a square centimetre, a
square inch, or a square hectare.


Post a reply to this message

From: Matt Denham
Subject: Re: Rendering CDs (diffraction)
Date: 24 Nov 2005 01:45:00
Message: <web.4385604cf6fe361774f3166b0@news.povray.org>
"Mike C" <the### [at] hotmailcom> wrote:
> "Warwick" <nomail@nomail> wrote:
> > doing - what are POVRay's native units anyway?
>
> If memeory serves me right, there are none -- if I use a box from <0,0,0> to
> <1,1,1> in the SDL file, it could end up being a square centimetre, a
> square inch, or a square hectare.
I dunno...  what with it being from <0,0,0> to <1,1,1>, I think it's more
likely a cubic whatever than a square whatever.  (Heh.)

But yeah - there are no innate units to the coordinates.  Just make sure
that 1u is consistent between all objects, or you run into six-inch-tall
streetlights, a donut the size of a VW Beetle, etc.

(Also...  if memory serves, isn't a hectare a unit of area already?  So a
square hectare is...  um...  10^8 quartic [tesseractic?  There's no really
GOOD term for it, y'know] meters.  Dunno about you, but I prefer keeping my
measurements in 3-space at most...  saves headaches for the readers.  :->)


Post a reply to this message

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