Announcement

Collapse
No announcement yet.

Making materials reflective?

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

    Making materials reflective?

    I want to make some of materials (tile, walls, ceiling) reflective(to reflect llevel around it). Any suggestion on tutorials or how it could be done?

    #2
    In material just use ReflectionVector as UV input for your texture sampler, then mix output with diffuse using LinearInterpolate and some B&W mask. BTW you will need to use ComponentMask on ReflectionVector to filter out unneeded Z component.

    Lerp (mix reflection color with diffuse)<-TextureSampleCube<-ComponentMask B<-ReflectionVector

    If you want your material to reflect whatever is actually in front of it, like mirror, you would need to create special Render-to-texture resouce and setup SceneCaptureActor to render stuff into it. Then just use it in your sampler, although i've never tried anything like that. For simple reflections static textures and even non cube textures look just fine.

    Comment


      #3
      Have a look at the 3d buzz tutorials on water. It's essentially the same principle I think. I "think" it's an interp actor?

      Comment


        #4
        i have done water sample, and i get how it works, but whets my problem now reflection is overpowering diffuse. and multiplying Reflection Vector by a constant doest change it

        Comment


          #5
          Also i notices when i add mask to reflection vector with RGB it works if i use 2 colors it doesn't work. (Reflects wrong way)
          Thanks a lot. Looks like i figured that out i needed to multiply cube texture not vector. Last thing i wanted to ask, I making a multiplayer map, and placing those Rendering cubes could be very FPS consuming. Is there a way to simulate (fake) reflections...i am not sure how it was done in Mass Effect 2. But floors there look pretty nice

          So because my map is pretty big creating materials for floors/walls with cubemap capture actor would be really hard i would need like at least 20-30 RenderToTexture cubes with separate material for each one. So whats the best way to implement that.

          Comment


            #6
            Yep, it would certainly ruin the frame rate . Fortunately you can make it capture scene only once or just save the cube capture into static texture.

            Double click on your render-to-texture resource, and check "render once". I think it updates texture only when you move capturing actor, i noticed it increased my fps just after i checked it.

            Still having all those scene capture actors everywhere around your scene may not be the most convenient option. If you just want to get result out of render-to-texture resource, right click on it and select "Create new static texture".

            I'm trying to test it out with a simple scene, but when i apply reflective material with cube texture, reflections are all off, it's ether i miss something about cube map usage or it's just UV's are distorting it. I hope it's just UVs XD.

            Comment


              #7
              I am not looking really for mirror effect. more like glossiness...i dont even need real relfections...I tried using my floor texture in diffuse + specular power. It kind of makes it shine but also makes matte

              Comment


                #8
                If it's something really simple, i've seen some examples where they use ScreenPosition(float4) instead of ReflectionVector. It's kind of makes texture "stick" to the screen, so it looks like reflection of something.

                Comment


                  #9
                  Yeah but again ScreenPosition requires CubeMap Capture Actor. Let me take Mass effect 2 screenshot and you will see what i am trying to achieve

                  Comment


                    #10
                    Try using a cubemap and see if that helps.

                    Comment


                      #11
                      what i have seen there is cubemap_x.tga textures in mass effect 2 in most of packages...and mostly they look like flares

                      Comment


                        #12
                        Huh, that probably explains the glossy look, you really just need wide white highlights in cube map, not a full colored image. Matte materials only reflect bright areas, the rest is scattered or absorbed

                        Comment


                          #13
                          basically i just need effect similar to a glass mask on character. that would change flares on it when moved. So it wont show real reflection only flares..So how do i get cube map with flares for my map?



                          So for this character from mass effect 2 there was 5 cubemap textures. My question is how to set up material to use something similar

                          Comment


                            #14
                            Generate base texture in editor then give it a pass in photoshop? Or just make it from scratch, blurring it out would go great lengths too.. It looks pretty arbitrary, no one's gonna count those spots anyway.

                            Comment


                              #15
                              Here is video of mass effect 2, pay attention to the floor, I would like to achieve effect like that

                              http://www.youtube.com/watch?v=4UeJSoKjWU0

                              Comment

                              Working...
                              X