Home Technical Talk

Skewmesh Tutorial

1
greentooth
Offline / Send Message
PeterK greentooth
A little Tutorial I did on how to get a bake without skewed elements for hard surface models, hope its helpful:

Max: https://www.youtube.com/watch?v=u8nvDgvKbSs
Xnormal: https://www.youtube.com/watch?v=NRNL_21Ee_w

Replies

  • Shiv
    Offline / Send Message
    Shiv polycounter lvl 15
    <3 really cool stuff man!
    Going to be abusing this for sure :D
  • Mark Dygert
    That is a really smart way to deal with skewing.
  • Dylan Brady
    Offline / Send Message
    Dylan Brady polycounter lvl 9
    welp shit. Ive got to try this next time
    thanks man!
  • jeebs
    Offline / Send Message
    jeebs polycounter lvl 11
  • Kessler
    Offline / Send Message
    Kessler polycounter lvl 17
    Thanks Peter K! I want to give this a try in Substance Designer. I had some quite skewed results in it and have gone back to xnormal.
  • igi
    Offline / Send Message
    igi polycounter lvl 12
    tried and it worked :) this guy has contributed the advancement of humankind, gj.
  • NegevPro
    Offline / Send Message
    NegevPro polycounter lvl 4
    Thanks for sharing, going to try this one today!
  • Millenia
    Offline / Send Message
    Millenia polycount sponsor
    You can also use Handplane to spit out the final tanspace normal rather than re-projecting the mesh in Max, I find it a bit faster for this kinda stuff. Also has the benefit of offering its alternative tangent spaces if you need to access them for some reason :V
  • OrganizedChaos
    Offline / Send Message
    OrganizedChaos polycounter lvl 17
    This looks awesome! I can't wait to try it out, thanks for sharing
  • Aga22
    Offline / Send Message
    Aga22 polycounter lvl 11
    Millenia wrote: »
    You can also use Handplane to spit out the final tanspace normal rather than re-projecting the mesh in Max, I find it a bit faster for this kinda stuff. Also has the benefit of offering its alternative tangent spaces if you need to access them for some reason :V

    that's what i thought immediately. and i think handplane is free?
  • Bek
    Offline / Send Message
    Bek interpolator
    Millenia wrote: »
    You can also use Handplane to spit out the final tanspace normal rather than re-projecting the mesh in Max
    +1, I tried this when handplane first released in the (mistaken) hope it would also help with waviness. What might be interesting is combining this with a raycast (non-cage) bake since you can set your lowpoly to average normals in xNormal as OS doesn't use lowpoly normals, meaning you're essentially doing an averaged cage projection anyway, in theory.

    Might have to think about this and try some tests tomorrow, as it could speed things up, and I don't see a downside if you're going to be using OS to ts via handplane anyway. Maybe cages have some other advantages I'm not considering.

    edit: like cages giving more control per piece than having a global ray distance. Which might be quite important when you have parts at fairly different scales.
  • Shrike
    Offline / Send Message
    Shrike interpolator
    Is this about skewed elements like this ?

    scew.PNG

    As rays are cast through vertices, simply doing a bake with a higher poly lowpoly would solve that issue. Copy the lowpoly > tesselate (subdivide) without smooting, and bake that + cage. Take the gained map, use it on the real lowpoly and done (unless I mix something up here ?)

    The first video uses endless crazy steps and a object space map when you only need more vertices for a more accurate bake, but please correct me if im wrong
  • Bek
    Offline / Send Message
    Bek interpolator
    Shrike wrote: »
    Is this about skewed elements like this?
    Pretty sure. I only watched the 2nd (xNormal) video. And unless I'm mistaken you can't do as you say because tangent space bakes rely on the shading of the lowpoly; so a subdivided lowpoly would have different surface shading (due to the extra geo) and hence the ts bake wouldn't match the real low poly. That's why you bake an OS map and convert that to TS to get the best of both.

    What I'm thinking is if you do this, you could get near enough to cage-like results using ray distance / averaged normals (doing in theory the same thing as a lowpoly + averaged cage, minus cage's ability to fine tune ray distance) on your subdivided lowpoly when baking an OS map (which you were probably going to do regardless). I did some quick tests and it seems to work quite well, but cages still seem to be the best option; so cages + subdivided lowpoly bake give the best possible results, but subdivided lowpoly + ray distance bake are pretty good too, and potentially a lot simpler/faster.
  • Noors
    Offline / Send Message
    Noors greentooth
    Clever ! Now we just need scripts to automate.
  • Ouran
    Offline / Send Message
    Ouran greentooth
    Great tip, thanks a lot !
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    Shrike wrote: »
    Is this about skewed elements like this ?

    scew.PNG

    As rays are cast through vertices, simply doing a bake with a higher poly lowpoly would solve that issue. Copy the lowpoly > tesselate (subdivide) without smooting, and bake that + cage. Take the gained map, use it on the real lowpoly and done (unless I mix something up here ?)

    The first video uses endless crazy steps and a object space map when you only need more vertices for a more accurate bake, but please correct me if im wrong


    did you even try what you just said? you can't just bake a tangentspace map from one mesh and put it onto another. Sometimes it might work, if you are lucky. But good luck once you use synced normals.

    basically what you wrote is exactly was Peter did, besides he baked an object space map he can convert to a synced tangentspace map.
  • Shrike
    Offline / Send Message
    Shrike interpolator
    Makes sense, thanks

    I remember working around the issue by doing what I described but maybe I did combine the 2 maps afterwards or something like that, didnt have any mesh at hand to test it out right now, my bad.
    More and more info, the puzzle completes itself, Nice!
  • igi
    Offline / Send Message
    igi polycounter lvl 12
    Actually I've been trying to avoid skewing by locking the vertex data of the mesh and adding extra loops where skewing occurs. But it doesn't always %100 matches with the final lowest-poly model for some reasons and wasting time by thinking about where to add extra polys. In this way you just tessellate whole model without affecting the silhouette, probably it also have some drawbacks but for now it seems to save a bit time and tedious work when baking.
    I never had luck with handplane, really dunno why :(
  • Bek
    Offline / Send Message
    Bek interpolator
    igi wrote: »
    In this way you just tessellate whole model without affecting the silhouette, probably it also have some drawbacks but for now it seems to save a bit time and tedious work when baking.

    From some testing I did the other day my conclusion is that using a 'skew mesh' is a pretty specific thing to do. By that I mean you will use it if you're getting significant skewing problems on an important mesh, or possibly (still need to do more testing here) if you notice significantly better results when doing a ray distance bake. That seemed to be the case for me, but I'm not sure why, so I'm not sure if I was doing something wrong or if using a skew mesh gives significantly better results with ray distance.

    For the best possible result you'll use a cage + 'skew mesh' but that's also the longest process, so if you can get good enough results using RD/skewmesh it might be a decent timesaver. And that's particularly interesting for us modo people because we can quickly bake an OS map in modo (no need to export; and this also means we can use the rounded edge shader) and convert to TS with handplane.
  • Next
    Offline / Send Message
    Next polycounter lvl 12
    Maybe this is obvious but, regarding the xnormal process to generate other maps like occlusion and so on. Do you then flatout use the maps generated form the skewmesh for textures?- as they do not need the tangentspace connection to the lowpoly geo right?
  • igi
    Offline / Send Message
    igi polycounter lvl 12
    Bek wrote: »
    From some testing I did the other day my conclusion is that using a 'skew mesh' is a pretty specific thing to do. By that I mean you will use it if you're getting significant skewing problems on an important mesh, or possibly (still need to do more testing here) if you notice significantly better results when doing a ray distance bake. That seemed to be the case for me, but I'm not sure why, so I'm not sure if I was doing something wrong or if using a skew mesh gives significantly better results with ray distance.

    For the best possible result you'll use a cage + 'skew mesh' but that's also the longest process, so if you can get good enough results using RD/skewmesh it might be a decent timesaver. And that's particularly interesting for us modo people because we can quickly bake an OS map in modo (no need to export; and this also means we can use the rounded edge shader) and convert to TS with handplane.

    Yeah, that method is useful where most of the mesh consists of the parts that prone to skewing(as in that example, a radial cog with lot's of screws etc on the surface), other than that normally it's somewhat predictable where skewing might occur so the places to add support loops. I feel like in some specific cases it can be a good blanket solution to cover whole mesh otherwise adding edgeloops onto the low poly might be too tiresome.
    By saying ray distance method, do you say baking one skewed cagebake and one non-skewed ray distance mesh and patch the skewed parts in ps?
  • Farfarer
    Next wrote: »
    Maybe this is obvious but, regarding the xnormal process to generate other maps like occlusion and so on. Do you then flatout use the maps generated form the skewmesh for textures?- as they do not need the tangentspace connection to the lowpoly geo right?

    Yes, that's correct. Only the tangent space map needs the extra work. You'll be able to use other maps on the low poly mesh without any further messing around (except derivative maps if you're using those, they're still linked to the tangent basis).
  • Next
    Offline / Send Message
    Next polycounter lvl 12
    Farfarer wrote: »
    Yes, that's correct. Only the tangent space map needs the extra work. You'll be able to use other maps on the low poly mesh without any further messing around (except derivative maps if you're using those, they're still linked to the tangent basis).


    thanks farfarer !
    btw love your unity plugin for xnormal it is awesome!:poly142:
  • Amsterdam Hilton Hotel
    Offline / Send Message
    Amsterdam Hilton Hotel insane polycounter
    this is a really creative idea. :thumbup:


    igi wrote: »
    Actually I've been trying to avoid skewing by locking the vertex data of the mesh and adding extra loops where skewing occurs. But it doesn't always %100 matches with the final lowest-poly model for some reasons and wasting time by thinking about where to add extra polys.

    I still work this way too, since being able to do every bake in one shot, with no conversions, is a lot more appealing to me than having to work through: tessellation -> object -> lowpoly -> tangent

    As for wasting time thinking about where to add the geo, test bakes help a lot. While making the lowpoly, periodically do an auto-UV, bake normals, check it out in-engine. Add geo to fix the vertex normals where you see skewing, ray misses, etc.

    Test bakes take almost no time and make it easy to catch all kinds of artifacts way before you're even done modeling
  • SrgFlamez
    Offline / Send Message
    SrgFlamez polycounter lvl 7
    Do you have a video that follows the xNormal one?
  • [HP]
    Offline / Send Message
    [HP] polycounter lvl 13
    I approve of this!
  • Thane-
    Offline / Send Message
    Thane- polycounter lvl 3
    Does this by chance eliminate the need to make UV splits for hard edges? (I ask because im told you don't necessarily have to separate UVs for hard edges when doing object space normal maps. )
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    if you intend to keep the normals object space, sure, if you want to make tangentspace maps out of them, which are pretty much the standard on every production out there, you will need uv splits.
  • Noors
    Offline / Send Message
    Noors greentooth
    Started to have some thoughts about automating that.

    The main issue i see here, is that if you need to edit manually that cage, it would be kind of a pain.
    You could create the cage on the original low poly, then export the cage, subidivide it, and import it on the subdivided mesh. See what i mean ?

    Or do you think there's no need to edit a cage manually with this method ?
  • Bek
    Offline / Send Message
    Bek interpolator
    igi wrote: »
    By saying ray distance method, do you say baking one skewed cagebake and one non-skewed ray distance mesh and patch the skewed parts in ps?
    Nope, I just mean baking with a skew mesh (subdivided, with no smoothing, lowpoly) and using ray distance rather than a cage. In my testing this seemed to give much better results than a regular ray distance bake but it's likely I made a mistake with the regular RD bake as I can see no reason for the big difference; I'll have to check.
    Noors wrote: »
    Or do you think there's no need to edit a cage manually with this method ?
    Well if the asset you're using doesn't need the benefits of a cage (specific distance values for certain areas) you might as well bake in OS with Ray Distance / Averaged normals as that's doing pretty much the same thing.

    If you're already using a script to automate your export of high/low/cage all you'd need to do is insert a step to export a subdivided low.
  • Tzur_H
    Offline / Send Message
    Tzur_H polycounter lvl 9
    uh, what's the way of doing the tessellation part to create the skew mesh in maya? I've tried mesh>smooth but it doesn't seem to be it, the mesh lost its shape.
  • Amsterdam Hilton Hotel
    Offline / Send Message
    Amsterdam Hilton Hotel insane polycounter
    Noors wrote: »
    Started to have some thoughts about automating that.

    The main issue i see here, is that if you need to edit manually that cage, it would be kind of a pain.
    You could create the cage on the original low poly, then export the cage, subidivide it, and import it on the subdivided mesh. See what i mean ?

    Or do you think there's no need to edit a cage manually with this method ?
    what usually makes you edit a cage? in my experience it's often because a vertex got pushed inside the model or because of skewing. those are both projection problems originating with the vertex normals, which more geo helps with (whether it's manual or tesselated)
  • Noors
    Offline / Send Message
    Noors greentooth
    It's a new term :p
    It's the temporary subdivided mesh used to calculate a temporary normal map with low distortions.

    Amsterdam Hilton Hotel : Skewing, yeah, waves on cylinder adjusted for a certain pov, interpenetrating stuff...Seems more simple to set the cage on the low poly rather than on the subdivided one.
    Anyway, no big deal, i can script that.
  • Stromberg90
    Offline / Send Message
    Stromberg90 polycounter lvl 11
    All I have to say is Thank you :)
  • PeterK
    Offline / Send Message
    PeterK greentooth
  • terr252
    Offline / Send Message
    terr252 polycounter lvl 3
    Tzur_H wrote: »
    uh, what's the way of doing the tessellation part to create the skew mesh in maya? I've tried mesh>smooth but it doesn't seem to be it, the mesh lost its shape.
    Edit Mesh > Add Divisions
  • [Deleted User]
    Offline / Send Message
    [Deleted User] insane polycounter
    The user and all related content has been deleted.
  • Stilettofern
    Mhm, really odd. I've followed all the steps but still get distortions. Could this be because of smooth shading on normals, or shouldn't that do anything?
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    Peter, thank you very much for sharing! Really cool and helpful way to completely eliminate manual combining of normal map bakes.
  • Thane-
    Offline / Send Message
    Thane- polycounter lvl 3
    Some people are saying removing the geometry after the bake ruins the results of the skew bake and some say its fine with no qualifications. Are there any guidelines for using this on a case by case basis so we know where we can and can't use this process?
  • EarthQuake
    If you're baking to object space you can add and remove as much geometry as you like with any technique that you like, and convert object space to tangent space with handplane at the end. Object space normal maps don't care about your lowpoly mesh normals.

    If you're baking to tangent space, you can't remove geometry without introducing smoothing errors, as you're changing the mesh normals as tangent space maps are tangential to the mesh normals, hence the name.
  • Thane-
    Offline / Send Message
    Thane- polycounter lvl 3
    I may be getting a little tripped up in semantics here, I thought the point of this was to produce a final tangent space normal map.
  • WarrenM
    He does, he just takes a side trip through object space.
  • Thane-
    Offline / Send Message
    Thane- polycounter lvl 3
    Thats what i thought, thanks Warren. Its just that earthquake said in the skewmesh thread that geo can't be removed afterwards without problems. PeterK chimed in with something to the effect of "thats incorrect". Hoping for some guidance. :D
  • EarthQuake
    I think you may have confused something I've said, assuming you're referring to the "skew you buddy" thread, as I mentioned multiple times that you can remove the geometry IF you're baking to object space and converting to tangent space, but it doesn't work if you're baking directly to tangent space. Basically, exactly what I said a few posts above.

    If you can link me to the specific post you're talking about I'll take a look and perhaps edit it to reduce any further confusion.
  • Thane-
    Offline / Send Message
    Thane- polycounter lvl 3
    I *think* it was just this part of your first post in your skewing thread where you said "are great if you have the polygon budget to leave them in the final low poly".

    There are a variety of methods in which we can do this.
    1. Original mesh, extreme skewing visible
    2. Tessellation, or “skewmesh”, skewing is removed entirely. Peter Kojesta explains this in more detail here: http://www.polycount.com/forum/showthread.php?t=144715
    3. Beveled edge, minor skewing visible
    4. Beveled edge with 2 support loops, there is a tiny bit of skewing here as well but it is essentially gone.
    5. My preferred method, cutting in the minimal amount of geometry to “spot fix” any issues. Skewing is removed entirely here as well.

    #2 and 3 are great if if you have the polygon budget to leave them in the final low poly.
  • EarthQuake
    Thane- wrote: »
    I *think* it was just this part of your first post in your skewing thread where you said "are great if you have the polygon budget to leave them in the final low poly".

    Aha, good catch! Yeah, I have the numbers wrong in the text there Fixed it now, thanks.
  • a3D
    Tzur_H wrote: »
    uh, what's the way of doing the tessellation part to create the skew mesh in maya? I've tried mesh>smooth but it doesn't seem to be it, the mesh lost its shape.
    Mesh>Add divisions
    Or smooth the mesh after creasing all edges
    Mhm, really odd. I've followed all the steps but still get distortions. Could this be because of smooth shading on normals, or shouldn't that do anything?
    Does the object space map look correct?
    If the OS map is distorted, maybe you're not using enough divisions, or your lowpoly shape is too different from the hipoly one.
    If the OS map looks fine but you get distortions when converting it to tangent space, there is an issue with the conversion method you use.
    Are you sure the skewmesh's shape is exactly the same as your lowpoly shape, silhouette-wise?
  • beefaroni
    Offline / Send Message
    beefaroni sublime tool
    Did a quick video showing this method on a weapon (20k tris). Worked beautifully and I'll definitely be using it from now on.

    [ame]https://www.youtube.com/watch?v=Z1AiI5l50NE[/ame]
  • Tzur_H
    Offline / Send Message
    Tzur_H polycounter lvl 9
    I'm using this method as well, it's really great!
    Sometimes I bake in Modo though in order to make use of the round edge shader, and exploding a mesh is super easy with morph maps.

    I wish SD had the option to convert the object space to tangent, then you could create a graph and automate a lot of things for all of your bake needs.
1
Sign In or Register to comment.