How to make CD DVD like diffraction? Is it possible?

Come here for help & support.
Post Reply
13 posts • Page 1 of 1
ior
Posts: 166
Joined: Tue Aug 24, 2010 11:47 am

How to make CD DVD like diffraction? Is it possible?

Post by ior » Sun Jan 30, 2011 6:01 am

The answer seems to be:
By using bump texture were the lines are smaller than the wave length of the light.

Did not tested. But does it work in indigo?

Thanks.

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: How to make CD DVD like diffraction? Is it possible?

Post by galinette » Sun Jan 30, 2011 7:34 am

ior wrote:By using bump texture were the lines are smaller than the wave length of the light.
It doesn't work for sure! This would require the support of light diffraction on scene geometry, which is extremely complex and does not exist in any renderer (except maybe some very experimental research codes which cannot really be called renderers)

These surfaces, called "diffraction gratings", could be however be supported by custom BRDFs but since Indigo does not allow to make what I would call "third party BRDF plugins" it would need to be hard-coded in Indigo (as a new material type)

It is however maybe possible to fake that effect by giving the CD a thickness, applying a specular material with very high cauchy coefficient, and set a non transparent reflective material on the back side. It may give some illusion of it, but you will still lack the anisotropic effect (which requires the not available ward material type, or some concentric bump scratches)

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
dcm
Posts: 663
Joined: Sun Jan 03, 2010 1:55 am

Re: How to make CD DVD like diffraction? Is it possible?

Post by dcm » Sun Jan 30, 2011 10:15 am

Galliente, you need to be part of dev team. Im sure other users will agre! :idea:

ior
Posts: 166
Joined: Tue Aug 24, 2010 11:47 am

Re: How to make CD DVD like diffraction? Is it possible?

Post by ior » Sun Jan 30, 2011 10:48 am

galinette wrote:It is however maybe possible to fake that effect by giving the CD a thickness, applying a specular material with very high cauchy coefficient, and set a non transparent reflective material on the back side. It may give some illusion of it, but you will still lack the anisotropic effect (which requires the not available ward material type, or some concentric bump scratches)
Hi, I will try that! Maybe 2 layers with different refractive indexes on top of mirror with circular bump would work.

EDIT: It doesn't work but ill try a solution.

User avatar
Headroom
Indigo 100
Posts: 1061
Joined: Wed Aug 08, 2007 1:07 pm
Location: Spartanburg, SC, USA
Contact:

Re: How to make CD DVD like diffraction? Is it possible?

Post by Headroom » Sun Jan 30, 2011 3:14 pm

dcm wrote:Galliente, you need to be part of dev team. Im sure other users will agre! :idea:
I totally agree. I have several times suggested to give Galinette at least a developers badge but the folks at glare are rather hesitant :roll:

He should have gotten the badge already for his contribution of several outstanding ISL shaders!

User avatar
Meelis
Posts: 383
Joined: Sat Mar 14, 2009 11:29 pm
Location: Estonia

Re: How to make CD DVD like diffraction? Is it possible?

Post by Meelis » Mon Jan 31, 2011 1:29 am

What if u model the geometry (not in µm level), im shure u get the effect.
U can model very small sector and instance it.

that's 0.000002 m
Image

http://en.wikipedia.org/wiki/File:CD_layers.svg

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: How to make CD DVD like diffraction? Is it possible?

Post by galinette » Mon Jan 31, 2011 5:58 am

Meelis wrote:What if u model the geometry (not in µm level), im shure u get the effect.
If you model the geometry, you may get the anisotropy but never the colored diffraction

This requires modelling of light as waves and not as rays. Since computing the intersection between a wave and a geometry is several degrees of magnitude more complex than intersecting a ray and a geometry, this is still at the level of sci-fi (or experimental code taking hours to render a scene with 100 polys)

Only hope, is a dedicated "grating" BRDF material not available in Indigo.

ior wrote:EDIT: It doesn't work but ill try a solution.
What does it look like? I'm curious...


That sounds like a tricky challenge... I should give it a try if I find time... However, I'm sure it needs to be quite fake.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

ior
Posts: 166
Joined: Tue Aug 24, 2010 11:47 am

Re: How to make CD DVD like diffraction? Is it possible?

Post by ior » Mon Jan 31, 2011 7:23 am

Seems that I'm heading for a solution.

A layer of transparent specular material with cauchy of 3 and a ior of 1 modeled with small angled slits of one degree (very small like 0.1 mm) and a layer of mirrored material.

But it is still an approximation because in a real holographic diffraction grid i think that diffraction does not bend like in this prism like approach.

Ill post some images when I have time to finish.

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: How to make CD DVD like diffraction? Is it possible?

Post by galinette » Mon Jan 31, 2011 9:57 pm

ior wrote:A layer of transparent specular material with cauchy of 3 and a ior of 1 modeled with small angled slits f one degree (very small like 0.1 mm) and a layer of mirrored material.
Be careful, 0.1mm is the nudge distance. You may have to change it

I got that yesterday evening. It is made by a shader on a single flat surface:
dvd.png
However, it is a big hack and the reflectance is quite low (lot of energy loss)
Basically, it is made of thin circular bump grooves for making an anisotropy reflection (classicalk pseudo-ward hack), with an overriden specular reflection color defined by a wavelength dependant shader that mimics the equation of dispersive gratings.
As the colors are made by filtering the specular color depending on angle, and not by redirecting each wavelength to a different angle, this explains the low reflectance obtained.

It is also very scale dependant : the groove bump height must be tweaked if you change the UV mapping scale, or you loose the effect.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: How to make CD DVD like diffraction? Is it possible?

Post by galinette » Mon Jan 31, 2011 10:01 pm

And... I maintain my position : giving access to a custom material API SDK for developping material plugins with custom BRDFs ( which is complicated because you have to define normalized PDFs, sampling functions, I know etc...) would allow me to make some very advanced materials. But I know, that the material class interface itself reveals some renderer secrets so...

But this may be one reason to switch to look to open source renderers one day... the SDK is self-contained!

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
dakiru
Indigo 100
Posts: 747
Joined: Mon Jun 22, 2009 6:51 am

Re: How to make CD DVD like diffraction? Is it possible?

Post by dakiru » Tue Feb 01, 2011 3:49 pm

Somebody already accepted the challenge. :)

ior
Posts: 166
Joined: Tue Aug 24, 2010 11:47 am

Re: How to make CD DVD like diffraction? Is it possible?

Post by ior » Thu Feb 03, 2011 1:18 pm

Hey galinette, your way is much better than mine. Is there any way to compensate the loss of light reflection power?


In the previous post I suggested a method, but it does not work, it only works with light at 90 degrees from surface and therefore only with parallel bumps viewed from a parallel point of view in relation to bumps.

But It resolved my problem of creating a diffraction mirror for light rays.


After some attempts I could not achieve the results I was aiming for.


Don't have much time now, so later Ill post here if I find a solution.

User avatar
dakiru
Indigo 100
Posts: 747
Joined: Mon Jun 22, 2009 6:51 am

Re: How to make CD DVD like diffraction? Is it possible?

Post by dakiru » Thu Feb 03, 2011 1:28 pm

Here is even a paper about it :shock:

Post Reply
13 posts • Page 1 of 1

Who is online

Users browsing this forum: Ahrefs [Bot] and 60 guests