Home Technical Talk

Triangles in Height map-Xnormal??

polycounter lvl 10
Offline / Send Message
melviso polycounter lvl 10
I keep getting triangles/ wireframe like lines in my height map rendered out from xnormal. I have the low poly mesh smoothed out and subdivided a few times to eliminate the lines but the result is still the same or is the mesh corrupt?
Any ideas?
Thanks.

Replies

  • MmAaXx
    Options
    Offline / Send Message
    MmAaXx polycounter lvl 10
    post a screenshot, it would help more.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Notice the little squares in the map, shows up as squares when used as height map.
  • MmAaXx
    Options
    Offline / Send Message
    MmAaXx polycounter lvl 10
    yeah, you probably just need to subdivide more your lowpoly. I usaually subdivide up to 4 to get rid of the triangulation.

  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    Ok. I only subdivided twice. Thanks for the info, mate.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    If this is a non tileable texture, you want the triangles.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    It is a non tileable texture, any reason why the triangles would be needed?
  • pior
    Options
    Online / Send Message
    pior grand marshal polycounter
    A displacement map (when used in a non-realtime renderer) displaces an already smoothed model. So basically you want to divide your "low" up to a point where a face is equivalent to one pixel of the intended texture, then bake.

    That way you will not get any shading artefacts since faces that are not supposed to be displaced will be shown as your chosen grey mid point.

    Other issues are probably coming from inappropriate scaling. Displacement maps work with absolute distances, therefore you need to carefully set your model scale.


  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    @pior Okay, thanks for the info. I wanted to ask about if it's possible to import and tile a base texture in xnormal and bake to a low res mesh? I can't find a tiling option after adding base texture.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    melviso said:
    It is a non tileable texture, any reason why the triangles would be needed?
    Yes.Imagine that you have a lowpoly mesh that has angular surface (because its lowpoly). And if you want to get it smooth, you need to tessellate, then move the inide of the original faces, and form "bumps", loosing intensity as it approaches the original edges, so you get a smooth curve. Here is an example image:


    Then imagine this flanttened, like on the top example on the image. So it makes total sense that you see the lowpoly edges in your height map.  This doesn't happen in the case of tileables, because you compare the hp heights to a flat plant.
    Displacement map/height map is a kind of distance map from the lowpoly surface to the highpoly...


    So don't worry about the visible topology in the heightmap, its actually needed for good result on anything more complex than a plane. You won't actually see them, once you apply it as a displacement map. Using higher poly lowpoly mesh would indeed reduce the visibility of the topology lines - since the surfaces match the hp closer.

    If you would subdivide the lowpoly to the density of the highpoly, you would loose these bumps/topology traces in the heightmap, so when it actually comes to any sort of displacement on the lowpoly, you map wouldn't be able to tell, which new vertex should offset how much.

    Technically this should be a thing in CG too but I guess the base "lowpoly" is so much higher poly than a game one, you don't use the displacement for bigger features like surface smoothness and curvature, you do it for small details, and then it doesn't matter.

    Edit - So after further investigation, it turns out that you can do it both ways, and the need of triangles in the displacement map depends. My example with the drawing still applies, if you don't put like a turbosmooth, you just tessellate (equals to flat tessellation in Unreal). But if you turbo smooth or use PN triangles as tessellation method in Unreal, you don't need them. So both can work, depending on how you do it.


  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    @Obscura Thanks for the explanation. Problem was the triangles was showing up when I also tested the displacement map in Blender which was wierd but subdividing the low poly seemed to lessen the traingles effect in the height map.
    Would you by any chance know if there is there a way to tile a base texture of a uvmapped high poly in Xnormal?

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You could do that, by scaling the UVs of the highpoly, in Blender.
  • melviso
    Options
    Offline / Send Message
    melviso polycounter lvl 10
    That's true. I wonder why I didn't even consider doing that. Thanks man.
Sign In or Register to comment.