# Hyperfy Discord - 2025-02-20

## Overall Discussion Highlights

### Development & Architecture
- **Hyperfy Engine Architecture Update**: Ash outlined a plan to make the Hyperfy engine more flexible in deployment configurations, supporting scaling through ephemeral containers that can launch on-demand and shut down when not in use. The architecture divides functionality into configurable Client and Server components. ([🏗│infra](#hyperfy---infra))
- **v0.7.0 Release**: A major update was announced with numerous new features including build-mode controls with flying capability, WebXR support, player effects (anchor, emote, snare, freeze), and enhanced UI elements. ([📣│announcements](#hyperfy---announcements))
- **Networking Architecture**: Developers collaborated on proper broadcasting of changes between server and client, particularly for implementing a chat clear command for admins. ([💻│developers](#hyperfy---developers))
- **Venice AI Integration**: Discussion about integrating Venice AI with an existing application, potentially bypassing Eliza to connect directly to Venice AI. ([🤖│agents](#hyperfy---agents))

### 3D Asset Optimization
- **Architectural Asset Optimization**: Detailed conversation between treed and voxvienne about optimizing 3D architectural assets, discussing triangle count reduction techniques and file size considerations. ([⚡│general](#hyperfy---general))
- **VRM Avatar Standards**: Discussions about VRM avatar optimization, including material count recommendations (1 is best, 2-3 is fine, 3-6 is high end, 6+ is heavy) and adding spring bones for dynamic elements like earrings. ([🧊│3d-design](#hyperfy---3d-design))
- **Draw Calls & Materials**: Clarification that each material creates a separate draw call regardless of shader sharing, with recommendations for optimizing performance. ([🧊│3d-design](#hyperfy---3d-design))
- **Road Assets**: TheMattEmpire showcased highly optimized road assets for Hyperfy spaces with 90-degree angles, snaps, LODs, and shared textures. ([🎨│showcase](#hyperfy---showcase))

### App Behavior & Issues
- **Object Manipulation Issues**: Discussion about how apps maintain their scale, position, and rotation when being moved or duplicated. When an object is picked up, the script stops running, causing it to revert to its original state. ([🐞│issues](#hyperfy---issues))
- **Persistent Storage**: Conversation about implementing persistent storage for app states, with ash mentioning plans to create a persistent storage solution apps can use. ([🐞│issues](#hyperfy---issues))
- **iPhone Compatibility**: Issues with v2hyperfy worlds on iPhones were identified and fixed by ash. ([🐞│issues](#hyperfy---issues))

### UI & Interaction
- **Proximity-Based Triggers**: Developers discussed how to make action triggers activate by player proximity instead of button presses, using rigidbody with colliders and onTriggerEnter events. ([💻│developers](#hyperfy---developers))
- **UI Image Display**: Sharing of code examples for UIImage implementation with properties like src, width, height, and objectFit. ([💻│developers](#hyperfy---developers))
- **Hyperfy Token (HYPER/SOL)**: Users tracked the price of Hyperfy token through bot commands, with market cap fluctuating between approximately 9.1M and 10.9M SOL. ([🪙│hyper](#hyperfy---hyper))

## Key Questions & Answers

### Development
- **Q**: How do I implement a chat clear command?  
  **A**: Add a clear method to Chat.js with broadcast parameter, handle server authorization, and implement network packet handling. (Ashxn)

- **Q**: How can I scale objects in builder mode?  
  **A**: Use shift+scroll to adjust scale, but applying the scale when placing objects requires additional implementation. (Saori)

- **Q**: Is VR working on the dev branch?  
  **A**: Yes, it's working on both dev and main branches, just without controller models. (Ashxn)

- **Q**: Can we get at the database from app script? File system?  
  **A**: Apps can connect to any external service using fetch(). At some point I want to make a persistent storage apps can use. For now, devs can add an endpoint to the server and write to JSON files in the world folder. (ash)

### 3D Design & Assets
- **Q**: How do I add spring bones for earrings in a VRM avatar?  
  **A**: Create new bones by extruding from the head bone in edit mode, position them along the chain links, assign vertex weights, and set them as spring bones in the VRM panel. (ii_cable_ii)

- **Q**: How many materials should a VRM have for good performance?  
  **A**: 1 is best, 2-3 is fine, 3-6 is on the high end, 6+ is heavy. (ii_cable_ii)

- **Q**: How do draw calls relate to materials and meshes?  
  **A**: Each material creates a draw call, so 1 mesh with 5 materials is 5 draw calls, and 5 meshes with 1 material each is also 5 draw calls. (Ashxn)

- **Q**: What's the optimal size for a building that is already a world for itself?  
  **A**: Filesize is good, triangle count for an entire environment also, but optimization helps when creating larger scenes with multiple buildings. (𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)

- **Q**: Does it matter the file format that I bring it to Blender from NomadSculpt (GBL, FBX, or OBJ)?  
  **A**: Do a GBL. (ii_cable_ii)

### UI & Interaction
- **Q**: How do I display images in a UI window?  
  **A**: Use UIImage component with properties like src, width, height, and objectFit. (Omka)

- **Q**: How can I make an action trigger activate by player proximity instead of pressing E?  
  **A**: Don't use an action; instead create a trigger zone using rigidbody with a collider and set rigidbody.onTriggerEnter. (Ashxn)

- **Q**: How do I fix the stuttering on a moving platform?  
  **A**: Make your rigidbody type='kinematic' as anything moving shouldn't be static. (Ashxn)

- **Q**: How do I use onPointerDown on a UIView?  
  **A**: It works with the crosshair pointer, check the stereo app on hyperworld for reference. (Ashxn)

## Community Help & Collaboration

### Technical Implementation Support
- **ii_cable_ii** provided detailed step-by-step instructions to **devilsadvocate.sol** for adding spring bones to VRM avatar earrings, explaining how to extrude bones, assign weights, and set up spring bones in the VRM panel.

- **Ashxn** helped **devilsadvocate.sol** implement a chat clear command with proper networking, explaining how to simplify code by using broadcast parameter and removing redundant changes to GUI.js and ChatBox.js.

- **Omka** assisted **devilsadvocate.sol** with displaying images in UI by sharing code examples for UIImage implementation with properties and demonstrating it working with IPFS URLs.

- **Ashxn** guided **Omka** in creating proximity-based triggers by explaining how to use rigidbody with collider instead of action triggers.

### 3D Asset Optimization
- **𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎** provided feedback to **treed** on mesh optimization for architectural assets and shared examples of well-optimized architectural assets.

- **Sceth iii** helped **treed** reduce polygon count on a 3D building, using Zbrush to reduce the model from 105k to 60k polygons while maintaining visual fidelity.

- **decentralize*** shared tools with **treed** for 3D asset optimization, including gltf.report for RAM size analysis and glb.babylonpress.org for texture optimization.

- **Ashxn** explained to **TheMattEmpire** how materials and draw calls work, clarifying that materials equal draw calls and explaining how instancing affects performance.

### Architecture & Infrastructure
- **ash** provided the community with a detailed architecture plan for flexible deployment configurations of the Hyperfy engine, explaining how to scale through ephemeral containers.

- **MetaMike** offered to help **saltï** set up an agent that bypasses Eliza and connects directly to Venice AI for better integration.

## Action Items

### Technical
- Implement chat clear command for admins (devilsadvocate.sol)
- Add scaling functionality to builder mode (devilsadvocate.sol)
- Fix ChatBox.js redundancy with GUI.js (peezy)
- Implement rotation on all axes in builder mode (Saori)
- Create reconnect button to avoid full page refresh (devilsadvocate.sol)
- Implement spring bones for earrings in VRM avatars (ii_cable_ii)
- Convert A-pose VRMs to T-pose by setting current position as rest pose in Blender (TheMattEmpire)
- Reduce polygon count on 3D models while maintaining visual fidelity (Sceth iii)
- Optimize materials by using vertex colors instead of multiple materials when possible (Sceth iii)
- Use instancing for duplicate objects to improve performance (Ashxn)
- Add scale memory for apps when moving them, similar to how position/rotation are remembered (ash)
- Create persistent storage for apps to use (ash)
- Auto-refresh the app list page when adding or deleting models to the world (general hyper)
- Fix iPhone compatibility issues with v2hyperfy worlds (ash)
- Implement environment variable configuration for Client/Server modes (ash)
- Develop resolver connection strategy (ash)
- Implement R2 asset strategy (ash)
- Create remote database strategy (ash)
- Fix character model in Blender (attach wig to body and fix anatomical issues) (saltï)
- Design system for generating avatars from component layers while ensuring 3D printability (treed)
- Fix DOM-related memory leak (ash)
- Fix artificial 2s delay on file uploads (ash)

### Documentation
- Add version number display to help identify build version (MetaRick)
- Create comprehensive VRM avatar creation guide for Blender (TheMattEmpire)
- Update performance guidelines for VRMs with current specifications (maximus)
- Add Accurig as an alternative rigging tool alongside Mixamo (TheMattEmpire)
- Create a GitHub project board to track enhancement requests (Saori)
- Document environment variable configuration (ash)
- Add thenounproject.com to resource list for design assets (maximus)
- Add missing `num` utility documentation for generating random numbers (ash)

### Feature
- Add cooldown property to actions separate from duration (devilsadvocate.sol)
- Expose boxgeometry from three.js to create architecture on the fly (Saori)
- Implement Sims-style wall builder tool (devilsadvocate.sol)
- Add support for WebP format in UIImage (Omka)
- Add an "optimize" button to find and consolidate duplicate materials across GLBs (Ashxn)
- Create a way to view and manage nested linked hyps in the app explorer (Omka)
- Implement a way to maintain script-defined scale when repositioning objects (general hyper)
- Add persistent state for apps that doesn't reset when moving or changing settings (Shiffty)
- Set up an agent to bypass Eliza and connect directly to Venice AI (MetaMike)
- Integration with Venice AI character chat (saltï)
- Implement volume support for HDR (TheMattEmpire)
- Add pay phone hyps with agent using whisper triggers (Omka)
- Create variant road angles for more interesting tracks in Hyperfy (TheMattEmpire)
- Create additional road-related assets (fences, signs) with same optimization standards (TheMattEmpire)
- Mint "Crown Hall" as 1/1 NFT while providing free STL file on 3D printing platforms (treed)