Announcement

Collapse
No announcement yet.

Quake reforged - alternative and altered skins!

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

  • mirror'd reflections was included with GLquake, long ago.



    Here's a discussion about it from back in 2009 Inside3d Forums • View topic - is this code refering to mirrors as reflections in quake?
    Want to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!

    Comment


    • thats what i miss most from glquake...

      Comment


      • In darkplaces these mirrors (with an external texture) are totally posible. Just write the current shader to "window02_1"
        the invasion has begun! hide your children, grab the guns, and pack sandwiches.

        syluxman2803

        Comment


        • Hello,
          why this script is doing that?

          Comment


          • Originally posted by webangel View Post
            Hello,
            why this script is doing that?
            The original texture is pretty small, you just need to re scale it.
            window02_1
            {

            {
            map $lightmap
            rgbGen identity
            }
            {
            map textures/window02_1

            tcMod scale 0.25 0.0825
            }
            dp_reflect 0.5 1 1 1 0.9
            }
            I am using this script. Notice the ""tcmod scale". What is the size of your "textures/window02_1"???
            Last edited by nahuel; 10-11-2011, 10:47 AM.
            the invasion has begun! hide your children, grab the guns, and pack sandwiches.

            syluxman2803

            Comment


            • This is it
              Thank You! Now it works!

              Comment


              • Please pardon my obvious ignorance, but where exactly does this code go to achieve the reflections?

                Comment


                • Originally posted by gdiddy62 View Post
                  Please pardon my obvious ignorance, but where exactly does this code go to achieve the reflections?
                  dp_reflect. 1/12 is 0,08333 so the correct code is
                  window02_1
                  {

                  {
                  map $lightmap
                  rgbGen identity
                  }
                  {
                  map textures/window02_1

                  tcMod scale 0.25 0.0833333
                  }
                  dp_reflect 0.5 1 1 1 0.9
                  }
                  the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                  syluxman2803

                  Comment


                  • nahuel,
                    Does this go in the config (which I can do) or is it qc code (which I can't do with my knowledge). If it is config, does it need to go in a certain place?
                    I told you I was ignorant! LOL

                    Comment


                    • Originally posted by gdiddy62 View Post
                      nahuel,
                      Does this go in the config (which I can do) or is it qc code (which I can't do with my knowledge). If it is config, does it need to go in a certain place?
                      I told you I was ignorant! LOL
                      You do not need edit any qc.
                      in the directory ID1 create a new directory called "scripts" (no quotes). In id1/scripts with notepad create a new file called "mirror.shader" (no quotes). You can use all the names that you want, but the extension will be "shader" .
                      put the code in the file. Is very important to leave 2 empty lines at the end. If you do not do it the shader will not work.
                      the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                      syluxman2803

                      Comment


                      • Hello Nahuel,

                        I see what amazing things you are doing here.
                        Thank you my friend.

                        The dp_reflect shader is a great thing to play with !
                        Your mirror youtube clip is simply wonderful.
                        I never thought that it was possible with such little effort in DarkPlaces.
                        Reading many things at inside3d forum about mirrors.
                        Even the very experienced people there said that it would be hard and would eat a lot of fps.
                        But in fact it doesnt (as long as the surface is not too big).
                        The windows are a perfect example for it usage.


                        I made some own investigations and want to share it with you too.
                        It is not much, due to lack of time, but maybe for some it is useful:

                        1.) Normal textures impact in dp_reflect shader:
                        I know that your hardware is not good and that you dont care too much about replacement textures.
                        But for those people, that uses normal textures together with their external window texture, it might be interesting, that you can adjust the dp_reflect shader to follow the normal texture.
                        It is done via the "distort" param (as you surely know Nahuel).
                        I suggest, if you use normal textures, to adjust the shader a little, so that it looks even more realistic:
                        dp_reflect 1 1 1 1 0.9

                        2.) Nahuel�s dp_reflect shader for all "shining things":
                        Maybe some people want to add your shader to all other shining things as well:
                        - other windows
                        - monitors in bas maps
                        I made a small compilation to catch them all.
                        Code:
                        +0planet
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/+0planet
                        tcMod scale 0.5 0.5
                        }
                        dp_reflect 1 1 1 1 0.7
                        } 
                        
                        
                        
                        +1planet
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/+1planet
                        tcMod scale 0.5 0.5
                        }
                        dp_reflect 1 1 1 1 0.7
                        } 
                        
                        
                        
                        +2planet
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/+2planet
                        tcMod scale 0.5 0.5
                        }
                        dp_reflect 1 1 1 1 0.7
                        } 
                        
                        
                        
                        +3planet
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/+3planet
                        tcMod scale 0.5 0.5
                        }
                        dp_reflect 1 1 1 1 0.7
                        } 
                        
                        
                        
                        window01_1
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/window01_1
                        
                        tcMod scale 0.25 0.0833333
                        }
                        dp_reflect 1 1 1 1 0.9
                        } 
                        
                        
                        
                        window01_2
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/window01_2
                        
                        tcMod scale 0.25 0.0833333
                        }
                        dp_reflect 1 1 1 1 0.9
                        } 
                        
                        
                        
                        window01_3
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/window01_3
                        
                        tcMod scale 0.25 0.0833333
                        }
                        dp_reflect 1 1 1 1 0.9
                        } 
                        
                        
                        
                        window01_4
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/window01_4
                        
                        tcMod scale 0.25 0.0833333
                        }
                        dp_reflect 1 1 1 1 0.9
                        } 
                        
                        
                        
                        window02_1
                        {
                        
                        {
                        map $lightmap
                        rgbGen identity
                        }
                        {
                        map textures/window02_1
                        
                        tcMod scale 0.25 0.0833333
                        }
                        dp_reflect 1 1 1 1 0.9
                        }

                        3.) Improving "DP New Teleport"
                        The dp_water shader is a combination of dp_reflect and dp_refract (and more).
                        So I thought it would be a nice idea to bring a little bit more reflection into the teleporter.
                        So I adjusted the dp_water shader accordingly and got a good result.
                        I could keep the visual almost 100% identical, but add just as much reflection, so that you can see yourself before you enter the teleporter.
                        Maybe this is interesting for some of you.
                        Please use this dp_water shader instead of the existing one inside "DP New Teleport":
                        dp_water 0.45 0.8 3 3 0.95 0.95 1 0.75 0.75 0.75 1
                        I dont recommend a much higher minimum reflection, because it would spoil the visual of the teleporter.
                        And remember, that LordHavoc changed something in his shader handling code during september 2011, that makes the "DP New Teleport" mod look VERY different with newer builds.

                        Regarding "DP pretty water": I dont recommend to raise the minimum reflection, because it would make it look very unrealistic. A value of 0.1 is good enough. A bigger one would make the water look too much like a mirror.


                        Thank you again Nahuel !

                        Kind regards,
                        Seven

                        Comment


                        • Yes, THANK YOU nahuel!

                          And you too Seven!

                          Comment


                          • Looks cool in game!

                            Here you go guys!
                            I am using Quake with the normalmaps and it looks great in game!
                            Attached Files

                            Comment


                            • Although I like the idea of reflected normals this result is kind of messy, the monitor frame is also reflecting and the window looks plain odd...

                              its like its all covered in shrink wrap!

                              with a rework to the normal texure it might look better...

                              just my two pennith...

                              Comment


                              • It is warpy, but isn't that due to the fact that the glass isn't smooth? If you notice on the monitor it looks different. I believe it is closer to reality due to the normals.

                                Comment

                                Working...
                                X