Unity Project: Utilising PFTrack’s New Photogrammetry Toolset

16 Sep, 2016 | KNOWLEDGE BASE, PFTRACK

The month of August was set aside for research and development within the walls of The Pixel Farm. New features have been added to PFTrack’s already powerful toolset, making the Photo Mesh node more versatile and more relevant to an unprecedented number of industries.

A bold claim should never go untested, so we have done just that. Our aim, a simple one: To demonstrate new photogrammetry functionality by taking the old fan favourite and bringing her to life in an interactive environment; I am of course talking about… Marden church.

The Project

The church project’s primary focus was to test PFTrack in a totally new environment and to explore its application in the arena of video game design. Our muse, Marden church, seemed an obvious subject choice – aside from being somewhat of a poster child for our creative endeavours, the building contains within a rich diversity of textures to test the product’s new features.

Bringing Marden church to life would require a number of things, but the most important is PFTrack’s added functionality; mesh simplification allows the mesh to be piped into other nodes including texture extraction, creating a very versatile environment for photogrammetry.   

Initial Experimentation

A number of options have been explored to capture the footage required to build our model. Primary experimentation focused on filming with a 360° spherical camera; we hypothesised that the method would generate a good model, not only of the subject in question but of the surrounding environment also. We found the focus of our project quickly changed to put a much greater emphasis on capturing the outside of the church solely, which meant more traditional methods of filming were more suitable.

Testing then focused on the use of a series of still images in the place of video.

Using material available through our photogrammetry tutorial we again tested the new pipeline and successfully imported the first 4k texture into Unity: While the model was still not perfect, the method showed improvement; we were on the right track!

Building on the successes of the previous model we extended our data set tenfold in an effort to increase the detail of the model. The data set in question was made up of static images shot from the ground.

The Workflow

Creating 3D models in PFTrack is a quick and simple operation. In addition to the steps outlined by the Photogrammetry and Photo Mesh tutorials, the Mesh Simplification and Texture Extraction tools allow users to modify a model to suit their needs. Mesh Simplification becomes a very attractive function in the arena of games development, shaving valuable processing time from the rendering process, streamlining performance and improving player experience.

Following on from the Photogrammetry workflow outlined by previous tutorials (Photogrammetry tutorial found here, Photo Mesh tutorial found here) and assuming that both the depth maps and photo mesh have been generated for the object in question:

Begin by simplifying the model’s mesh; this intuitive new feature allows you to dictate the number of triangles that make up your model’s mesh. The simplification option is located to the right of the mesh options.

Then extract the model’s texture by creating the texture extraction node and linking it from the Photo Mesh node. Important – the texture extraction node will not function without first simplifying the mesh! The process should look something like this:

Set the UV Projection to ‘Custom’ as we are using the texture coordinates already stored with the object, then click ‘Auto Generate’.

Highlight the ‘Photo Mesh’ object located in the ‘Objects’ window and select ‘Edit UV.’ Then a menu will be presented: select ‘Unpack’, then ‘Fill All.’ Shown here is UV before and after being unpacked: 

Make sure to select ‘Best Frame Per Triangle’ from the Auto Texture menu, then select ‘Extract.’

Create an Export node linking on from the Texture Extraction node. As we are exporting a model to be used in a video game environment, before the model is exported make sure the Camera’s, Groups and Point Cloud options are deselected. Define where the object and texture will be exported to and in what file type. Finally select ‘Export Scene.’

An in-depth description outlining the new pipelines available to PFTrack users will be covered in upcoming tutorials, make sure to look out for them to make the most of the new updates!

In Closing

Testing PFTrack in a new environment has been an illuminating experience for us all. Overall we have found that the new features in PFTrack have increased the software’s diversity and strength. Used in conjunction with game creation, software assets can be created and imported very quickly.

Stay tuned for our practical demonstration, coming soon!

Learn PFTrack For Free

Get a Personal Learning Edition of PFTrack to work through our tutorials, free of charge.

Find Out More

Related Posts

PFTrack: Auto Track and Camera Solve

In this tutorial, you will learn how to solve for the camera motion in the tutorial clip, and then test the resulting scene so that it is ready for exporting. You are going to solve the motion of the camera in the tutorial clip, using trackers that have been…

Read More

PFTrack: Photogrammetry

In this tutorial, you will be solving the tutorial clip using PFTrack’s photogrammetry tool set and then add a second camera to the scene. This will be done by creating a point cloud from a set of still images and then automatically solving cameras into the scene…

Read More

Creating a Triangular Mesh in PFTrack

In this tutorial you will learn how to create a mesh model from the point cloud you have created in the previous lesson. Creating a mesh from the point cloud makes the data easier to handle in some 3d party applications and you can use the mesh as the basis for…

Read More

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Share This

Share This Post On: