Jump to content
3DCoat Forums

New autopo algorithm: Autopo for game assets


Gian-Reto
 Share

Recommended Posts

  • Advanced Member

Long time 3D Coat user here, been mainly using 3D Coat to create game assets for my own hobby projects for some years now. Impressed what the tool can do, having to use blender less and less with some of the features I have found in 3D coat over the years.

One thing never really worked for me however, and that is the autopo feature. Now correct me if I am wrong, but I see the current implementation of autopo as being more optimized for people wanting to create 3D models for animation, rather than games. The heavy emphasis on quads and even distribution of the polygons seem to suggest this. For game assets, at least the static ones, that is the wrong approach in my expierience however. Getting the best shilouette match with the least amount of tris used, and more often than not, using tris instead of quads to make sure every single tris counts towards the shilouette seem to be the right way to go forward.

Having purchased ZBrush lately because some of the brushes are just better for general sculpting of rocky objects, I found out that I could directly export the high poly sculpt from ZBrush as a mesh, which besides being easy to import as a high poly voxel object for retopo in 3D Coat, also allowed me to import it into blender to run the decimate modifier over it. And to my amazement, that modifier actually did work, and gave me an 90-95% usable low poly mesh I could then load into 3D Coat for retopo.

Now, Blender decimate is not perfect. There are the misplaced edges sometimes, which result in ultrathin tris giving 3D Coat headaches during the bake, which need to be cleaned up after. Sometimes the algorithm just seems to stumble and fall on its face, resulting in areas with tons of tiny tris for no apparent reason (that could be a problem with the ZBrush mesh though). So I did have to clean up the meshes. But even with that, I got a mesh that very closely followed the shilouette of the highpoly mesh, and was able to quickly bake the low poly mesh after about an hour or so of clean up.

Contrast that to the amount of time I would spend on putting guides on the high poly mesh for Autopo, and then STILL get a mesh with just evenly spaced quads placed without taking the shillouette of the voxel sculpt into consideration apart from my guides, and I bet I would spend way longer going down that route.

 

So what I would like to discuss here if there would be a need for an improved Autopo function, which lets you select different algorithm to generate the Autopo mesh. So the idea clearly is not to replace the current algorithm, which I guess is fine for many users, and what I am suggesting here is very much tailored to the needs of game assets... but giving the user the option to select what kind of meshing algorithm should be used.

 

The algorithm I envision would basically try to to create a mesh, matching the high poly mesh / voxel objects shilouette as best as possible while using the least amount of tris within a given tris budget. So if there is a flat surface... ideally use only 2 tris, or however many are needed to get a good shape in case the flat surface resembles an octagon more than a quad, for example. If there is an edge in the high poly mesh or voxel object, place the edge of an Autopo mesh tris on it. Favour the more acute edges, and steeper angles first, only placing edges on smaller detail edges when the bigger details have been accounted for.

Keep the tris budget input, keep the guidelines (as you might want to help guid the topology for something like a face), keep the density modulator (in some use cases that might be helpful)... but the main work should be done automatically by the algorithm, so when you have run it on your voxel object, you get a pretty usable mesh for a game asset right out of the box, without fiddling around with guidelines or density. As long as you don't care about the topology, you should get a mesh which best captures the details it can from the high poly object within the tris budget you set, without anything other than setting that budget and hitting the autopo button.

 

Maybe a selector switch for tris or quad preferrence would be a good idea.... after all, some people prefer quads, seems to be still preferred for skinned meshes. Maybe a way to paint areas where one or the other should be preferred the way it is currently done with density?

 

What do you guys think? Am I just not getting the way the current Autopo tool works, or is there a real need for an Autopo revamp?

Edited by Gian-Reto
Link to comment
Share on other sites

  • Reputable Contributor

I find that it works exceptionally well on more simplified objects. If you have a complex shape or model, it's a good idea to either keep it modular as you model or use the Hide tool to hide parts of the model and run auto-retopo on segments of a model.

 

  • Like 1
Link to comment
Share on other sites

  • Advanced Member

But can you tell the algorithm to favor tris? I found that I often had to go in and add edges because the algorithm ignored part of my guides and placed a quad on an edge of my voxel model.

Also, I still think the algorithm shouldn't wholly rely on density paint to choose the density of the mesh at certain points... thats just wasteful for game assets.

 

But thanks for the hint about running autopo only on parts of the model. Have to try it one of these days when working with a simpler voxel object.

Link to comment
Share on other sites

  • Reputable Contributor
8 hours ago, Gian-Reto said:

But can you tell the algorithm to favor tris? I found that I often had to go in and add edges because the algorithm ignored part of my guides and placed a quad on an edge of my voxel model.

Also, I still think the algorithm shouldn't wholly rely on density paint to choose the density of the mesh at certain points... thats just wasteful for game assets.

 

But thanks for the hint about running autopo only on parts of the model. Have to try it one of these days when working with a simpler voxel object.

That's the problem. No auto-retopo algorithm, whether it's 3D Coat, ZBrush's ZRemesher, Mudbox, etc. spits out a game-ready mesh. They are designed to provide a more uniform quad distribution. Not one that is optimized for games.

Link to comment
Share on other sites

  • Advanced Member
9 minutes ago, AbnRanger said:

That's the problem. No auto-retopo algorithm, whether it's 3D Coat, ZBrush's ZRemesher, Mudbox, etc. spits out a game-ready mesh. They are designed to provide a more uniform quad distribution. Not one that is optimized for games.

Which is a shame really.

 

Given that I had quite good results with the decimate modifier in Blender, is there any way to directly create a mesh from a Voxel object and export that? I mean, 3D Coat has to create a mesh anyway to send to the GPU, sooooo... is there a way to export the mesh of millions of polygons that is used to display the voxel sculpt?

That would allow to export the sculpt, and let other 3D tools with different decimate capabilities run over it. Like Blenders decimate, which ain't perfect, but does the job.

Edited by Gian-Reto
Link to comment
Share on other sites

  • Reputable Contributor
1 hour ago, Gian-Reto said:

Which is a shame really.

 

Given that I had quite good results with the decimate modifier in Blender, is there any way to directly create a mesh from a Voxel object and export that? I mean, 3D Coat has to create a mesh anyway to send to the GPU, sooooo... is there a way to export the mesh of millions of polygons that is used to display the voxel sculpt?

That would allow to export the sculpt, and let other 3D tools with different decimate capabilities run over it. Like Blenders decimate, which ain't perfect, but does the job.

FILE Menu > EXPORT > EXPORT DENSE QUADS. Try that and see if it works with Blender's decimate tools

  • Like 1
Link to comment
Share on other sites

  • Reputable Contributor

I agreed the auto-routine could do with some more refinement. It will fail competely on some models while mudbox will create a fine mesh, At times it will put a large amount of polygons where not needed and not enough to cover some areas. Mudbox will do the same at times too but to a lot lesser degree than 3DC. I am not saying as AbnRanger said that any auto-routine will make a game ready mesh... 

I also would like to see the autopo routine follow the curvature better when using a lower amount of polygons... 

Painting Density still is a hit and miss. Sometimes seems to work other times not. 

You might find some interesting tips on this tutorial series by Christoph Werner, not that you are inexperienced but we all can get some new tips.

The transform tool now is very good for creating polygons along cylinder type of model or model parts. That has been feature added since the below tutorial.

Video 6 and 7 is on manually retopoing for a game ready model. 

https://www.youtube.com/watch?v=ptjEuJ8LbS0&list=PL3zXSVOeORuFJfJUczNtyc3bzzwjeSiTS

 

Edited by digman
corrections
  • Like 2
Link to comment
Share on other sites

  • Advanced Member

Gave exporting the voxel mesh a try... wow! Works like a charm. Why the hell did I never see this option before? Is it new?

Not 100% how well the resulting decimated mesh would be of use for baking, but seems to work rather well all things considered with the Blender decimate option. Certainly quicker to work from such a mesh than first creating a retopo mesh from scratch in some cases at least.

Of course, this is only really usefull for static assets that are kinda damaged, or of natural origin, where exactness of the mesh is of no real importance. An improved autopo algorithm for game asset creation would probably still have some value, as Blender decimate, while doing a fine job, sometimes makes some questionable geometry and is not as configurable as I would wish. And of course, export > import of such a large mesh always takes quite a bit of time.

 

BTW, thanks for the DarkBlender hint. I really have to chech this theme out. Maybe Blender starts looking like the professional tool it is with this? :)

 

Still have to look into some of the other options... but thanks a lot for all the useful information guys!

Link to comment
Share on other sites

  • Reputable Contributor

Another method I am exploring is a combination of 3DC and Maya LT.

Use Autopo in 3DC to create a higher polygon retopo as it tends to follow the curvature of the model better.

Next use Maya Lt to reduce the quads polygons to a lower count triangles but keep the silhouette. Can also do quads if that is what you want.

Shown in second  picture. The results of keeping the silhouette.

Shown in first picture is the 1150 tri model in 3DC with the normal map.

I have just started to explore this method so further testing is required. 

2300 quads would be 4600 tris not including the UV set vertices

987 quads would be 1974 tris --------------------------------------

1150 tris  ( 830 tris, 160 quads) --------------------------------------- The quads will be divided to tris. You can triangulate the quads when re-importing into 3DC.  

I know it is not necessary to triangulate a quad model for Unity or Unreal as the engines will do it auto, so a artist call depending upon the end result use of the model.

Last picture is 500 Tris... showing the wireframe and the low tri silhouette. 

What I like so far... keeping the silhouette appears to work good. Important for VR work as normal maps do not work very well in VR.  Up close they look painted on. They can enhance the model as they respond to light direction but having a good silhouette is necessary.  

Keeps uv set preserved so you can use your textures and normal map.  Might cause a few problems but those can be repaired. 

Maya Lt and 3DC are very good companion software.

 

 

 

tris2.JPG

tris.JPG

500.JPG

Edited by digman
corrections
Link to comment
Share on other sites

  • Reputable Contributor

As this was a spur of the moment test I just used the 2,300 poly retopo mesh I had. 

To get a even better result of Maya Lt's decimation routine for following the silhouette a higher autopo mesh would be better. like say around 10 to 20 thousand polygons.

Then use the Maya Lt mesh has your retopo mesh for baking or use the method as in the first post.

Edited by digman
Link to comment
Share on other sites

  • Advanced Member
On 2.7.2017 at 2:27 AM, Carlosan said:

And what about Retopo Via Decimation ?

 

RetopoViaDecimation.jpg

Couldn't get that test done this weekend. Will try to look into it this week. I am pretty curious how well this method works, but I will maybe have no time to try until friday. I'll update the topic as soon as I have tried

 

@digman: Is there a difference between how Blender and how Maya does the decimation? From my tests with 3D Coat voxel objects exported as meshes it looks like the problem with messy parts of the decimated mesh comes from the exported ZBrush mesh, which most probably has some weird artefacts somewhere in the mesh. So Blender seems to work just fine together with an exported 3D Coat voxel object, without any cleanup needed really.

As I do no longer have access to Maya, could try you the same thing with Blender to see if there is a difference in the output? Again, only if you have Blender installed and the time to run the decimate modifier. Would be cool to see how the two tools stack up in this particular use case.

Edited by Gian-Reto
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • Advanced Member

Okay, gave the "retopo via decimate" a testrun today and have to say, I am officially impressed. For a moderatly complex model with many sharp angles (a crystal), the algorithm did a fabolous job once I got the amount of decimation right.

Cleanup was needed, but once the Voxel object was smoothed, there were no weird artefacts, just some unneded bevels. I think this is pretty close to what I originally envisioned.

 

Thanks for all the hints and tricks mentioned. I am grateful for all the help you have given me!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...