I have a file 500 MB in size with 4 million vertices that was converted to a .blend from a .ply. A large majority of the vertices really aren't necessary, as they are on the same plane. The file comes from scans of the lunar surface by an instrument on the Lunar Reconnaissance Orbiter. It has a lot of artifacts I need to smooth out, but first I need to get the vertex count down.

LOLA scan of lunar surface at Lalande Crater

I tried using the decimate modifier. In order for my machine to handle it (and my machine is no slouch), I had to divide up the file into a lot of smaller objects. Then I tried using the 'planar' option, set at 5o. It worked, but the faces it leaves behind are a mess.

effect of decimate modifier set to planar on LOLA file

I tried using the 'collapse' option, but at the ratio 0.3 it leaves a great deal of artifacts of its own, and the vert count is still 87,000, on a small section of the file.

enter image description here

So does anyone have advice on the least grief-laden way to approach this task?

  • $\begingroup$ Frankly, I'm thinking maybe rebuilding the whole thing using this as a reference is the best idea here... $\endgroup$
    – kim holder
    Mar 11 '16 at 16:13
  • 1
    $\begingroup$ A simple thing to check first would be to select all and remove doubles, choose X > Limited Dissolve and execute Degenerate Dissolve from Mesh > Clean-Up menu. Beware that dissolving may delete more vertices than expected; also these tools won't repair everything. If you do need all that geometry as real one consider either retopology or displacement texture as already proposed. If you don't you could bake normal map. $\endgroup$
    – Mr Zak
    Mar 11 '16 at 18:38
  • $\begingroup$ Try using the decimate modifier. It will give you a lot of control on the desired number of vertices. $\endgroup$
    – user1853
    Mar 12 '16 at 5:07
  • $\begingroup$ @cegaton i'd already tried that, the results are discussed in the body of the question :P I thought maybe of trying again and doing it in stages, but the way the program chooses which vertices to dissolve is too chaotic, the mesh left would be hard to work with. $\endgroup$
    – kim holder
    Mar 12 '16 at 14:17
  • $\begingroup$ @MrZak I tried that out. It works, but like the decimate modifier, it leaves a weird mesh behind with a ton of artifacts. But i hadn't been aware of those functions, it was good to test them. $\endgroup$
    – kim holder
    Mar 12 '16 at 14:20

Because the mesh is fairly simplistic in terms of shape, I would recommend rendering out the Z-Pass/Z-Depth (setting your camera to your top view before render), and saving that image. Then you can start with a new plane, and use the displace modifier, using that rendered image as the displacement texture. Once you have that in place, you could subdivide your mesh until it fits your needs, and add sub-surf modifiers to smooth it out.

I will attempt to circle back around to this post shortly, but as time allows, in order to post screenshots of the process, and step by step text to finalize this answer.

OK, sorry that this took so long, but I personally had to verify the steps to get this done, because it has been a little while since I have used this method, and I wanted to make sure that the steps were correct before posting.

To Get the Z-Pass Image Rendered

  1. Go to top view using Numpad 7.

  2. Ctrl+Alt+Numpad 0 - to set your camera to the active view.

  3. In the Render Panel, Adjust your render size to a proportion equal to your mesh dimensions.

  4. Switch to the Data Panel (with your camera selected it's the one that looks like a movie camera - not the render panel).

  5. Set your camera to Orthographic.

  6. Copy the X & Y Locations to your camera's X & Y Locations.

  7. Adjust your Orthographic Scale until the mesh fills the Camera.

  8. Turn Limits on.

  9. In your 3D View go to a front or side view and change the view to orthographic (Numpad 5).

  10. Adjust clipping start to just above the mesh (the limit line will move toward the top as you increase the start value).

  11. Adjust clipping end to just below the mesh (the far end of the limit line will move toward the bottom of the mesh as you decrease the value).

  12. Go into the Node Editor and into Compositing Mode.

  13. Check 'Use Nodes' as soon as you do, there should be a 'Render Layers Node' as your input, and a 'Composite Node' as your output.

  14. Add The following three nodes:

    • Add >> Vector >> Map Range
    • Add >> Color >> Mix
    • Add >> Output >> Viewer (optional - If using this make sure that you have backdrop checked in the compositor toolbar.)
  15. From the 'Render Layer Node' Take 'Z' and input it into 'Value' of the 'Map Range Node'.

  16. Set 'Min' & 'Max' to the same values that you clipped your camera to in steps 10 & 11.

  17. Take the 'Value' Output of the 'Map Range' and input it into 'Fac' of the 'Mix Node'.

  18. Verify that the top image is 100% white .

  19. Set the bottom image to 100% black.

  20. Take the 'Image' Output of the 'Mix Node' and input it into the 'Composite' & 'Viewer Node'.

  21. Render and save this image for Displacement.

For the actual Displacement

I'm going to describe using the Images as Plane Add-on, as I believe it is the easiest method for this. If you don't have it enabled, please either enable it to follow along from the User Preferences, or Manually add your plane and UV unwrap it from the top view.

  1. Add >> Mesh >> Images as Planes.

  2. Browse to your saved file from the Z-Pass Instructions Above.

  3. With the new Plane Selected, go into the Modifier Panel and Add the Displace Modifier.

  4. For the Texture Just go into the drop down and select the image that you just imported via steps 1 and 2.

  5. Set Texture Coordinates to UV.

  6. In the Modifier (at the top) Enable 'Display Modifier In Edit Mode'.

  7. Sub-Divide your Plane W >> S.

  8. Adjust Mid Level & Strength to suit your liking.

  9. Repeat Steps 7 & 8 Until you are satisfied with the outcome.


There are faster methods, such as Shrinkwrap, or Face Snapping your verts in edit mode, etc... BUT, once you actually do all these steps and get used to them, you will find that this is actually very quick as well.

However this method allows you to keep the detail information in texture form, and adjust your mesh topology up and down separately without worrying about losing information.

This also has great usage capacity when your camera moves away in distance, and you can modify it in a procedural driver sort of way to lessen poly-counts (via Sub-Surf Modifier Driver) in the rest of your scene (super useful for animation render times when things come in and out of focus or change in foreground/midground/background).

  • $\begingroup$ I've been trying to figured this out on my own, but it uses parts of the program i don't know at all. I'm going to try using a shrinkwrap modifier as cegaton suggests, if i can't get that to work, i'm afraid i would need you to walk me through this. $\endgroup$
    – kim holder
    Mar 12 '16 at 15:40
  • $\begingroup$ Sorry, busy weekend for me. So i haven't been able to get the time in. Shrinkwrap should work just as well. $\endgroup$
    – Rick Riggs
    Mar 12 '16 at 19:21
  • $\begingroup$ Yes, in the end that worked well for this case. $\endgroup$
    – kim holder
    Mar 12 '16 at 19:39

I believe using the shrinkwrap modifier on a subdivided plane, using the generated mesh as the target may be an easy way to go about it. This method has the added advantage of giving you full control over the final mesh, although by doing this you do risk ending up with poor topology.

Here's a short tutorial on using the shrinkwrap modifier in case you're not familiar with it :https://www.youtube.com/watch?v=ljMePAmmxx4

An alternative method would be to render out a Z-depth pass image of the mesh and use it as the texture for a displacement modifier on a subdivided plane.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.