Home Technical Talk

3ds max, ortographical projection mapping?

Graylord
polycounter lvl 9
Offline / Send Message
Graylord polycounter lvl 9
So I am trying to do some render to texture normal mapping, but I keep hitting on an issue I am not sure of how to adress.

I always assumed projection mapping was ortographical and that the view was based directly traced from the polies of the cage.
This appears to not be the case. Instead it seems to use the UVMap to break the object into a seperate 3d scene and render it normally, including camera effects such as field of view.

Obviously when creating flat, uvmapped textures, I wish it to be orthographical.

This is the object in question:

ProjectionMappingIssue_zps5411c642.jpg
Yes, I know the cage is useless for the concave bits, but I am only needing the grey knobs there.

The knobs/bolts whatever are perfectly aligned to the surface they are being projected onto.

However, when I render the normal map, they appear like this.
ProjectionMappingIssue2_zpsf414d06d.jpg
As you can see, instead of being flat, the appear to be angled towards the center of the UVMap (this is just a cut-out of the entire map, so the center of the uv-map isn't the center of the image), due to what I guess would be the field of view of a camera? (I still don't understand why a render to texture would render like this in the first place) How can I correct this?

Since this is a render to texture, setting up a camera is obviously not an option.

Replies

  • fatihG_
    Options
    Offline / Send Message
    fatihG_ polycounter lvl 14
    If there is a mismatch with your mesh and your cage, you will get that distortion.

    What you want to do, since your UV's are separated already is to have the cage "cut up" and make sure the cage matches with the low poly mesh perfectly.

    Apart from that, if tri budgets isnt a big issue, you can cut the mesh and have a vert for each knob.

    Key here is that you need to understand how "smoothing" with the vertex normals work.
    As vertex normals basically fake a smoother look on a model, its "projection" gets bent. That bent projection of the normals direction is what is causing the "projection errors" you are having.

    --edit--

    Added attachment image, to hopefully give you a better idea what I am talking about.
    Note that the stuff on the right would be a "smoothed" version, while the examples on the left would have either hard edges, edited vertex normals or an edited cage.

    As you can see on the examples on the right, the projections fan out from the center of the polygon, while on the left they are pointing out perfectly straight.
  • Graylord
    Options
    Offline / Send Message
    Graylord polycounter lvl 9
    Thanks!

    Ah, I believe I understand, but how would I go on about using a custom cage for a RTT?

    I tried just copying the face in question (I know all other faces of the object would be broken, but again, I only need to normal map that one bit), move it out along it's own axis a bit (enough to cover the knobs) and try to use that as a cage, but I cannot figure out how to make it those polies instead of a projection modifier.

    The "Smoother" look you saw of the cage was the projection modifier basically just being a "push", which gave that result by extent.

    Edit: So I realize now that it won't accept it as a cage, unless it has the same topology as the lowpoly, which is frustrating. How would I would you suggest I go on about making a decent cage model for this?

    Edit2: So I just made a copy of the model, and just moved the face in question along it's normal (like I did with the flipped face I mentioned above).

    While that works fine in this case, I can't see this being a very sustainable method for more complicated highpoly models, particularily with details that follow curves and edges. Is there some sort of equivalent of push that keeps the proportions that I'm not aware of? (Though I suspect that would be a a mathematical impossibility)
  • madmex
    Options
    Offline / Send Message
    I'm not sure if this is what you are looking for, but I went ahead and rendered the left one with the "Use Cage" Turned off, and the right one is using the cage. Might be worth trying.
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    madmex wrote: »
    I'm not sure if this is what you are looking for, but I went ahead and rendered the left one with the "Use Cage" Turned off, and the right one is using the cage. Might be worth trying.

    Yeah. That's dependant on smoothing groups though and may mess up your harder edges (miss rays).

    Another way to use supporting edges in order to control rays casting out from an averaged cage is to place them liberally wherever needed on the lowpoly, bake out an OS normal map, go back to your lowpoly and delete said control loops, then throw both the newer lowpoly and the OS map into handplane and reap the benefits.
Sign In or Register to comment.