View Full Version : UE3 question: Orienting Poly To Camera
12-02-2008, 10:22 AM
Does anyone out there that is working in the Unreal 3 engine know this little problem I am trying to solve?
It's simple and old school but I just want to orient a poly face to camera. Source is doing it all over the place with their foliage. I want to do something similar for foliage and light rays I'm making. No one here knows how to do it in Unreal 3.
Thanks in advance!
12-02-2008, 10:29 AM
You could always try some sort of particle system, I know it sounds like a giant hack but I'm not sure if there's a simple object that orients polys to the camera other than particles.
Another good soloution for light rays is to just use a box/sphere/cylinder w/ a gradient from top to bottom then have fresnel + depthbiased alpha + dist from camera cut multiply the opacity so that its invisible on the edges, places where it intersects geometry, and disappears as it gets closer to camera.
12-02-2008, 11:22 AM
Yeah particles does seem like the way to go. I just found out one of the engineers made a Sprite component actor which is placeable in the editor which is basically the same as placing a single frozen particle and it's dirt cheap.
The main thing I was avoiding was placing 100 or more of these buggers on a tree or bush and having to make a prefab every time instead of controlling the placement of the poly-faces in maya. But if that's what I gotta do... ehh.
Our current rays are using pretty much the exact setup you described. The particular effect I was trying to achieve was a sort of layering or "dancing" of the light rays as you walk around them and I was curious to see what would happen if I used the sprite and constrained its rotation to an axis. I'm getting an "ok" look with a panner on our current cylindrical ray.
Also we are trying to get a single light ray attach to our bullet decals so when we are penetrating a thin surface a light ray will appear on the internal normal but that's definitely going into the particle system and might need code support to create specific inside/outside volumes.
So, you've convinced me to use the particle hack and proceed from there, thanks a lot for the help I didn't expect a response to this so damn fast! :)
I'll post my results if it doesn't break my NDA.
12-02-2008, 12:18 PM
could always try a bump offset or something that's view depenant like using the camera vector to shift one of the noises in your light rays if you want them to shimmer or something when you move.
12-02-2008, 03:35 PM
Ah yeah, I will try that thanks a lot! I'm just beginning to dig deeper into the shader tech so I appreciate the help.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.