Clocking snippers in the grass
by Johan Carlsson · in Torque Game Engine · 02/24/2006 (2:43 am) · 14 replies
I've been thinking about a FPS problem where snippers hide in the grass.
In close range it works fine but in a distance, view with a scope for instance,
the snipper will be exposed because the grass doesn't due to distance.
Rendering a patch just around the snipper would also give him away because
the patch would be really visible :-)
Well, would it be possible to render an invisablity patch?
E.g. render the grass patch but instead of opaque texture it would render as a transparency mask for the player, mostly hiding him.
I'm not sure how this would look in reality, maybe it just would look stupid, but it might be worth trying.
How would it be possible to implement such a thing?
In close range it works fine but in a distance, view with a scope for instance,
the snipper will be exposed because the grass doesn't due to distance.
Rendering a patch just around the snipper would also give him away because
the patch would be really visible :-)
Well, would it be possible to render an invisablity patch?
E.g. render the grass patch but instead of opaque texture it would render as a transparency mask for the player, mostly hiding him.
I'm not sure how this would look in reality, maybe it just would look stupid, but it might be worth trying.
How would it be possible to implement such a thing?
#2
02/24/2006 (3:59 am)
Wouldnt it be even better to just render the grass that the sniper can see? Then you don't have performance issues with rendering ALL the grass, but the game will look right because youre rendering the grass where the player can see it.
#3
I'd go with Jorgen's suggestion: fade-out or cloak players hiding in grass over a certain distance. To work smoothly, you'd have to do some changes in the source code, so that the fade effect can be tied to distance from the camera and the render distance of the grass around the sniper (so that the sniper becomes more opaque when the grass starts rendering around him again).
02/24/2006 (9:59 am)
I think Johan was talking about the player seeing another player (a sniper) on the grass. Since the fxGrass and fxFoliage are only drawn to a certain distance, the player would see the grass disapepar and could easily spot the sniper.I'd go with Jorgen's suggestion: fade-out or cloak players hiding in grass over a certain distance. To work smoothly, you'd have to do some changes in the source code, so that the fade effect can be tied to distance from the camera and the render distance of the grass around the sniper (so that the sniper becomes more opaque when the grass starts rendering around him again).
#4
Cloakign the player will look like crap and pop the player out of the absorbing nature of the game.
02/24/2006 (10:01 am)
I know exactly what he was talking about. There's no reason he can't just draw that grass.Cloakign the player will look like crap and pop the player out of the absorbing nature of the game.
#5
As far as the original question goes, I'm not sure if it's really possible to do what he wants with the fxfoliagereplicator. I'd suggest putting some interiors with convienient sniping positions in the field instead. Another option would be to modify the foliagereplicator so that it pays attention to "always render zones" or some such, which IMHO would be quite difficult and could cause some major performance issues.
02/24/2006 (10:11 am)
Reading the original title I had a vision of people with scissors hiding in the grass.As far as the original question goes, I'm not sure if it's really possible to do what he wants with the fxfoliagereplicator. I'd suggest putting some interiors with convienient sniping positions in the field instead. Another option would be to modify the foliagereplicator so that it pays attention to "always render zones" or some such, which IMHO would be quite difficult and could cause some major performance issues.
#6
You couldn't go and render grass in an area around a sniper just to hide him--that would be a dead giveaway that the sniper is nearby. You would have to increase your foilage replicator zones to include all possible areas that a sniper could be (in effect, the entire rendered scene) which is not what the intent of the foilage replicator is.
02/24/2006 (11:14 am)
@Chris...you said "render the grass that the sniper can see": but hte problem is not the sniper seeing, it's the sniper being seen.You couldn't go and render grass in an area around a sniper just to hide him--that would be a dead giveaway that the sniper is nearby. You would have to increase your foilage replicator zones to include all possible areas that a sniper could be (in effect, the entire rendered scene) which is not what the intent of the foilage replicator is.
#7
02/24/2006 (11:38 am)
Stephen... The problem is a sniper looking through a sniperrifle and not seeing the grass that is that far away. Hence, if you render the grass that the sniper can see, wether he is looking at another sniper or not, it will always look right.
#8
In the particular example he does state, given two snipers, your solution would work (foilage replicate within the sniper view), but there are quite a few middle cases as well where you are out of foilage render distance, but within "see the guy hiding in the grass" distance which couldn't be solved by just the one solution unfortunately.
02/24/2006 (11:47 am)
Actually, we're both right here (and saying the same thing), since his description of the problem is a bit ambiguous (there are actually TWO snipers in his example if you read between the lines).In the particular example he does state, given two snipers, your solution would work (foilage replicate within the sniper view), but there are quite a few middle cases as well where you are out of foilage render distance, but within "see the guy hiding in the grass" distance which couldn't be solved by just the one solution unfortunately.
#9
If you render all grass that is in your FOV when you're looking through a sniper rifle, everything should appear perfectly.
02/24/2006 (11:49 am)
What middle cases would prevent my solution from working?If you render all grass that is in your FOV when you're looking through a sniper rifle, everything should appear perfectly.
#10
Edit: Spelling
02/24/2006 (12:15 pm)
When people aren't looking through a sniper rifle, but are looking AT anyone that thinks they are hiding in grass because on their system, the grass is rendered due to foilage replication rendering.Edit: Spelling
#11
02/24/2006 (12:17 pm)
Yes, that would present a problem. I suppose it would defeat the purpose of the foliage replicator to draw all the grass in your FOV up to the viewing distance.
#12
Perhaps, define small areas of grass or foliage that are always visible spread throughout the map. This provides many hiding spaces without the performance hit of rendering ALL of your fxGrass in the entire map. The only problem will be that people learn all the good hiding spaces and just hose them down automatically.
02/24/2006 (12:22 pm)
--edit-- Stephen beat me to it.Perhaps, define small areas of grass or foliage that are always visible spread throughout the map. This provides many hiding spaces without the performance hit of rendering ALL of your fxGrass in the entire map. The only problem will be that people learn all the good hiding spaces and just hose them down automatically.
#13
Check out the little known title "Joint Operations: Typhoon Rising".
www.novalogic.com/games.asp?GameKey=JOCA
Snipers that are prone and not moving are cloaked (sort of predator style) and I think it works well. This is balanced against tracers in the world and minimap that make snipers have to stay on the move to avoid detection.
BTW: For those of you that haven't tried it, this is one of my favorite cooperative/competitive team based shooters out there (next to Tribes1 =P). I think it is better than BF42. Huge terrains, tree and grass cover, ground and air vehicles, wide weapon/loadout selection, custom servers/maps, highly dependant upon teamwork. You just have to get over the cheesy name.
-Unk
02/24/2006 (12:40 pm)
@Johan: The cloaking solution does work in terms of design.Check out the little known title "Joint Operations: Typhoon Rising".
www.novalogic.com/games.asp?GameKey=JOCA
Snipers that are prone and not moving are cloaked (sort of predator style) and I think it works well. This is balanced against tracers in the world and minimap that make snipers have to stay on the move to avoid detection.
BTW: For those of you that haven't tried it, this is one of my favorite cooperative/competitive team based shooters out there (next to Tribes1 =P). I think it is better than BF42. Huge terrains, tree and grass cover, ground and air vehicles, wide weapon/loadout selection, custom servers/maps, highly dependant upon teamwork. You just have to get over the cheesy name.
-Unk
#14
(This is really a theoretic discussion for my point of view :-)
Jorgen et al: I don't think fading the player would give the same effect. But I keep that idea for any sneak em up game I might endavour (I'm a big fan of Thief Deadly Shadows :-)
Philip et al: Your suggestions is good pragmatic solutions, but I'm purely theoretical at this point. T.hanks for your input
Unk: Thanks dude, I'll check it out.
02/25/2006 (4:07 am)
Stephen & Chris: Thanks for your feedback. Chris suggestion is a good one (IMO) but as as Stephen points out there will be cases where it would give away a hidden snipper. I would probably implement both my suggestion (if it would work) and Chris solution. The effect would (in my mind anyway) would be that the snipper is cloaked in the same fasion regardless if the grass renders or not. E.g. only fragments of the snipper would be visible, and preferably the fragments would be consistant, as the grass pop in and out of vision.(This is really a theoretic discussion for my point of view :-)
Jorgen et al: I don't think fading the player would give the same effect. But I keep that idea for any sneak em up game I might endavour (I'm a big fan of Thief Deadly Shadows :-)
Philip et al: Your suggestions is good pragmatic solutions, but I'm purely theoretical at this point. T.hanks for your input
Unk: Thanks dude, I'll check it out.
Torque Owner Jorgen Ewelonn
Don't have any code or practical exampels but that is the first thing that springs to mind.
Hope it helps :)