Model Viewer

The Model Viewer lets you place 3D models, Videos, Audio and Images into a folder and quickly view them. This can also be set up using the GUI

Either create a new folder in the "collections" folder in the model viewer and add your models there, along with folders for "Videos", "Audio" and "Images".  You can simply drag and drop the model into a collection and now it is ready to be viewed in VR.  

Scene Controls

Move forward to next scene - v or "Y" button on LH controller

Move backward to last scene - c or "X" button on LH controller

Use highlighter tool (instructor) - RH or LH grip button or Right mouse button

Toggle Playback of Media (set to Auto play) - "1" key or LH thumbstick button down

Close Scene - "q" key or escape

Reset position - "r" key

Grab objects - Left mouse button or controller triggers

Can also use optional 3D menu for these actions

Toggle 'm' or press RH thumbstick to see menu

Movement

Desktop

WASD/Arrow keys: Movement.

X/Z: Vertical movement.

Q/E: Rotation.

/: Capture screen shot

HMD

Arc Teleport - RH thumbstick 

Magic Carpet - LH thumbstick while holding down RH B key to move forward/ backward/ side to side, 

LH thumbstick while holding down A key to move up/down

See this page for navigation and button mappings

https://sightlab2.worldviz.com/controls 

To view the model collection, run ModelViewer.py, choose your hardware and choose the collection you want to view

Press either the 'v' and 'c' keys, the X and Y LH controller buttons (these can be configured to be different buttons or event in the mediaConfig.py file) , use the optional scene controller tool by grabbing the tool with your controller trigger or left mouse button and  clicking on the button that says "Next Model", or have the models change on a timer by setting Timer=True in the mediaConfig.py file and choosing how many seconds to have it model play after TimerValue = . 

Grabbing Objects and Adding as Objects of Interest for View Count and Fixation Duration Information

To grab objects  and add them as objects of interest you can add the word "_tag" after an object when setting up your scene in Inspector. Note: the older method of using a dictionary can still be used as well (see below). 

Additionally if you add the TV_Stand Object you can have a video play for each scene if you place it in a folder called "Videos" and title it the same name as the environment model (i.e. LectureHall.osgb model name and LectureHall.mp4 video)

The same goes for images in an "Images" folder, audio in an "Audio" folder

If you end the name of your environment and video with "_Large" it will play the video on a large, IMAX style screen (which can be stereo or monoscopic). 

#MediaViewer Settings


AUTO_PLAY_VIDEOS = True

LARGE_VIDEO_TYPE = 'Stereo'

STEREO_VIDEO_FORMAT = 'Left_Right'

THREE_SIXTY_VIDEO_TYPE = 'Stereo'


swapMediaKey = 'v' #Choose which key will advance the media, if not using a timer

backMediaKey = 'c'

mediaFolderPath = 'mediaPath'

collectionsPath = 'collections'

BIOPAC_ON = False

videoRecording = 0 #Choose whether to record a video, videos are saves in the recordings folder

Timer = False #Choose whether to advance the videos on a timer or a keypress. Set to true for the timer

TimerValue = 5  #Choose how many seconds to run the timer

cycleMedia = True

startExperimentKey = ' ' #choose which key will start the experiment

endExperimentKey = 'q' #choose which key will end the experiment

randomize = False


STARTING_POSITION = [0, 1.8, 0]

Controls for running in a Projection VR system with PPT wand:

Use the middle button to cycle between models/environments

Trigger to interact and pick up objects


The Model Viewer will also work for Multiple Users

Older method for tagging objects using a dictionary, add this code to the mediaConfig file with the name of the environment and the name of the child objects

# Environment Settings

environments = ['']  # List of environment files.

grabbableObjects = ['']  # List of objects in the environment for grab or view interactions.

environ_dict = {

    'lab_empty.osgb': ['basketball1'],

    'ShowRoom_empty.osgb': ['basketball']

}  # Mapping of environments to their associated objects.