Skip to main content

csgo_item_previewmodel

Point Entity

A model entity that can be used for items (weapons/props) in ui maps.

Keyvalues

  • Render Mode (rendermode) <Choices>
    Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.

    • Normal
    • Color
    • Texture
    • Glow
    • Solid
    • Additive
    • Additive Fractional Frame
    • World Space Glow
    • Dont Render
    • Dev Visualizer
  • Render FX (renderfx) <Choices>

    • Normal
    • Slow Pulse
    • Fast Pulse
    • Slow Wide Pulse
    • Fast Wide Pulse
    • Slow Strobe
    • Fast Strobe
    • Faster Strobe
    • Slow Flicker
    • Fast Flicker
    • Slow Fade Away
    • Fast Fade Away
    • Slow Become Solid
    • Fast Become Solid
    • Constant Glow
    • Distort
    • Hologram (Distort + fade)
    • Cull By Distance (TEST)
    • Spotlight FX
    • Fade Near
  • FX Amount (0 - 255) (renderamt) <Integer>
    The FX amount is used by the selected Render Mode.

  • FX Color (R G B) (rendercolor) <Color255>
    The FX color is used by the selected Render Mode.

  • Disable Receiving Shadows (disablereceiveshadows) <Boolean>

  • Start Fade Dist (fademindist) <Float>
    Distance at which the overlay starts to fade (-1 = subtract from fademaxdist).

  • End Fade Dist (fademaxdist) <Float>
    Maximum distance at which the overlay is visible (0 = don't fade out).

  • Culling Behaviour (object_culling) <Choices>
    Modifies culling behaviour when the object is small / distant

    • Default
    • Smaller than default
    • Much smaller than default
    • When extremely small
  • Render to Cubemaps (rendertocubemaps) <Boolean>
    If true, this geometry renders into baked cube maps

  • Lightmap Static (lightmapstatic) <Choices>
    Determines if this geometry be considered static & cast shadows/bounce light when baking lightmaps?

    • No
    • Yes
    • Bounce Only
  • World Model (model) <Studio>

  • Skin (skin) <MaterialGroup>
    Some models have multiple versions of their textures, called skins.

  • Body Groups (bodygroups) <BodyGroupChoices>

  • Cast Shadows (disableshadows) <Choices>
    Used to disable shadow casting from this entity.

    • Enabled
    • No Shadows
    • Only Realtime Shadows
    • Only Baked Shadows
    • Enabled
    • No Shadows
    • Only Realtime Shadows
    • Only Baked Shadows
  • Add Attribute (add_attribute) <String>
    Will add an additional attribute that AI/player entities can query when checking props for information (ex: 'DogToy' or 'GrabbableResource')

  • Add Modifier (add_modifier) <String>
    Will add this modifier when the entity spawns.

  • Name (targetname) <TargetSource>
    The name that other entities refer to this entity by.

  • World Model (model) <Studio>
    Overriden by game code.

  • Animgraph (animgraph) <AnimGraph>
    Specify animgraph resource. Overridden if the model is changed by game code.

  • Weapon State (weapon_state) <AnimGraphEnum>
    Weapon specific animgraph. Should be set to 'inspect' for weapon preview. Set by game code for weapons.

  • Model Scale (model_scale) <Float>
    Initial scale for the model.

  • Default Animation (DefaultAnim) <Sequence>
    The name of the idle animation that this prop will revert to whenever it finishes a random or forced animation. This setting is ignored for models with an animgraph when Use Animgraph is enabled.

  • Reset Model on Spawn (reset_model_on_spawn) <Boolean>
    Clear this model when the entity spawns. Used for previewing a specific model in hammer but populating the actual model based on player equipment.

Inputs

  • Alpha <Integer>
    Set the sprite's alpha (0 - 255).

  • Color <Color255>
    Set the sprite's color (R G B).

  • Skin <Integer>
    Changes the model skin to the specified number.

  • DisableShadow <Void>
    Turn shadow off.

  • EnableShadow <Void>
    Turn shadow on.

  • AlternativeSorting <Boolean>
    Used to attempt to fix sorting problems when rendering. True activates, false deactivates

  • SetRenderAttribute <String>
    Set the value of a render attribute used in material dynamic expressions. Examples: $myfloat=0.25 $myfloat4=1.0,0.0,1.0,1.0

  • ClearRenderAttribute <String>
    Remove a render attribute previously set by SetRenderAttribute, restoring it to its previous value.

  • SetItem <Void>
    Set the itemid for this preview.

Outputs

  • OnIgnite <Void>
    Fired when this object catches fire.

  • OnDestructiblePartDestroyed <Cpp>\