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.
@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.
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
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?
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.
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.
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!
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.
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.
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.
Replies
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.
Oh well, one day.
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
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?
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.
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.
You're a genius mate! Kudos!
I am really interested too see if it is actually werkin' fer people.