DEV Community

Cover image for 🛰️ Turning Solar Panel Images into 3D Models on Maps: My End-to-End Experience
M.Azeem
M.Azeem

Posted on

🛰️ Turning Solar Panel Images into 3D Models on Maps: My End-to-End Experience

📌 Introduction

In my recent project, I tackled an exciting challenge: transforming 2D images of solar panels into interactive 3D models and visualizing them on a map with accurate geolocation. This task is particularly useful for solar energy companies, industrial monitoring, and remote inspection platforms.

This article documents my journey, from research and tools to implementation and lessons learned.


🎯 The Goal

I wanted to build a system in which:

  1. Users upload one or multiple images of a solar panel setup (drone-captured or ground images).
  2. The system generates a 3D model or point cloud from those images.
  3. That model is then rendered on a map (like Google Maps or MapLibre) at a specific location.

This would make it easier for technicians or stakeholders to remotely inspect solar installations.


🧱 The Tech Stack

Here’s the stack I explored and used:

Functionality Tool
Frontend Next.js, TailwindCSS
Image Upload React + Form Handling
3D Model Generation Meshroom (AliceVision), TripoSR
3D Rendering Three.js, GLTFLoader
Map Visualization Deck.gl + MapLibre (Open Source alternative to Mapbox)
Hosting 3D Models Firebase Storage or S3
Backend (Optional) Node.js / Python API for processing

🖼️ Step 1: Uploading Images

Users can upload multiple images from different angles of the solar panel. I used a standard file input component with drag-and-drop support in React:

<input type="file" multiple accept="image/*" onChange={handleUpload} />
Enter fullscreen mode Exit fullscreen mode

I stored these images temporarily and passed them to the backend.


🧠 Step 2: Generating 3D Models from Images

This was the most complex part. I explored several options:

🔧 Option A: Meshroom (Open Source Photogrammetry)

Meshroom is a powerful open-source tool that uses photogrammetry to convert multiple images into:

  • Sparse/dense point clouds
  • Mesh (.obj, .gltf, .glb)

It requires a local or server-side installation, and you can automate it using the CLI:

docker run -v $(pwd)/images:/data/images -v $(pwd)/output:/data/output \
  alicevision/meshroom \
  meshroom_photogrammetry --input /data/images --output /data/output
Enter fullscreen mode Exit fullscreen mode

⏳ Downside: High computation cost, GPU recommended

🤖 Option B: AI-Based 3D Model Generation

For smaller models or single images, I explored:

  • TripoSR – fast, Hugging Face-ready 3D generator
  • Luma AI – cloud-based photorealistic 3D generation
  • GET3D (NVIDIA) – works well for shapes

🧪 I used TripoSR locally to generate .glb models and it worked well for solar panel-like structures.


🧳 Step 3: Hosting the Model

Once I had a .glb or .gltf file, I uploaded it to a public bucket (Firebase Storage or S3), making it accessible for frontend rendering.


🗺️ Step 4: Displaying the 3D Model on the Map

I used the combo of:

  • MapLibre GL JS (free, Mapbox-compatible)
  • deck.gl (Uber's visualization framework)
  • Three.js for 3D model rendering

Sample Integration:

import { Map } from 'react-map-gl';
import { SimpleMeshLayer } from '@deck.gl/mesh-layers';

const meshLayer = new SimpleMeshLayer({
  id: 'solar-model',
  data: [{ position: [-122.4, 37.8] }],
  mesh: await loadGLBModel('solar-panel.glb'),
  getPosition: d => d.position,
  sizeScale: 10,
});

<DeckGL
  layers={[meshLayer]}
  initialViewState={{ latitude: 37.8, longitude: -122.4, zoom: 15 }}
  controller={true}
>
  <Map mapLib={maplibregl} mapStyle="https://.../style.json" />
</DeckGL>
Enter fullscreen mode Exit fullscreen mode

💡 Challenges I Faced

Challenge Solution
3D model generation took time Used cloud compute & caching
Not enough angles for some images Advised users to upload more images
Large .glb files Compressed using Blender or mesh decimators
Rendering lag on map Lazy load and level of detail (LOD) logic

✅ Final Results

  • Solar panel image ➝ 3D .glb model ➝ Interactive map marker
  • Real-time geolocation + 3D inspection
  • Entire flow works from a browser + backend pipeline

🚀 Future Improvements

  • Integrate WebAssembly-based 3D generation (on-device)
  • Use AI to enhance poor-angle images
  • Add annotation tools for panels (measure, tag, comment)
  • Batch processing for industrial solar farms

📝 Final Thoughts & What’s Next

Working on this idea gave me a glimpse into how technology can transform how we build and maintain renewable energy projects. Creating 3D solar panel visualizations isn’t just cool — it’s practical, scalable, and the future.
I plan to expand this by:

  • Automating model generation from uploaded drone images.
  • Switching from Google Maps to CesiumJS for handling bigger solar sites.
  • Creating a dashboard for visual inspection and analysis.

📍Conclusion

This project helped me explore a powerful cross-section of computer vision, 3D graphics, and web-based GIS. The idea of showing real-world solar infrastructure in 3D is not just cool—it’s practical and scalable for solar energy and infrastructure companies.

If you're interested in building something similar, feel free to reach out or check the resources below.


🔗 Useful Links

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.