Home Technical Talk

phong shading errors in bakes

Ged
interpolator
Offline / Send Message
Ged interpolator
Im trying to bake a simple window model and its coming out with these wierd shading errors, basically it looks like its showing all the triangles that make up the lowpoly in a very subtle way. It doesnt look too bad in xnormal but it looks terrible in other engines. Any idea how I might fix this? Im currently working in cinema4d and exporting to wavefront from there but I tried exporting to 3ds and it gave the same result, Im not sure its exporting the phong tag information :(

bakeerror1.jpg

Replies

  • Eric Chadwick
    Looks to me like the vertices are being duplicated in the OBJ file. I know some programs do this wherever there's a UV seam.
  • Ged
    Offline / Send Message
    Ged interpolator
    Looks to me like the vertices are being duplicated in the OBJ file. I know some programs do this wherever there's a UV seam.

    thanks Eric maybe thats what it is, is there any way to fix this problem? I suppose I just need a better obj exporter. :/
    tried using the riptide exporter for c4d objs and the errors are still there :(
  • Eric Chadwick
    Does Xnormal have an auto-weld function, maybe an import setting? Maybe look for a different export format that Xnormal supports (or use a different baker).

    The .3ds format is always going to have problems though, it cannot store a UV seam in a single mesh vertex, so it either tosses it out or it dupes the vert (can't remember which).
  • Ged
    Offline / Send Message
    Ged interpolator
    well problem fixed, all I did was import the obj that I got out of c4d into max, then set the smoothing groups to auto and export and the bake is perfect, this is very annoying, I wonder if someone has made a good exporter for c4d which keeps all the correct phong tags and doesnt duplicate verts or anything.
  • Eric Chadwick
    Glad you sorted it out.

    This isn't related to Phong though, OBJ doesn't store material data at all unless you're also creating a MTL file on export, and even then it doesn't store the shading model (Phong, Blinn, etc.)

    Your issue was caused by the mesh itself... vertex normals, duplicated verts, whatever.
  • Ged
    Offline / Send Message
    Ged interpolator
    Glad you sorted it out.
    Your issue was caused by the mesh itself... vertex normals, duplicated verts, whatever.
    ah I thought that smoothing groups and phong tags were similar things but youre saying one is using vertex normals to control shading which is exported and one is using a shader setting which is not exported?
  • Eric Chadwick
    Correct.

    Smoothing groups are simply a way to control vertex normals. Smoothing groups are meant to simplify editing vertex normals, but I think they actually make vertex normals harder to understand.

    Vertex normals are a mesh-specific control. Phong is a shader-specific setting. They both control the "smoothness" of the model, but at different ends.
  • Ged
    Offline / Send Message
    Ged interpolator
    Correct.
    Smoothing groups are simply a way to control vertex normals. Smoothing groups are meant to simplify editing vertex normals, but I think they actually make vertex normals harder to understand.

    well then I can only assume that cinema 4d has no way of editing smoothing groups and therefore is inferior to apps like 3ds when it comes to game models and texture baking :(
  • Eric Chadwick
    I don't know C4D well enough, but applying a Phong break to an edge sounds like the same result as using 3ds Max to assign different smoothing groups on either side of an edge.

    http://www.polycount.com/forum/showthread.php?t=56935
Sign In or Register to comment.