Home Technical Talk

3ds Max Scanline Baker Strange Ray Misses and Bright Normals

polycounter lvl 7
Offline / Send Message
Computron polycounter lvl 7
I am having a TON of weird issues with 3ds max's Baker.

I am trying to bake the normals and AO for my BR but the asymmetrical elements (The ones that don't get mirrored and are in the 0-1 UV space) are having ray misses in every other triangle. I have tried collapsing both my high and low, triangulating the low, checking for inverted faces in my UVs (except for the mirrored portions, those are suppose to be that way), resetting the materials for the high and low and they still ray miss.

Here is the model with the test bake applied (red is the ray misses):
LocnH.png

I can guarantee it's not my cage, as you can see its a weird pattern of ray misses fills every other triangle on the assymetrical parts:

here is my cage:
W7PXb.png

Here are my UVs, with the asymmetrical UVs selected in red:
0EDha.png

None of them are overlapping and only the UVs that are offset by 1 (the mirrored geo) are inverted.

My normals also render out too brightly, as if they are being gamma corrected. (My LUT and Gamma are turned off). The only way I could get them to render out correctly is by changing the background color in the bake settings to black. (IDK, makes no sense to me either) *shrug*

Any suggestions are appreciated, I'm really looking forward to getting this stage over with. :\

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Maybe you have duplicated triangles there? Also, have you tried a Reset Xform? You could also remove any defunct Max data by exporting to OBJ, and re-importing into a new scene.
  • EarthQuake
    Options
    Offline / Send Message
    OH man you're using an insane amount of hard edges/smoothing groups/uv island splits, your vert count has got to be insane! Also, a massive amount of messy intersections, like every mesh just intersects with the mesh next to it, aren't you getting massive intersection errors, or are you explode baking all 100 of these individual mesh chunks???

    Not sure if any of that has to do with your problems, but it looks really messy, with all the hard edges and uv splits you're using you could just as easily chamfer some edges and make texturing much easier for yourself.
  • Jesse Moody
    Options
    Offline / Send Message
    Jesse Moody polycounter lvl 17
    Yeah what EQ said. If I was the texture artist that passed along that UV map I would be pretty upset. It is def a jigsaw puzzle
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    EarthQuake wrote: »
    OH man you're using an insane amount of hard edges/smoothing groups/uv island splits, your vert count has got to be insane!

    Also each split means more padding which equals less pixel density.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Here is the full UV sheet as its layed out from 0-1:
    Fr0bs.png

    I am going by the workflow I learned in Alec Moody's briefcase/normal-mapping tutorials on 3dmotive. His models have just about as many UV islands, except my model is admittedly a lot more complex. :poly122: There are a lot of 90 degree angles in the concept i'm modeling off of. Projection works fine since everything is welded and im using hit only matching material IDs and there is very little intersection. Right now, 85 percent of the chunks are layed out right next to their corresponding elements, so I wouldn't say its a jigsaw. Since I am exporting to a engine with an unsynced tangent basis I decided to split my UVs and smoothing where the smoothing would be too demanding. I tried to chamfer the edges to have less UV islands and decided about half way through that it was inflating my polycount way to much and it would be difficult to align the edges of my shells to 90 degree axises without splits. Would the duplicate vertices on the splits be a bigger problem?

    How would you recommend I make my low poly?
    Just chamfer all the edges until the smoothing of the low poly is roughly the same as the high?
    How would I unwrap that, just relax the shells and live with the distortion around the edges?
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    For any potential google searchers, I fixed the ray misses, you were right about Max glitching out, Eric, thank you.
    I exported into a new 3ds max scene through .OBJ and got a perfect bake.


    I'll go run your Uber Vert Count script now.
  • EarthQuake
    Options
    Offline / Send Message
    Generally speaking, vertex count is more important in games than triangle count. So if you have a model with 5000 verts and 7000 tris, vs a model with 5000 verts and 5000 tris, the 7000 tris model is actually much more efficient. Triangles are not free, but saving triangles at the cost of verts and these sort of UV layouts isn't really something you should do. I'm talking real vertex count, which that uber vert count script will tell you.

    I think you need to experiment more with how to get decent bakes, you shouldn't need to chamfer until your lowpoly looks like your high, that would be really excessive. Once you get more experience you'll get a better idea of what you need to do. I'm not suggesting that you have NO hard edges, as your uv's will naturally need hard edges somewhere, you just want to avoid having hard edges on virtually every face.

    Generally you will end up with a good mix of beveled areas to keep seamless uv islands, and hard edges/smoothing groups along where you would naturally break off your uvs. Of course you'll have to make some decisions along the line as to where you use a hard edge vs bevel, but you'll have to do some test bakes to really figure out what is best.

    What I usually do is model my lowpoly with about the minimum amount of geometry I think I can get away with, in the case where I'm using broken tangents, thats with a good amount of bevels to help smoothing etc. Then I do temp uvs, testbake and edit/add in more bevels or hard edges as needed.

    You should define your smoothing groups with your uv layout, so think about that when you're setting your uv seams. Then you can just run textool's to set all uv islands to smoothing groups. This saves a massive amount of time. http://www.renderhjs.net/textools/
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    I would say lot of sacrifice, instancing, some good amount of stretching here and there, and overlapping lesser pieces. Also, I would totally ditch some of the model parts in term of UV if they're a hard color and just make them a single color instead without a proper spec or normal map.

    It all depends on what sacrifices you want to make, but yeah, you really have to butcher your model to make end meets, especially for Normal Maps.

    You could also make your Normal maps like this in your second UV channel, and have your first UV channel be more 'organized' for your other textures, although that won't really help with optimization runs. Define what is most important in your model and what can be thrown to the lions basically.
  • EarthQuake
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    Also, I would totally ditch some of the model parts in term of UV if they're a hard color and just make them a single color instead without a proper spec or normal map.

    For an important, in view 99% of the time take up 25% of the screenspace weapon asset? Absolutely never. Unique uvs for every peice besides mirroring. Bit that are less likely to be seen can have less uv density, bits that are up close in your face should have more density.

    Unless you're making a PS2 asset or something, you really shouldn't be mapping random bits to random uv's because "the color is similar" just not how modern asset creation works.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    EarthQuake wrote: »
    Generally speaking, vertex count is more important in games than triangle count. So if you have a model with 5000 verts and 7000 tris, vs a model with 5000 verts and 5000 tris, the 7000 tris model is actually much more efficient. Triangles are not free, but saving triangles at the cost of verts and these sort of UV layouts isn't really something you should do. I'm talking real vertex count, which that uber vert count script will tell you.

    I think you need to experiment more with how to get decent bakes, you shouldn't need to chamfer until your lowpoly looks like your high, that would be really excessive. Once you get more experience you'll get a better idea of what you need to do. I'm not suggesting that you have NO hard edges, as your uv's will naturally need hard edges somewhere, you just want to avoid having hard edges on virtually every face.

    Generally you will end up with a good mix of beveled areas to keep seamless uv islands, and hard edges/smoothing groups along where you would naturally break off your uvs. Of course you'll have to make some decisions along the line as to where you use a hard edge vs bevel, but you'll have to do some test bakes to really figure out what is best.

    What I usually do is model my lowpoly with about the minimum amount of geometry I think I can get away with, in the case where I'm using broken tangents, thats with a good amount of bevels to help smoothing etc. Then I do temp uvs, testbake and edit/add in more bevels or hard edges as needed.

    You should define your smoothing groups with your uv layout, so think about that when you're setting your uv seams. Then you can just run textool's to set all uv islands to smoothing groups. This saves a massive amount of time. http://www.renderhjs.net/textools/


    I have been doing all these things for the past week. Soooo many test bakes and temp UVs. I didn't mean chamfer until its a high poly, that would be excessive, I meant I tried to add support loops around my low poly and put it in one smoothing group, but even then the shading just didn't work out as well in Cryengine. Do you think its worth it to add in the loops again so I can have less UV shells if Uber Vert Count gave me this:

    3Zyub.png

    (That shot was just taken now with the fixed ray misses, no AA or MS though, I will rebake)


    I have also been using the Textools Smoothing groups script as well. Have a look at my WIP thread if you got some time, I would love some of your feedback, I got other 3point gents helping me (and any other readers) out with their crits in there as well: Halo 4 Battle Rifle WIP

    Ace-Angel wrote: »
    I would say lot of sacrifice, instancing, some good amount of stretching here and there, and overlapping lesser pieces.


    I am instancing the top cube bits as well as removing some bits on the other side, such as the safety switch (no reason for their to be 2).
    Ace-Angel wrote: »
    Also, I would totally ditch some of the model parts in term of UV if they're a hard color and just make them a single color instead without a proper spec or normal map.

    Can you point out some of the areas you would ditch?

    In Alec moody's tutorials he suggest just padding the small uv islands, baking out a selection mask and pretty much leaving them as a solid color.

    Ace-Angel wrote: »
    You could also make your Normal maps like this in your second UV channel, and have your first UV channel be more 'organized' for your other textures, although that won't really help with optimization runs. Define what is most important in your model and what can be thrown to the lions basically.

    Don't second UV sets just make your final vert count at least double what it would be with one set in most engines? (Cryengine or UDK for example?)
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    There is a lot of less than 90 degree angles that do not need separate smoothing groups.

    g0TrS.png

    Look at these piece and think "can I merge these uv islands with minimal stretching?"
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    I've read that's its not just as simple as hardening only 90 (+-15) degree angles,
    but I tried it anyway, baking with the UVs layed out the way you just showed earlier in the week, the smoothing still ended up being too demanding still. :poly122:

    Maybe I did something wrong?

    I'll see if I can find the picture, Here it is:
    PES8I.png
    It didn't smooth well in Nitrous or cryengine. In fact, this picture was taken using Qualified normals with xoliul 2!
  • EarthQuake
    Options
    Offline / Send Message
    Computron wrote: »
    It didn't smooth well in Nitrous or cryengine. In fact, this picture was taken using Qualified normals with xoliul 2!

    Something is probably messed up with your bake then, have you tried it with 3pshader? I know thats not too helpful if its going into cryengine, just curious.

    Whats with the model getting darker near the middle there? Is there some weird AO map there? If possible it would be good to see the result without that on it.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    I can't find that max file, I was running out of disc space so I deleted some of the earlier max files (I enabled the setting the increments your save). I tried 3point as well. I'm not sure why it was getting darker toward the center. This bake was from back when I was still having problems with ray misses and bright normals (I had to level them out in photoshop before I figured out the background color trick)

    Either way, its not going to make UDK or cryengine synced to my baker, like you said.

    Do you mind posting some examples of unsynced hard surface assets and how you split their UVs and did your hard angled edges?

    I have finished my final bake with this set of UVs, and i'm pretty much ready to start texturing, UVs and low poly took forever but I learned a lot from my test bakes. I am a little tired of UVing this asset, i kinda want to move on at this point, not sure its worth the trouble to redo this one if its going to shade poorly in cryengine. It is a portfolio piece though.

    IDK, What do you think?
    tIZDF.png

    bU0oF.png

    uq7hU.png
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    EarthQuake wrote: »
    For an important, in view 99% of the time take up 25% of the screenspace weapon asset? Absolutely never. Unique uvs for every peice besides mirroring. Bit that are less likely to be seen can have less uv density, bits that are up close in your face should have more density.

    Unless you're making a PS2 asset or something, you really shouldn't be mapping random bits to random uv's because "the color is similar" just not how modern asset creation works.

    What about the parts which are never show by the camera? Many peeps usually delete them out right, but I always found it's more hassle to 'plan' what needs deleting as opposed to overlaying for approximation reasons, since a passing eye won't notice something like that at something certain angles.

    For the gun, I'm tempted to say 'this looks fine' when I think about a game running on PC hardware and it's requirements, but then I remember we still have consoles which need all the juices to be pulled through, and I start thinking on how much you will have to butcher something.

    Currently, it looks fine, I'm sure with a decent set of maps (Diffuse, Specular, Gloss and Cube), it will look fine, nothing too harsh that will take away from the looks.
  • Eric Chadwick
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    What about the parts which are never show by the camera? Many peeps usually delete them out right, but I always found it's more hassle to 'plan' what needs deleting as opposed to overlaying for approximation reasons, since a passing eye won't notice something like that at something certain angles.

    Reloading animations can reveal those unseen bits. Also holes in the mesh can cause shadowing errors. Deleting a few faces here and there doesn't really save anything anyhow, you would have to delete a bunch of vertices to actually save transform cost and/or memory.

    (as always, great advice EQ!)
  • EarthQuake
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    What about the parts which are never show by the camera? Many peeps usually delete them out right, but I always found it's more hassle to 'plan' what needs deleting as opposed to overlaying for approximation reasons, since a passing eye won't notice something like that at something certain angles.

    This is really uncommon these days, again this was something that was done on 10 year old PC games and last generation consoles(xbox, ps2), I haven't personally worked on a project that did this - ever.

    Like I said, for areas less likely to be viewed, you simply use less geometry and less texture resolution. Your concept artist should be thinking about this too, and all the important cool bits should be right in the player's view, while the front barrel area and rear buttstock should be streamlined and simplified to allow for low geometry counts. The design of this particular model isn't that well thought out when thinking along those lines, but it was probably meant to look good from all angles for marketing material etc because its such a recognizable asset.

    The deleting half the model thing is a really messy way to do it. Even with Xbox/PS3 specs you shouldn't be that hungry for tris - for an asset as important as a FPV weapon, you should have a simple fixed budget for what is onscreen(regardless of even how large/complex the asset is). So you're budgeting 8000 tris for an asset, if you delete 1/3rd of the faces and now you're below your budget, what do you save? Your game runs at 0.2fps faster, but only when the lower polycount weapons are on onscreen?

    It's also a mess if you delete parts of the mesh and then need to do a LOD mesh. Do you delete stuff after you've made your entire model? Now you need to entirely recreate the LOD with new UVS? Do you finish the entire model for the sake of LOD creation and then chop it up, resulting in a huge loss in texture resolution? And then as Eric says, you better be damned sure you know exactly how the asset will be seen at every angle when animated.

    The guns we did for Brink were 7000-12000 tris, on Xbox and PS3. Probably a bit high for most current gen consoles, but your FPV weapon is the most important asset on the screen in any shooter. Its extremely easy to budget as its always there, and theres never 30 of them on screen. Its a constant so you just set aside X amount of tris and X amount of texture space. No need to optimize past that.
    Currently, it looks fine, I'm sure with a decent set of maps (Diffuse, Specular, Gloss and Cube), it will look fine, nothing too harsh that will take away from the looks.
    Yeah it looks good for the most part, there is some wanky stuff on the smoother areas around the grip, but you shouldn't see it ingame. In general for your next asset I think there are a lot of areas you can improve as far as lowpoly construction, but I understand not wanting to redo the thing.
  • EarthQuake
    Options
    Offline / Send Message
    Computron wrote: »
    Do you mind posting some examples of unsynced hard surface assets and how you split their UVs and did your hard angled edges?

    Sorry, everything recent I've done is under NDA. I could show you some Brink stuff but we had sync'd normals between Maya and the game engine for the project, so it wouldn't be productive.
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    You went a little overboard with the splits but at least you have the basic idea down. I probably could have worded some things a little better in that video so people didn't take things this far. I made a paint over showing you some places you could stitch stuff together and still get good smoothing behavior in unreal. You could probably get away with more but those looked like a safe bet to me. Additionally, the way you did the symmetry down the center is not vertex efficient and you will probably want unique texture info since those areas face the camera directly.


    Most times I prefer smoothing splits to supporting geometry but there are certainly times where supporting geo is cheaper. You need to determine which to use on a case by case basis and factor in things like if you will likely have a UV split in place anyway or if you would need to use 2 supporting loops to clean up an area vs 1 smoothing split.

    Also, these threads tend to fill up with people posting bad advice so it can become very confusing. For example, that paintover zacd posted has some good stitching but also some of the key areas are going smooth really badly without additional supporting loops.

    also:
    "In Alec moody's tutorials he suggest just padding the small uv islands, baking out a selection mask and pretty much leaving them as a solid color."

    I do this for actual small areas because it doesn't look good to force a lot of texture information onto a small polygon. In those cases what is important is clean normals and carefully selected diffuse,spec,gloss values. The difference is that there are a bunch of smallish faces here that are part of larger and more visible surfaces that will need hand polished texture time.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    EarthQuake wrote: »
    Sorry, everything recent I've done is under NDA. I could show you some Brink stuff but we had sync'd normals between Maya and the game engine for the project, so it wouldn't be productive.

    I would still be interested in seeing that, if your up for it, like the UV seams and texture sheets.
    AlecMoody wrote: »
    I made a paint over showing you some places you could stitch stuff together and still get good smoothing behavior in unreal. You could probably get away with more but those looked like a safe bet to me.

    So this is probably going to be something that comes with experience with various engines. Will the suggested smoothing work in other unsynced engines, i.e. cryengine, or will I have to figure those out with more test bakes?

    I have a much greater appreciation for why polycount hates unsynced workflows with a passion now. :poly124:
    AlecMoody wrote: »
    Additionally, the way you did the symmetry down the center is not vertex efficient and you will probably want unique texture info since those areas face the camera directly.

    Can you elaborate on your preferred way to mirror this type of asset?
    The way I have it now, the ammo display, the bolt assembly and the bottom of the scope area and the lens of the scope, all of which are close to the first person camera, are asymmetrical so that I don't get a Rorschach effect.
    AlecMoody wrote: »
    Also, these threads tend to fill up with people posting bad advice so it can become very confusing. For example, that paintover zacd posted has some good stitching but also some of the key areas are going smooth really badly without additional supporting loops.

    Polycount Normal Map thread in a nutshell:
    ibgyVGxfuxCCxm.jpg

    EarthQuake wrote: »
    Yeah it looks good for the most part, there is some wanky stuff on the smoother areas around the grip, but you shouldn't see it ingame. In general for your next asset I think there are a lot of areas you can improve as far as lowpoly construction, but I understand not wanting to redo the thing.

    Thanks guys, I am definitely learning a lot with your help.
    My models are just getting better with each asset, thanks for all the crits and advice.
    I'm really loving making these hard surface assets. :):thumbup:
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Computron wrote: »
    Can you elaborate on your preferred way to mirror this type of asset?
    The way I have it now, the ammo display, the bolt assembly and the bottom of the scope area and the lens of the scope, all of which are close to the first person camera, are asymmetrical so that I don't get a Rorschach effect.

    You can mirror the sides and have top part unique. You don't have to split the object in half to mirror side parts.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Hey, do your normal maps bake out with very slight noise? I baked to a .TGA (I checked in photoshop, it's mode is 8-bits per pixel) on the highest quality Hammersley MS and Mitchell-Natreveli AA and it's a bit noisy.

    Here is a close up with the normal map displayed in qaulity 3-point shader with just a reflection cube map applied, the normals map is 2048x4096:
    8xoUj.png
  • EarthQuake
    Options
    Offline / Send Message
    One thing that I have noticed, normal maps from max tend to be a bit more noise in the gradients while normal maps from maya tend to have a "stepping" type artifact. The difference between the two shouldn't be noticable in any normal situation though.

    Hard to tell exactly what your issue is here, you can always try to render 2x as large and size down, which should sample out the noise. It looks like its really exaggerated because of your enviro map settings though?
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    The way I understand this is that it is a limitation of 8-bit textures?

    At least that's what I got when I read PhilipK's Metal Texturing tutorial:

    XKFeW.png

    I'm not sure why this works for him since you still end up with a 8bit picture in the end.

    Would it help if I instead baked to a 16bit .tiff and then saved in photoshop under 8bit mode, or is what PhilipK demonstrated only applicable to photoshop filters?? I've read similar things in Cryteks whitepapers on their crytif exporter and Crysis 2 texturing workflow.

    I'm not sure I want to bake a 8Kx4K map, so would 16-bits help though?
  • EarthQuake
    Options
    Offline / Send Message
    Its a bit depth issue yeah, but again, it shouldn't be noticeable in normal use. You're not going to find a game engine that loads 16bit normals, so I wouldn't bother baking them. Max dithers to avoid the "stepping" artifacts.
  • Eric Chadwick
Sign In or Register to comment.