PDA

View Full Version : Flip a material's Z axis?



WesBelden
02-24-2008, 08:28 PM
Hello :)

I've setup a SceneCaptureCubeMapActor to render to a texture, which is then used in a material in the following way:

http://giz.rebelsquadrons.org/unrealEd/materialEd.jpg


When applied to the walls of a subtracted cube this acts somewhat similarly to a SkyBox in earlier versions of the Unreal engine.

The problem I'm having however, is that that while the X and Y appear fine, the Z axis is flipped, with the ceiling on the floor and vice versa. Does anyone know of a way to flip this around? I've tried using the Vector transform in various ways, but the best I've been able to get is either showing just the ceiling (both top and bottom) or just the floor (again both top and bottom).

Edit: Forgot to mention that the Vector Transfrom is set to World; setting it to local seems to have the same affect as the world, while setting it to view just shows the floor (seemingly looking directly down at it), no matter what direction the player cam looks in.

Any input would be greatly appreciated! :)

Waylon
02-27-2008, 04:57 AM
Try multiplying the output of the Transform node against a 3-vector with values 1,1,-1. That should invert the Z axis.

WesBelden
02-27-2008, 05:16 PM
I'd thought of that but just didn't know how to go about it (that'll teach me not to read the UDN properly! :-p). Thank you very much, that works like a charm! :)