Giter Club home page Giter Club logo

heatmap-unity's Introduction

Unity Heatmap

About

Unity Heatmap is a Unity3D package built with C#. It allows recording of different Vector3 positions for different events(for example movement, some in-game events, or positions of points on another object where to player’s camera is facing), storing it, calculating, and then visualizing it with the usage of the heatmap.

A heatmap (or heat map) is a data visualization technique that shows the magnitude of a phenomenon as color in two dimensions (or sometimes in three dimensions ). This package offers a heatmap that is highly configurable and can deal with big amounts of data.

   

Settings

Screenshot 2023-01-01 at 18 04 59

Button - Load events from a file

Loads events from file with provided path and stores data in memory. After reading the event you will see options in the "Events" setting.

Button - Initialize particle system

Creates and configures particle system for heatmap on this game object. You should activate it if you changed the configuration of the heatmap (such as particle distance or particle size) in run-time.

Button - Generate heatmap

Adds events to heatmap and calculates color for its particles.

Button - Reset heatmap values

Resets the color of particles in the heatmap to default

Events

Here you can choose, which events from the provided file should be visualized

Distance between particles

This setting changes the distance between particles. A smaller distance will result in more particles in total and worse performance, but a smoother heatmap.

After changing this setting "Initialize particle system" MUST be called.

Particle size

Changes the size of each particle. Mostly changes how smooth the heatmap looks and if doesn't have gaps between particles. If performance is important for big heatmaps particle size and distance between particles should be increased (fewer particles in total).

After changing this setting "Initialize particle system" MUST be called.

Coloring Multiplier

Changes how much each event changes the color of particles near it (depending on distance, but this value is the maximum value). For bigger data sets should be decreased, and for a smaller increases.

Coloring Distance

Changes distance in which each event changes particle color.

Gradient

The gradient is used after the calculation of the color value of the particle (from 0 to 1) to determine its real color.

You can use your gradients, different colors, different transparency, etc.

Color Cutoff

This setting is used to determine which particles with which color value should be displayed, and which not.

If the value here is 0.5 all particles with a color value less than 0.5 will not be displayed.

Setting this value at 0 will display ALL particles and particles with 0 color value (no event data nearby).

Height in particles

By default, heatmap uses the size of its game objects collider to calculate the height of the heatmap in particles.

If you want to override it this setting can be used (also should be used, when the "Ignore height for color calculations" setting is on)

After changing this setting "Initialize particle system" MUST be called.

Ignore height for color calculations

If this setting is on, the y-axis of events data will be ignored while calculating the heatmap. That will result in a flat(2D heatmap).

If this setting is off, generated heatmap will be 3D.

TODO at some point

  • Add in memory recorder and reader (to record and visualize data without writing to file = live)
  • Maybe debug and test performance to allow even bigger data sets / faster visualization
  • ...... more than just heatmap as visualization option ?

heatmap-unity's People

Contributors

kdanik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

heatmap-unity's Issues

Add 2D option

Could you add the option for a heatmap to be 2d: use only x and y coordinates, display on 2d view correctly

Displaying heatmap on 3D objects

Hi!

Thank you for developing this tool!

I'm trying to display a heatmap on the surface of a 3d object (i.e. a sphere) based on the number of other smaller 3d objects (i.e. cubes) inside the sphere at a given location. I'm wondering if there is a way to use your tool to accomplish this task or a similar one.

Missing files and cannot save setting

Hi, Can you provide the Packages and ProjectSettings folders? Without those two files, I had huge trouble to try the project on my own machine. I can not generate sln file and every time I enter play mode the setting under heatmap controller will be reset.

IOException: Sharing violation on path

Hi there!

When using specifically the Character recorder, and not the camera recorder with the 'generate new file if it doesn't exist' causes a sharing violation on path error. This error does not appear for the camera recorder with 'generate new file if it doesn't exist' ticked.

Hope this helps squash a bug!

Custom Shape

Hey Eric! Can you please guide me with projecting onto a custom shape? For example a brain shaped 2D image.

3D heatmap doesn't seem to work

Hey,

I had to point out 2 separate issues (the first one being the main issue highlighted here):

1.When disabling the "ignore height for color calculations", the particles don't seem to render at all.

  1. Also is there a reason why HeatmapController.cs line 103, the if statement checking "eventData.IsCurrentlyDisplayedOnHeatmap" only displays when the eventData is currently on the heatmap? How would the event data be added to the heatmap if it only waited for it to currently be on the heatmap?

Scalability issue

Hi there!

I'm trying to use this asset for an open-world game. The issue with it however is that this doesn't scale very well. Using it in large scenes will either cause a lot of lag when trying to generate particles or throw an Out of Memory error.

Do you think you could update this to add some sort of scalability so it can work for bigger maps? Maybe a shader could work or splitting up different sections into smaller particle areas automatically.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.