A Small Gift - simple model explorer for Unity 3D

aurivus|REVIT, 3D Studio MAX, 3D Coat, Lightwave, ZBrush, VRMesh, TopoGun, Blender, Rhino, Trimble Sketchup Etc.
Post Reply
User avatar
jcoco3
Global Moderator
Global Moderator
Posts: 1724
Joined: Sun Mar 04, 2012 5:43 pm
12
Full Name: Jonathan Coco
Company Details: Consultant
Company Position Title: Owner
Country: USA
Linkedin Profile: No
Has thanked: 70 times
Been thanked: 157 times

A Small Gift - simple model explorer for Unity 3D

Post by jcoco3 »

I have been trying to think of a small gift for all my friends on this forum, and the only thing that I can come up with is this simple little Model Explorer that I built in Unity 3D. I guess the idea is that some of us build some pretty fantastic 3D models and it would be fun to put our models in a "game" environment so they can be explored intuitively on mobile devices or online. Over the last few years I have experimented with all kinds of cool stuff that Unity can do, but I keep falling back to the most basic environment because it is easier to understand and requires no programming. We have used this for presentations, and to wow clients by letting them play around in the model. If you would like to put some of your models in a "game" so you can share them in a different way then download Unity 3D and the Model Explorer Project at the bottom of this post and give it a try.

To give you a hands-on taste of what is possible try this Web Player Version I made from a Microstation example model and hosted straight from dropbox: https://dl.dropboxusercontent.com/u/114 ... 20Web.html It will ask you to install the Unity 3D web player. Use mouse to look, W,A,S,D or arrows to move, and spacebar to jump.

Here is the same game for Android(click this link from Android and install the downloaded .apk):
https://dl.dropboxusercontent.com/u/114 ... 20Yard.apk
(thumb-sticks are at the bottom left and right of the screen and double tap right thumb-stick to jump)

Here are some earlier test from projects we scanned, modeled and stuffed into Unity:

youtu.be/

youtu.be/

Unity 3D Download:http://unity3d.com/unity/download
Model Explorer Project:https://dl.dropboxusercontent.com/u/114 ... plorer.zip
The simple version of the workflow is export your model as an .fbx file from CAD, then import into the Model Explorer Project, generate colliders, and publish to your device of choice. Of course it is a little more complicated than that, so I made a quick tutorial:http://www.youtube.com/watch?v=uSPY3s36uj0
I hope this is useful to someone or at least a little entertaining. Enjoy :D
User avatar
colhum1
V.I.P Member
V.I.P Member
Posts: 456
Joined: Mon Jul 16, 2012 3:10 pm
11
Full Name: Colin Humphreys
Company Details: Warwickshire Police
Company Position Title: Forensic Collision Investigator
Country: UK
Skype Name: col.humphreys
Linkedin Profile: Yes
Location: Rugby

Re: A Small Gift - simple model explorer for Unity 3D

Post by colhum1 »

Do I spy the Seiki 4k tv being used as a monitor Jonathan at the Coco command centre?
Very nice...not available in the UK.

Looks an interesting project, I do like a bit of gaming but unfortunately have no experience of modelling in that context.

I'll take a look at Unity 3D.
Thanks

Colin
"Just leave me alone. I know what I am doing" - Kimi Räikkönen
User avatar
jcoco3
Global Moderator
Global Moderator
Posts: 1724
Joined: Sun Mar 04, 2012 5:43 pm
12
Full Name: Jonathan Coco
Company Details: Consultant
Company Position Title: Owner
Country: USA
Linkedin Profile: No
Has thanked: 70 times
Been thanked: 157 times

Re: A Small Gift - simple model explorer for Unity 3D

Post by jcoco3 »

Yep the command center :lol: I don't know if you have ever seen Grandma's Boy, but my office is slowly turning into JP's office. Still need glass walls with binary, and the door that sounds like doom doors.

youtu.be/

What do you mean by modeling in that context? I don't model in Unity, I model in Microstation/AECOsim and then just export my model to .fbx for import into Unity. I can imagine that this may be pretty handy for forensics, because it allows the model to be viewed live from any position versus an animation which is set. Of course the same can be said for viewing the model in CAD, but the typical CAD interface is complex and distracting compared to the simplicity of a published Unity project.

On a similar note, I found something today that allows point clouds in unity. ~40 million point limit, which is not bad if you spatially filter a large project. Color supposedly works too, but I have not been able to get it to work yet. Will post some more info, once I get it figured out.
User avatar
3DForensics
Honorary Member
Honorary Member
Posts: 1979
Joined: Mon Aug 03, 2009 1:52 am
14
Full Name: Eugene Liscio
Company Details: AI2-3D Forensics
Company Position Title: Owner
Skype Name: eliscio
Location: Toronto, Canada
Has thanked: 13 times
Been thanked: 70 times
Contact:

Re: A Small Gift - simple model explorer for Unity 3D

Post by 3DForensics »

You read my mind about getting point clouds inside of Unity...

Maybe the guys from ESR in New Zealand could pop in and tell us some things about point clouds in Unity. They are creating a "forensics viewer" based on the Unity engine that allows for point cloud import but is also tied to photographs, documents and links. A virtual crime scene of sorts.

However, I don't know what, if any point limit exists.

Keep us posted JC!
msantoni
I have made <0 posts
I have made <0 posts
Posts: 1
Joined: Thu Jul 18, 2013 11:16 am
10
Full Name: Marco Santoni
Company Details: GRS S.r.l.
Company Position Title: Technical Director
Country: Italy

Re: A Small Gift - simple model explorer for Unity 3D

Post by msantoni »

Thank you very much for the software and for the tutorial. Tomorrow I'll made some acquisition with my Riegl VZ400 and I'll try to import in Unity!
User avatar
jcoco3
Global Moderator
Global Moderator
Posts: 1724
Joined: Sun Mar 04, 2012 5:43 pm
12
Full Name: Jonathan Coco
Company Details: Consultant
Company Position Title: Owner
Country: USA
Linkedin Profile: No
Has thanked: 70 times
Been thanked: 157 times

Re: A Small Gift - simple model explorer for Unity 3D

Post by jcoco3 »

Bingo! Got some color point clouds in Unity now :D

[youtube]http://www.youtube.com/watch?v=HH_j-Bc- ... e=youtu.be[/youtube]
It wasn't easy and the point cloud is heavily decimated, but I think the next run I will try a spatially filtered set so it might look better. This is only 4.5 million points, but it could definitely handle much more. The limitation I am encountering is editing the .txt file that contains the xyzrgb data prior to import. There is an empty line at the end of the file and it must be removed, but all of the text editors I have tried struggle to open such a large file. I was able to delete the line using Wordpad, but there was a great deal of waiting involved.

Here is where I got the script for viewing the point clouds in Unity:
http://unitycoder.com/blog/2012/09/01/x ... ewer-dx11/
The developer is very helpful and responsive, and is helping work through all the minor details.

Eugene, I also would love to hear more about what our New Zealand buddies have been cooking up!
jedfrechette
V.I.P Member
V.I.P Member
Posts: 1237
Joined: Mon Jan 04, 2010 7:51 pm
14
Full Name: Jed Frechette
Company Details: Lidar Guys
Company Position Title: CEO and Lidar Supervisor
Country: USA
Linkedin Profile: Yes
Location: Albuquerque, NM
Has thanked: 62 times
Been thanked: 220 times
Contact:

Re: A Small Gift - simple model explorer for Unity 3D

Post by jedfrechette »

jcoco3 wrote:There is an empty line at the end of the file and it must be removed, but all of the text editors I have tried struggle to open such a large file. I was able to delete the line using Wordpad, but there was a great deal of waiting involved.
It sounds like you need a stream editor, like sed [1]. You still need to wait a bit but the following command will delete all blank lines from your text file, regardless of where they are, while you go have a cup of coffee.

Code: Select all

sed -i '/^$/d' points.txt
[1] http://en.wikipedia.org/wiki/Sed
Jed
User avatar
jcoco3
Global Moderator
Global Moderator
Posts: 1724
Joined: Sun Mar 04, 2012 5:43 pm
12
Full Name: Jonathan Coco
Company Details: Consultant
Company Position Title: Owner
Country: USA
Linkedin Profile: No
Has thanked: 70 times
Been thanked: 157 times

Re: A Small Gift - simple model explorer for Unity 3D

Post by jcoco3 »

Thank's Jed, I will give it a shot tomorrow. The developer's suggestion was also similar, but within the Unity script, I have not tried it yet either. Thanks for the help.
max72
V.I.P Member
V.I.P Member
Posts: 846
Joined: Tue Feb 26, 2013 9:32 pm
11
Full Name: Massimo De Marchi
Company Details: Massimo De Marchi
Company Position Title: freelancer
Country: Italy
Skype Name: massimo_de_marchi
Has thanked: 15 times
Been thanked: 53 times
Contact:

Re: A Small Gift - simple model explorer for Unity 3D

Post by max72 »

You could try cloudcompare.
it can resample the data in many ways, and you can do it from command line too.
I'm confident the output has not extra lines.
Otherwise the solution (for occasional use) I would use is
Use tail to see the last lines and check if intervention is required
In case use wc -l (word count - numbers of lines) to get lines number
Use a script to cut off the last line. I have similar perl scripts. Have to dig the hard disk to find the right one...
I'll post it soon.
Massimo
ing. Massimo De Marchi - +39 347 32 17 049 - www.studiodemarchi.net
max72
V.I.P Member
V.I.P Member
Posts: 846
Joined: Tue Feb 26, 2013 9:32 pm
11
Full Name: Massimo De Marchi
Company Details: Massimo De Marchi
Company Position Title: freelancer
Country: Italy
Skype Name: massimo_de_marchi
Has thanked: 15 times
Been thanked: 53 times
Contact:

Re: A Small Gift - simple model explorer for Unity 3D

Post by max72 »

This one looks promising..
http://gnuwin32.sourceforge.net/packages/coreutils.htm
It contains tail and head.
You should be able to use head to cut the last line of a file.
Just in case cloudcompare is not enough..
Massimo
ing. Massimo De Marchi - +39 347 32 17 049 - www.studiodemarchi.net
Post Reply

Return to “Modeling Software”