Home Unreal Engine

UDK - Material - World Projection Texture on Skeletal Mesh

polycounter lvl 12
Offline / Send Message
Ace-Angel polycounter lvl 12
Hey to all,

I was wondering if in UDK you can project a texture on an animated model (skeletal mesh) without world based variables and distortion on the texture projection.

No need for a solution, just curious if it's possible.

Replies

  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    IDK, but you have me intrigued, whats the application?
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    With a light function maybe, with a specific lighting channel for only affecting the skeletal mesh.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    @Comp: Basically, your project on your mesh textures. So say you have detail map textures, but your model has alot of nasty seams and you want to avoid that, by projecting on your mesh via the X, Y, Z coordinates on World Space, you can avoid said seams.

    The issue is, it looks weird, because as soon as your model moves, the textures don't move with the character, but appear to be floating on your mesh, not bending or such.

    However, this techniques is great for Static Mesh, but paradoxically is pointless since your can hide the seams of your model or use a second UV channel for your detail map with a unique layout which requires less resources, especially for a detail map, while Skeletal Mesh which could benefit from it more, get kicked to the curb.

    @Froyok: Actually, that sound pretty good for another question, har har. However, for the Skeletel Mesh projection thingy, it still floats the detail when the character moves.
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    In this case, the projection must be done in the material , otherwise you will always get your current error.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Ya, that is what I was afraid of, if only there was a way to project on per mesh tangent location as opposed to world without the need for UV's.

    Oh well, one day.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    oh :P

    I think this IS possible, and in fact is similar what I'm working on implementing for the texture based specular solution that you posted about further down this subfoum.

    So far I have sphere mapping working from the light's perspective, but I'm certain a different form of projection can be had with some further math tweaking.


    But just to clarify on what you're wanting.. essentially you want a per polygon planar mapped projection for skeletal meshes for tiling textures? or do you want to project large decals like tattoos and such onto an already textured mesh? Cause the implementation would be a little different for each of those
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    No, I understand what your asking for, but I wanted to know what your where doing with it. I've tried making 3d-projection Shaders for my terrain but skinned meshes? like what?

    In UDK you can project 3d textures from world space, maybe object space, but that's the only other methods I know of. Never seen tangent space projections in any engine, but why do you think you need UVs for this?
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Vailias: Haha, seriously, do you ever sleep? :P

    To be honest, I wasn't really looking for a solution for the detail map projection (I know, it sounds weird), just was curious if there was a quick and simple (dirty) way to implement detail maps without seams breaking and without them looking floaty. That's about it, haha.

    Computron: Well, having a skin based character which is naked pretty much is the reason I was looking for this solution. Naked zombies, naked monsters, I have a lot of naked mutant models which would benefit from detail maps, but the seams look really sore.

    Currently the way I avoid detail seams is to gradient paint my detail mask and to put seams around stress joints in my models.

    Places like ankles, wrists, neck and pelvic region have next to a black color mask and I use that to control what gets what detail, but it takes alot of planning time and was hoping for a quick and dirty solution.

    Cheers guys.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    See, the reason I ask is because you might be making things too complicated for something like this. Consider using multiple blended UV sets for the detail maps with vertex alpha masks for the seams.

    3d projection for detail textures sound expensive and probably won't give any better results than Muli UVs, especially with muddy blending that will happen between the x, y & z angles with most 3d projections. Plus with the second UV channel you get a trumendous amount of control over it, you can make it look PERFECTLY seamless without too much work.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    That's actually pretty clever! I already use Vertex Colors for other things, but I could use the Blue channel of my Normal Map and have the user save out a Vertex/Mix map in there, which they could be used in the Lerp node as the Alpha between the two UV's!

    You're a genius mate! Kudos!
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    I got some interesting results but nothing all that usefull. :shrug: no shrink wrap for now with UDK. Would be easier with access to the vertex shader routines as then the projection matrix for the whole polygon could be established, but I tend to agree with computron here, in that its overly complex for something that has more easily authorable solutions.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    I used this technique all the time when I want to have environments made of tiling textures but have unique normal maps and seamless detail normals. Saves a lot of memory, easy to author and looks awesome. Got the Idea after seeing snefer's modular exercise post. UVs can be fun.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Thanks guys, and yeah, I guess sometimes simple is all you need.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Post moar pics ace.

    :)
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    Did you get a chance to check out the UV seam painting options yet in the new December 2011 release?
    I am really interested too see if it is actually werkin' fer people.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    No documentation, no idea what I should be looking for. Also, it wouldn't work for Detail maps since they would still tear at the borders.
Sign In or Register to comment.