Virtual+Construction+Simulator

The Virtual Construction Simulator (VCS) is an educational software tool developed by the CIC Research Group at Penn State. The application can be used to develop 4D construction plans based on a 3D model. There was an initial version (Version 1) that was developed in the Deep Creator game engine. This version has been superseded by VSC II which is developed in the [|Irrlicht] rendering engine, an open source project.

Some of the features of the VCS II application are:
 * The application can be used on any windows based system ensuring easy portability.
 * It provides a virtual 3D environment for 4D model creation supporting both single screened and 3 screen immersive displays.
 * The application does not require an already created schedule to develop the 4D model. In fact, it generates a construction schedule in the form of a list once the 4D model has been created.
 * Users can save their current work in the application as an XML file which can be reloaded at a later time.
 * It allows the user to input activity durations in minutes providing more flexible and accurate schedules.
 * The application is not 3D model specific and any 3D model can be easily used with the application to create 4D models.

The 3D model in the application must be divided into specific individual objects which can be joined together to form groups. After a group is created, more objects can be added to it or objects can be removed from that group. Users can also delete that group if required. Any object which is not part of a group is put into a group of its own ensuring smooth functionality.
 * Users are required to create construction activities in the application and these activities have to then be linked to groups. After an activity is created, additional links to other groups can be created or links may be removed depending on the user’s schedule creation preferences.
 * After the creation of groups and activities, activities will have to sequenced as preceding and succeeding activities and lag may be introduced into these relationships. The application calculates start times for activities on its own once the relationships are created.
 * The playback mode of the application allows the users to look at the 4D model. The 4D model shows the gradual buildup of the project and the percentage of completion of activities is also displayed. The playback may be paused and stopped. Rewinding and fast forwarding the playback are also supported.

The Irrlicht software development kit is available on the Irrlicht website.

[|This page] has a few tutorials on using Irrlicht.

**Development of new 4D simulations**
In case a new 3D model is being developed for the purpose of creating a new 4D simulation then: 1. Each model object which would need to included in the 4D simulation should be created as a separate model object. 2.The background information i.e. all 3D objects which are not included in the 4D part of the simulation can be created as separate objects or can be combined together.
 * New 3D model**

1. Go to Edit->Select All and then Groups->Ungroup to ungroup all objects. 2. The 3D model objects which are to be part of the actual 4D part of the new simulation will now be individual objects. If some of these individual objects are to be put into groups then first select any object which is to be a part of the group being created. With the object being selected, go to Modifiers->Edit Mesh. A panel towards the right side of the 3D studio max window will now open up. In this panel, click on the button labeled 'Attach' under 'Edit Mesh'. Now click on all the other model objects which you want included in that group. As and when you are done with creating that group, with the group selected go to File->Export Selection and put in an appropriate file name and save as a .3DS file. For the individual objects which do not need to be grouped, they can directly be exported using File->Export Selection after ensuring that only the particular object is selected.
 * Previously created 3D model**

3. For the background file, all objects which are not part of the actual 4D part of the simulation should be selected and then by going to Modifiers->Edit Mesh and clicking on attach they should now be a single mesh/object which can be exported using File->Export Selection. The file name should be put in as Background.3DS.

4. These files should be put into a single folder called 'modelfiles' and this folder should be a sub-folder to 'C:\model files' as this is the location the VCS 2 program reads the model files from.


 * Setting Up a VCS 2 Project in Visual Studio (for making additions or changes to the VCS application)**
 * 1) Install Visual Studio if you have not already done so.
 * 2) Download **Irrlicht** (currently compatible with Irrlicht 1.3.1) from http://irrlicht.sourceforge.net/ and Extract all the files from the zipped folder.
 * 3) Download the VCS source code from the [|Downloads] area of this site.
 * 4) Open Visual Studio and start a new **Visual C++** project of type **'Empty Project'**.
 * 5) Add existing source file for VCS2.
 * 6) Go to the Project Properties (by right clicking on the project) and then add the Irrlicht location to the **'Additional Library Directories'** (in //'Linker - General - Additional Library Directories'//) Use the irrlicht-1.3.1\irrlicht-1.3.1\lib\Win32-visualstudio location if using a Windows XP or Vista.
 * 7) Add the include directory for Irrlicht to the default include directories for VC++. To do this in VS 2008, go to the Project Properties (by right clicking on the project) and then add the Irrlicht location to the **'Additional Include Directories'** (in //Configuration Properties - C/C++// ) Use the irrlicht-1.3.1\irrlicht-1.3.1\include location.
 * 8) Add **Irrlicht.lib** file as a resource. To do this, right click on the 'Resource Files' and add an existing item. Then navigate to the lib file location at irrlicht-1.3.1\irrlicht-1.3.1\lib\Win32-visualstudio (note that you will need to show 'all file types'). Then select the Irrlicht.lib file.
 * 9) Add the **Irrlicht.dll** file to the __//Windows/system32//__ folder location if you have administrative access to the computer. Otherwise copy and paste the Irrlicht.dll file to the Visual Studio saved project location (for the new VCS project that you just created in VS). The file is located at irrlicht-1.3.1\irrlicht-1.3.1\bin\Win32-VisualStudio

The link to download the VCS setup files is http://code.google.com/p/virtual-construction-simulator/. Make sure you download both the files on the project webpage and run vcredist_x86.exe first. You can refer to instructions on how to setup a VCS project in Visual Studio on the Google project wiki.