|
|
||
|---|---|---|
| .. | ||
| README.md | ||
| gunung_lemongan.glb | ||
| gunung_semeru.glb | ||
| mountain.gltf | ||
| pantai_tlepuk.glb | ||
| pantai_watu_godeg.glb | ||
| puncak_b29.glb | ||
| ranu_kumbolo.glb | ||
| ranu_pani.glb | ||
| ranu_regulo.glb | ||
README.md
AR 3D Models
This directory contains 3D models for Augmented Reality visualization in the Explore Lumajang AR application.
Model Requirements
- Format: GLB (.glb) or GLTF (.gltf) with external assets
- Optimization: Mesh and texture optimization is critical for mobile performance
- File Size: Keep individual models under 10-15 MB
- Polygons: 10,000-50,000 triangles per model
- Textures: Use compressed formats (WebP or ASTC)
Available Models
waterfall.glb
- Representation of Tumpak Sewu Waterfall
- Suggested scale: ~2-3 meters in AR
- Color scheme: Blues and greens with water effects
mountain.glb
- Representation of Mount Semeru
- Suggested scale: ~3-4 meters in AR
- Color scheme: Grays and browns with snow effects
lake.glb
- Representation of Ranu Kumbolo Lake
- Suggested scale: ~2 meters in AR
- Color scheme: Blues with reflective water
waterfall2.glb
- Representation of Kapas Biru Waterfall
- Suggested scale: ~2-3 meters in AR
- Color scheme: Turquoise with tropical vegetation
village.glb
- Representation of Ranu Pani Village buildings
- Suggested scale: ~2 meters in AR
- Color scheme: Traditional architecture colors
Creating or Acquiring 3D Models
Option 1: Free 3D Model Websites
- Sketchfab: https://sketchfab.com (filter by GLB format)
- Poly Haven: https://polyhaven.com/models
- TurboSquid Free: https://www.turbosquid.com/Search/3D-Models/free
- CGTrader Free: https://www.cgtrader.com/free-3d-models
Option 2: Creating Your Own
- Blender: Free 3D modeling software (blender.org)
- Meshmixer: For model cleanup and optimization
- Substance Painter: For texturing
Option 3: AI Generated Models
- Meshy AI: Generates 3D models from text descriptions
- DreamFusion: Generates 3D from text
Optimization Pipeline
- Model Creation: Create or download your model
- Cleanup: Remove unnecessary geometry and materials
- Decimation: Reduce polygon count using tools like Meshmixer
- Baking: Bake textures to reduce material complexity
- Compression: Export as GLB with compression enabled
- Testing: Load in AR and verify performance
Using gltf-transform for Optimization
# Install gltf-transform
npm install -g @gltf-transform/cli
# Compress a model
gltf-transform optimize input.gltf output.glb
# Simplify geometry
gltf-transform simplify input.gltf output.glb --ratio=0.5
Using Blender for Optimization
- Import your model
- Select all meshes
- Decimation modifier (target face ratio: 0.5-0.8)
- Remove unused materials
- UV optimize if needed
- Export as GLB
Loading Models in AR
Models are loaded automatically when entering AR view. The app will:
- Detect if ARCore is supported
- Initialize AR session
- Wait for plane detection
- Allow user to place model on detected surface
- Provide gesture controls for manipulation
Troubleshooting
Model not appearing
- Check file exists in assets/models/ directory
- Verify path in destination_service.dart matches filename
- Check console logs for loading errors
- Ensure model has valid materials
Model appears distorted
- Check UV coordinates in Blender/3D editor
- Verify normals are calculated correctly
- Try reimporting and checking textures
Performance issues
- Reduce polygon count further
- Compress textures more aggressively
- Reduce animation complexity
- Check Material complexity
Integration with App
Models are loaded via ar_flutter_plugin. The app handles:
- Model loading from assets
- Gesture-based transformation (rotate, scale, move)
- Plane detection and placement
- Real-time rendering
To add a new model:
- Place GLB/GLTF file in this directory
- Update
destination_service.dartwith path - Test in AR view