Announcement

Collapse
No announcement yet.

Unable to achieve stained glass effect

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

    Unable to achieve stained glass effect

    Hi, guys. I'm using the June 2010 version of UDK and am trying to create a stained glass effect in my level, which casts coloured shadows on the ground plane, which is a static mesh. However I've tried checking and unchecking almost every checkbox I could find, and fiddling with every setting, the "stained glass" still wouldn't cast a coloured shadow on the ground. Please help me understand how it all works.

    For the material of the stained glass, I used the texture as an emissive and its alpha as the opacity. Blend mode is set to "transparency" and lighting model is set to "unlit".

    As for the lights in the level, I'm using a Dominant Directional Light. I also tried various types of spotlight and point light. None of it works. In fact, the point light couldn't cast any shadow at all.

    I would really appreciate it if someone could explain to me how I could get it to work. Thanks in advance.

    #2
    Im not really sure about that, I didnt tried it. But I think you need to do particular light function with material of colored shadow and create special light (I would use spot light) for it. Function tab is in light properties light->light component->light component-> function- then you need to fill the source with the material you like. I dont know if this is the only solution,but I would make it this way.


    Yep, My english sux. Sry about that.


    Yep my english sux, Im sorry about that.

    Comment


      #3
      Thanks for the suggestion. I tried this, but it creates a completely desaturated shadow of the stained glass instead of a translucent colored shadow.

      Thanks anyways

      Comment


        #4
        Check out this page, lightmass can do what you need.

        http://udn.epicgames.com/Three/Light...ml#Translucent shadows

        - ook

        Comment


          #5
          Hey there, ook. I saw this tutorial before, forgive me for being a bit slow, but I don't quite get this part:

          Lit materials
          BLEND_Translucent and BLEND_Additive: Transmission = Lerp(White, Diffuse, Opacity)
          BLEND_Modulate: Transmission = Diffuse
          Unlit materials
          BLEND_Translucent and BLEND_Additive: Transmission = Lerp(White, Emissive, Opacity)
          BLEND_Modulate: Transmission = Emissive

          I did as instructed and plugged the Lerps into the transmission color and it still doesn't work.

          Comment


            #6
            Does anyone here know of a better way? Would really appreciate it...

            Comment


              #7
              2 things here:

              Dominant lights can't do translucent shadows in lightmaps as shown on the Lightmass page unfortunately. This is because dominant lights use distance field shadows for the shadow maps which don't support translucent shadows. In fact the only kinds of lights that you can get translucent shadows in the lightmaps is a vanilla Point, Spot or Directional light.

              Light functions on dominant lights can only be greyscale which allows them to be rendered faster.

              Comment


                #8
                in regards to this...

                BLEND_Translucent and BLEND_Additive: Transmission = Lerp(White, Diffuse, Opacity)

                does it get plugged into the opacity input of the material? or the diffuse?

                Comment


                  #9
                  Originally posted by daniwrig View Post
                  2 things here:

                  Dominant lights can't do translucent shadows in lightmaps as shown on the Lightmass page unfortunately. This is because dominant lights use distance field shadows for the shadow maps which don't support translucent shadows. In fact the only kinds of lights that you can get translucent shadows in the lightmaps is a vanilla Point, Spot or Directional light.

                  Light functions on dominant lights can only be greyscale which allows them to be rendered faster.
                  so, to get colored shadows from a translucent mesh you have to use a standard directional light?

                  Comment


                    #10
                    Am I crazy for just suggesting that you fake it using a light function?

                    Comment


                      #11
                      You could use a decal.

                      Comment


                        #12
                        Originally posted by Piranhi View Post
                        You could use a decal.
                        Now that's a crazy suggestion

                        What is the problem with using light functions just as omegalith suggests? You don't get secondary diffuse bounces with translucency anyway.

                        Comment


                          #13
                          Originally posted by Oniram View Post
                          in regards to this...

                          BLEND_Translucent and BLEND_Additive: Transmission = Lerp(White, Diffuse, Opacity)

                          does it get plugged into the opacity input of the material? or the diffuse?
                          Both opacity and diffuse of the material are factors.

                          Comment


                            #14
                            Originally posted by Hellclown View Post
                            so, to get colored shadows from a translucent mesh you have to use a standard directional light?
                            Standard directional, spot or point light, yes.

                            Comment


                              #15
                              Thanks greatly for the input, guys. I manage to fake the effect using a light function. However it'd be nice to know how it can be achieved without faking it Good to know.

                              Comment

                              Working...
                              X