Ok so i'm still what i would consider new to UDK and have been writing a set of tutorials both for my own reference and for a school assignment.
I have been trying to figure out how to create reflections for my little mock up hallway and i must be retarded because i cannot for the life of me get things to work the way i want.
The first thing i tried was creating a cube map and using it in my material for the floor. It almost achieved what i wanted but the rotation on the reflection was slightly off for it to look correct. I have no idea if there is a way to adjust the rotation of the reflection at all but i have a feeling i shouldn't need to and i'm doing something wrong.
Could the uv layout or anything like that be causing issues? The floor is only using part of the uv map because i was planning on using it for multiple things, but i wouldn't think that's causing the issue
So i started using Tor Flick's project as reference which was made downloadable because hes awesome. It is this project here
http://www.torfrick.com/info/lab.html
I noticed he was using a Scenecapturereflect actor which was attached to a TextureRenderTarget2d. The reflection on the ground is what shows. So i gave this a shot and mine ended up being a solid reflection instead of just partial. Now i'm sure hes got a fancy trick or something for this but i cannot get anything like it. My reflectactor hides the floor beneath and i haven't found any information on how to get the same effect.
Now im pretty sure im just retarded because everyone else seems to figure out things just fine but its been driving me crazy and i really need help since i don't know anyone personally that knows UDK. Anyone that can give me an insight into WTF im missing would be greatly appreciated.
Replies
Why are you adding the reflection to colour? Think of nodes like a mathematical formula applied to every pixel. If you add a white floor texture to anything your going to get a white texture 1,1,1 + x,x,x is 1,1,1 with a little bit of bloom and that's still white. also that multiply by 1 is pointless.
just go right from your Reflections texture sample into the lerp.
That still does not help me in anyway with my actual problem though. Some input on that would be appreciated.
I was wondering if the position of the sphere used for the cubemap capture was slightly off, could that cause the reflection to also end up slightly off. Perhaps i didnt have it in the exact center or something
Now i would like help with the actual questions i asked help with. The floor reflects the image in the material just fine. What its not doing is reflecting it on the right rotation, its slightly to the side when it should not be.
Please actually read through the thread then post
so i'm a little confused. you're saying the reflection is not lining up properly, or reflecting in the right rotation as you have said, yet the last image you posted it looks like it is.
I want to see the reflections and the floor like in tors example but i cant find a way to do this
Hope that makes sense
i'm not sure how Tor made his small and out of the way. i've never tried, i just hide mine below the floor. as for the reflections on top of the floor in the shader, sounds like you got that covered?
I am trying to figure out how to get the same reflections on my floor. You see my last picture where the actor reflections everything perfectly, How do i get that into reflect in my floor material exactly as it looks now.
Everything i have tried when putting that reflection into the floor material, does not reflect everything on the same angle. If you see my first picture, i have reflection working but its on an angle, not reflecting whats directly above it.
Edit: I have that actor connected to a Texturerendertarget2d. Am i supposed to be using this to make a static texture because its not working when i do.
I dont understand if im supposed to creating a texture from this actor and putting it into the material to reflect or if theres something else i should be doing.
To put it in your material plug the texturerendertarget2d into a texture sample in the material with a screen pos and mask (R G) like this
That's the most simple of reflection setups. Then play around with strength of reflection as detailed above.
This should help also: http://forums.epicgames.com/threads/733910-Simple-Real-Time-Reflection-Distortion
That whole thread is a good read.
I had one more quick question. Since this type of reflection seems to be used for larger rooms and such, what is a cubemap normally used for?
Thanks so much for putting up with me Polycount is the best