You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot understand PBRInstancedMaterial. Is it a simple shader to replace lightEntity? Is there a simply way to set Env Light such as "lightEntity = new Qt3DCore::QEntity(camera())"? I saw the color information has been transferred to Klein::ConcretePointsRenderer/Klein::ConcreteLinesRenderer, and so each geometry owns its material. Thanks!
// Add PBR material
auto pointsMaterial = new Klein::PBRInstancedMaterial(rootEntity);
pointsMaterial->setUseInstanceColor(true);
pointsMaterial->setRoughness(1.0f);
pointsMaterial->setMetalness(0.0f);
pointsMaterial->setEnvLightBrdf(brdfMap);
pointsMaterial->setEnvLightIntensity(1.0f);
The text was updated successfully, but these errors were encountered:
Hi @zhangfq-chemistry, PBRInstancedMaterial uses gpu instancing to render a bunch of meshes with different transform matrices, which is exactly what ConrectePoints/Lines do (render lots of spheres or cylinders). Environment lighting is another issue. I sort of just hacked the envlight properties into the PBR materials by adding the QParameters into BasePBRMaterial in order to update the uniform buffers. The way I did it is because, as long as I recall, it's a bit hard to update the uniform buffers without a material like QEnvironmentLight by only using the qt3d public api. Maybe you could give it a try though.
I cannot understand PBRInstancedMaterial. Is it a simple shader to replace lightEntity? Is there a simply way to set Env Light such as "lightEntity = new Qt3DCore::QEntity(camera())"? I saw the color information has been transferred to Klein::ConcretePointsRenderer/Klein::ConcreteLinesRenderer, and so each geometry owns its material. Thanks!
// Add PBR material
auto pointsMaterial = new Klein::PBRInstancedMaterial(rootEntity);
pointsMaterial->setUseInstanceColor(true);
pointsMaterial->setRoughness(1.0f);
pointsMaterial->setMetalness(0.0f);
pointsMaterial->setEnvLightBrdf(brdfMap);
pointsMaterial->setEnvLightIntensity(1.0f);
The text was updated successfully, but these errors were encountered: