Creating 2D sprites that show through walls.

Heavy_4HTD

L1: Registered
Dec 16, 2023
2
0
Hello.

I want to add 2D sprites to my map that are similar to the sprites shown on players behind walls in the Passtime gamemode (sprites that show through walls and scale with distance from player to the entity).

Like these
20231216153929_1.jpg

With these sprites, I want to create player markers that would show the location of two randomly chosen players.

I've tried using the env_sprite entity with the Render Mode property set to Glow. In this render mode, the sprite does scale with distance, but it doesn't show through walls and the sprite turns darker the further away the player is from it.

Up Close
20231216164131_1.jpg

At Distance
20231216164203_1.jpg


Is there any way to achieve this effect without using Passtime gamemode logic ?
 

Tiftid

the Embodiment of Scarlet Devil
aa
Sep 10, 2016
612
476
I've heard that parenting something to an info_particle_system entity will make it always render, even through walls.
For the distance scaling, you're on the right track with the Glow rendermode.

Another way to make something always render is to put it in the 3D skybox - however, everything in the 3D skybox must render behind the main map. This is actually how Idolon did that "wallhack" koth map 10 years ago - the whole visual representation of the map is in the 3D skybox, so it always renders behind the players and you can seemingly see the players through walls.
 

Heavy_4HTD

L1: Registered
Dec 16, 2023
2
0
$ignorez in a vmt file should work
The sprite I used in the preview images (passtime_ball.vmt) already has Ignore Z set to true.
I've heard that parenting something to an info_particle_system entity will make it always render, even through walls.
Tried it, sadly it didn't work. Parented the sprite to an info_particle_system, it didn't render at all.
Another way to make something always render is to put it in the 3D skybox - however, everything in the 3D skybox must render behind the main map. This is actually how Idolon did that "wallhack" koth map 10 years ago - the whole visual representation of the map is in the 3D skybox, so it always renders behind the players and you can seemingly see the players through walls.
The map looks pretty cool, but it wouldn't work for my use case. I only want to show the location of 2 players at any given time.



I tried setting the env_sprite's Render Mode to Solid and Size of Glow Proxy Geometry to -1, and that did give me a sprite that renders through walls. The problem now however is that entities and players aren't rendered when they're not in an area visible by the player.