Khai-J-Bach opened this issue on Aug 27, 2010 · 1684 posts
rty posted Thu, 16 September 2010 at 4:44 AM
Quote - tried exporting my Nuka Cola bottle to Lux. BB is right, the glass material isn't working for it. You can't see the cola inside the bottle. Oh, well. Probably I was getting way too ambitious.
That's not normal; Glass is an old material and working; Could it be you have a double IoR, and light gets lost inside your glass? (Sorry, can't see your picture, there is a "maturity" filter blocking people who aren't members.)
Anyway, if your glass and liquid meshes are really perfectly aligned (no spaces), you can indeed try the glass2 material. Prepare to rip out some hair though.
The material syntax would be something like that:
MakeNamedMaterial "MyMaterial" "string
type" ["glass2"]<br></br>
"bool architectural" ["false"]<br></br>
"bool dispersion" ["false"]<br></br><br></br>
# Volume 'TheWorld'<br></br>
Texture "Scene:named_volumes:2.tex:value"
"fresnel" "constant"<br></br>
"float value" [1.0]<br></br>
MakeNamedVolume "TheWorld" "clear"
"texture fresnel"
["Scene:named_volumes:2.tex:value"]<br></br>
"color absorption" [0.0 0.0 0.0]<br></br><br></br>
# Volume 'MyGlass'<br></br>
Texture "Scene:named_volumes:1.tex:value"
"fresnel" "constant"<br></br>
"float value" [1.5]<br></br>
MakeNamedVolume "MyGlass" "clear" "texture
fresnel" ["Scene:named_volumes:1.tex:value"]<br></br>
"color absorption" [0.9 0.6 0.2]
The problem is you need to declare those volumes also in the mesh, too (in the .lxo file), and so far we haven't tried that, so I can't tell you how it works exactly. It seems to be straightforward, like adding some lines on the material naming of the mesh:
NamedMaterial "MyMaterial"<br></br>
Exterior "TheWorld"<br></br>
Interior "MyGlass"
Don't ask me how to do this for 3 volumes (air-glass, glass-liquid, liquid-air)!...