Activity Log
Notes, thoughts, and insights on 3D development, design, and creative technology
March 2025
Wave Function Collapse Algorithm Implementation
Made significant progress on my procedural city generation project today. Implemented the Wave Function Collapse algorithm in Godot 4 to create near-infinite procedural city layouts with constraints for realistic urban planning.
The key challenge was optimizing the algorithm to work in real-time while still maintaining realistic constraints between buildings. I found that precomputing adjacency rules and caching partial solutions dramatically improved performance.
Here's a snippet of the core algorithm:
func collapse_wave_function(grid): # Find cell with lowest entropy var min_entropy_cell = find_min_entropy_cell(grid) if min_entropy_cell == null: return true # Done! # Pick a random value according to weights var options = grid[min_entropy_cell.x][min_entropy_cell.y].possible_values var selected = pick_random_weighted(options) # Collapse this cell grid[min_entropy_cell.x][min_entropy_cell.y].collapse(selected) # Propagate constraints var queue = [min_entropy_cell] while queue.size() > 0: var current = queue.pop_front() var neighbors = get_neighbors(current, grid) for neighbor in neighbors: var updated = update_neighbor_constraints(grid, neighbor, current) if updated: queue.push_back(neighbor) return collapse_wave_function(grid) # Recursively continue
Next steps: Adding more diverse building types and implementing height variation based on district types.
Optimizing 3D Models for Web Delivery
Working on making the 3D assets from my Riddle Chest project more web-friendly. The challenge is balancing visual quality with load times. I've been experimenting with several optimization techniques:
- Mesh decimation - reduced polygon counts by ~60% with minimal visual impact
- Texture atlas creation - reduced draw calls significantly
- Normal map baking from high-poly models
- DRACO compression for geometry
Results: File size down from 24MB to 3.8MB with only minor visual differences. Initial loading time improved by 78%.
Exploring Diffusion Models for 3D Texture Generation
Been diving into using Stable Diffusion for generating tileable textures for my projects. The initial results are promising but require additional work to make them truly seamless.
Created a custom post-processing pipeline in Python that takes the raw output from the diffusion model and:
- Applies edge blending to create seamless tiles
- Generates normal, roughness, and displacement maps
- Adjusts overall color balance for consistent materials
Best results have come from using specific prompts that describe material properties rather than visual elements. For example, "rough stone surface with medium-sized cracks and granular texture" works better than "stone wall texture".
February 2025
Custom GLSL Shaders for Atmospheric Effects
Working on a custom atmospheric scattering shader for the Solar System visualization project. The goal is to create realistic atmospheric effects for planets without relying on expensive volumetric rendering.
Instead, I'm using a multi-layered approach:
// Atmospheric scattering fragment shader uniform vec3 v3LightPos; uniform vec3 v3InvWavelength; uniform float fCameraHeight; uniform float fOuterRadius; uniform float fInnerRadius; uniform float fKrESun; uniform float fKmESun; uniform float fKr4PI; uniform float fKm4PI; uniform float fScale; uniform float fScaleDepth; varying vec3 v3Direction; varying vec3 c0; varying vec3 c1; void main() { float fCos = dot(normalize(v3LightPos), normalize(v3Direction)); float fRayleighPhase = 0.75 * (1.0 + fCos * fCos); float fMiePhase = 1.5 * ((1.0 - g * g) / (2.0 + g * g)) * (1.0 + fCos * fCos) / pow(1.0 + g * g - 2.0 * g * fCos, 1.5); vec3 color = fRayleighPhase * c0 + fMiePhase * c1; gl_FragColor = vec4(color, color.b); }
Successfully implemented the effect for Earth, but still working on optimizing it for real-time performance on lower-end devices.
Testing Claude API Integration with Godot
Made significant progress on the Godot Claude API plugin today. Successfully implemented the core functionality that allows games to send context to Claude and receive structured responses.
The key breakthrough was figuring out how to parse JSON responses efficiently within the Godot environment and translate them into game events. Created a custom response handler that maps Claude's output to in-game actions.
Current features:
- Async API calls that don't block the main game thread
- Memory management for conversation context
- Structured output parsing for game logic
- Simple node-based interface for designers
Testing with a simple RPG dialogue system shows promising results - NPCs can maintain contextual conversations and react to player actions in meaningful ways.
Exploring Advanced Rigging Techniques
Digging into more advanced character rigging techniques for the Assembly tool. Implemented a modular rigging system that allows for easy swapping of character parts while maintaining animation integrity.
Key learnings:
- Socket-based connection points work well for modular character parts
- Weight painting needs to be consistent across modules for seamless blending
- IK solvers need special handling at connection points
Also experimenting with automated weight painting using geodesic distance calculations, which shows promise for speeding up the rigging process for complex meshes.
January 2025
Local File Manager for AI Projects
Started working on a local file manager specialized for AI asset pipeline integration. The goal is to create a system that can index and organize large collections of 3D assets, textures, and reference materials for easy access by AI tools.
Current functionality:
- Automatic tagging of assets based on file content and metadata
- Vector embedding generation for semantic search
- Thumbnail generation for quick visual browsing
- Version tracking and change history
Next steps will be implementing the API layer for LLM integration and creating a more intuitive UI for filtering and browsing the asset library.
Life Chart Visualization Updates
Enhanced the Life Chart project with new visualization options and data import capabilities. The system can now import CSV data from various life tracking apps and render them in multiple formats.
New visualization types:
- Spiral timeline that shows cyclical patterns across years
- Heat calendar similar to GitHub's contribution graph
- Relationship graphs that show connections between events and people
The most interesting insight from testing with my own data was seeing how certain creative productivity patterns emerge seasonally, with distinct peaks in late winter and early fall.
2025 Projects Planning
Taking some time at the beginning of the year to plan out my major project focuses for 2025:
- Godot Claude API Plugin: Finish development and release open source
- Procedural City Generator: Implement wave function collapse algorithm for building layout
- Assembly: Develop the rigging tools further with AI-assisted weight painting
- AI Asset Manager: Build a robust local system for managing and tagging 3D assets
- VR Sketching Tool: Prototype a VR-based 3D modeling tool focused on intuitive creation
My main focus is on creating tools that make 3D creation more accessible while also pushing the boundaries of what's possible with procedural generation. I'll be documenting the journey of each project here.
December 2024
Year in Review: 3D Development Learnings
Looking back at 2024, it's been a productive year of growth in 3D development. Key achievements and learnings:
- Completed 12 major 3D projects and 8 smaller experiments
- Learned GLSL shader programming to a proficient level
- Migrated from Blender 3.6 to 4.0, adapting to the new geometry nodes system
- Implemented my first fully procedural city generator
- Improved Three.js optimization techniques, reducing load times by 65% on average
Most valuable skill gained: Understanding how to bridge the gap between high-quality 3D assets and web performance requirements. This has completely changed how I approach project planning and asset creation.
Implementing Physically Based Rendering for Web
Working on implementing a custom PBR system for the Riddle Chest project. The challenge is to create physically accurate materials while maintaining good performance on mid-range devices.
My approach uses a simplified Cook-Torrance BRDF with these optimizations:
- Pre-computed environment lighting using spherical harmonics
- Simplified specular calculations for mobile
- LOD system for material complexity based on device capabilities
Finding the right balance between accuracy and performance is tricky, but I'm getting close to a solution that works well across devices.
Next step: Adding subsurface scattering for organic materials, likely using a simplified approximation rather than true volumetric scattering.