Monday, December 10, 2018

One Man's Journey Into VR: Step 2

One technology that I have been really curious about has been Virtual Reality (VR).  I really have wanted to know how to create my own VR experiences.  One of my first blog posts was talking about how stereo-panoramas are an easy way to get started in VR.  That post has been one of my most read entries, perhaps you are as curious as I am.  Even though it has been a long time since that post, I never gave up desiring that knowledge.  I recognized that to build the skills I needed, it was going to be a long journey.

I decided to set incremental goals for myself.  After being able to create the stereo-panoramas, I figured that my next step should be to create a static environment that I could move around in.

The delay in gaining this knowledge has had several components.  First was the time to invest in learning this skill, but recently, I made the decision to dedicate time to gaining this knowledge.  Secondly, my only VR device is a Google Cardboard, which can be limiting.  Lastly, I had to find the right tool.

My first step was into Autodesk Stingray.  At the time it made the most sense, I work for an Autodesk partner and had access to the software and other resources for Stingray.  I had difficulty here because most of the reference material was for higher end devices, like the Oculus Rift and HTC Vive.  So I had some trouble making much progress.

After some time trying to learn Stingray, Autodesk announced that they were going to stop developing Stingray.  I think that they realized that they were not going to compete with Unreal and Unity, so it better to partner with them, than compete with them.

So at that point, I decided that I should just pick either Unity or Unreal and begin learning the tool.  I ended up picking Unity, primarily because most of the VR games I had on my phone had a Unity logo during the splash screen sequence.

Unity has a lot of great tutorials and learning resources, but what really helped me make real progress was a class from Udemy.  Udemy has a lot of classes in a wide variety of topics.  If you are not in a hurry, you can usually buy your classes during a sale.  For example, as I am typing this, there are three days left on sale where most courses are $10.99  The classes I purchases were normally $200.

I did buy several Unity courses from Udemy, but the first course has really helped.  I would recommend taking "Building Virtual Reality Games for Google Cardboard Using Unity."  You can find a link to the class here.

At this point, I have learned enough to create an environment, place a model from Inventor, and create a script that allows me to move around.  In this case, I hit the input button to start moving, and hit it again to stop.

Here is a video of the preview in the Unity Editor.


If you would like to download and try my first VR experience, you can download it here.  Please bare in mind before installing, I am only a beginner and this is only for Android.

If you are as interested in VR as I am, but don't know where to go first.  I highly recommend Unity and courses from Udemy.  I feel they have helped me make more progress in just a month than I had made in previous attempts to learn VR.



Thursday, September 6, 2018

A Mesh Model You Can Actually Edit

A few months ago, I stumbled upon a workflow that allowed me to actually edit a mesh derived from photos.  I was talking with someone about how Fusion 360 and ReCap Photo both have tools that allow you "clean up" mesh models, but not ever truly edit the mesh.  Then I remembered that Fusion 360 allowed me to convert mesh models to T-Splines.  However, it had to be a Quad-Mesh, at the time I didn't understand what that meant.  I also noticed that ReCap Photo would allow me to export an OBJ and an OBJ(Quad), again at the time I didn't quite understand what the difference was.  After a little bit experimenting, and research, I was able to connect a few dots that opened up a whole new workflow for me.

The key to the workflow is understand what ReCap Photo means by OBJ (Quad), and how that relates to the Mesh to T-Spline conversion in Fusion 360.  The big difference between an OBJ and an OBJ (Quad) is that an OBJ (Quad) has a rectangular mesh as opposed to the standard triangular mesh.  See the Images below, taken from Fusion 360.



OBJ Mesh


OBJ (Quad) Mesh

The difference becomes significant when using Fusion 360's Convert Utility to convert a Quad Mesh to a T-Spline.  T-Splines are shapes defined by a rectangular mesh.  So in this workflow, the Quad Mesh generated by ReCap Photo will have a direct correlation to the T-Spline mesh.  Once the conversion is done, Fusion 360 gives you a new T-Spline body, which can be edited with any of the Free Form editing tools in the Sculpt Workspace.

So how do you go about doing this?  In the rest of this blog entry, I walk through a sample workflow that starts with photos of my drone and ending in Fusion 360.

1.  Take your pictures

In ReCap Photo, you start with photos.  I always try to get 50 to 100 photos from 3 to 4 elevations around an object, and 10 to 15 in each cycle around the object.  Recently, I have had some trouble with ReCap Photo giving me very poor, unusable models.  Then I realized something, I was standing too close to the object.  I was trying to out-smart the software by keeping close to the object and not capturing too much of the environment, which would be deleted later.  From my experience, you need those environment elements to help the software piece the photographs together better.  So now I have started making a larger diameter cycle and a smaller diameter cycle around the object.  

Below are just a few of the photos I took of the drone.




2.  Use ReCap Photo to Create the 3D Model

Creating the model from the photos is pretty easy in ReCap Photo.  You just have to select if you are using photos from an object or if you are using aerial photographs, which can be part of surveying  workflows.  In my case, I am using the object preset.  There is no scaling done at this point, that is handled after the model is generated.

Here is a quick video that shows how to use ReCap Photo to create the initial 3D Model.




3.  Model Cleanup in ReCap Photo

Once the model is generated, you can download and open the model in ReCap Photo.  Most often, my first step is deleting all of the the unnecessary mesh faces.  This is done by selecting the faces and hitting Delete.  My second step is setting the scale of the model.  Since we used photos, ReCap Photo will not have any idea how big, or small, the object is.  Using a measurement that we have taken from the model, we can use the Scale tool to identify those points in the model and set that distance in the model.

There are additional  mesh cleanup tools in ReCap Photo.  You will also have some mesh cleanup tools in Fusion 360, as well.  However, you will find that most will be unusable because Fusion 360 is expecting a triangular mesh, and will not recognize faces or edges of the quad mesh. 

This video shows the common steps I take after generating the 3D model and some of the mesh cleanup tools in ReCap Photo.




4.  Exporting to Fusion 360

When you have completed the scaling and model clean up in ReCap Photo, you are ready to export to Fusion 360.  ReCap Photo offers Quick and Advanced export options.  If you use the Quick options, you can specify which Autodesk product you want to export to and ReCap Photo will choose which export option is best suited for that product.  In this case, simply choosing Fusion 360 will set the export to OBJ (Quad). 

This video shows the export capabilities of ReCap Photo.



5.  Importing to Fusion 360

Importing an OBJ (Quad) into Fusion 360 is a straight forward process.  You go to the Insert menu and select Insert Mesh.

This video shows how to import the mesh in Fusion 360.





6.  Converting the Mesh to a T-Spline

The final step is to convert the mesh to a T-Spline, so we can leverage Fusion 360's T-Spline editing capabilities.  Fusion 360 does have a utility to do this in the Sculpt workspace.  I typically start a new Freeform shape, then use the conversion tool.  You will find that you still have the mesh body in the browser.  Once the conversion is done, you have full capabilities to edit T-Spline, using the tools inside the Sculpt workspace.  

From my experience, you do get a T-Spline mesh that is too dense.  I just compensate for that by deleting some of the mesh edges/lines.  That seems to smooth out the shape and makes working with the T-Spline a little easier.

In the case of the drone model, it has two planes of symmetry.  It is unlikely that I will be able to create the symmetry on the whole model.  What seems to work in this case is deleting three-quarters of the model, then using Mirror - Duplicate twice to make it a complete model again.

This video shows how to convert the model to a T-Spline shape and use the tools in the Sculpt workspace to edit the model.



Once you break down the workflow to the individual steps, you will see that it really is pretty simple.  I really like that I can truly edit the mesh that I get from ReCap Photo, which is something beyond what the clean-up tools offer.  I hope that you can put this workflow to good use.

Wednesday, August 1, 2018

Animating Inventor Parameters

You may not know this, but a lot of my blog post ideas come from trying to find answers to customer questions.  Occasionally, the answer to the question is a pretty cool workflow or technique.  That is the case with this post.

Yesterday, a customer emailed me after viewing my Inventor Studio webinar.  She was working, in Inventor Studio, on an animation that showed a tool crimping two panels together.  Her idea was to have the pre and post crimped panels overlaying each other and have the one fade out, as the other one faded in.  Looking at her video it looked good, except for Inventor rendered a shadow, or something else, where the deformation occurs.  The customer wanted to know if I had any ideas on how to eliminate those shadows.

I don't typically use the component fade animation in Inventor, but I do remember a former co-worker saying that they never work right for him.  So that got me thinking about which other types of animations Inventor Studio is capable of, that might be able to accomplish this.  Obviously, the Component, Constraint, and Positional Representations were not possible because the change we needed to see was contained in one part file.  That really left me with the Parameter animation.  I knew that I could drive a flange angle with a parameter, I just wasn't sure if Inventor would allow me to animate that parameter and how smoothly the animation would play.  So I told the customer that I needed to test out an idea before I sent her in that direction.

The parts that get crimped looked like sheet metal Contour Flanges.  So I made a test part.  Then I created a cut where the the crimped sections would be.  The next step was to add Flange features in the cutouts.  I made sure to give the Flange Angle parameter a meaningful name, so I could work with it later in the animation.  Also,  I had to tweak the settings so that the new flange matched the original shape of the model.  While I was creating the flanges, I made the Bend Reliefs wide enough for me to add a Loft later to fill the gaps.  I was also a little worried about how the Lofts would animate, but I figured that I would cross that bridge when I came to it.



Before I went to the trouble to make the Lofts, to fill the gaps, I wanted to make sure the flanges would animate smoothly.  So I saved my part, placed it in a new assembly, and entered Inventor Studio.  

There are two things that you have to do to a parameter to be able to animate it in Inventor Studio.  First, it has to have Export enabled.  That just tells Inventor that it is allowed to use that parameter in operations like Derive. 


The second step is to make sure that you have picked the parameter as a Parameter Favorite.  Using the Parameter Favorites command, Inventor opens a dialog where you navigate a tree structure of your model and pick out parameters that you want to add as favorites.  



The rest of the process was easy.  I just had to use the Parameters animation command to pick the Parameter Favorite to animate, the start and end values, and the location in the timeline.  The software takes care of the rest.

In this case, the parameter animation was working great.  I just had to go back and add lofts to get the flanges to blend in with the rest of the part.  After I added the Lofts, I did discover that when the flange got close to the end of its movement, the automatic mapping on the lofts would change.  I had to turn off the Automatic Mapping on the the Lofts.

After all of that, I had a pretty good looking animation.  I will be the first to say that the Lofts are not 100% realistic to how the part would work when crimped.  However, for the animation in question, it is very unlikely anyone would notice, especially because of the viewing angle in the animation.

Here is a quick sample of the finished product.  


Introduction to Visualization in Inventor


I know it has been awhile since I have posted to this blog.  Summer has been a busy time and I have been working on many topics.  However, none of them are ready for a blog post.  I am sure they will show up here soon.  In the meantime, I presented a webinar yesterday on how to use Inventor Studio to create still and animated renderings.  It is just an introduction, but should be enough to help you get started. 



Tuesday, April 17, 2018

Creating 3D Models From 2D Floor Plans: Part 3

In previous posts, I started to outline a workflow that eased the process of taking an existing AutoCAD floor plan to a 3D model, the workflow was also using 3D scans as an error check.  The final installment is where all the work pays off and we can validate our model with the 3D scan data.

In the last post, I had connected the Revit and ReCap models, with the help of Navisworks.  Using the Real View function in ReCap, we are able to see both models as an overlay.  We are then able to take measurements from the model to determine corrections that should be made.  It is important to understand, that we could potentially take real life measurements too.  

Once we know what corrections or additions need to be made, you return to the CAD models, in their native applications and use standard editing and modeling techniques to make the corrections.  In the case of AutoCAD and Revit, you have to decide if you want to maintain the Revit model, AutoCAD floor plan, or both.  Personally, I would maintain the Revit model and designate the AutoCAD floor plan as an obsolete file.

Once the CAD models are changed, it will be important to incorporate those changes in the Navisworks model, especially if you want to see them in the combined ReCap and Revit view, in ReCap.  The trick here is that the NDW file, that is attached to the ReCap point cloud, will not live update and will need to be re-exported.  So the proper workflow is to open the Navisworks NWF file, which does maintain a live link to the CAD models represented.  I recommend using Save As to create the NWD file and overwrite the previously created NWD file.  The reason for this, is that we can reload, or refresh, the attached Navisworks project in ReCap.  If you generate a new NWD, you will have to delete the attached model and attach the new one.

If you find that you have a significant amount of changes to make to your Revit model, it might be easier to insert the ReCap model into the Revit model in Revit.  There are tools that will allow you to snap to the point cloud when moving and inserting objects.

Here is a YouTube video that demonstrates this portion of the workflow.




Thursday, April 5, 2018

Who Can Use Factory Design Utilites? (Hint: Probably You!)

In March, I hosted MESA Inc's webinar entitled "Who Can Use Factory Design Utilites?  (Hint: Probably You).  In the webinar, I demonstrate how the Factory Design Utilities workflow can be applied to non-factory facilities.  There are plenty of ways these tools can be applied to factory and non-factory facilities.  If you want to see how these tools work, you can watch a recording of the webinar here.

Friday, March 16, 2018

Creating 3D Models From 2D Floor Plans: Part 2

In my last post, I began a series of posts that was going to create a 3D model from a 2D floor plan.  The floor plan is also going to be compared to a 3D scan to verify the accuracy of the 2D floor plan.

The first portion of the workflow was to take the facility scans into ReCap to create a 3D Point Cloud.  Now that we have done that, we are ready for Phase 2, which is building the Revit model on the 2D floor plan.  One key element to the whole workflow is making sure that the Point Cloud and 3D model have a common origin.  We set the origin in the ReCap model, so we just need to make sure that we have the same point as the origin of the AutoCAD file.  The origin of the AutoCAD model will be connected to the origin of the Revit model.  The standard AutoCAD move command can be used to move the entire floor plan to the origin, if it is not already in the correct location.

Now we are ready for Revit, so we can create a new Revit model, from an Architectural template.  The AutoCAD file can be inserted as a linked CAD file.  Then the AutoCAD file can be used to snap to as walls, door, etc are added to the model.

The following video shows how to move the desired AutoCAD point to the origin, insert it into a Revit model, and create the building architecture from standard Revit workflows.




Once the Revit model is done, the next step it to connect the Revit Model to the ReCap model.  There are two ways to do this.  One is to insert the ReCap model into the Revit model.  However, there is a ReCap Beta function that I want to show off in this workflow, so I am going to focus on the second method.  The beta function that I want to show allows the user to overlay a Navisworks project over the scan image in a 3D view.  Again,  this requires a Navisworks file, so my next step will be to append the Revit model to a Navisworks model.

There is not much to appending a Revit model to a Navisworks file.  It really is just a matter of clicking the Append command and picking  the Navisworks file.  Navisworks will insert the model origin to origin, thus the earlier importance of getting the AutoCAD file's origin to the right place.  There is one tricky point to the Navisworks portion of the workflow.  ReCap wants an NWD file, not the typical NWF file.  The NWF file mostly references other files, the NWD will contain all the model geometry, which ends up being easier for ReCap to overlay.  One downside to the NWD file is that it will not update dynamically.  So as the Navisworks model changes, you will need to export another NWD file.  Creating the NWD file is pretty simple, it is just a matter of performing a Save As of the Navisworks model.

Once you have the NWD file, it is time to attach the file to the ReCap project.  The attachment of the NWD file is done through a command from the menu in the bottom right corner of the interface.  All you have to do is click on the Attached Project command and pick an NWD.  It can be confusing at times because you really will not see the project change after the file is attached.  That is because the overlay occurs only in the RealView, which allows the user to look at the actual scan image.  However, if the project attached successfully and you enter a RealView, from one of the scan locations, you will see the Navisworks project overlayed with the scanned image.

Here is a video that demonstrates the workflow of taking the model from Revit to Navisworks to ReCap.


The benefit to this is that it should be easier to visually compare the ReCap to the Revit model.  If any discrepancies are found, the user has a pretty good idea of what portions of the facility need to have some measurements taken.

In my next post, I will discuss how to correct some of the discrepancies between the 3D scan and 2D floor plan.



Thursday, February 15, 2018

Creating 3D Models From 2D Floor Plans: Part 1

Recently, I was my opinion on the best way for a customer to build a 3D model of their facility.  They were considering getting the building scanned to aid in the process.  As much as I like working with scan data, I personally see some sort comings from modeling from scans.  When it was mentioned that the customer had a 2D AutoCAD floor plann of the facility, I was hit with a little inspiration.

Using a 2D floor plan as the basis of a 3D building model in AutoCAD Architecture or Revit is really easy.  Those softwares allow you to create walls, doors, windows, etc, while snapping to geometry from the 2D floor plan.

One of the problems with working from 2D floor plans of a building is that they are rarely up-to-date.  At my last job, we had a floor plan of the entire building, but no one ever maintained it.  That is unless a project arose that needed it.  Then it was a scramble to update the drawing by going and taking a ton of measurements.

This is where the 3D scan can come into play.  The 3D scan can be used to validate the model from the 2D floor plan.  Sure Revit and AutoCAD Architecture both have tools for inserting a ReCap point cloud, but ReCap has a function, currently in Beta, where you can attach a Navisworks model.  Once the Navisworks model is attached, it will overlay the Navisworks model when you are viewing the actual scan in RealView.  There is just one catch to this, the origins of the ReCap model and the Navisworks model need to align.  If not, you find it a lot harder to detect the differences between the two models.

The initial ReCap workflow is the same as pretty much every other ReCap project.
  1. Create a Project
  2. Import the Scans
  3. Process the Scans, manually registering any scans that did not get merged into the project
  4. Create regions as needed
  5. Update the origin if needed
Here is a video that shows these steps for my sample project.




The next step will be to import the AutoCAD floor plan into Revit and create the walls and other architecture element.  These steps will come in my next blog post and video.

Wednesday, January 24, 2018

Introducing ReCap Photo

Last Fall, Autodesk released ReCap Photo.  It is only partially a new product and a companion product for ReCap and ReCap Pro.  I say it is partially a new product because the technology has been around for over a year before the release of ReCap Photo.  If you have been following Autodesk, ReCap, or reality capture, in general, you should have heard of or seen Project Memento.  Project Memento was focused on mesh files while ReCap's photogrammetry workflow was focused on point clouds.

I really like this "semi-new" product.  One of the biggest struggles for  the casual ReCap user was how to go from the point cloud to something solid.  Anyone using ReCap as part of a survey workflow, actually had tools inside of AutoCAD Civil 3D to turn point clouds into Civil 3D surfaces.  However, there seemed to be a lack of tools for other applications.  As I learn about ReCap Photo, I find that it is capable of functions that make my work easier.  For example, I just found a way to use ReCap Photo and Fusion 360 to turn an STL file into a solid model.

If you have used  the previous web-based Photo to 3D workflow, it is pretty similar.  ReCap still uses the cloud to process the photos and make a 3D model.  The biggest differences are that the project is created in a local application, and not a web site, and the output is now a mesh file instead of a point cloud.  At first, I was not sure if I would like the mesh output because I was pretty comfortable with the point cloud output.  I am growing to appreciate the mesh output and recognize that the mesh output is better suited for working toward a solid output.

I was a little nervous the first time I tried to run a ReCap Photo project because I was not able to set the scale of the model in the photos while uploading the photos.  I discovered that scaling of object based projects is now done after the model is made.  Which actually fits some advice Autodesk had for the previous workflow.  Autodesk said that ReCap works best if it is allowed to figure how the photos fit together without having to worry about scaling.  The old advice was to run projects once without control points, then run it again with them.  Now that does not need to be done.

To help you make the transition into using ReCap Photo I have made two videos.  The first video shows how to create an Object based project.

The second video shows some of ReCap Photo's tools for processing the mesh output.