Prop detail sprite: Difference between revisions
Jump to navigation
Jump to search
Tip:Only use this entity if you are desperate. It is much better to assign a material a %detailtype and let VBSP generate detail sprites itself.
Note:This is an internal entity. When the map is compiled by VBSP, it is processed and then removed; it does not exist when the map is running.
mNo edit summary |
SirYodaJedi (talk | contribs) |
||
(17 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{ent not in fgd}} | ||
{{this is a|point entity|internal=1|name=prop_detail_sprite}} It allows manual insertion of [[Detail props|detail sprites]] into a level. | |||
See [[Detail props#Sprites]] for detailed information about setting up detail props through .VBSP files. | See [[Detail props#Sprites]] for detailed information about setting up detail props through .VBSP files. | ||
{{tip|Only use this entity if you are desperate. It is much better to assign a material a [[Detail props#Usage|%detailtype]] and let VBSP generate detail sprites itself.}} | {{tip|Only use this entity if you are desperate. It is much better to assign a material a [[Detail props#Usage|%detailtype]] and let VBSP generate detail sprites itself.}} | ||
{{ | {{Internal entity note}} | ||
==Keyvalues== | == Keyvalues == | ||
''This entity is not in Valve's FGDs. Its properties must be set with [[SmartEdit]] disabled.'' | {{!fgd}}''This entity is not in Valve's FGDs. Its properties must be set with [[SmartEdit]] disabled.'' | ||
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.}} | {{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.}} | ||
{{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=angles|angle|This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.}} | {{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=angles|angle|This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.}} | ||
{{KV|detailOrientation|intn=detailOrientation|int|See [[Detail props#Sprites|Detail props]].}} | |||
{{KV|position_ul|intn=position_ul|vec2|The location of the sprite's upper left corner, relative to its origin.}} | |||
{{KV|position_lr|intn=position_lr|vec2|The location of the sprite's lower right corner, relative to its origin.}} | |||
{{KV|tex_ul|intn=tex_ul|vec2|The X Y position of the sprite's upper left corner on the detail texture.}} | |||
{{KV|tex_size|intn=tex_size|vec2|The area of the detail texture that should constitute this sprite (dimensions of the sprite in [[texel]]s). See [[Detail props#Sprites]].}} | |||
{{KV|tex_total_size|intn=tex_total_size|int|The width (X-axis resolution) of the detail texture.}} | |||
{{KV Targetname null|hammer only=1}} | |||
==Example== | == Example == | ||
Here is an example of a sprite from a custom .VBSP file. | Here is an example of a sprite from a custom .VBSP file. | ||
< | <syntaxhighlight lang=ini> | ||
RoseFlower | RoseFlower | ||
{ | { | ||
Line 37: | Line 33: | ||
maxangle 70 | maxangle 70 | ||
} | } | ||
</ | </syntaxhighlight> | ||
To place this sprite manually, the entity would be set up in this way: | To place this sprite manually, the entity would be set up in this way: | ||
Line 47: | Line 43: | ||
; <code>tex_size <83 128></code> | ; <code>tex_size <83 128></code> | ||
; <code>tex_total_size <512> </code> | ; <code>tex_total_size <512> </code> | ||
== FGD Code == | |||
{{empty}} | |||
== See also == | |||
* [https://github.com/ValveSoftware/source-sdk-2013/blob/aea94b32cbefeba5d16ef6fc70eff9508cf11673/src/utils/vbsp/detailobjects.cpp#L922 Definition in code] | |||
[[Category:Prop entities|detail sprite]] |
Latest revision as of 06:59, 9 March 2025
prop_detail_sprite
is an internal point entity available in all Source games. It allows manual insertion of detail sprites into a level.
See Detail props#Sprites for detailed information about setting up detail props through .VBSP files.


Keyvalues
!FGDThis entity is not in Valve's FGDs. Its properties must be set with SmartEdit disabled.
- Origin (X Y Z) (origin) <coordinates>
- The position of this entity's center in the world. Rotating entities typically rotate around their origin.
- Pitch Yaw Roll (X Y Z) (angles) <angle>
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
- detailOrientation (detailOrientation) <integer>
- See Detail props.
- position_ul (position_ul) <vector2>
- The location of the sprite's upper left corner, relative to its origin.
- position_lr (position_lr) <vector2>
- The location of the sprite's lower right corner, relative to its origin.
- tex_ul (tex_ul) <vector2>
- The X Y position of the sprite's upper left corner on the detail texture.
- tex_size (tex_size) <vector2>
- The area of the detail texture that should constitute this sprite (dimensions of the sprite in texels). See Detail props#Sprites.
- tex_total_size (tex_total_size) <integer>
- The width (X-axis resolution) of the detail texture.
- Name (targetname) <string>
- Name of this entity. Displayed in Hammer's 2D views and Entity Report. No effect in-game, nor in map compilers.
Example
Here is an example of a sprite from a custom .VBSP file.
RoseFlower
{
sprite "0 0 83 128 512"
spritesize "0.5 0.05 7 13"
spriterandomscale .3
amount 0.02
detailorientation 2
sway 0.2
upright 1
maxangle 70
}
To place this sprite manually, the entity would be set up in this way:
detailOrientation <2>
position_ul <0 13>
position_lr <7 0>
tex_ul <0 0>
tex_size <83 128>
tex_total_size <512>