CD Surface material.

Interesting… I was wondering why I was getting an error message about the file being from a newer version of Blender that isn’t even out yet. I’m on 4.0 and anxiously awaiting 4.1 on the 19th.

In your demo animation, the stationary CD has the rainbow rotating too. I think the trick would be to have the camera data tie into the rotation so that rotation is dependent upon the angle relative to camera.

EDIT:

Okay, I loaded the file. I see you did some fancy programming with the world node. I was going to add my HDRI, but I decided to explore the world node and saw where you had your HDRI plugged in and pointed to my HDRI file and got it to work.

And I was mistaken about the ‘stationary’ CD. They are all moving, so I deleted animation from one CD just to see if it is static and indeed the reflections behave correctly.

This looks pretty darned good.

BTW, here’s what I did 14 years ago in Maya. I remember it took me about five minutes to get the reflectivity effect.

2 Likes

Yes sorry that was a bit misleading, it was not stationary, I rotated it on the z axis to test the texture was rotating on all axis’s.

Ha ha, not too fancy it is just a way to get the reflections of the hdri without having it visible.

It would be good to get the colours and the radial bit closer to the real thing I will have a try (no promises).

1 Like

Ah, I figured that out about the HDRI without visibility. The simpler way is to go to the Film submenu of the render settings and click “transparent”. But your method offers more flexibility. I can have any color background. Neat trick.

So I’m trying to figure out how this group of nodes works.
I don’t know what’s going on with the separate XYZ and why the outputs are being added back together. Same goes with the Combine XYZ when only the Z input is used. Would it work if that node were bypassed?

The whole setup is WAY above my paygrade. Blender should just come up with a CD shader or more technically, a Diffraction Grating shader to make this easier.

Any idea what causes the hard edge on some frames of the animation?
image

The hard edge is because the radial array goes from 0 to 1 (so it ends and starts abruptly.)

You can get rid of it by adding another colour ramp just after the radi9al array, something like this

That way it goes from 0 to 1 and back to zero at the start and end of the array.

I sometimes complicate my thought process :rofl: I could have just done this instead.

Edit;

I also deliberately added a few more hard edges with the constant black and white colour ramp because there are hard edges in the reflections I see on real cd’s.

2 Likes

It is up to us to come up with a more correct shader!
Blender gives us tools to use.

My approach is “faking it” the real thing is a result of refraction and dispersion on the reflections of the cd’s micro grooves, or “diffraction”. The transparent coating disperses the colours reflected off the grooves.

There probably is a way to do this more physically but It would take a setup even more complex, there are a few threads here on BA that talk about glass dispersion shaders, but it would not just involve the dispersion, you would have to mimic the micro groves and the glass like “diffractive coating” somehow and work out a way to get it all working in conjunction.

2 Likes

I did a little experimenting myself and found that changing the color ramp from constant to ease made smoother transitions.

I’ll also experiment with simplified nodes in the Get Rotation group.

You’ve given me a lot to chew on here!

2 Likes

Good! here is a bit more to chew on :grinning:

I have played some more with this too,
I changed the radial mapping to use modulo so the colour ramp for the rainbows is now just 2 stops.

I added a bit of emission to the rainbows to get them stand out more.

I added yet another colour ramp so the rainbows stop at the inside and outside ridges, the bit of the cd that has no grooves (start and end).

I also used the rotation to drive the hue, not really realistic but it is nice to see the colours shift as the discs rotate.

New video, this time Eevee. Be sure to watch in HD I hate the way Youtube defaults to min quality!

and file if you want to peak:
cd4.blend (153.7 KB)

3 Likes

This is really looking quite excellent now. I can’t say there’s anything that catches my eye as not realistic.

The thing that is sad for me is that all this node programming is way over my ability to comprehend.
Frankly, I don’t have the first clue as to the reasons 90% of those nodes exist, how you knew to use them and what values to plug in.
Even if I were to randomly experiment, it would take me centuries to stumble across something like this.
I’m thinking, “maybe I better stick to AI art and using text prompts”… LOL

Oh, just noticed a strange anomaly when I switch to Cycles render:
image

1 Like

Unplug the View vector from the tangent. To get rid of that.

Well it is experimenting, there are probably nodes in there that are not doing what I wanted (like that view vector). The reason I put it in there was to bend the Anisotropics highlights a bit depending on the tangent of the view angle, which it does but it does not look good at all angles. (maybe I could restrict its effect so it does not bend too far. :thinking:)

Nodes are fun once you get used to them, don’t give up for AI!

2 Likes

Thank you for explaining the tangent vector node. That indeed fixed the artifact with Cycles. Hopefully I will be able to render this with EEVEE because it’s so much faster.

Sorry for my tardy response. I’ve been in the hospital four days following my second heart attack this month. The hourglass of life is nearly run out for me.

1 Like

Sorry to hear that, take things easy, my best wishes for you.

The last video I did was in Eevee, using the emission for the colours helps them stick out.

2 Likes

Feeling much better after having a stent installed in my LAD artery.

Here’s what I’m doing with the CD shader. Remaking a 2010 animation. This is about 2/3 of the way through, time-wise.

2 Likes

That’s looking good, glad to know you a feeling better. :slightly_smiling_face:

1 Like

Just want let you know that I created (or adapted) a realistic looking CD/DVD Shader for Cycles:

2 Likes

That looks good!

Finally, here’s the completed updated version of the project I originally built in Maya in 2010.
Blender 4.1 used here. Tried to make it as close as possible to the original, but better realism. Also re-did the music portion with modern equipment & samples.