Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

When will Unity have Open SubDiv?

Discussion in 'General Discussion' started by Butch007, Oct 7, 2012.

  1. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9
    Looking at Square Enix's implementation of Open SubDiv in the engine makes me very interested in seeing this in Unity. (http://www.agnisphilosophy.com/en/index.html) Considering Pixar made it open source it should be simple to at least grab it and make some sort of implementation quickly. I wonder if the Unity developers are working to implement Pixar's Open SubDiv at all? I'm also wondering if they are working on adding Ptex as well which would be huge as well especially for 3D artists.
     
  2. AqusSeven

    AqusSeven

    Joined:
    Aug 10, 2011
    Posts:
    119
    If this was the case unreal and crytek would have implemented it already in their products.
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Unlikely to be added:

    On one hand it requires GLEW, which means about half the supported platforms would be cut or require major efforts
    On the other hand it offers optional GPGPU which for stuff like seen on the movie are not remotely 'optional' anymore, which is a thing not supported on Unity outside DX11s DirectCompute either which Open SubDiv on the other hand does not support
     
  4. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    It's not really intended for use in games. Unlikely to be adopted by any major engine for some time.
     
  5. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9
    Impossible...it was closed, inaccesible source until just recently.
     
  6. AqusSeven

    AqusSeven

    Joined:
    Aug 10, 2011
    Posts:
    119
    Your missing my point, udk and many other engines get major updates every month (admittingly mostly large team based workflow and lighting upgrades). Any easy to implement feature in that was worth being in a AAA game engine would appear in at-least udk within months and they would tell you via their fb/twitter/email etc when they started. This thread should be closed.
     
    Last edited: Oct 17, 2012
  7. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9

    It's only been made available in the last couple of months.
     
  8. Darkhazard

    Darkhazard

    Joined:
    Oct 4, 2010
    Posts:
    105
    Well said from a non-programmer.

    If it's so simple to add it then build your own engine using it? It is open source right?
     
    zoran404 likes this.
  9. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9

    You were missing the point. Pixar's SubDiv algorithms are not only closed, but there's no other implementation that comes close to it's efficiency.

    Check out the tech demo (particularly starting at about 10:00) Open SubDiv Tech Demo
     
  10. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9

    Such and a$$hat. I mean there's so much third party source already integrated in Unity because it works, go crawl back down your troll hole.
     
  11. Darkhazard

    Darkhazard

    Joined:
    Oct 4, 2010
    Posts:
    105
    I didn't mean to insult you. Unless you have done it yourself don't insult the unity dev's by saying it should be simple to do.
     
  12. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574



    I thought Tessellation feature in DX11 that UT is bringing in is essentially the same thing.



    From Microsoft :

    "The Direct3D 11 runtime supports three new stages that implement tessellation, which converts low-detail subdivision surfaces into higher-detail primitives on the GPU. Tessellation tiles (or breaks up) high-order surfaces into suitable structures for rendering."

    http://msdn.microsoft.com/en-us/library/windows/desktop/ff476340(v=vs.85).aspx


    From Nvidia:


    http://www.nvidia.com/object/tessellation.html




    EDIT: Unity 4 already supporting it







    http://docs.unity3d.com/Documentation/Components/SL-SurfaceShaderTessellation.html



    The only real difference between DX11 Tessellation vs "Subdivision surface" is in the modeling stage, the "Subdivision surface" requires 'quad' polygons to work while DX11 Tessellation doesn't - it works regardless since it subdivides trianglar mesh. In term of workflow and pipeline - there is no difference to you as far as I can see - you just model as usual (in quads if you like) and export the mesh and Unity will triangulate it anyway and it will go through DX11 Tessellation stage and comes out looking the same as any other Subdiv surface implementation.
     
    Last edited: Dec 5, 2012
  13. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Well, TBH Unity cant just say it is to hard, there has to be other reasons.. but yeah it would be great if we had this implemented.

    Anyway, I just say that because I love all features, from what I see it seems like this is just a better version of tessellation... and maybe not real time?
     
  14. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9
    Dynamic tessellation is good enough for hard surface assets and non-organic animating assets and will probably be deemed good enough by a lot of shops for everything, but my guess is that Open SubDiv is far more efficient for animating organics with mixed surface characteristics like characters. Consider that it's a time tested technology before you judge.

    Just as importantly, from an asset management standpoint, there are lots of Film resolution models that would probably be able to just pass through to a game pipeline without modification or with minimal modification. Most formally trained modelers learn to model in quads before jumping into process saving low poly techniques, it's just part of being a professional.
     
  15. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    So, would you enlighten us what is the real advantage of Open SubDiv over DX11 tessellation?
     
    Last edited: Dec 5, 2012
  16. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    But if it's already "film resolution" doesn't that defeat the point of this, which is to dynamically increase the resolution of low(er) resolution models?

    I personally wouldn't want to use film resolution models in a game pipeline, though. For a start they'll take up a lot more space, and secondly there are performance considerations aside from straight up poly count which matter, such as the type and number of materials.
     
  17. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Come on man, use your eyes... the quality Open SubDiv is clearly a massive step above tessellation in terms of quality, if you look a a tessellated thing it is nearly always visible were the original polygons were this no way!
     
  18. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574

    Massive step forward? You do realize the quality depends entirely on the implementation of tessellation algorithm (the way of polygon distribution) and tessellation level (how many polygons) right?? It is entirely up to you how you implement your algorithm and tessellation level.

    Again, show me the advantage or an example of so called "massive quality difference". :D
     
    Last edited: Dec 5, 2012
  19. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    I was kinda bewildered by the tessellation on DX11. To me, I was expecting the SubD surface like Catmull Clark and not that mess of polygons, but it looks very clean and detailed, especially when it is used with displacement mapping
     
  20. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
  21. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    SDS doesn't need quads, it's just generally easier to model using quads. This is true for games or for high res stuff.

    You can generally use any number of sides to a polygon and you'll get a clean result with SDS so long as you know what you're doing (or using the more advanced Catmull-Clark subdivisions, for example).
     
  22. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574

    I always thought the reason for using quad is for nicer edge flow and to avoid subdivision artifects such as starshape/poles. But I do agree it doesn't require quad to work.
     
    Last edited: Dec 5, 2012
  23. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Depends on the subdiv algorithm. And even the crappy ones can get away with ngons and triangles here and there. You've just got to know what you're doing.
     
  24. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    I never saw any information that Agni's Philosophy demo is using OpenSubDiv (or catmull-clark subdivision surfaces). OpenSubDiv was released after Square Enix' demo afterall.

    Nothing is ever simple. And OpenSubDiv isn't exactly "finished" right now (CPU part is mostly done, but the GPU implementation is very much in-progress).

    But yes, I agree that it's a very interesting piece of technology. That said, right now we aren't integrating it; there are more important things to do.

    That said once more, you can already do Epic / Square Enix / Crytek's Toad style subdivision + displacement in Unity 4.0; it seems to be just flat or Phong tessellation and some displacement maps.


    If anything, that's totally not a reason. Yes, current OpenSubDiv code drop uses GLEW. But also, yes, removing that would actually be a piece of cake. All the "other parts" about integrating it, however, aren't piece of cake.
     
  25. OpenSubdiv

    OpenSubdiv

    Joined:
    Dec 10, 2012
    Posts:
    1
    Howdy,

    It would be great if Unity was interested in using OpenSubdiv. Takahito is a member of the Pixar GPU team who implemented a quick Unity plugin for OpenSubdiv to try it out. It's basic but we're working on getting that folded into the public codebase for folks to build on. We don't use Unity at the studio but the engineers here recognize how important it is in the real time world. Work that we've done for Unity has been a weekend project for us so far but we hope it builds momentum. We've met with the Square Enix folks several times also, Agni's is pretty amazing. They don't use OpenSubdiv but we hope they may someday.

    We're about to open the release candidate codebase which we feel brought the API and functionality for drawing to a mature and stable place. We support DirectX and OpenGL for drawing, and CUDA/OpenCL/GLSL/C++ and soon DirectX for the GPGPU compute stage. We use it regularly on Linux and Windows, and have more weekend projects porting OpenSubdiv to Android and WebGL through OpenGL ES usage. The beta code shown over the summer is currently being used by Pixar animators in released code, so we feel good about it's performance and stability in real working environments.

    We're a little short on documentation unfortunately, but see: http://graphics.pixar.com/opensubdiv/news.html for a Vimeo video of our latest presentation. We're working on better documentation.

    Others asked about the difference between tessellation and OpenSubdiv. As was pointed out on the thread tessellation is a very general tool that you can use to dice lots of things. Some folks do things like PN triangles or approximate Catmull-Clark evaluation to generate smooth surfaces from a polygonal mesh using tessellation. See an earlier summary like: http://www.ludicon.com/castano/blog/2009/01/10-fun-things-to-do-with-tessellation/

    OpenSubdiv is in the same spirit, but generates a surface that exactly matches the final rendered surface rather than generating an approximation. We also support features like semi-sharp creases and hierarchical edits that aren't supported by approximate Catmull-Clark- though folks like Square have added their own creasing extensions.

    -Dirk Van Gelder
    Pixar GPU Team
     
  26. Tae

    Tae

    Joined:
    Oct 7, 2012
    Posts:
    44
    Can't wait ^
     
  27. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    <nerdorgarsm>This is better solution than Dx tesselation and is multiplatform!!!</nerdorgarsm>

    I am glad code is open, UT have no time to play with it at the moment, but I know community will create great things using this tech.
     
    Last edited: Dec 10, 2012
  28. Butch007

    Butch007

    Joined:
    Oct 7, 2012
    Posts:
    9
    I'm glad that my little request thread attracted the attention of the Unity developers and Pixar Software development people. Accessible hardware accelerated rendering and hardware accelerated rendering for realtime or close to real-time applications seems to have always been part of Pixar's vision/mission from the beginning so I know how important open sourcing Pixar SubDiv technology is to them. They are as invested in the success of this idea as they are in any other thing they've invested time and resources into, maybe more.

    With Pixar already having extended themselves to the point of starting to code OpenSubDiv into UNITY in-house, hopefully some type of some type of collaboration can take place or the UNITY team can take the reigns and get OpenSubDiv humming within UNITY in as painless a way as is possible.

    I'm glad to finally have the Square Enix non-use clarified. I'd read, albeit briefly, a post of some forum that it used OpenSubDiv and the timing seemed to fit it terms of some kind of pre-testing before Pixar SubDivs were open sourced.

    As an additional note I've never understood the Direct X elitism that seems to inevitably pop-up when any topic about real-time graphics not involving Direct X comes up. It's even more puzzling these days considering the explosion of opportunities that have come about in the last few years in mobile, Linux, [edit] expanded OS X/iOS, PS3/PS4 and Android development don't have anything to do with Direct X.
     
    Last edited: Jul 22, 2013
  29. The-Spaniard

    The-Spaniard

    Joined:
    Jan 7, 2012
    Posts:
    149
    Could this guy have a more appropriate surname for what he's doing?! :D


    Whilst I don't know that much about tessellation of either kind, I do get slightly worried about the push towards greater and greater visual fidelity, and the limitations it places on games creators. To create an asset from a sculpt takes significantly longer than "normal" modelling, and therefore means that to create games of this kind of fidelity takes more time and money - which means you miss out on depth and complexity in the mechanics and gameplay of the game. And a focus on photorealism takes away attention from the overall art direction, which is easily the main factor in determining how good a game looks.

    I suppose technologies such as Dx11 tessellation are a better way of showing off the high def models that you've already made (and would normally approximate with normal maps etc) but this also places pressure to use the same method on everything - which normally wouldn't have to be sculpted and super high res to look consistent. I mean, if you made a high res sculpt for your main character and baked it into a normal map, and modeled a wooden chair and made a normal map from the texture - the two will look consistent in your game. But with tessellation etc, your character looks super high res, so you have to sculpt your chair to maintain consistency, which takes more time...

    What we really need are tools to increase the efficiency of creating these super high res assets - to allow for fast iteration and prototyping, similar to how Unity is increasing the efficiency of creating the "game" aspects of the game.
     
  30. squidbot

    squidbot

    Joined:
    Jan 4, 2011
    Posts:
    128
    This thread is worth a necro since Dirk Van Gelder actually paid attention to it, which is awesome :) Apparently with v2 of OpenSubDiv, Pixar has released a better implementation and also some patents it had on subdiv surfaces: http://www.fxguide.com/featured/pixars-opensubdiv-v2-a-detailed-look/

    This is definitely worth a second look. Someone is already experimenting with it, I think I'll be adding to that list as well. http://geofflester.wordpress.com/2013/04/29/if-i-said-i-was-done-id-be-lion/
     
  31. geoffeep

    geoffeep

    Joined:
    Feb 13, 2013
    Posts:
    4
    Glad you liked my tinkering :)

    Yeah, I'm very excited about openSubDiv, would love to see it in Unity.
    Houdini and Maya now support it, so I hope to see more artists moving towards edge-weighted sub-d, and more software / engines supporting it too.

    The nice thing about edge weighting is that the base meshes end up being a lot cheaper than more standard sub-d models, because you're not bevelling every edge. It makes for a nicer modelling workflow (in my opinion), and control cages that you could feasibly use for distance LODs.

    There's additional benefits of OpenSubDiv (specifically) that Dirk mentioned, such as feature adaptive tessellation and hierarchical edits, explained better in that link that Squid posted above than I could manage.

    ***

    For my little test in Unity in that blog post, I only really implemented edge weighting, and quad mesh importing, and all on CPU not GPU like openSubDiv.
    So it's super slow and hacky, and you end up with crazy heavy meshes, because it's just creating a bunch of high poly meshes for the different sub-d levels.
    The meshes and code would need to have some very heavy optimisation.

    The point of the exercise?
    It can be hard convincing artists to build edge-weighted models, and engine / graphics programmers that the runtime costs of OSD are worth it. There's considerable risk, because building / integrating this tech would potentially need a whole project worth of support.

    Having a backup pipeline that generates mesh LODs would reduce some of the risk of "Oh god, we're 3/4 the way through making a game with all sub-d models, and the GPU is melting!".
    You could go through a bunch of assets at that point, and flag them for pre-generated sub-d LODs to reduce the runtime costs.

    It seems like this is fairly close to what they are suggesting for Unreal 4:

    https://answers.unrealengine.com/questions/11738/request-opensubdiv.html

    As long as I get edge-weighted sub-d models that look the same as they do in Modo, I'm really not too fussed whether it's OSD, or a different tessellation implementation , it just seems like OSD is a great opportunity to miss...
     
  32. geoffeep

    geoffeep

    Joined:
    Feb 13, 2013
    Posts:
    4
    That is a good point, and the focus of tessellation so far has been to smooth out models, then use displacement to "fill out" the shapes from sculpting.

    I think is worth mentioning that sculpted assets aside, OSD and edge weighting can actually make it incredibly quick to create hard-surface objects, and I find that *most* games tend to have a lot more of these sorts of assets.

    For good examples you should totally have a look at the Modo forums, or any Pixar films, but... For the sake of argument, I'll post a bunch of my stuff.
    I don't do this stuff for a job any more, so the times listed will be a lot longer compared to what a professional artist could pull off :)

    This took me about 2 hours to model, and trying to straight poly model it with all the bevelling, etc, would have taken me longer:

    http://geofflester.files.wordpress.com/2013/07/deco-dispense.jpg

    This thing took me a few days, but I've spent more time on lower poly models for games than this:

    http://geofflester.files.wordpress.com/2013/07/full1.jpg

    This model was probably about 8 hours over a weekend (except for the keyboard, which is part of Modo's stock assets).

    http://geofflester.files.wordpress.com/2013/02/render6.jpg
    http://geofflester.files.wordpress.com/2013/02/render3.jpg

    ***

    So I think that for some models, OSD (or just edge-weighted sub-d, in general) can make the modelling process easier.
    I also see edge-weighted sub-d as a vehicle for less experienced modellers to make higher fidelity assets.

    Another things that's worth mentioning, is that having less verts in the mesh, and most of the detail generated from edge-weights can actually reduce the time taken when modifying a mesh.
    For example, if you want to modify the bevelling width on any of those objects, or adjust the curve shapes, it's very easy to select edge loops and just change the weights, rather than removing and re-bevelling, etc :)
    This is the sort of operation that can easily mesh up UVs as well, but that should not be an issue with edge weighted models.

    All this stuff is just my ten cents, many artists would disagree :)
     
  33. geoffeep

    geoffeep

    Joined:
    Feb 13, 2013
    Posts:
    4
  34. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,741
    holy necro, but just why, Unity is a game engine, not a 3d modelling application
     
  35. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    Unity is a real time visualization application. Over 1/2 the jobs I get have nothing to do with games. There is a bunch of you that are basic Luddites when it comes to implementing anything that will not improve your MMORPGFPSXYUZ. Not interested. Go gander at another thread and let the folks interested in this tech get a discussion going without passive aggressive derailing.
     
    elbows likes this.
  36. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    Here is an example of the use of SubD's. I am creating a car modeling application in VR for Porsche. It is built so that the designers can move around a virtual clay car and grab points, edge. panels and objects on the car and move them, scale them and rotate them. Change the wheelbase length and width, add more curve to a fender, move the air vent on the front back to the rear of the door and rechannel the air intake and output channel. Then grab the outline splines and weight them and the edge gets sharper or softer. The basic cage for the car is maybe 8000 polys but is rendered at 2X subd so I get around 128K polys generated at runtime with full control over edge sharpness, beveling etc. that subD's offers. For organic characters the benefits are awesome. Load a 1000 poly character and it can have LOD levels that get progressively more detailed and will not crumple at joint bends. This can save a great deal of time in weighting models.
     
    Devilwhale, elbows and MV10 like this.
  37. geoffeep

    geoffeep

    Joined:
    Feb 13, 2013
    Posts:
    4
    Because you can have very low memory meshes with semi sharp creases that can have incredible detail up close.
    And (eventually) control cages will be simple enough to use as your lowest LOD, especially with edge creasing, because you're not beveling edges everywhere like other sub-d methods.

    But don't take my word for it, because I've never actually used an engine that supports edge weighted sub-d, so I can't fully justify my excitement about it outside of loving it in Modo.

    Take Call Of Duty's word for it, they've been using subdivision meshes with semi sharp creasing since 2014 apparently:

    https://graphics.stanford.edu/~niessner/papers/2016/4subdiv/brainerd2016efficient.pdf

    Edit: Necro'd again because I'm back to doing some work in Unity with sub-d meshes, after a long excursion in UE4 land, and stumbled back on this thread. I'll just be using the sub-d meshes as pre-built lods for now.
     
    Martin_H likes this.