### Asset Spawning & World Streaming Documentation Source: https://mhcpcreators.github.io/worlds-documentation/docs Guides and resources for implementing asset spawning for dynamic gameplay and world streaming for large-scale experiences in Horizon Worlds. ```markdown ## Asset spawning & world streaming _Build bigger, more interactive experiences in Horizon Worlds by mastering two essential systems: Asset Spawning and World Streaming._ In this practical, step-by-step walkthrough, _MHCP mentor SeeingBlue_ guides you through both tools. You’ll learn how to use asset spawning for dynamic gameplay and implement world streaming for massive scale and performance, finally giving you the power to move beyond static environments. 📚 **RESOURCES & DOCUMENTATION** **➡️ Spawning & Despawning Assets:** https://developers.meta.com/horizon-worlds/learn/documentation/vr-creation/scripting/spawn-despawn-assets-horizon-worlds **➡️ World Streaming:** https://developers.meta.com/horizon-worlds/learn/documentation/typescript/asset-spawning/world-streaming ``` -------------------------------- ### MHCP Worlds Documentation Links Source: https://mhcpcreators.github.io/worlds-documentation/docs A collection of links to various documentation and resources for MHCP Creators, including publishing checklists, planning guides, and creator manuals. ```html * [MHCP Publishing Checklist.pdf](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2FMHCP_Publishing_Checklist.pdf) * [MHCP WorldPlanningGuide.pdf](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2FMHCP_WorldPlanningGuide.pdf) * [plan your world game design & monetization sheet](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fplan-your-world-game-design-%26-monetization-sheet.md) * [publishing checklist for Horizon Worlds](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fpublishing-checklist-for-Horizon-Worlds.md) * [world building & pre production guide](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fworld-building-%26-pre-production-guide.md) * [worlds creator manual essentials made easy](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fworlds-creator-manual-essentials-made-easy.md) * [worlds workarounds](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fworlds-workarounds.md) ``` -------------------------------- ### Color Palette & Vertex Tuning Source: https://mhcpcreators.github.io/worlds-documentation/docs Guide on utilizing color palettes and performing vertex tuning for Worlds asset creation. ```Blender # Color Palette & Vertex Tuning: # Color Palette: # - Use Blender's color management settings to define and apply consistent color schemes. # - Create custom color ramps or use pre-defined palettes. # Vertex Tuning: # - In Edit Mode, select vertices. # - Use tools like 'Smooth Vertices' or manually adjust vertex positions. # - Vertex colors can be used for special effects or material variations in Worlds. ``` -------------------------------- ### Importing Images and Texture Animation Source: https://mhcpcreators.github.io/worlds-documentation/docs Guide on how to import images into Worlds and apply them as textures, including setting up texture animations. ```TypeScript // Assuming 'Texture' and 'Material' classes are available // Load an image const texture = await Texture.load("path/to/your/image.png"); // Create a material const material = new Material(); material.setTexture(texture); // Apply material to a mesh mesh.setMaterial(material); // Example of simple texture animation (e.g., scrolling) let scrollOffset = 0; function animateTexture() { scrollOffset += 0.01; material.setScrollOffset(scrollOffset); requestAnimationFrame(animateTexture); } animateTexture(); ``` -------------------------------- ### Custom Skydomes Guide Source: https://mhcpcreators.github.io/worlds-documentation/docs Instructions for creating and implementing custom skydomes for cinematic environments in Worlds. ```Blender # Creating Custom Skydomes: # 1. Model a large sphere or cube in Blender. # 2. Unwrap the UVs of the sphere/cube. # 3. Create or find a high-resolution panoramic image (equirectangular). # 4. Apply the panoramic image as a texture to the inside faces of the sphere/cube. # 5. Ensure the material uses an emission shader or similar to light the scene. # 6. Export the skydome model and texture. ``` -------------------------------- ### TypeScript Basics for Worlds Source: https://mhcpcreators.github.io/worlds-documentation/docs Beginner-friendly introduction to TypeScript for developing within the Worlds platform. Covers fundamental concepts and syntax. ```TypeScript console.log("Hello, Worlds!"); function greet(name: string): string { return `Hello, ${name}!`; } let message = greet("Creator"); console.log(message); ``` -------------------------------- ### Blender Tips for Horizon Assets Source: https://mhcpcreators.github.io/worlds-documentation/docs Specific tips and tricks for using Blender to create optimized assets compatible with the Horizon platform. ```Blender # Blender Tips for Horizon Assets: # - Polycount: Keep polygon counts reasonable for performance. # - UV Mapping: Ensure clean UV layouts without overlapping for textures. # - Normals: Recalculate normals (Shift+N in Edit Mode) to ensure correct shading. # - Scale: Apply scale (Ctrl+A -> Scale) before exporting. # - Origin Point: Set the origin point appropriately (e.g., at the base of the model). # - Export Settings: Use appropriate export formats (e.g., FBX) and check export options for compatibility. ``` -------------------------------- ### MHCP Creator Resources Source: https://mhcpcreators.github.io/worlds-documentation/docs Links to essential resources for MHCP Creators, including Meta's official Horizon Worlds documentation, creator manuals, and community forums. ```html [Creator Docs](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fget-started.md) [Meta Docs](https://developers.meta.com/horizon-worlds/learn) [Creator Manual](https://github.com/MHCPCreators/horizonCreatorManual) [Forums](https://communityforums.atmeta.com/t5/Creator-Forum/ct-p/Meta_Horizon_Creator_Forums) [Contribute](https://mhcpcreators.github.io/worlds-documentation/docs.html#docs%2Fmanuals-and-cheat-sheets%2Fcontribute-to-creator-documentation.md) ``` -------------------------------- ### Page Navigation and Contribution Source: https://mhcpcreators.github.io/worlds-documentation/docs Information about the page's origin, contribution guidelines, and links to related community resources. ```html ← Previous Next → ### On this page Built by MHCP Creators • [GitHub](https://github.com/MHCPCreators/worlds-documentation) • [Forums](https://communityforums.atmeta.com/t5/Creator-Forum/ct-p/Meta_Horizon_Creator_Forums) • [ ](https://www.youtube.com/@metahorizoncreatorprogram) ``` -------------------------------- ### Custom UI API Introduction Source: https://mhcpcreators.github.io/worlds-documentation/docs Introduction to the Custom UI (CUI) API for creating interactive user interfaces within Worlds. ```APIDOC Custom UI (CUI) API: // Create a new UI element CUI.createElement(type: string, properties: object): UIElement - Parameters: - type: The type of UI element (e.g., 'button', 'text', 'image'). - properties: An object containing initial properties for the element. - Returns: The created UIElement. // Append a UI element to the screen CUI.appendChild(element: UIElement): void - Parameters: - element: The UIElement to append. // Update UI element properties UIElement.setProperties(properties: object): void - Parameters: - properties: An object containing properties to update. // Example Usage: let myButton = CUI.createElement('button', { text: 'Click Me', onClick: () => console.log('Button clicked!') }); CUI.appendChild(myButton); ``` -------------------------------- ### Copilot for Worlds Desktop Editor & VSCode Source: https://mhcpcreators.github.io/worlds-documentation/docs Discover how to leverage Copilot for faster coding within the Worlds desktop editor and Visual Studio Code, improving development efficiency. ```TypeScript // Example of using Copilot suggestions in Worlds scripting // This snippet is a placeholder as the actual code is not provided in the input. // Copilot can assist with generating code based on comments or existing code. // // Function to create a new object // function createObject(name: string, position: { x: number, y: number, z: number }) { // // Copilot might suggest the following line: // // return new GameObject(name, position); // } ``` -------------------------------- ### Roads & Fences in Horizon Paths Source: https://mhcpcreators.github.io/worlds-documentation/docs Tutorial on creating roads and fences for path systems within Horizon Worlds. ```Blender # Creating Roads and Fences: # Roads: # - Use curves or Bezier curves to define path shapes. # - Convert curves to meshes and extrude for thickness. # - Apply textures for asphalt or ground materials. # Fences: # - Model fence posts and railings. # - Use array modifiers for repeating sections. # - Consider using instancing for performance if creating many similar fence segments. ``` -------------------------------- ### JSON PPVs and Versioning Source: https://mhcpcreators.github.io/worlds-documentation/docs Explanation of how to use JSON for Property-Parameter Values (PPVs) and implement versioning strategies in Worlds projects. ```JSON { "version": "1.0.0", "description": "Configuration for World settings", "settings": { "gravity": 9.81, "skybox": "default_sky", "lighting": { "sunDirection": [0.5, 0.5, -1], "ambientIntensity": 0.3 } }, "parameters": { "playerSpeed": { "value": 5, "type": "float", "min": 1, "max": 10 } } } ``` -------------------------------- ### Optimizing IWP Assets Source: https://mhcpcreators.github.io/worlds-documentation/docs Strategies for optimizing Imported Worlds Platform (IWP) assets to ensure peak performance within Worlds environments. ```Blender # Optimizing IWP Assets: # - Reduce vertex count where possible without sacrificing visual quality. # - Optimize UV layouts to minimize texture memory usage. # - Use efficient material setups; avoid excessive texture maps. # - Implement Level of Detail (LODs) for complex models. # - Bake lighting and textures where appropriate. # - Ensure correct scale and orientation before export. ``` -------------------------------- ### Blender Basics for Worlds Assets Source: https://mhcpcreators.github.io/worlds-documentation/docs Fundamental concepts of using Blender for 3D modeling, including UV unwrapping, essential for creating assets for Worlds. ```Blender # Blender Basics: # - Navigation: Middle Mouse Button (Orbit), Shift + Middle Mouse Button (Pan), Scroll Wheel (Zoom) # - Object Mode vs. Edit Mode: Tab key to switch. # - Extrude: E key in Edit Mode. # - Scale: S key. # - Rotate: R key. # - Grab/Move: G key. # UV Unwrapping: # 1. In Edit Mode, select faces to unwrap. # 2. Press U to open the UV Mapping menu. # 3. Choose an unwrapping method (e.g., 'Unwrap', 'Smart UV Project'). # 4. Adjust UVs in the UV Editor window. ``` -------------------------------- ### TypeScript Best Practices Source: https://mhcpcreators.github.io/worlds-documentation/docs Guidelines and best practices for writing efficient and maintainable TypeScript code for Worlds projects. ```TypeScript // Use clear and descriptive variable names let playerHealth: number = 100; // Prefer const over let when the variable will not be reassigned const MAX_PLAYERS: number = 10; // Use interfaces for defining object shapes interface Player { id: string; name: string; score: number; } // Avoid any type when possible // let data: any = fetchData(); ``` -------------------------------- ### Worlds TypeScript API 2.0 Tips Source: https://mhcpcreators.github.io/worlds-documentation/docs Learn 15 tips and tricks for using the Worlds TypeScript API version 2.0 to enhance your scripting capabilities within the Worlds platform. ```TypeScript // Example of a TypeScript API usage // This snippet is a placeholder as the actual code is not provided in the input. // Refer to the documentation for specific API calls and examples. // import { World } from 'worlds-api'; // const world = new World(); // world.loadAsset('myAsset'); ``` -------------------------------- ### PlayerControls API Source: https://mhcpcreators.github.io/worlds-documentation/docs Documentation for the PlayerControls API, enabling interaction and control over player actions within Worlds. ```APIDOC PlayerControls API: // Get the current player's input state PlayerControls.getInputState(): InputState - Returns: An object containing current input states (e.g., movement, actions). // Set the player's movement direction PlayerControls.setMovementDirection(direction: Vector3): void - Parameters: - direction: A Vector3 representing the desired movement direction (normalized). - Description: Controls the player's movement in the world. // Trigger a player action PlayerControls.triggerAction(actionName: string): void - Parameters: - actionName: The name of the action to trigger (e.g., 'jump', 'interact'). - Description: Executes a predefined player action. ``` -------------------------------- ### Using LODs for Performance Source: https://mhcpcreators.github.io/worlds-documentation/docs Explanation of how to use Level of Detail (LOD) systems to improve the performance of Worlds by dynamically adjusting model complexity. ```Blender # Implementing LODs in Blender: # 1. Create multiple versions of a model with decreasing polygon counts (LOD0, LOD1, LOD2, etc.). # 2. Name the objects clearly, e.g., 'MyModel_LOD0', 'MyModel_LOD1'. # 3. Parent all LOD versions to an empty object or a base model. # 4. Export the entire hierarchy. The Worlds engine will typically handle the LOD switching based on distance. ``` -------------------------------- ### GenAI Scripting with TypeScript Source: https://mhcpcreators.github.io/worlds-documentation/docs Explore how to use Generative AI (GenAI) for scripting in Worlds, focusing on TypeScript for enhanced functionality and creative possibilities. ```TypeScript // Example of GenAI-assisted TypeScript scripting in Worlds // This snippet is a placeholder as the actual code is not provided in the input. // GenAI tools can help generate complex scripts or suggest optimizations. // // Generate a script for a dynamic environment element // // Prompt: "Create a TypeScript function that makes a tree sway in the wind." // // Copilot/GenAI might provide: // function swayTree(treeObject: GameObject, windStrength: number) { // // ... implementation for swaying animation ... // } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.