LogoLogo
API Status
  • 👋Welcome
  • 🌐What is Morpheus Platform?
    • Interoperability
  • â„šī¸Help
    • 📗Glossary
    • 🆘Support
    • Firewall problems
    • EULA
  • CREATION
    • 🎮Unreal Development
      • ⚡Get Started
        • âš’ī¸Download the Editor
        • âĢUpload Content
        • 🌎Creating your own map
        • 📝Morpheus Base Project
        • ❓Differences from Unreal
          • 🧍Character Configuration
        • 📡Morpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • 📚Features & Guides
        • 📒Example Plugin
          • Nameplates
          • In-game roles
        • 🏊Actor Pooling
        • 🔊Audio
        • 🎭Avatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • 🤖Bots
        • đŸŽ™ī¸Chat
          • Unreal Text Chat
        • đŸŽ›ī¸Control Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • 🔉Crowd Audio
        • đŸ¤ŧCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • 🍱Helpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • đŸ–Ĩī¸Loading Screen
        • ⚡Live Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • 🧊MML
        • đŸ•ēMotion Capture
        • 📡Networking
        • đŸ“ĸNotifications
        • Raycastable Crowd
        • 🌐Singletons
        • 📱Streaming & Multiplatform
          • GFN on mobile
        • đŸ–Ĩī¸UI
          • "UI Mode"
        • đŸ—ƒī¸User Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • đŸ“ēVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • 🐞Visual Debugging
          • Inspector
        • đŸĒŸWeb UI
        • 💠Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • âœˆī¸World Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • 🔑Workflows
        • â†—ī¸Upgrade the Editor
          • đŸ–Ĩī¸Version History
        • âš™ī¸Editing Project Settings
        • 📈Profiling
        • đŸ§ēMarketplace Importing
        • đŸ› ī¸Extra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • 📚Useful Reading
        • ⭐Best Practices
    • 🌎Worlds
      • 📩Invite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • 📅Running events
      • ✅Large scale events - Checklist
      • 👾Anti-Cheat (EAC)
      • 🎮Player Entry
        • 📱React Native
        • Steam
        • đŸ’ģHardware Reqs
      • đŸŽĨBroadcast
        • 📹OBS Integration
      • Failover
      • 🏁Capacity And Queue Management
  • ADMINS
    • đŸ‘ĒAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • 💲Pricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • âš™ī¸Settings
      • đŸ—ƒī¸Projects
  • APIs and Tooling
    • 👩‍đŸ’ģIntroduction
    • đŸ–Ĩī¸API Reference
      • Accounts
      • Datasources
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • Sessions
      • User Profile
      • World Builder
      • Worlds
    • đŸ“ĻFrontend SDKs
      • 📄Version History
      • Pixel Streaming
    • 🚀Launcher
  • Integrations
    • 📊Analytics
      • Sending events from web
      • 🎮Sending Events from Unreal
    • đŸ’ŦChat
      • 🎮Integrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page
  • Visuals for nearby clients (foreground/LOD0 render target actors)
  • Initial setup for item visuals
  • Making an Item Visuals Class
  • Listening to property updates
  • Equip/Unequip Animations
  • Pose Overrides
  • Visuals for distant clients (background/animated crowd)
  • Setup for animated crowd meshes
  • Playing "use animations"
  • Missing pieces

Was this helpful?

  1. CREATION
  2. Unreal Development
  3. Features & Guides
  4. Inventory
  5. How to Make Devices

Item Visuals

Last updated 1 year ago

Was this helpful?

If you want your made gadget to have visuals that are seen by other clients, follow these steps!

Visuals for nearby clients (foreground/LOD0 render target actors)

Initial setup for item visuals

  • Add an "item visuals details" object to your item PDA's Custom Item Details field.

    • If you're wanting a "gadget in hand", the simplest solution here would be to use the existing BP_ItemVisualsDetails_MeshInHand, which provides some defaults for easy configuration:

      • In the MeshInHand section, you can replace the mesh used (either static mesh or skeletal mesh), modify its material, or change its relative transform and attach socket (the mesh will be transformed and attached to the provided socket on your character's skeleton)

      • All classes provide an Item Visuals Class (extending M2_ItemVisualsBase)

        • This is the object that is spawned on all clients when the item is "active", and is used to actually create the visuals. Any custom behavior required for handling your visuals would be handled here. BP_ItemVisuals_MeshInHand_Default should be enough for most basic use cases - spawning a mesh for players in the foreground & LOD0, and attaching it to the right place. If you need more custom behavior, see Making an Item Visuals Class.

      • Any class extending M2_ItemVisualsGadgetDetails will include animation details:

        • If an Equip Animation is provided, this will be played any time you select/equip the gadget. For more details on how to make equip animations, see Equip/Unequip Animations.

        • If an Unequip Animation is provided, it will be played whenever the gadget is unequipped (returning to no gadget equipped, rather than switching to a different gadget).

        • If a Pose Override Layer is provided, you can swap out the animation set whilst the gadget is in your hand, e.g. changing your upper body pose to be "holding the gadget". For more details on this, see Pose Overrides.

        • NOTE: If using M2_ItemVisualsGadgetDetails, the Item Visuals Class must at least extend M2_ItemVisualsGadget to make the animation changes take effect automatically.

Making an Item Visuals Class

If you want custom behavior that is seen by nearby clients, making a custom child of M2_ItemVisualsBase is the way to go.

There are a number of exposed events that can be implemented to supply your desired behavior:

  • Initialize - called when the class is first created (e.g. when equipping the item)

  • Tear Down - called just before the visuals are removed (when the item is unequipped)

  • Notify Render Target Updated - called when the render target changes, e.g. when switching role, or switching from LOD0 to the animated crowd. This can be used to attach the model to the right place, or show/hide the visuals, depending on whether you need the visuals working in the crowd

  • Notify Network Level Updated - similar to the above, but for network level changing. If you e.g. only want your item present in the network foreground, you can respond to updates here.

  • Notify Details Updated - called when the item's properties have updated. (e.g. by calling InventoryComponent->SetItemProperty). If you want your visuals to respond to some property on the item, you can use this. For more details, see Listening to property updates.

  • Notify Begin Unequip - called when we begin unequipping. We can use this to delay actually removing the visuals, e.g. by first playing an animation. This is handled automatically within classes inheriting from M2_ItemVisualsGadgetDetails. If you do override the unequip behaviour, you will need to make sure to call InformUnequipComplete when done. NOTE: We only trigger this if explicitly unequipping, not if switching from one equipped item to another.

See BP_ItemVisuals_MeshInHand and BP_ItemVisuals_Glowstick_ColorChange for some examples of how these work

Listening to property updates

If you set an item property as Foreground (on the server) or Foreground Client Auth (on the client), it will be reflected in the item visuals

once the property has been set, it can be reachable on the item visuals object, via the NotifyDetailsUpdated event. You can then get the property by calling GetVisualSlotProperty on the Item Visuals Component, using the current item's slot:

Equip/Unequip Animations

If your item PDA's visuals details extends BP_ItemVisualsGadgetDetails and provides an Equip and/or Unequip animation(s), the equip and unequip animations will be played by default.

  • The animations to be played must be "animation montages".

  • The animation should also be set to be "upper body only", so that it looks correct whilst moving. To do that, you need to change the slot to be DefaultGroup.UpperBody

    • NOTE: When you change the slot, your character may end up T-posing. if you move the animation inside the group, it will refresh and fix itself.

  • By default, the gadget visuals will be shown at the start of the equip animation, and hidden at the start of the unequip animation. If you want to show/hide the gadget at a specific point in the animations, you can add the M2 Anim Notify Hide/Show Gadget respectively

Pose Overrides

Some gadgets will want to update your animation set once equipped. We achieve these using the Pose Override Layer field in the BP_ItemVisualsGadgetDetails.

  • The pose override layer is a fresh AnimInstance

    • See ABP_OverrideLayer_GenericGadget for an example.

    • Your "override layer" anim instance will need to implement the ALI_Layers interface, to provide the Animation Layers to override. (These can be controlled in the class settings)

    • For each of the animation layers defined, you can provide an override.

    • If you don't want to override the behavior, pass the input pose straight through.

    • NOTE: Currently we only support overriding the idle animation, or applying a constant override layer to the upper body pose. Further pose overrides beyond these could be doable, but would require modifying the animation blueprints and interfaces. You could provide your own, or the defaults could be extended upon request.

  • The pose is applied at the point NotifyShowGadget is called.

Visuals for distant clients (background/animated crowd)

For characters on the animated crowd, we don't have a lot of the visual polish present for LOD0 actors, such as pose overrides, or equip/unequip animations. Equally, some steps in terms of setup are different:

Setup for animated crowd meshes

  • We need a new item detail added to the PDA: M2_ItemAnimatedCrowdVisualDetails

    • You need to specify a mesh, a socket to attach the model to, and optionally an offset transform.

    • If you are using the same mesh in the crowd and for full actors, the transforms should be the same.

Make sure the static mesh you use has Allow CPUAccess set to true in its details panel. Otherwise you may run into crashes in cooked builds.

Playing "use animations"

You will need to use emotes, since abilities are not supported on the background. See e.g. BP_ItemExecutor_Glowstick_SingleColor - when we "use" the item, we are calling RequestEmoteById.

Missing pieces

  • "Pose Overrides" for the animated crowd is a long way off

  • Adding visuals for items other than your equipped gadgets is a supported extension of the visuals system, but hasn't been done yet.

If you want more customization than is provided here, you can make your own item visuals details class (extending at least M2_ItemVisualsDetails).

If you want your item visuals to respond to details about your item (e.g. the PDA_Item_Glowstick_ColorChange needing to reflect the glowstick's color), you can use item properties (see ).

See for more details on this setup.

🎮
📚
🎒
Attaching static meshes to crowd members
Item Properties
The PDA_Item_Glowstick_ColorChange in action - you can wave it, or select its color, and these changes are seen by other nearby clients
By default, the "mesh in hand" details will create a cube attached to your right hand
The Visual details for PDA_Item_Glowstick_Blue
The mesh used by the blue glowstick item