How to make CD DVD like diffraction? Is it possible?
How to make CD DVD like diffraction? Is it possible?
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.
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.
Re: How to make CD DVD like diffraction? Is it possible?
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)ior wrote:By using bump texture were the lines are smaller than the wave length of the light.
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
http://www.eclat-digital.com
Re: How to make CD DVD like diffraction? Is it possible?
Galliente, you need to be part of dev team. Im sure other users will agre! 
Re: How to make CD DVD like diffraction? Is it possible?
Hi, I will try that! Maybe 2 layers with different refractive indexes on top of mirror with circular bump would work.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)
EDIT: It doesn't work but ill try a solution.
Re: How to make CD DVD like diffraction? Is it possible?
I totally agree. I have several times suggested to give Galinette at least a developers badge but the folks at glare are rather hesitantdcm wrote:Galliente, you need to be part of dev team. Im sure other users will agre!
He should have gotten the badge already for his contribution of several outstanding ISL shaders!
Re: How to make CD DVD like diffraction? Is it possible?
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

http://en.wikipedia.org/wiki/File:CD_layers.svg
U can model very small sector and instance it.
that's 0.000002 m

http://en.wikipedia.org/wiki/File:CD_layers.svg
Re: How to make CD DVD like diffraction? Is it possible?
If you model the geometry, you may get the anisotropy but never the colored diffractionMeelis wrote:What if u model the geometry (not in µm level), im shure u get the effect.
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.
What does it look like? I'm curious...ior wrote:EDIT: It doesn't work but ill try a solution.
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
http://www.eclat-digital.com
Re: How to make CD DVD like diffraction? Is it possible?
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.
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.
Re: How to make CD DVD like diffraction? Is it possible?
Be careful, 0.1mm is the nudge distance. You may have to change itior 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.
I got that yesterday evening. It is made by a shader on a single flat surface: 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
http://www.eclat-digital.com
Re: How to make CD DVD like diffraction? Is it possible?
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
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
http://www.eclat-digital.com
Re: How to make CD DVD like diffraction? Is it possible?
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.
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.
Re: How to make CD DVD like diffraction? Is it possible?
Here is even a paper about it 
Who is online
Users browsing this forum: Ahrefs [Bot] and 60 guests

