2

tl;dr;

How a software developer who get's a very high detailed 3D model, quickly & easily optimize it for mobile apps, so he can focus his time & energy on developing the app logic?

I think it's a pretty common use case and there may be a tool for this already out somewhere.

Long story

I have a 3D model (collada) of a machine. This model being created by the machine's engineering team, contains a lot of minute details essential in creating the machine hardware.

Now, I am developing a mobile app with unity that needs to render this machine along with 10 other machines in a single scene. The thing I like about the available models is that they look exactly like the real stuff. At the same time, I am not interested in the internal stuff, the external shell is just enough for me. I have no interaction with the 3D modelling team (let's assume I downloaded the model from some archive), and hence can't ask them to make any changes for me. The model is all I have. I am on my own.

There are two problems I am facing

  • How to get rid of the interiors of the models?
  • How to get rid of the high resolutions details in the external shell which the human eye can't detect in a mobile phone?

To give a sense of the scale, the real equipment and hence the model can be as big as 100 ft. (30 m.) while these will never occupy more than a 5 inch HD display. The size of the models ranges from 50MB to 400MB. The entire scene hence can go up to 2GB. Each model has nearly 300k faces.

The other challenge I am facing is that I am a software developer familiar with code and my familiarity with 3D modelling tools is very limited and I would like it to be that way :) I can play around with these tools, but I don't want to start spending half my time with these tools.

I have tried blender's decimate modifier. But the result's aren't good, the amount of details lost is very uniform, instead of being targeted to the interiors. I don't want to spend time in going through each mesh and deleting them manually.

Also, for some reason when I import a model that is exported from blender into unity, they look horrible (some faces/polygons that I can see in Blender I don't see them in unity), even with 0 decimation.

I am unable to digest the fact that the manual process is the only way. I feel with today's technology this would be a simple automation. The steps as I see are

  • Detect polygons that aren't directly reachable from any exterior raycasts. If required, I can define the set (14 may be enough) of points for the raycast's origin, basically camera's locations.
  • Delete these polygons
  • Detect polygons with dimensions less than a threshold
  • Delete these polygons
Jugal Thakkar
  • 13,432
  • 4
  • 61
  • 79

2 Answers2

1

Blender to unity models can have slight problems if you don't export them the right way. How to do this is out of my field as I am also a developer and personally prefer 3DSMax.

What I would reccomend you to do is do what you don't want to do, it is the easiest way. Select the faces (just drag and select) and then just delete them all (the inside faces that is) you should be able to hide the outer shell if you got a propper 3d program, just google how to do it if it's too complicated for you.

If you want to delete smaller details on the outside, do exactly the same... just select the polys and delete them. I wouldn't reccomend using a build in tool because most of those tend to take the whole object and make it less polys or more polys depending on what tool you use.

In the end next time just try to get in to the program, as a programmer I dislike having to use 3D modelling software as well, but it is part of the job, so put some effort in and just learn the tools. It's less work than it seems.

Edit: As for the tools you are asking for, those do not really exist, you don't normally take a high poly model and change it to a low poly model for a mobile game. Instead you usually get a 3D artist to make a low poly model. The fact you do not have any communication with the team is a bit odd, but so be it. I'd reccomend either getting in touch with them or like I said before, putting the effort in and learning a 3D program, what you are wanting to do literally sounds like just click, drag, select and then press delete to delete some polys you wouldn't see anyways.

-Lars

LAKster
  • 151
  • 1
  • 1
  • 12
  • Thanks Lars. The reason I don't have communication with the model team is that these models are perhaps created ages ago and all we now have is the model, probably the team itself has moved on. The models aren't in active development but are fetched from a sort of archive. – Jugal Thakkar Sep 17 '15 at 08:15
  • I am unable to digest the fact that the manual process is the only way. I feel with today's tech this would be a simple automation. The steps as I see are just 2. Detect polys that aren't directly reachable from any exterior raycasts, or detect the ones that are and take the inverse. Delete these polygons altogether. Second step is, remove all polys that are less than a given dimension. – Jugal Thakkar Sep 17 '15 at 08:18
  • 1
    LAKster is right, it's not that easy. Removing invisble parts can be done with a python script in Blender. But the _remove all polys that are less.._ is extctly was the decimate modifier does. Years ago I had to perform this job and wrote a [blog post](http://www.scio.de/en/blog-a-news/scio-development-blog-en/entry/decimating-high-poly-to-low-poly-and-baking-in-blender). As a respnse one of the readers recommended MeshLab which might be worth to consider. – Kay Sep 17 '15 at 09:03
1

with vcglib

vcglib may work for you, you can see the sample for simplify a ply 3D file. And it can applyed for many other 3D file format such as stl, obj... As vcglib is a C++ library, you can write a simple to use this library to simplify your stl model. This method work on the OS without X, such as ubuntu server. You can refer to my quesiton Failed to to simplify 3D models with vcglib, Assertion `0' failed on how to use vcglib to simplify a ply 3D file.

with meshlabserver

If you want do the auto simplyfication on OS with X, or windows, or Mac OS, it's much easy, you can refer to the meshlabserver, meshlab is also build on vcglib. You can run such ccommand, where the PLYmesher_script.mlx is the filter file, you can write this file or generate it with meshlab refer here.

meshlabserver -i ./option-0000.ply -o ./meshed.ply -m vc vn -s scripts/PLYmesher_script.mlx
LF00
  • 27,015
  • 29
  • 156
  • 295