A tradesman and his tools

AIM:

Develop the preconditions for creation of tool(s) for visualisation and testing of various aspects of the data (graph nodes, terrain data etc) and approaches (pathfinding path visualisation etc)

CONDUCT:

  • An initial version of TerrainData class was created
  • A simple small (100m x 100m) Unity terrain was created as a base.
  • A script was created to create a TerrainData object from a Unity terrain and height sampling interval space.
  • A debug method was created to visualise the TerrainData (distinct from the terrain object it was taken from) in order to confirm the accuracy of the Unity terrain to TerrainData method.

RESULTS:

The Unity terrain is a small terrain however provides some nice undulations and cover with a central higher area for the enemy location.

Small undulating terrain created in Unity
The 100m x 100m Unity test terrain to be used in simple tests in future.

 

The validity of the TerrainData object drawn the relevant data from the Unity terrain was confirmed through a basic visualisation method; 1m cubes were spawned at each sampled data point.

Initially this was done with 1m samples which effectively recreated the terrain (albeit in a blocky form)

A reconstructed version of the original terrain using Unity cubes
The TerrainData object created with data from the terrain in the previous image visualised with cubes at each sample point at the relevant height. The reconstructed terrain matches the original perfectly.

This was also tested successfully with 5m sample intervals

The original Unity terrain with cubes to visualise the data points at 5m sample height spacing
The same terrain was used to create a TerrainData object with a sample height spacing of 5m. The visualised points conform to the terrain as expected.

Overall the TerrainData object works well and the system of creating a TerrainData object from an existing Unity terrain works well.

The visualisation system needs to be properly implemented as creating a high number of game objects (the cubes) will cripple performance. The goal of these tools is to assist in the testing as opposed to create additional hurdles so this is an important issue.

TIME SPENT:

2 hours (18 hours running total)

FROM HERE:

  • Develop a separate node visualisation script (one that is not system crippling like instantiating (tens… hundreds… of) thousands of unity cubes) for use with pathfinding graph, viewshed calculation points and possibly solution candidates (effectively something that will show a point in space with some relevant information; possibly making use of common interface?)
  • Develop a script to create a Unity terrain from a TerrainData object (This will be required for visualising terrains from external data sources).
  • Implement pathfinding graph creation and visualisation.

Previous ongoing – No change:


THOUGHTS:

Payoff. The time investment in developing a suite of visualisation tools will be well spent; it is a small distraction from the research (and nice to get a bit of more practical work) however it will greatly assist in the testing of various approaches (eg. viewsheds, pathing, optimisation algorithms etc).

Plus it was a bit of fun.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s