Announcement

Collapse
No announcement yet.

Stained Glass Window material

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

    Stained Glass Window material

    I am creating a scene of a reconstruction of a building torn down in the 60's which features three stained glass windows.

    The material I currently have created has finally got the colour of the glass to effect the light rays coming through it.
    It even produces shadows from the non transparent leadwork, BUT it does not colour the shadow cast.

    It does not need to be dynamic, but that would make fine tweaking the scene lighting much easier.


    The current scene with window.


    The material itself. Currently very simple.

    Does the Unreal Engine 4 currently support coloured shadows from transparency's?

    #3
    This used to be a feature of lightmass in UE3, but it disappeared at some point from the engine

    Comment


      #4
      Originally posted by Jacky View Post
      Light Function doesn't read colour channels either, at least I haven't been able to get it to. The only information it seems to pick up is (single channel) intensity.

      You could maybe break your light into three Light Functions (seperate the R,G,B channels). Not sure if that would play well mind.

      Comment


        #5
        Opacity seems to be an either on or off switch. Try using the opacity mask instead. If that does not work try making shadow casting dynamic.
        Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
        Custom Map Maker Discord
        https://discord.gg/t48GHkA
        Urban Terror https://www.urbanterror.info/home/

        Comment


          #6
          The scene does have an outdoor part with the scene sun light casting the light through the windows.

          Comment


            #7
            Not ideal, but if you need a proverbial tyre iron; this is projecting three seperate Light Functions (R,G,B).

            I had to literally split it into three textures however, as even if you only output R into Emission, the light reads the whole RGB intensity. This might be intentional but I'll file it as a bug anyway.

            (and yes, it works as dynamic [Movable], so you can manually place & tweak..just parent the G & B lights to the R light)



            Last edited by Walternate; 03-27-2014, 01:30 PM.

            Comment


              #8
              So I sat down this morning to recreate this for a report, and discovered that I couldn't repeat the steps.

              It appears that Light Function materials do read seperate channels (as Emission inputs) ok - you still need three Lights & three materials however.

              Apologies for any confusion!

              Three Light Function materials & Lights + 1 RGB texture.

              Tip: Set your Lights to extremely high intensities, and tweak their Indirect Lighting Intensity to get nice HDR glows and GI bounce from them (this is at 8000000.0 & 0.3 ILI per light), and seperate (or rotate) the lights very slightly for chromatic aberration:

              Last edited by Walternate; 03-28-2014, 06:03 AM.

              Comment


                #9
                That is a very nice solution, Just not sure whether it would work in the scene.
                The scene has both indoor and outdoor areas connected by an open doorway, both lit by the same sky and directional light.
                I would like the light rays to come out from the window parallel.

                I will have an attempt to use the system suggested and see what I can get working in the scene.

                I do wonder why the lighting system does not take into account transparent colours.

                Comment


                  #10
                  Originally posted by PlatypusGreen View Post
                  That is a very nice solution, Just not sure whether it would work in the scene.
                  The scene has both indoor and outdoor areas connected by an open doorway, both lit by the same sky and directional light.
                  I would like the light rays to come out from the window parallel.

                  I will have an attempt to use the system suggested and see what I can get working in the scene.

                  I do wonder why the lighting system does not take into account transparent colours.

                  Couldn't you create a texture / decal and cheat the look? Make it seem as if the texture is coming from the light when it reality it's a texture placed on the wall?
                  KITATUS
                  "Information shouldn't be behind a paywall, It should be free for all!"

                  Comment


                    #11
                    Originally posted by Walternate View Post
                    Tip: Set your Lights to extremely high intensities, and tweak their Indirect Lighting Intensity to get nice HDR glows and GI bounce from them (this is at 8000000.0 & 0.3 ILI per light), and seperate (or rotate) the lights very slightly for chromatic aberration
                    It didn't occur to at the time, but you can simply turn off Use Inverse Squared Falloff on the Light properties to avoid having to overload the light intensities - this will give let you use much lower light Intensity and ILI settings, for more subtle control over the look and in particular less GI overloading from indirect light.

                    Sadly I've no solution for coloured light rays - direction lights can't clamp (I don't think) the Light Function texture, so although you can use Light Functions with them, they'll be a repeating tiled projection. I might look into this more this evening.

                    Comment


                      #12
                      Originally posted by KitatusStudios View Post
                      Couldn't you create a texture / decal and cheat the look? Make it seem as if the texture is coming from the light when it reality it's a texture placed on the wall?
                      You can, and the docs state that deferred decals are very efficient, but there are caveats - namely they don't shadow and they wrap. They're also oblivious to the material properties they're projecting on - see the water in the screenshot.

                      Either way, if you have a lot of these to place, I'd create a Blueprint of any windows that need to project, with a "source light" public variable that can be set to the light that's doing the real casting (i.e. the sun) from which you can get the vector for the light projection. There are caveats again of course - spotlights have a cone, so it could be problematic in some cases, whereas decals are flat (but have other considerations such as bounding box volume).

                      Comment


                        #13
                        Excellent architectural designs stained glass
                        Toughened glass dealers in chennai

                        Comment


                          #14
                          Sorry for posting in such an old topic, but it still shows up when looking for a stained glass methods in search engine. Currently I'm really interested in the first image from this topic - how is it possible to create such stained light rays? I know most light rays in UE4 are just a model with proper material (with exception of Light Shafts from a Directional Light), but I can't find anything about stained rays anywhere. Even here PlatypusGreen mentions only that "The material I currently have created has finally got the colour of the glass to effect the light rays coming through it." Could someone please explain this in more detail?
                          Twitter

                          Comment


                            #15
                            Most likely they are just bloom based light shafts. You have to check light shafts enabled on your directional light.

                            Regarding the issue at the stop of this thread, it's probably just that the opacity needs to be adjusted to let more colored light through. You can try using the "lightmass replace" node and feed a lower opacity into lightmass. You should get nice colored light IF your directional light is static. Stationary lights only use shadow maps which cannot be colored. Dynamic lights would also have to be faked by using a projection.
                            Ryan Brucks
                            Principal Technical Artist, Epic Games

                            Comment

                            Working...
                            X