Announcement

Collapse
No announcement yet.

Realtime reflections / environment mapping ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Realtime reflections / environment mapping ?

    Hi, i'm trying to make a realtime reflections on car body (or something that is moving, like for example rigid body), so they will reflect all things around from the position of that thing. I figured out how to do such reflections using the SceneCaptureCubeMapActor but it reflects all objects around from the position of that actor, not the body I applied the material to.. any ideas how to do it ? And is it possible to do such thing using only editor or maybe only with scripts ?
    P.S sorry for my english ;P

    #2
    Try to hard attach scene capture actor to your car, but i doubt it will work.

    Generally unreal engine uses fake reflections for performance reasons. For eg. in racing game you really do not need real reflections, you need static cubemap that add some shine on fast moving models. Real time reflection on one object will work fine, but then you want add next one and maybe some dynamic lights etc. Each such effect forces engine to render whole scene once more, you slow it to crawl quite fast.

    Comment


      #3
      we had that system working perfectly in ut2k4. havent tried it in ue3 yet but i dont see why it wouldnt work. an attatched scenecapture rendered to a cubemap then applied as an environment map should be just the ticket. there may be some problems omitting the object which is to have the reflection material applied from being captured by the scenecapture itself, but idunno. could just place the scenecap above it.

      we certainly got it working with a non-moving scenecapture

      i did hear that there were problems where native code was stripping out the rotation params of the scenecapture but if youre capping a cube then it should be fine.

      Comment


        #4
        thanks for your replies guys
        you're right Nawrot, i think i'll give up with those reflections, and stay with static cubemap ;P

        Comment


          #5
          There is a minimum distance property for the cube capture actor, under which nothing is captured.

          I've had problems with cubemaps and normals together, be wary about warping and rotating reflections with normal maps.

          Comment


            #6
            Sorry for my english too

            I don't understand your problem and i'm newbie in UDK.

            I know you have to Link a RenderToTextureCube at SceneCaptureCubeActor. And then in Material, link CameraVector to TextureSample and TextureSample to Difusse or what you want.

            I do this way and i got the problem with Map align in the object that reflect. But it reflect what SceneCaptureActor see.

            Comment


              #7
              Originally posted by raxell View Post
              Sorry for my english too

              I don't understand your problem and i'm newbie in UDK.

              I know you have to Link a RenderToTextureCube at SceneCaptureCubeActor. And then in Material, link CameraVector to TextureSample and TextureSample to Difusse or what you want.

              I do this way and i got the problem with Map align in the object that reflect. But it reflect what SceneCaptureActor see.
              For a cubemap it should be: Reflection vector -> Texture Sample -> Diffuse

              it's also possible a transform to world coordinates may be needed in some cases

              Comment


                #8
                Transform to world will probably be needed.

                This should work fine. I did some testing with this and you can do some pretty cool stuff. You can attach the scene capture actor to pretty much anything and it will work great. Just make sure that you center the scene capture actor in the object that you are attaching it to. I had a soft body blob and rigid body sphere reflecting the world. It is pretty cool.

                Comment

                Working...
                X