Closed zz85 closed 10 years ago
@mrdoob should we make the subdivision modifier just work on Geometry2
or finish it with Geometry
then port it over?
Good question... Maybe Geometry2
...?
Can't sleep due to an overdosed of caffeine after drink some local tea, gonna give this another shot. Using references from http://graphics.stanford.edu/~mdfisher/subdivision.html and http://www.holmes3d.net/graphics/subdivision/ ...
@mrdoob I'm don't see any examples of Geometry2
with WebGLRenderer
at the moment, so I testing this with the old geometry.
Good news: managed to get it working :) (Requires 3 subdivisions for models to look nice though)
Code on GIST currently: https://gist.github.com/zz85/9064672 not tested with UVs etc and requires cleanup.
Time for some sleep first!
Sweet! :D
It's also much faster and less code ^^
Thanks to the tea for keeping me awake that night :)
Would also be interesting to hear results from those running SubdivisionModifier
in production... ping @ZanQdo (#3024)
Great news @zz85 I will let my guys know, hopefully try it out and report back!
Hi,
I experienced issues when trying an import of subdivision surfaces from Blender (or Clara.io) to three.js. Those 2 softwares do not use Loop scheme, even on triangular meshes (first step will split triangles into quads). I'm not 100% sure but I think this is why subdividing in three.js does not give the same surface as subdividing in Blender. Also, splitting quads to triangles impacts the resulting surface, giving even more difference.
We wanted to use subdivision surfaces in my company to reduce the size of the files to load. Would it be possible somehow to resurect the old Catmull Clark subdivision code ? As an option to the subdivider maybe ? I guess I can also just copy-paste it in our code base, but I think it would make sens to stay compatible with existing softwares.
After
Face4
s were killed (See #3663), subdivision modifier has always been a known issue in releases and is part of the TODO 's "Replace Catmull-Rom based SubdivisionModifier with a Loop subdivision implementation".Of course there's no guarantee loop subdivision is going to be a perfect replacement, but its something we should work on. I've given it a shot but didn't have the strength to finish through with the implementation. Will try resuscitating it if I can, meanwhile anyone who wants to give it a shot should do so :)