Announcement

Collapse
No announcement yet.

"DP New-Lava" Thread

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

  • "DP New-Lava" Thread

    Thread has been moved to "Finished Works" subforum,
    cause there is nothing more that can be done/added to the mod at the moment.

    Always find the latest Update at the end of this post.



    Hello,

    jakub1 brought it on the table, and I wanted to follow his idea.

    Now that we gained some experience from "DP Pretty Water" and "DP New teleport" and
    learned a lot about shaders, its time to start working on this last moving thing in Quake

    So I started this Work-In-Progress thread to be able to discuss it here.
    Hopefully jakub1 will join the discussion and brings his experience with him

    My ideas:
    1.) Lava is not comparable with water. It is not transparent.
    2.) Lava should glow. It is unbelievable hot and must therefore "shine".
    3.) Lava should NOT move straight; most suitable with different speed/accelaration in curvy ways.
    4.) It should have a big difference in height = use a huge normal to express the enclosed stones and magma.

    With all these ideas I created a first interpretation for you to test.
    (simply throw the pk3 in your ID1 folder as usual)

    Best viewed in maps:
    - E1M7
    - E3M6

    I added some screenies, which can absolutely not express the dynamic effect.
    It must be seen in game (use above mentioned maps).

    Please tell us your thoughts and additional ideas. We need your feedback.
    Thank you very much.





    UPDATE 20101208:

    I implemented your different suggestions:
    - slightly bigger texture scale
    - around 50% slower lava movement

    But the main reason why I released V0.2:
    I found a way to use the lava shader with almost no FPS drop.
    Due to the fact, that Lava is NOT transparent, I deactivated the variable "dpwater" inside the shader.
    So now you have almost no FPS drop. The visual effect stays exactly the same.


    UPDATE 20111031:

    A shader modification was necessary due to usage of new Lava haze effect of the "small mod compilation". In previous V0.2 the "blendfunc" command prevented the nice visual haze effect.


    Please download V0.3:
    DOWNLOAD V0.3

    Previous version V0.2:
    Download V0.2

    Best wishes,
    Seven
    Last edited by Seven; 07-20-2014, 05:15 AM. Reason: updated to V0.3

  • #2
    Looks awesome !
    And if shots cannot render the effect: please record a video !!
    What Does Not Kill You, Makes You Stronger

    Comment


    • #3
      Thanks for your comment JPL.

      Creating a video is not that easy (compared to screenshot).
      You have to make it, compress it, upload it; and in the end it only represents the path I walked.
      Its much easier to simply download the 2MB .pk3, put it in your ID1 and start DP as usual.
      Then you can take all the time you want to look at it in every level you want and have your high resolution,
      not a cropped video resolution.

      Fortunately DP gives you that opprtunity to quickly test something, when you have it as a pk3 file.

      And another reason: I have no clue how to record a video and all that.

      Kind Regards,
      Seven

      Comment


      • #4
        The black spots are too regular; they create a repeating pattern.

        Scale the texture up?
        Scout's Journey
        Rune of Earth Magic

        Comment


        • #5
          Hello gb,

          yes, I scaled them up in the screenshots already.
          Thank you for your comment.
          The pattern is (without shader usage) the classic way even more repeating.

          Yes, I can scale them even more.
          But in the end, it will still be a repeating pattern...
          Thats the way a map is built i guess.

          But, E1M7 and E3M6 have a HUGE lava pool.
          All other maps (with smaller pools) will look not so "repeated".
          Anyway, it is an improvement to classic external texture usage,
          cause of bigger scale / lesser repeats.

          Thank you for your comment.
          I will probably scale the texture even bigger.

          --------------

          Another Update:

          I found out how to move shaders up and down in z-direction (like a wave on the sea):
          deformVertexes wave 500 sin 0 3 0 0.3
          But then Quake shows its weaknesses:
          The textures are not always linked correctly, so the "wave" movement (in z-direction)
          will be cut and a lack of texture is visible for a short time...

          This is not repairable (due to bsp file itself). So I had to drop this idea.

          Seven
          Last edited by Seven; 10-31-2010, 03:37 PM.

          Comment


          • #6
            Well. If you can somehow replace the texture with a 256x256 lava texture that has less repetition, it might look better. I'm not sure how to do that without changing either the map or the engine though.

            Anyway, you're right, the stock lava texture sucks and is only 64x64, which is why it's often recommended to either scale that up during mapping already, or use a different texture.

            Not your fault I guess.
            Scout's Journey
            Rune of Earth Magic

            Comment


            • #7
              You can divide the initial texcoords by some number that works well for you to get the scaling up effect; start with maybe 2 and work from there. This can be done in the vertex shader to optimize things a little as texcoords are linearly interpolated.

              Another option for dealing with the repetition might be to add a noise function somewhere. I'm speaking fairly theoretically now as I haven't tried it personally.

              One final thing is that I saw some of the old GLQuake style bad-texture-joins in the hard hall in start.bsp.
              IT LIVES! http://directq.blogspot.com/

              Comment


              • #8
                i think that lava must have an area with a hot-air-distortion shader, like in DOOM3... I remember some areas in D3 hell levels with that air-distortion, and also some broken pipes with this effect... maybe DP can do it...
                Ia! Ia! Shubb Niggurath!


                "Not dead is what forever can wait" (HPL)

                Comment


                • #9
                  Thank you MH for your comment.

                  Scaling the lava texture with the shader is realy easy.
                  You can use the "tcmod scale X Y" function.

                  This is what you get with:
                  tcmod scale 0.01 0.01

                  (look at the huge height difference. It is because the normal is also rescaled. Looks cool, but unsharp)


                  This is what you get with:
                  tcmod scale 2 2



                  So a good compromise and to avoid the "repeating" visual is maybe:
                  tcmod scale 0.1 0.1


                  ---------------

                  The issue with the bad-texture-joins is what I described in my above post #5.
                  It is visible when you use the shader function that creates "waves":
                  deformVertexes wave ...
                  The waves look fantastic ! But reveales the bad-texture-joins in the Quake maps.
                  There is nothing I can do against it, because the failure is in the map itself...

                  -----------------

                  inkub0,
                  steam is not possible in my opinion, but I might of course be wrong.
                  Due to the fact, that every shader needs a brush (so this should also would also mean for steam).
                  And we have no brushes above the lava.
                  But again, I might be wrong...

                  Regards,
                  Seven
                  Last edited by Seven; 11-01-2010, 02:54 PM.

                  Comment


                  • #10
                    i think 0.2 is the better value =)
                    Ia! Ia! Shubb Niggurath!


                    "Not dead is what forever can wait" (HPL)

                    Comment


                    • #11
                      The water textures work perfectly fine in my GLSL and HLSL shaders to reproduce the classic software Quake water warp; no bad joins, no breakup or tearing. Curious.
                      IT LIVES! http://directq.blogspot.com/

                      Comment


                      • #12
                        Dear MH,

                        sorry, I maybe didnt express myself well.

                        I mean, with regular "DP pretty water", the linking problem is NOT visible.
                        Only when I add big waves in Z-direction (up and down) with this shader command (example):
                        deformVertexes wave 100 sin 0 7 0 0.3
                        the linking problem becomes visible.
                        Of course not everywhere, but in a few places where the mapper had to cut out the
                        water texture because of objects penetrating straight walls.

                        A very good example is Map E1M2. Right at the beginning, there is water with a pillar on the side.
                        Here you can see that the original map (which we all use) has not good linked textures/brushes.

                        Without waves in z-direction:



                        With big sine waves in z-direction:



                        Can you maybe show a screenshot of this area with z-direction sine waves activated using your shader ?
                        I would be very interested to learn. Maybe you can help to solve this issue ?

                        Thank you very much for your help and effort.
                        Seven
                        Last edited by Seven; 11-01-2010, 02:42 PM.

                        Comment


                        • #13
                          OK, I understand now.

                          Here's mine (HLSL version, which I consider "the master") for reference:
                          Code:
                          float4 LiquidPS (VertLiquidOutput Input) : COLOR0
                          {
                          	// same warp calculation as is used for the fixed pipeline path
                          	// a lot of the heavier lifting here has been offloaded to the vs
                          	float4 color = tex2D (tmu0Sampler, mul (mul (sin (Input.Texcoord1), warpscale) + Input.Texcoord0, 0.015625f));
                          #ifdef hlsl_fog
                          	color = FogCalc (color, Input.FogPosition);
                          #endif
                          	color.a = AlphaVal;
                          
                          	return color;
                          }
                          
                          
                          VertLiquidOutput LiquidVS (VertLiquidInput Input)
                          {
                          	VertLiquidOutput Output;
                          
                          	// this is friendlier for preshaders
                          	Output.Position = mul (Input.Position, WorldMatrix);
                          #ifdef hlsl_fog
                          	Output.FogPosition = mul (Input.Position, ModelViewMatrix);
                          #endif
                          	Output.Texcoord0 = Input.Texcoord;
                          
                          	// we need to switch x and y at some stage; logic says lets do it per vertex to get the ps instructions down
                          	Output.Texcoord1.x = mul (Input.Texcoord.y, warpfactor);
                          	Output.Texcoord1.y = mul (Input.Texcoord.x, warpfactor);
                          
                          	// keeping vs instructions down is good as well, of course.
                          	Output.Texcoord1 = mul (Output.Texcoord1 + warptime, 0.024543f);
                          
                          	return (Output);
                          }
                          IT LIVES! http://directq.blogspot.com/

                          Comment


                          • #14
                            The e1m2 water in that area is one single brush. It does penetrate the walls though.
                            Scout's Journey
                            Rune of Earth Magic

                            Comment


                            • #15
                              Thank you very much for your code MH.

                              But it knocks me out of my shoes.
                              I just started to know shader syntax. And this is by far too much for me.
                              I studied this page: klick
                              Your code is far beyond that.
                              So I have to give up for now.


                              gb,
                              I am also not a mapper. So what does it mean, when you say it is only one brush.
                              Why is then the texture ripped apart in this area (as seen on the screenshot) ?
                              If it is one brush, how can it look like on the screenshot ?
                              It looks like someone cut it with a scissor.
                              I really dont understand it.


                              Its much harder than I thought.

                              Comment

                              Working...
                              X