Is the .blend file for the second image somewhere in this thread? I’m messing around with iridescent materials and I would be interested in exploring this one further. Even a nodes screenshot would be enough
Well, green went purple and it depends on the prism intersecting a plane but this is as far as I got with prism dispersion. It is a hack and not correct.
Joao_Carvalho_Xisto’s setup in that thread is great.
@simopiersi No. I didn’t upload that blend file, and I doubt i still have it.
But the setup is not so different from the one here.
The main difference is a white noise plugged into rotation, and all glossy stuff is mixed with a diffuse with a little of SSS.
I see… Thanks for taking time to reply anyway, I’ll start from there.
Hi, @Secrop I have a question about your Diffraction grating shader example if you don’t mind. I am a 3D artist helping a person trying to get a semi-realistic Diffraction grating shader where he can input an image and get a good-looking result out for his engravings in blender, this would give us an indication of how it would look before he does the whole process in real life.
Would it be possible to add a custom image to the existing node group and have fine control over the colours that the image makes? And is it possible to of set it with angels so different parts of the image show up at different angels when viewing?
more technical questions whenever you get a chance to answer ![]()
- Where would m be in the order of diffraction?
- in the current shader, we consider the orders from -3 to 3 but not the 0th order?
- so if we start the path from the camera, we should know theta_m. That’s the angle between the surface normal and the projection of the ray_fromCameraToSurface on the plane that’s perpendicular to the diffraction grating, Could we somehow link the colour from the texture map to some sort of angle that we use to rotate the plane we do the projection on?
If we figure it out I will post it here for anyone to use, I think it would be a cool Shader idea to use!
Thank you so much for your time and I hope you have a great day!
That’s a tricky question… Are you trying to replicate an Hologram, or just break the diffraction interference by absorbing certain wavelengths?
Do you mean m as the integer multiplier on the wavelength interference?
If so, m is the order of diffraction for a specific wavelength.
The 0th order is a typical glossy reflection. I reality, the reflection tends to show a small red-ish blur, because longer wavelengths get spread a bit more. One can calculate the 0th order by going through the wavelengths, but for simplicity and speed, a simple glossy can also be used.
Well, it really looks you’re trying to do an Holographic shader… In that sense, I don’t know how plugging an image would do the trick, unless you fake it somehow.
Holograms, don’t have ‘colored images’ inside… Microscopically, they are just grattings in variable directions and with different slit distances (mostly like ripples in a pond).
So I don’t know how that would work.
But there are those cheap holograms that are made of just a mask (not by reflective interference that look 3d), and those are normally just a change in slit distance and/or slit direction.
Hey, @Secrop Thank you for taking the time to answer.
Sorry I am not extremely technical on this so I am going to try my best, I am just a simple 3d artist ![]()
So I believe it is breaking the diffraction interference by absorbing certain wavelengths.
So the work my friend is doing is based on diffraction grating and their use in the real world. So an example of this would be to engrave A logo onto a piece of metal( or any object) for branding and so on.
The purpose of the shader is to just show how this Logo would look before doing the actual process. It does not have to be perfect but just give us a general idea. and we will base it on real variables we have like the slit distance and rotation.
So in your opinion, what would be the best way to have an input image (we don’t care about keeping the colour) going into your node group and output in a semi-realistic way?
I will do some renders later in the day on what I have been able to do and screenshot the node group for you.
And I’ll show my friend the more technical responses thank you.
Thank you so much for your time on this and your work is amazing, thank you for sharing it with the world!
@Secrop if there’s anyway to reach you, I’d love to know if I can feature your solution and OSL shader, in an upcoming video on my youtube channel about holograms? With credit to you of course.
If you want to have a private conversation or an off-topic conversation it might be best to use private message.
Soo, this material setup is mentioned on the Blender Guru’s (aka @andrewprice
) recent video: https://youtu.be/RwwFIpX7djc?t=401
I thought people might want to check it out.
And thank you @Secrop for creating it, looks like it’s still useful.