Relative Refraction vs. Absolute Retraction Index

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
Miclazz
Posts: 3
Joined: Thu May 14, 2020 12:19 pm

Relative Refraction vs. Absolute Retraction Index

Post by Miclazz »

I often render liquids inside glass and model the interface surfaces accurately to get a very realistic effect. This means the outer glass surface which has a air > glass interface gets IOR ±1.5 ... and the liquid > air interface ±1.333 ... but the internal glass > liquid interface is a ratio of glass and liquid IOR, and often (depending how your normals are orientated, needs to be in the region of 0.88. see: https://blender.stackexchange.com/quest ... -in-cycles

Luxcore Render nodes do not allow for an IOR <1
Could this be made possible in the future or would it cause a problem for the physically based equations that are used in the engine?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Relative Refraction vs. Absolute Retraction Index

Post by B.Y.O.B. »

In LuxCore you do not have to do this math by hand. Usually you just specify the IOR of each interior volume, model the meshes so they overlap each other, and use volume priorities to control which volume overrides the other in the overlapping area. When going from one volume to another, LuxCore automatically computes the correct IOR for the transition.
You can check the "Orange Juice" example scene to see this in action: https://luxcorerender.org/example-scenes/

This is the reason why I limited the IOR setting in BlendLuxCore to 1 at minimum.
However, if you have a situation where you really need to set IOR < 1 by hand, you can do so by plugging a constant value node into the IOR socket:
Attachments
Capture.PNG
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Relative Refraction vs. Absolute Retraction Index

Post by Dade »

B.Y.O.B. wrote: Thu May 14, 2020 1:09 pm In LuxCore you do not have to do this math by hand.
Yes, just use IOR relative to vacuum and LuxCore takes care of the rest (including the case of two no-vacuum volumes).
Support LuxCoreRender project with salts and bounties
Miclazz
Posts: 3
Joined: Thu May 14, 2020 12:19 pm

Re: Relative Refraction vs. Absolute Retraction Index

Post by Miclazz »

Thanks for the response guys, I will test it out!
Miclazz
Posts: 3
Joined: Thu May 14, 2020 12:19 pm

Re: Relative Refraction vs. Absolute Retraction Index

Post by Miclazz »

Your way (overlapping volumes) works well :) . This will also save me time on model setup (mostly from CAD). Thank you.

How do you recommend treating the material for a bubble in the liquid? Adding a sphere with a glass material and a IOR of 1?
Looks that way. Would that be physically accurate?

Let me finish by saying that I am thoroughly enjoying Luxcore and Blender and completely amazed that this is freeware. Luxcore is AWESOME. I come from a long history of interest in CGI and rendering. I used to work on many packages from as early as the '90s - always looking to get more realism, but because I work in engineering and design field we ended up using KeyShot because of the ease of use and quick results that could be generated.

This all started with trying to find a Lego CAD for my son, which lead me to Mecabricks and I was blown away by the realistic renders it could generate, which led me to Blender (which was free to try!), which lead me to try render light to refract through a glass prism (didn't happen), which lead me to Luxcore. What an awesome rabbit hole :D. The depth of your product and the stunning realism you can achieve has hooked me, and I've spent the better part of COVID Quarantine learning Blender and Luxcore. All I can say is WOW, and well done. I have become a huge fan. Keep up the amazing work you do.
Attachments
IOR Test.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Relative Refraction vs. Absolute Retraction Index

Post by Dade »

Miclazz wrote: Thu May 14, 2020 4:01 pm How do you recommend treating the material for a bubble in the liquid? Adding a sphere with a glass material and a IOR of 1?
Yes, it should work fine. Just use appropriate priorities so the bubble "wins" over the liquid volume.
Miclazz wrote: Thu May 14, 2020 4:01 pm Let me finish by saying that I am thoroughly enjoying Luxcore and Blender and completely amazed that this is freeware. Luxcore is AWESOME. I come from a long history of interest in CGI and rendering. I used to work on many packages from as early as the '90s - always looking to get more realism, but because I work in engineering and design field we ended up using KeyShot because of the ease of use and quick results that could be generated.

This all started with trying to find a Lego CAD for my son, which lead me to Mecabricks and I was blown away by the realistic renders it could generate, which led me to Blender (which was free to try!), which lead me to try render light to refract through a glass prism (didn't happen), which lead me to Luxcore. What an awesome rabbit hole :D. The depth of your product and the stunning realism you can achieve has hooked me, and I've spent the better part of COVID Quarantine learning Blender and Luxcore. All I can say is WOW, and well done. I have become a huge fan. Keep up the amazing work you do.
Thanks :D
Support LuxCoreRender project with salts and bounties
Post Reply