HeatMap (Processor of players pass-by-spot levels) [TOOL]

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

HeatMap (Processor of players pass-by-spot levels) [TOOL]

Post by PrinceOfFunky »

So, recently I thought about "porting" this(which shows what spots of a 360° video people see the most/less):
Spoiler
Image
into Unreal/Editor.
It gets the player coordinates in a map every few(with a specified interval), saves them as lights in a T3D file, these lights will have fog enabled and will turn from blue(few players pass by that spot) to red(many players pass by that spot), (if there'll be a red zone surrounded by blue zones/less red zones, then it could mean the players camper over there).
This can be useful for mappers for creating maps basing on players behaviour.

Speed up the vid if you are bored or if you don't want to be bored lol.
YvD7y2ka9Bc

I'm still making it, the distance check I talk about in the vid is already done now.
User avatar
XaNKoNII
Skilled
Posts: 217
Joined: Wed Jun 09, 2010 12:29 pm
Personal rank: Phenix
Location: Portugal

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by XaNKoNII »

I´m very interested in this, one thing is making a Level with a plan in mind and trying subtly to make players pay atention to the way point, another is what they actually feel atracted to or see.
I Think I´ll try to use this as I release each SP map I have planed

___Edit___

This just reminded me of something, In The Source engine i know there is a trigger actor that is designed to, as the player looks into a specific location it triggers an event. Does the Unreal engine support such mechanism? I´m asking because i´m seeing here that you managed to make it register the "looking" location and destination (where seeing has stopped, for lack of a better term) is it possible to make a trigger being activated by this mechanism?
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by PrinceOfFunky »

UPDATE: Implemented the main feature(the color gradient). (If you just want to see the end result, go straight to the end)
MyFRxR_JeXY
XaNKoNII wrote:This just reminded me of something, In The Source engine i know there is a trigger actor that is designed to, as the player looks into a specific location it triggers an event. Does the Unreal engine support such mechanism? I´m asking because i´m seeing here that you managed to make it register the "looking" location and destination (where seeing has stopped, for lack of a better term) is it possible to make a trigger being activated by this mechanism?
Are you talking about this?
User avatar
Barbie
Godlike
Posts: 2911
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by Barbie »

XaNKoNII wrote:there is a trigger actor that is designed to, as the player looks into a specific location it triggers an event. Does the Unreal engine support such mechanism?
From what I know there is no such event in Actor's base functions. But you can realize that by polling in Timer() for example together with the Actor.PlayerCanSeeMe() function. (Yes, I know that polling is inefficient...)
"If Origin not in center it be not in center." --Buggie
User avatar
sektor2111
Godlike
Posts: 6435
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by sektor2111 »

PlayerCanseeMe works only until 1600 UU range - READ FORUM, dudes. If you think at HUGE maps you can forget it, it will always be False at 2000 UU. As for default UE without XCGE this is a trouble maker, so if you are busily engaged to work on a "how to crash" servers mod then you must find that people will not go interested regarding to their first blabbering spree. Ah yes, Linux is not sensitive here but that function still do sucks - developers from EPIC I think did not even tested it properly before releasing this Engine, and UTPG were doing nothing than triggering to crash faster here. Are you happy now ?
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by Spectra »

Barbie wrote:
XaNKoNII wrote:there is a trigger actor that is designed to, as the player looks into a specific location it triggers an event. Does the Unreal engine support such mechanism?
From what I know there is no such event in Actor's base functions. But you can realize that by polling in Timer() for example together with the Actor.PlayerCanSeeMe() function. (Yes, I know that polling is inefficient...)
Using Trace() function it can be done. But I think using trace is not good for very long distances.
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by nogardilaref »

Spectra wrote: Using Trace() function it can be done. But I think using trace is not good for very long distances.
Trace would only be to check for occlusion at most though, the first check to be made would be the actual direction the player is facing, within a peripheral margin (using the Dot operator), so it would be a purely mathematical check first, and only if that one returned to be true, then a trace could be made, so in practice the Trace wouldn't need to be done most of the time.
If the effect was limited to a certain radius (set by the mapper), then the radius check would be the first and it would be even more efficient.
JackGriffin
Godlike
Posts: 3776
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by JackGriffin »

Heat maps are interesting, we used that data a lot in DayZ to suggest places to hide tents and safes that were seldom traveled. I'm not really sure in UT how much information it would give you though. UT maps overall just aren't large enough to generate data that's useful. I can see it being interesting in some CTF maps but I'm not sure how applicable the data would be to something concrete.

It might be more useful to log the number of times an item is picked up during a match and see if any sort of balancing can be done there. Move the higher value targets out from the middles and cause the map to be more covered.
So long, and thanks for all the fish
Red_Fist
Godlike
Posts: 2194
Joined: Sun Oct 05, 2008 3:31 am

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by Red_Fist »

The way you do it would be to make the lines, blue or red change to other colors to see the paths that are being used or not.
The other thing is the bots are motivated by several factors, if you don't solve why they don't go that way, showing a diagnostic chart will be of little help knowing why bots do the way they do .

On the map I am doing now, I am using in a few spots a property changer to lower the maxdesireability after they open a certain door or something, so they don't want that last item as much to keep the bots flowing ahead through the map.

Along with 2 monster waypoints as a booster, those work here for what I am doing since they will go back to that location, but then move on to the next room-area.
The bots always gotten through but this map it takes them a long time, so I needed to motivate, and demotivate them.
Binary Space Partitioning
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by PrinceOfFunky »

Red_Fist wrote:The other thing is the bots are motivated by several factors
Well it won't be for bots, that was just a test since I couldn't use it online of course. I could add the data about what property was changed on the player, but ok I could put that data inside the file but how to visualize it in the editor, there wouldn't be a way unless we would use Blender and import the map from UT and then import the lights.
Red_Fist
Godlike
Posts: 2194
Joined: Sun Oct 05, 2008 3:31 am

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by Red_Fist »

Maybe show the path lines in-game, then let the bots go and see if you can make indicators on those lines itself. A sprite with a number or change the line somehow. :noidea
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6435
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by sektor2111 »

Man, let's not make Bot's hobby a predictable insanity, people will ambush them easy. I can illustrate their RouteCache as in MHBotyman4 if you saw it, but this will be like a cheat. They are already stupid enough, doesn't worth to spam map with crap. Else it would be needed some ScriptedTexture for seeing who is the seeker, imagine now 8 Bots and their routes. It will be a lousy letter soup at nodes harder to read and even bugging human's visibility - already showing nodes (generally hidden actors) might be annoying. Think twice.
If you have a hobby with Bot things let's start a thread and work together at something on purpose. Some map a la 2017, a little madness at Bot, depressions (suicidal on a trap Zone complaining about a thug life, etc.). But we don't need to continue OFF-Topic here. Let Funky to do stuff for "player-only" as a permanent UT task which was done since forever - everyone against Bots :omfg: . Have you seen BuilderGun thread ? There is nothing Bot related there as an evidence about "let's block players* otherwise they are too skilled and will kill me" so I need to cheat developing short routes never used by A.I. and all that blocking mess (imagine evil people spamming blocks there, geniuses :loool: :sleep: )...
If you give to player one finger it will bite entire hand abusing stuff - as valid evidence I mention CoopTranslocator which I had to modify because it was often use to telefrag monsters, so player deserve DEATH on demand with 100000 points penalty for Game Stats - now do abuse that... :pfff:
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by PrinceOfFunky »

sektor2111 wrote:Let Funky to do stuff for "player-only" as a permanent UT task which was done since forever - everyone against Bots
Well I didn't know people wanted it for bots too, it's not a problem to put a boolean to enable bots heatmap, just it should be saved in a different T3D just for bots, of course players and bots behaviour are very different from each other lol.
This is a match in AS-Overlord(I spectated so I didn't get count), 10 bots overall, balanced teams, solo 100 and sometimes 10(didn't affect the heatmap that much cause I tried it with slomo 1 before and got similar results).
heatmap_AS-Overlord_14_11_2017.7z
Notice how imperceptible it is to distinguish blue around azure from azure, that's because there was an imbalance of pass-by, which is pretty normal in an Assault gametype since some players need to camper a lot while others need to move a lot, but since most bots campered at nearly the same few locations, the color gradient is imbalanced.
I think this cannot happen with players anyway, it can happen in one match, maybe two, but if you run the heatmap to update for months/years, the campers will probably have low level spots(depending on the gametype etc of course, but in this case I was thinking about vanilla deathmatch with no mutators other than the DMMutator)
(azure is lower than dark blue)
Now, color gradient goes from 134 to 255, I could use the full range(starting from 0) but the beginning of the range is red just like the ending, plus I guess it would be confusional to remember all colors maybe, I'm not sure.
A good data to have would be the "most used weapon in different areas".

Anyway about updates: I'm porting most of the code(like the vectors calculations) into Unreal instead than Java, just because of the walls, imagine there are two locations which are very close and so will merge together as an approximation, well they shouldn't merge if there's a wall in between even if they are very close each other, I cannot stream walls from Unreal to outside, and so all the calculations(at least those of the vectors) will be done in Unreal.
An intermediate file will be created instead of streaming and creating the T3D all at once, since the T3D is human readable, a machine would require more complexity to modify it. Something like a CSV would be good, that file will then be updated time by time, when the mapper will need it, he/she will just need to convert it into a T3D file(of course with a software I'll make).

EDIT: Actually, about the bots, the intermediate file could store a number after a location like 0=player 1=bot, so that there wouldn't be need to enable bots heatmap from Unreal, but the second software I talked about could create a T3D for the players and one for the bots reading from the same intermediate file.
You do not have the required permissions to view the files attached to this post.
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by PrinceOfFunky »

Well, I have a question now, what symbol could not be used to name map files?
I have seen so many map file names with pharentesis and underscores, I'm trying to find a separator to use for heatmap file names.
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: HeatMap (Processor of players pass-by-spot levels) [T

Post by nogardilaref »

I am not sure which characters aren't allowed (or at least strongly advised against), but rather than excluding what you cannot use, it's probably better to opt to use a few and establish a notation instead.
For instance, alphanumeric, underscore and hyphens are allowed, so maybe you should stick with those.