Open tigrazone opened 4 days ago
maybe is more correct way is set ior and transmissionFactor? https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_ior/README.md https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md
my source scene is edit in blender, I will check if it can export ior and transmission
updated three glb to export ior & transmission, and update the model.cpp
Thank you!
For which purposes you plan to use RefractionIndex2? Why not RefractionIndex?
For which purposes you plan to use RefractionIndex2? Why not RefractionIndex?
specific for qx50 scene, the car glass is single layered, ior2 make the refraction ray pass through directly~ a trick, with extra
looks like thinwalled https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md thicknessFactor
// Thin film approximation
if(mat.thicknessFactor == 0.0F && mat.roughness > 0.0F)
{
refractedDir = sampleThinTransmission(data, mat);
}
else
{
refractedDir = sampleSolidTransmission(data, mat, refracted);
}
better way to set bool thinWalled = material.thicknessFactor < 0.011;
because precission issues
and I rewrite in by fork repo
if(mat.thinWalled && mat.roughness > 0.0F)
maybe dielectrics works wrong. because when I just open qx50.glb and start to render by https://github.com/nvpro-samples/vk_shaded_gltfscene and glass rendered w/o issues.
I use previous version of vk_shaded_gltfscene and nvpro_core bacause new version have issues
kitchen scene has strange glass material
I'm importing glb to another raytracer and glass not imported ok.
how to support these glass? can you change scene with extra: "glass"?
For luxball scene I find in code https://github.com/gameknife/gkNextRenderer/blob/b90eb1324c4d8c98cece9128641ad0f1c388fc24/src/Assets/Model.cpp#L245-L248 and do in my renderer code