# Hyperfy Discord - 2025-02-21

## Overall Discussion Highlights

### Technical Developments
- **iPhone Compatibility**: Ashxn announced iPhone worlds now run without external dependencies. A critical bug was identified where some environment configurations used "http://" instead of "ws://" for WebSocket URLs, causing loading issues specifically on iOS/Safari devices.
- **Player Effects System**: Player effects were enhanced by moving them to the control system (`control.setEffect()`) to prevent players from getting stuck when apps are modified. A new "turn" option was added that makes players face the camera direction.
- **Solana Integration**: Peezy improved the Solana branch with networked wallets, allowing player-to-player token transfers. The token program now dynamically retrieves metadata tokens.
- **Infrastructure Plans**: Ash outlined plans for enhancing Hyperfy engine's deployment flexibility, moving from "standalone" mode to a more scalable architecture with separated client and server components, configurable through environment variables.
- **World Maintenance**: Users discussed the `world-clean.mjs` script that removes unnecessary leftovers after deleting models, with some concerns about it potentially deleting important files.

### 3D Asset Optimization
- Extensive discussions about optimizing 3D assets for web-based environments, with focus on polygon count reduction, material management, and draw calls.
- Sceth demonstrated polygon reduction techniques using ZBrush, reducing a 105k poly building to 60k while maintaining visual fidelity.
- TheMattEmpire shared a solution for converting A-Pose to T-Pose for VRMs in Blender, which fixed avatar rigging issues.
- Ashxn explained that in game engines, meshes can only have one shader, and multiple materials on one object in Blender actually represent multiple meshes elsewhere.
- Hyperfy automatically instances duplicated objects, significantly improving performance.

### AI and Agents
- Discussion about the differences between fine-tuning AI models versus providing context, with maximus sharing resources explaining when to use RAG versus fine-tuning.
- Context works well for dynamic information while fine-tuning is better for establishing baseline behaviors.
- Debate about why more people aren't doing fine-tuning despite the agent hype, with devilsadvocate.sol suggesting it feels like "black magic" to average users.

### Community Projects
- **Road Kit**: TheMattEmpire is developing a modular road kit with grid-compatible components, including spiral sections and chicanes that align properly with the grid system.
- **Object Avoidance**: MayD524 demonstrated object avoidance using raycasting.
- **Custom Backend**: Bear connected Hyperfy to a custom backend for board games.
- **Documentation Search**: Omka created a documentation search tool.
- **Animation Conversion**: Saori shared scripts to convert Mixamo animations to Hyperfy-compatible GLB format.

### Platform Updates
- Hyperfy V2 has been released over a month ago and no longer requires an NFT to create worlds.
- Documentation efforts were highlighted with mentions of hyperfy.how, a documentation site built with Starlight Astro.

## Key Questions & Answers

### Development
- **Q**: How do we add an image into a UI window?  
  **A**: Use UIImage with properties like source, width, height, and fit (Omka provided code examples).

- **Q**: How can I make an action ontrigger activate by player proximity and not E?  
  **A**: Use rigidbody with collider instead of an action, set rigidbody.onTriggerEnter (Ashxn).

- **Q**: How do we set up automatic doors with triggers?  
  **A**: Use sphere colliders for distance-based triggering (Ashxn).

- **Q**: Are there docs for packaging things into .hyp apps?  
  **A**: After writing a script with a model, click the download button (Saori).

- **Q**: How to get rid of the grass in Hyperworld?  
  **A**: Currently requires self-hosting to turn off, need to make a no-code way (Ashxn).

### 3D Design
- **Q**: How do materials and meshes relate to draw calls?  
  **A**: Each material creates a separate draw call; if you have multiple materials on one mesh in Blender, it's actually multiple meshes in the game engine (Ashxn).

- **Q**: How does instancing work in Hyperfy?  
  **A**: Duplicated objects are automatically instanced; you can place hundreds of objects and they'll be optimized (Ashxn).

- **Q**: What are the recommended material counts for optimization?  
  **A**: 1 is best, 2-3 is fine, 3-6 is on the high end, 6+ is heavy (ii_cable_ii).

- **Q**: How many polygons is acceptable for a large building asset?  
  **A**: For a building with complex architecture, 60-100k triangles is reasonable; reducing below 60k starts to lose shape fidelity (Ashxn).

### Platform
- **Q**: Do we still need an NFT to create a world?  
  **A**: For v2, no. Use https://hyperfy.how/setup/quickstart/ to set up locally then self-host or go to https://hyperworld.host/ (Omka).

- **Q**: When was Hyper v2 released?  
  **A**: Over a month ago (HPrivakos).

- **Q**: How does PhysX work in the browser without an Nvidia card?  
  **A**: It's just a physics engine running on the CPU. The WASM implementation supports SIMD though it could theoretically use the GPU (Ashxn).

### AI
- **Q**: What is the difference between fine-tuning and providing context to an AI model?  
  **A**: Fine-tuning changes the weights of the model to better suit specific needs, while context provides information without changing the model itself (maximus).

## Community Help & Collaboration

1. **UI Image Implementation**  
   **Helper**: Omka  
   **Helpee**: devilsadvocate.sol  
   **Context**: Needed to display images in UI  
   **Resolution**: Provided code examples for UIImage implementation with properties explanation

2. **3D Asset Optimization**  
   **Helper**: voxvienne  
   **Helpee**: treed  
   **Context**: Optimizing a complex 3D architectural asset with high triangle count  
   **Resolution**: Provided feedback on optimization strategies and examples of well-optimized architectural assets

3. **Polygon Reduction**  
   **Helper**: Sceth iii  
   **Helpee**: treed  
   **Context**: Optimizing a high-poly architectural model  
   **Resolution**: Used ZBrush to reduce polygon count from 105k to 60k while maintaining visual fidelity and preserving UVs

4. **Animation Conversion**  
   **Helper**: Saori  
   **Helpee**: Community  
   **Context**: Converting Mixamo animations to Hyperfy format  
   **Resolution**: Shared Blender scripts for batch converting FBX to GLB

5. **VRM Rigging Fix**  
   **Helper**: TheMattEmpire  
   **Helpee**: Community  
   **Context**: Converting A-Pose to T-Pose for VRMs in Blender  
   **Resolution**: Shared a method from egneva.com that fixes avatar rigging issues when VRMs are rigged in A-Pose but need T-Pose

6. **AI Fine-tuning vs RAG**  
   **Helper**: maximus  
   **Helpee**: devilsadvocate.sol  
   **Context**: Understanding when to use fine-tuning vs RAG  
   **Resolution**: Shared educational resources including a DataCamp tutorial and Medium article explaining the differences and use cases

7. **World Maintenance**  
   **Helper**: 0mka  
   **Helpee**: general hyper  
   **Context**: Explaining the purpose and usage of world-clean.mjs script  
   **Resolution**: Explained it cleans unnecessary leftovers and shared the GitHub link

## Action Items

### Technical
1. **UI Improvements**
   - Implement "hidden" property for props to hide audio files in inspector (Ashxn)
   - Add cooldown property to actions, different from duration (devilsadvocate.sol)
   - Create no-code way to toggle grass/ground visibility (Ashxn)
   - Include grid app in default world generation (Ashxn)
   - Auto refresh the app list page when adding or deleting models to a world (general hyper)

2. **Infrastructure**
   - Implement client/server separation with configurable connection strategies (ash)
   - Fix WebSocket URL configuration in environment files (ash)
   - Investigate world-clean functionality issues (ash)
   - Fix issue where clean world kills some hosted worlds (HypPrivakos)
   - Consider making world clean run during server startup (with caution) (ash)

3. **3D Asset Optimization**
   - Implement T-Pose conversion for VRMs in Blender using rest pose method (TheMattEmpire)
   - Optimize road assets by creating prefabs in Blender (ii_cable_ii)
   - Use vertex colors as an alternative to textures (Sceth iii)
   - Reduce material count on models (Sceth iii)

4. **Road Kit Development**
   - Add up and down slopes to the road kit (TheMattEmpire)
   - Add ramps to the road kit (0mka)
   - Add portals to the road kit (0mka)
   - Ensure VR compatibility with 90 FPS browser performance (TheMattEmpire)

5. **AI Integration**
   - Review tests comparing models tuned on context versus untrained models passed the same context (devilsadvocate.sol)
   - Fix callback for animation end to better time projectile spawns (Shiffty)

### Documentation
1. **Asset Optimization**
   - Document UIImage properties and usage (Omka)
   - Create comprehensive animation library (peezy)
   - Update VRM documentation with performance rankings (TheMattEmpire)
   - Update asset optimization guide for Hyperfy v2 (Omka)
   - Create tutorial on rigging and animation for Hyperfy avatars (᲼)

2. **Platform Documentation**
   - Consolidate documentation from various sources into hyperfy.how (Omka)
   - Create in-world documentation with UI components and search functionality (Omka)
   - Review and potentially incorporate content from jin's v1 docs (jin)

3. **AI Documentation**
   - Create explanatory materials about the difference between context and fine-tuning (devilsadvocate.sol)

### Feature Requests
1. **Platform Features**
   - Implement more robust permissions system with role-based access (devilsadvocate.sol)
   - Support for CSS keyframes and SVG in UI (Omka)
   - Add animation dropdown/string field for easy animation access (Saori)
   - Add Accurig support to Hyperfy tools (TheMattEmpire)
   - Implement angle-based snap points for props (Omka)
   - Add material optimization tool (TheMattEmpire)

2. **Infrastructure Features**
   - Implement R2 asset strategy (ash)
   - Implement remote database strategy (ash)
   - Create resolver connection strategy (ash)
   - Explore "FTAAS" (Fine-Tuning as a Service) (MetaMike)

3. **Token Economy**
   - Implement token flywheel when market recovers (coard)
   - Develop hyperfy game loops for token mining (maximus)