Skip to content

jarvez31/Unity3D_patterned_walls

Repository files navigation

Unity3D Patterned Walls

A Unity3D environment for generating visual datasets to train Deep Learning models on object representation and spatial navigation tasks. The environment consists of a box with four distinctly patterned walls and a freely positionable object, and saves first-person (POV) images of an agent following a scripted trajectory.


Overview

The core idea is simple: place an agent in a controlled 3D box, vary the wall patterns and object position, and record what the agent sees as it moves. The resulting image dataset can be used to study how visual features like stripes, checkerboards, and object location are encoded — relevant to research on spatial cognition and object representation in neural networks.

The four wall patterns available are:

Script Pattern
Checkerboard Checkerboard (alternating squares)
Checkerboard H Horizontal stripes
Checkerboard V Vertical stripes
CheckertiltedStripes Angled / diagonal stripes

Repository Structure

Unity3D_patterned_walls/
├── Assets/                         # Unity project assets (scenes, scripts, materials)
├── Packages/                       # Unity package dependencies
├── ProjectSettings/                # Unity project configuration
├── UserSettings/                   # Local user settings (not synced)
├── traj_obj(sh1)_20k.csv           # Trajectory with object in quadrant 1
├── traj_obj(sh2)_20k.csv           # Trajectory with object in quadrant 2
├── traj_obj(sh3)_20k.csv           # Trajectory with object in quadrant 3
├── traj_obj(sh4)_20k.csv           # Trajectory with object in quadrant 4
├── traj_wo_20k.csv                 # Trajectory without any object
├── .gitignore
├── .collabignore
└── LICENSE                         # Apache-2.0

Trajectory Files

Each .csv file contains 20,000 timesteps of agent position and heading data. The naming convention is:

  • traj_obj(sh1)_20k.csv — object placed in quadrant 1 of the environment
  • traj_obj(sh2)_20k.csv — object placed in quadrant 2
  • traj_obj(sh3)_20k.csv — object placed in quadrant 3
  • traj_obj(sh4)_20k.csv — object placed in quadrant 4
  • traj_wo_20k.csvno object present (baseline / empty environment)

These files can be loaded into the Unity scene to replay a trajectory and capture POV images at each timestep, building a labelled image dataset.


Generating Custom Trajectories

To design a trajectory with a custom object position, use the Trajectory.py script available in the companion repository:

👉 Object_representation_model


Dataset Generation Workflow

  1. Open the project in Unity3D.
  2. Load a trajectory .csv file into the scene.
  3. Set the desired wall pattern via the appropriate script (Checkerboard, Checkerboard H, Checkerboard V, or CheckertiltedStripes).
  4. Position the object in the desired quadrant (or remove it for the wo baseline).
  5. Run the scene — the agent follows the trajectory and saves POV images as .png files at each step.
  6. Use the resulting image dataset to train or evaluate your Deep Learning model.

Requirements

  • Unity3D (version used during development — check ProjectSettings/ProjectVersion.txt)
  • C# (built-in with Unity)
  • For trajectory generation: Python 3.x (see companion repo)

License

This project is licensed under the Apache License 2.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages