Home Technical Talk

Another problem baking on xnormal ...

1
polycounter lvl 14
Offline / Send Message
NAIMA polycounter lvl 14
Hello , I have made what I think should be a pretty simple shape ... you can see here a topogun screenshot of the high model reference and above the lowpoly that fits perfectly on the high poly , the general wall baking comes out well but the windows intrusions do not so I detached in uvmapping and pelted and relaxed placing them at the corners of the textures , they are even and uniform in scale with the wall etc ... but the problem is that in xnormal , no matter whatsettings I put for the ray distances , it always make the sloppy results you can see in the normal map , just on the windows , now why that? the low poly follows precisely the shape inside the intrusions , the uvs are even and placed well ... why it does mess it up ? I have tried ray distances for front and rear from 2 up to 0.001 and no improvements , I mean sure it changes but not significantly and still it offers bad results....

Then I tried with a cage and the result are near to awfull as the whole wall gets ok only if I enlarge the cage but then the windows get fagocitated in vertex and faces intrusions ...

What can I do to bake this simple shape that is driving me mad now?

26346497.jpg

Replies

  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    I did and it comes out a mess , did you read what I wrote after? extruding the cages , messes up the windows because the vertices overlap on each other the more I extrude it .
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
    When I am having trouble with a smaller segment of a normal map sometimes I freeze the normals of the lowpoly, delete everything but the faces I am having trouble with and only bake those and composite in photoshop...its a real shit time waster workaround sometimes, but if you already spent 20 minutes trying to fix the cage then its better to just spend 10 minutes using a workaround.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    If I cut away the windows into different mesh , then bake them apart , will the normals come still seamless or isntead will come out broken?
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
    As long as you freeze normals before you edit a mesh anything baked from it will not change.
    Edit:Unless you are moving verts, uv's or the cage.
    Edit2: Oh and this method won't work with a custom cage from Xnormal as the topology changes.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    lets say I do not use a cage, but the normal ray tracing system , will it work ? and how do I do to freeze normals ? in 3dsmax or in xnormals?
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
    Throw an edit normals modifier on your mesh, select all the normals and click "Make Explicit"
    I am starting to think it might be easier to just diagnose your cage issue in Xnormal :D
    I would have to see a screen of your cage in Xnormals model viewer, preferably at an angle where I can see the window well, question, are you clicking save models before exiting Xnormal's 3d viewer?
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Is not wokring , I do not understand how such a simplicistic shape cannot be baked normally with Xnormal , I have baked more complex stuff without problems and this small windows are causing a huge load of mess and impossible baking , any other ideas pleasE?
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
    Share your low-poly, I won't need the high-poly to diagnose...preferably the pre-triangulated version you are using to bake with. (well you should never share meshes as a general rule, but even more so for quadded meshes).
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Ok thanks please take a look and tell me what is wrong with that I getting mad at it , I uploaded also the high poly in a compressed format to reference in xnormal , I want to use that program but I am really not understanding why is not working ... here the files thx a lot...

    http://www.speedyshare.com/FUNUX/Nordic-Mound.7z
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    I took a look at it, and while I couldn't read or import the high poly for some reason, your low poly has some issues with how you unwrapped those offending areas like overlapping UVs and flipped faces. So right off the bat, you will get issues with those areas because of that.

    Now, sorry to come off like a dick, but the low poly is fucking appauling. You have access to topogun, so why not use their great retopo tools? It seems like you just decimated a mesh in zbrush and call that your low poly and called it a day.
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
    Yeah the UV's r not gud
    CG2G1.png
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Well ok and how shoudl be done to be good and working in xnormal?

    I do not know much topogun as I am tring it for first times and I used only create the vertex , and faces and i have united them all without caring much for quads as far as I know for a normal static mesh is not needed . so what's the not good?
    Also the texture in xnromal is enlarged to a 2014x1024 but if you open in max it looks stretched just because I can't make a uvmap non squared in 3dsmax so did stretch ...
    What mens appauling? and how shoudl be done to be not appauling?
    so can u tell me how to fix?
  • Farfarer
    Options
    Offline / Send Message
    Try adding a blockers file.

    Also try turning off the ray miss option.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    what's a blockers file?
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Here is a picture of just the low poly with over the normal map and the occlusion map , now I made a fast renderbake with 0 aliasing so this is why u see a lot of jagged but , it shows how in the intrusion areas , some artefacts appear that according to the model high poly and low poly and the uv , altough judged sloppy shoul'nt be there and I can't understand why is there and how to fix?

    then I 'd still like to knw why the uvmapping is not good .

    15063684.jpg
  • Shadownami92
    Options
    Offline / Send Message
    Shadownami92 polycounter lvl 7
    If your UVs are what the image above that is posted by Scruples displays, then the UVs are bad as described.

    If there are overlapping portions then bakes won't turn outright, also the edges have lots of space in your UVs but the details near the center have barely any space, also it's extremely stretched. Normally before you do bakes and when you unwrap, you should throw a checker pattern of some sort onto your mesh to see where there is stretching. You normally want to have as little stretching as possible on your meshes.

    Even if you mesh is static and all your textures are only going to be baked I feel like having less stretched textures will make things easier if you ever need to paint into your diffuse texture and it helps the texture density be more even throughout the entire model.

    Something else that may cause problems with the results of bakes if your topology I think, you have lots of very narrow triangles, I believe that can cause problems when baking some of your maps.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    I wanted to give a non tiled texture because I wanted to capture all the carvings and normal map blocky look of the original high poly mesh , the low poly I could surely ise a tile but wouln't look that good or detailed .....

    Here is how the Uvmapping and distribution of checker pattern looks in3dsmax and with the non even quadlike but rectangular uvmapping ... is it bad? If so I do not get why because all is even and all has space for the texture , so what's the problem of that uvmapping?

    the uvmap above was produced with a quad layout but mine is rectangular ...


    here they are ...
    31062216.jpg

    46923796.jpg


    what's wrong with those? why I get the artifacts if the low poly just borders, the high poly ? there are no intrusions or weird parts on the intrusion windows surfaces etc...
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    NAIMA what do you think is happening to your bake? Imagine yourself as a ray being cast and see where you would end up to get the undesirable result you are getting.

    some possible reasons

    Ray is going too far
    Ray is not going far enough
    Ray is being sent off an an unintuitive angle
    Ray is hitting some unseen or backfacing geometry and terminating

    If you are changing the ray distance between high and low values you might be swapping between the first two and so need to use a cage to have variable ray lengths.

    I don't think your UV or low poly model are causing the errors unless you have something like overlapping intersecting or non manifold geo. (I haven't looked)
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    the problem Is that as long as I could thingk there shouln't be any problem , I have tried all the ray settings , I have checked the normals directions , there are no instrusions or backface hittings , the uvmap to me seems fine but I am open to all ctritics , I have even redone a test with a completely different uv pelted map but the results where the same , I have tried cage and no cage the cage is just a mess couse when I enlarge it's size the vertex on the intrusions overlap , while if I do not inflate some parts of the cage cuts off normal faces causing a massive bad cut in the normals , I have uploaded the hp and low p models so you can all check what could be wrong , I really hope to find a solution for this and so understand what's wrong for all the forecoming models ...
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    It should be predictable and problem solving should be easy if you think about it logically and understand the process. Randomly changing settings isn't ever going to get you a solution that you can use on every other model in the future.

    Look at the image you posted and say what you think the problem is.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Lol And why do you think I am asking help in the forum after two days of testing , and brainstorming ?
    I couln't find any valid reason why those bad artefacts did appear , I checked all normals and to me they looked correctly extruding from the vertices and so rays should hid just the mesh and not other things ... is also working fine on the even surfaces but not just on the intruded windows ....
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    downloading now...
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    I had a quick look.

    I cleaned up the UVs a bit, moved them around (not perfectly) but the UVs are more evenly distributed now.

    bake in xnormal, viewed with standard phong realtime view in Maya 2011,

    walltest.jpg

    and the normalmap,

    walltestnormal.jpg
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    It looks quite clearly like that rays are hitting the other side of the window frame.

    I expect as you changed the ray distance from 0.001 to 2 you went from having areas of short rays terminating too early and producing blank areas to having long rays not terminating early enough and hitting geometry you don't want.

    It sounds like you're not thinking the process though clearly enough, try and visualize the rays emitting from each pixel and where do they go and what makes them stop to produce the final result.

    you should extract a problem areas and test with only them, I'm expecting a cage to be the only solution. The cage is a mess but it is still representative of what the bake is doing, then you only need to go in and fix the problem areas by making sure the cage isn't overlapping unwanted geo.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    are so perhaps settings? apart rotating the uvs what did you do ? because I tried diffferent uvlayouts but I did get always the same strange artefacts ...
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Frankie wrote: »
    It looks quite clearly like that rays are hitting the other side of the window frame.

    I expect as you changed the ray distance from 0.001 to 2 you went from having areas of short rays terminating too early and producing blank areas to having long rays not terminating early enough and hitting geometry you don't want.

    It sounds like you're not thinking the process though clearly enough, try and visualize the rays emitting from each pixel and where do they go and what makes them stop to produce the final result.

    you should extract a problem areas and test with only them, I'm expecting a cage to be the only solution. The cage is a mess but it is still representative of what the bake is doing, then you only need to go in and fix the problem areas by making sure the cage isn't overlapping unwanted geo.
    I have done this I spent 2 days trying all the settings from 0.0001 to 30 to see all the difgferences, I saw some minimal improvements on a side and somw worsening on others, but not significantly improving the bake , while the cage is just not working as I said when I inflate it overlaps vertices everywhere and if I don't inflate it just stands halfway between faces creating so cutted normals .
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    Are you reading what I've written? I'm 99% sure this is the problem.
    "I expect as you changed the ray distance from 0.001 to 2 you went from having areas of short rays terminating too early and producing blank areas to having long rays not terminating early enough and hitting geometry you don't want."

    That would explain why your 2 days of ray length tweaking didn't significantly improve the bake. Because there are 2 different errors breaking the bake and the model is one you cant bake with a single ray length so you will never get a clean bake in that way.
    "you should extract a problem area and test with only them, I'm expecting a cage to be the only solution. The cage is a mess but it is still representative of what the bake is doing, then you only need to go in and fix the problem areas by making sure the cage isn't overlapping unwanted geo."

    I don't think you know how to use a cage properly, explain how you think it works and what problems it solves.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    I then fear I am not understad what do you mean, can you show me with a picture on the model I uploaded what would solve the issue? I am clearly then not understanding what you are referring to ... as for the cage what I understand is that it inglobates the model in an external cage taking what's under as normal map projection , the problem is that to make that I need to inflate it and then I get lots ov vertices intruding on other faces.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    Yeah you shouldnt really need to change the main UVs tbh. they work.

    I did notice you have some uv faces that are welded wrong. In one of the previous posts of the UV editor, you can see them as marked red. These arent overlapping, but they arent orientated correctly and one of them is welded to the wrong vertices and should be corrected. (Mirror on X or Y, or do a Smooth UV on that island.)

    I used the raydistance calculator in xnormal to get the ray distance,

    Normalmap settings are
    "Closest hit if ray fails" unchecked.
    "Discard Back-faces hit" checked.

    let me know if you want me to upload the OBJ of the changes i made.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Well, did you build a cage manually ? That's the best way to make sure that absolutely everything is under control. That way not everything is an even inflate, and you can make the cage quite tight around the problematic areas.
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    From my quick experiments:
    1.) all fully automated bake > some errors in cage projection along wall openings. (this would for sure require little love by hand adjusting cage. can be done either in your 3d app or in xnormal)
    2.) your UVs seem to have some extra splits around outer edge.
    3.) triangulate before toying with cage and bake (i think you already know that)
    4.) if all fails use ray distance calculator which should be located in tools of xNormal
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    The cage is a visual representation of where the rays are going to trace to. The numbers you put into the ray distance are a bit meaningless if you don't know what they relate to.

    Even you just inflate the low poly model by x amount it's still an representation of how the normal map baker does it behind the scenes with the ray distance also set to x.

    There's no way you should need to spend 2 days testing ray amounts from 0.001 to 30. The ray distance is a unit of measurement that can be directly related to your model (although I say that, it could be a % of the models bounding box)
  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
    Scruples wrote: »
    Yeah the UV's r not gud
    CG2G1.png

    I guess I need to elaborate, you see the red parts? they are flipped or backfacing UV's, it's fine to have them as long as the entire Island/Cluster is one or the other, you can't have both on the same island, I believe this is half of your problem.

    Oh and you have some uv overlap in the bottom right corner, this obviously won't work either.
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Yeah you shouldnt really need to change the main UVs tbh. they work.

    I did notice you have some uv faces that are welded wrong. In one of the previous posts of the UV editor, you can see them as marked red. These arent overlapping, but they arent orientated correctly and one of them is welded to the wrong vertices and should be corrected. (Mirror on X or Y, or do a Smooth UV on that island.)

    I used the raydistance calculator in xnormal to get the ray distance,

    Normalmap settings are
    "Closest hit if ray fails" unchecked.
    "Discard Back-faces hit" checked.

    let me know if you want me to upload the OBJ of the changes i made.

    I used the ray distance calculator and I get those results ...


    LP_.obj fmin 0 fmax 97 rmin 0 rmax 354

    here is the result , I guess a little better but still there are some issues as you can see ... btw the uvmap of the model I am using is a little bit different from the one u have downloaded because I fixed the issues that where rised up b4 ....

    as you can see I still having those weird strange linees etc ... what can those be due to and how to remove definetly ?

    82161168.jpg
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    I think they are happening where LP cage intersect HP. Best and safest approach would be most time consuming one. To author cage by hand and make sure it cover whole HP. As other option I would see splitting geometry in middle by in UV and relax it little more. This way you should also get better texture coverage if current layout free space wasn't intended.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    cupsster wrote: »
    I think they are happening where LP cage intersect HP. Best and safest approach would be most time consuming one. To author cage by hand and make sure it cover whole HP. As other option I would see splitting geometry in middle by in UV and relax it little more. This way you should also get better texture coverage if current layout free space wasn't intended.
    I do not want to take a week to complete that thing , what you mean by the second approach?
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    you have at least 2 different errors in that mesh but they are easy to see what the problems are if you don't panic take the time to look.

    https://dl.dropbox.com/u/1693140/web/Untitled-5.jpg

    https://dl.dropbox.com/u/1693140/web/Untitled-3.jpg

    Steps you should follow to making a cage, it wont take a week, it shouldn't even take more than 10 mins for something like this.

    Make "ugly" looking cage as you have already done by pushing it out an even and reasonable amount.

    Test bake, it should look the same as a normal bake without the cage

    Find all the errors, go in and move the cage so its not intersecting unwanted geometry.

    Test again.

    Done or fix more errors.

    Actually I'm pretty lazy so I would just flatten the tight indents where the problems are and it will be ok.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Frankie wrote: »
    you have at least 2 different errors in that mesh but they are easy to see what the problems are if you don't panic take the time to look.

    https://dl.dropbox.com/u/1693140/web/Untitled-5.jpg

    https://dl.dropbox.com/u/1693140/web/Untitled-3.jpg
    I understand the first but didn't get what means the second ...

    but the main problems I am having are just on the wndowed parts ...

    Frankie wrote: »
    Steps you should follow to making a cage, it wont take a week, it shouldn't even take more than 10 mins for something like this.

    Make "ugly" looking cage as you have already done by pushing it out an even and reasonable amount.

    Test bake, it should look the same as a normal bake without the cage

    Find all the errors, go in and move the cage so its not intersecting unwanted geometry.

    Test again.

    Done or fix more errors.

    Actually I'm pretty lazy so I would just flatten the tight indents where the problems are and it will be ok.

    what u mea by flatten tight indents?

    The problems I am referring mostly are in the larger intrusion windows walls .
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    Sorry I meant I would try build the low poly geo to not get the problems in the first place and not bother with a cage, but that's only because I'm being lazy.

    This is an example of the first problem, its a slice of the the white lines are uniform ray distances and the red circles are the geometry the bake is deciding to use the normal from.

    https://dl.dropbox.com/u/1693140/web/Untitled-2.jpg
  • EarthQuake
    Options
    Offline / Send Message
    Frankie wrote: »
    Sorry I meant I would try build the low poly geo to not get the problems in the first place and not bother with a cage, but that's only because I'm being lazy.

    This is an example of the first problem, its a slice of the the white lines are uniform ray distances and the red circles are the geometry the bake is deciding to use the normal from.

    https://dl.dropbox.com/u/1693140/web/Untitled-2.jpg

    Yeah this is really good advice, just keep your low simple and try not to cut in little gaps like this that are going to cause errors when the cage/rays get pushed out and overlap.
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    Pick one of the errors on your normal map bake then take a long look at the low and high poly relationship and try and figure out why it looks like that then if you cant, upload the latest data again and point out the exact same one.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    ok so you mean , that for LARGE windows intrusion I can make the low poly follow the indent , while avoid it for smaller holes , ok , but ... Still I have problems on the faces of the large ones ... I ll take a try at make some cleaning on the cage , wich is something I hate to do in xnormal because it becomes slow , unresponsive and is not really good to handle vertices and moving them around ...

    while loading a high res poly in 3dsmax , well it slows a lot my system ....
  • Frankie
    Options
    Offline / Send Message
    Frankie polycounter lvl 19
    Well the example can happen anywhere, if you understand why it happens and can see where its going to be a problem you can build the model different to avoid it. A custom cage can fix it if you really can't build it differently.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Again Naima - just take the time to build a custom cage manually in maya or max or whatever you use. It takes about two minutes - just inflate the whole thing using the push modifier then touch up the tight areas. And make sure that the vertex order between your original low and the cage version is the same before export by testing it out with a morph modifier.

    Don't rush things - just take the time to do things well.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Ok , a question is possible to export from xnormal the cage to import in 3dsmax?
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Btw ... Thanks really a lot to everyone for taking the time to analyze my problem and trying to help me figure out my problem ... thanks really a lot ...
1
Sign In or Register to comment.