Skip to content

UI and file viewer which can be used to load and manipulate 3d models using Vulkan

Notifications You must be signed in to change notification settings

San916/vulkan-object-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vulkan Object Loader

An object loader capable of loading 3D objects and animations using Vulkan. Contains a physics engine built from scratch.

Overview

The user can:

  • Load 3D .obj and animated .md5mesh/.md5anim files from a file tree made with wxWidgets

object-loading-gif

  • Move around the 3D environment using either UI or mouse controls
  • Manipulate objects using the UI controls, with mouse picking for object selection

object-and-camera-manipulation-gif

  • Simulate rigid body physics using a physics engine built from scratch (physics currently works on .obj files, .md5 files are a WIP)
    • Cube bouncing on a plane cube-bouncing-demonstration-gif
    • Cubes stacking on each other cube-stacking-demonstration-gif
    • Cubes colliding with each other cube-collision-demonstration-gif
    • And many other rigid-body interactions!

Setup

Installing the libraries

Place the glfw, glm, boost, stb-master, and wxWidgets libraries into a single parent directory.

To build wxWidgets, open wxWidgets-3.2.4\build\msw\wx_vc15.sln, then select the build solution option after right-clicking the solution in the Solution Explorer.

For boost, run boost_1_84_0\bootstrap.bat, then run the file boost_1_84_0\b2.exe which should have appeared after running the previous file. A new folder boost_1_84_0\stage should appear. If you are having trouble (or are using a different version of boost), follow the guide at https://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010/2655683#2655683.

This is what your directory should look like for the project.

Image of a file explorer

Setting up the solution

Drag the contents of the folder named files-to-place-in-minimal into wxWidgets-3.2.4\samples\minimal, then open up wxWidgets-3.2.4\samples\minimal\minimal_vc15.sln.

  • At the top of Visual Studio, go into View -> Other Windows -> Property Manager
  • In the Property Manager, drop down minimal and right-click Debug|x64, select Add Existing Property Sheet... and select the file PropertySheet.props
  • Go into minimal -> Properties -> General -> C++ Language Stantard while in the Debug x64 configuration, and select the option with C++17
  • At the top of the Solution Explorer, select Show All Files, right click every file shown in the image below (these are all the relevant files), and select Include In Project

Image of a Visual Studio Solution Explorer

  • In minimal.cpp at the top, fill out the ROOT_HOME_FOLDER_NAME and ROOT_DIR_NAME to correspond to whichever directory you like

Image of a c++ file contents

If you use different versions of libraries or have placed them in different locations, you may need to change some of the file paths in Properties -> VC++ Directories -> Include Directories | Library Directories, Properties -> C/C++ -> Additional Include Directories, and Properties -> Linker -> General -> Additional Library Directories.

Controls

  • Scrollwheel: Camera zooming
  • Left click: Camera panning
  • Right click: Camera rotating (around the camera target)
  • Shift + Left click: Object selection

Creators

Made by San Kang

Resources

Chalet.obj and corresponding texture files can be found on: https://github.com/heitaoflower/vulkan-tutorial/tree/master/Tutorial29

Bob Lamp files can be found on: https://www.katsbits.com/download/models/

About

UI and file viewer which can be used to load and manipulate 3d models using Vulkan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published