Dear All,

I am working on a project in which I have to apply texture (via png file) to the GridGeometry.

To apply the Texture, I am using the DiffuseMap property of materials. As shown in the following code

Qt Code:
  1. Model {
  2. id: model;
  3. visible: true
  4. scale: Qt.vector3d(100.0, 100.0, 100.0)
  5. geometry: GridGeometry {
  6. horizontalLines: 40
  7. horizontalStep: 0.1
  8. verticalLines: 40
  9. verticalStep: 0.1
  10. }
  11.  
  12. materials: [
  13. DefaultMaterial {
  14. id: material;
  15. Texture {
  16. id: baseColorMap
  17. source: "qrc:/Images/gradient_texture.png"
  18. }
  19. blendMode: DefaultMaterial.SourceOver;
  20. lighting: DefaultMaterial.FragmentLighting;
  21. opacity: 1.0;
  22. diffuseMap: baseColorMap
  23. }
  24. ]
  25. }
To copy to clipboard, switch view to plain text mode 

However, the texture of GridGeometry is not changing.

I have searched online extensively for this issue, but I have not found anything useful for this issue. Can somebody please point me in the right direction?

Thank you for your time!