Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
18. October 2018


Meshroom is a new, free and open source photogrammetry software from AliceVision.  Photogrammetry software enable you to create a 3D scene using a series of photographs, generally the more the merrier.  Currently documentation is a bit lacking, so I’ve decided to create this quick tutorial.  In this tutorial we are going to quickly walk through the process of using Meshroom using a photoset available here.  That post links to a zip file containing 50 images that are confirmed to work with Meshroom.  Simply extract them somewhere on your drive.  Of course you need to download Meshroom, which is available for download right here.  Simply download the archive, extract then execute the Meshroom application.  Note Meshroom requires a CUDA GPU and works on Windows and Linux!  So this process will only work on nVidia GPUs, at least as of time of writing.


Once you’ve got Meshroom loaded, follow the following simple steps.

Drag extracted images into the Images pane on the left.

image

Save your project somewhere

image


Click the green Start button.

image


As it’s running, you will see the progress across the top:

image

This bar indicates a problem occurred.  You can divine more details by locating the current task in the Graph, like so:

image

With the node selected, check the Log (bottom right corner) for details.  This is the error message you receive if you run the process on a non-CUDA (nVidia) GPU.  Keep in mind, it can also be caused by the process running on a laptop with Optimus, not automatically selecting the right GPU.

image

Hopefully however you encounter no such errors and the process is entirely green.  On the bright side, it should pick right up where the error occured if you run the project again in the same directory, as Meshroom caches the results of each step as it goes.  You will find the vast majority of time is spent on the DepthMap section,  this is normal.  As the process continues, you should start seeing results in the 3D viewer.

image

You can pan, zoom and orbit the mouse using the LMB, scroll wheel and MMB respectively.  More detail in the point cloud will fill in as the process runs.  Once it completes successfully, you will see a button Load Model.

image

You can now preview the results of your effort!

FinalGif

A few steps in, it will have evaluated all of your photos, acceptable/usable photos will be marked with a green checkmark.

image


Review the remaining photos for flaws and inconsistency if you run it again.

Go make some tea… it’s going to be between 10 minutes and an hour depend on the speed of your machine.  Once the process is complete, there will be a folder called MeshroomCache, with the following contents:

image


This is a folder with all of the output files from each step in the process.  Generally what you are going to be interested in is the obj, mtl and texture file in the Texturing folder.  This can be imported into your 3D modelling application of choice, the obj format is fairly universal.  The resulting mesh is extremely dense and you may consider checking out Instant Meshes for optimizing the results.


Now that you know it works, it’s time to start refining the process or providing your own picture set.  I would recommend the following tips from my own experience:

  • use an actual camera, not a phone.  I got terrible results from my Pixel phone, but my Canon DLSR gave much better results.  YMMV
  • DO NOT green/white screen your background.  Unique markers in the background help Meshroom position each virtual camera
  • try to get the entire object in frame on each shot
  • get rid of any image with any blurring

So far we just default settings in the Graph Editor.  This graph represents a graph of nodes in the process, one for each directory shown in the screenshot above.  Note when you select a node, there are a number of properties you can edit:

image

You can also connect pins to multiple nodes to create multiple results.  For example, if you wanted to create a set of TFF and lower resolution PNG textures, you can do the following.  Right click the graph editor and select Texturing:

image


This will create a new node in the graph.  Now drag the output node from MeshFiltering and connect it to ini and inputMesh.

image


Select the new Texturing node and have it create a lower detail texture set:

image


Now when it runs, it will create two sets of textures for you.  Note there are other nodes such as Decimation that aren’t in the process by default.  You can see the entire thing in process in the video attached below:

Art


15. October 2018


The academy award winning book Physically Based Rendering from Theory to Implementation 3rd Edition is now available free online in it’s entirety at http://www.pbr-book.org/.  This book is hugely important to the game and film industry as this is where the expression Physically Based Rendering (PBR) was coined, and it is the underlying rendering technology behind every major modern 3D game engine.

Description of PBR 3rd Edition from the book homepage:

Physically Based Rendering, Third Edition describes both the mathematical theory behind a modern photorealistic rendering system as well as its practical implementation. A method known as “literate programming” combines human-readable documentation and source code into a single reference that is specifically designed to aid comprehension. Through the ideas and software in this book, you will learn to design and employ a full-featured rendering system for creating stunning imagery.

This new edition greatly refines its best-selling predecessor by adding sections on bidirectional light transport; stochastic progressive photon mapping; a significantly-improved subsurface scattering implementation; numerical robustness issues in ray-object intersection; microfacet reflection models; realistic camera models; and much more. These updates reflect the current state-of-the-art technology, and along with the lucid pairing of text and code, ensure the book's leading position as a reference text for those working in rendering.

The author team of Matt Pharr, Greg Humphreys, and Pat Hanrahan garnered a 2014 Academy Award for Scientific and Technical Achievement from the Academy of Motion Picture Arts and Sciences based on the knowledge shared in the first and second editions of the book this book. The Academy called the book a “widely adopted practical roadmap for most physically based shading and lighting systems used in film production.”

Additionally you can still buy print (and digital) copies on Amazon via this affiliate link, should you desire the feeling of paper in your hands.  This is not an easy text, and isn’t required reading for everyone, but if you are working on rendering technology or want a peek behind the curtain this is definitely a book you should check out today.

Click here to read the book now.

GameDev News Programming


27. September 2018


One of the most challenging things when just starting game development is handling art in your game.  Most programmers have the artistic ability of a slightly blind tree toad, so what are they to do?  Well, you can scour the internet, tons of great free content out there, but there’s 100x more garbage as well.  Then you have the struggle of trying to get all of your content you grabbed from disparate sources to look good.  Or you can use one of the free content packs linked below.  Most of the follow assets have all you need, in a consistent art style, to create a game… and they are free!


Free game art pack resources:

Additionally the following two sites are great collections for finding resources like those mentioned above:


For more details on these resources, be sure the check the video below.  If you have an additional recommendation for complete free game art kits, please let me know in the comments!

Art


30. August 2018


Due to it’s popularity in the professional game industry, I get all kinds of requests for C++ based game engines.  That is exactly what this guide is, a collection of game engines that use C++.  This is not about game engines that are written using C++, many if not most game engines are at least partially written using C++, instead it covers engines where you (can) primarily use C++ in developing an actual game using the engine.  So without further ado, let’s jump into the list of (3D only) game engines that (can) use C++ to develop games.


The game engines, in no particular order:

CryEngine (Learn More)

Lumberyard (Learn More)

Unreal Engine

OGRE  *Technically a renderer

G3D Innovation Engine (Learn More)

Godot (Learn More)

Torque3D

Banshee Engine (Learn More)

Source Engine

Limon Engine (Learn More)

idTech

Leadwerks

IrrLicht

Urho3D (Learn More)

Toy Engine (Learn More)

Panda3D (Learn More)

Esenthel (Learn More)

Tombstone Engine (C4 successor)

PhyreEngine

Unigine

Shiva

LumixEngine (Learn More)


The list is not comprehensive but tries to at least get most of the options out there.  If I missed something, please let me know in the comments below.  For more information on all the engines listed above, be sure to check out the following video.  Any engine with a learn more link to the right of it means we have previously covered this engine in video form.


Programming


4. August 2018


Romain Guy, a developer on the Android graphics team, just released Filament, an open source Apache 2.0 licensed PBR based renderer for Android, Linux, MacOS and Windows.  Filament was designed to be as small as possible and with optimal performance on Android.


The renderer currently possesses the following features:

APIs
  • Native C++ API for Android, Linux, macOS and Windows
  • Java/JNI API for Android, Linux, macOS and Windows
Backends
  • OpenGL 4.1+ for Linux, macOS and Windows
  • OpenGL ES 3.0+ for Android
  • Vulkan 1.0 for Android, Linux, macOS (with MoltenVk) and Windows
Rendering
  • Clustered forward renderer
  • Cook-Torrance microfacet specular BRDF
  • Lambertian diffuse BRDF
  • HDR/linear lighting
  • Metallic workflow
  • Clear coat
  • Anisotropic lighting
  • Approximated translucent (subsurface) materials (direct and indirect lighting)
  • Cloth shading
  • Normal mapping & ambient occlusion mapping
  • Image-based lighting
  • Physically-based camera (shutter speed, sensitivity and aperture)
  • Physical light units
  • Point light, spot light and directional light
  • ACES-like tone-mapping
  • Temporal dithering
  • FXAA or MSAA
  • Dynamic resolution (on Android)

The Filament renderer is currently used in the Sceneform ARCore augmented reality framework.  Filament is exceedingly well documented and is a great read for anyone working on a renderer, even if you have little interest in using Filament in your own project.  The Github page contains documentation on getting started and the source contains several examples on how to use Filament.

GameDev News


See More Tutorials on DevGa.me!

Month List