Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Qt Quick 3D - Simple Fog Example

Demonstrates how to enable fog in the 3D scene.

This example demonstrates the usage of the SceneEnvironment's fog property. The scene contains a number of instanced spheres, with controls that can be used to tune the various properties of the Fog object.

Fog {
    id: theFog

    enabled: cbFogEnabled.checked
    depthEnabled: cbDepthEnabled.checked
    heightEnabled: cbHeightEnabled.checked
    transmitEnabled: cbTransmitEnabled.checked

    density: valDensity.value
    depthNear: valDepth.first.value
    depthFar: valDepth.second.value
    depthCurve: valDepthCurve.value
    leastIntenseY: valHeightMin.value
    mostIntenseY: valHeightMax.value
    heightCurve: valHeightCurve.value
    transmitCurve: valTransmitCurve.value
}

Example project @ code.qt.io

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded