Announcement

Collapse
No announcement yet.

My pet project: rewriting Quake's 3D renderer with modern OpenGL

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

  • My pet project: rewriting Quake's 3D renderer with modern OpenGL

    I know there are already lots of advanced source ports with highly sophisticated graphics but for me this is more of a learning project than anything else. I'm a software engineer by profession but not a graphics/game developer, so pretty much a complete noob on realtime rendering. I'm just really fascinated by these stuff and would like to write some actual code to help myself learn.

    Since I'm getting very close to feature parity with the original software renderer I decided to share this here with you guys and hear your ideas about what to do next.

    First 3D model

    http://imgur.com/2Q6U2mJ

    Entities on blank background

    http://imgur.com/Xa6o9cx

    Level geometry rendered with simple hardcoded lighting

    http://imgur.com/Z4khmHx

    Weapon model added

    http://imgur.com/pWZkjLn

    A video

    https://www.youtube.com/watch?v=t9nnaOU6_e8

    First lightmap

    http://imgur.com/XwEZTPA

    Lightmap rendered without filtering

    http://imgur.com/yZs6yPo

    Level textures

    http://imgur.com/LbJdO6H

    Entity textures and sky

    http://imgur.com/34RP3f6

    Video of sky and lava texture

    https://www.youtube.com/watch?v=bjANMhABkcU

    Particles and dlights working

    https://www.youtube.com/watch?v=dcna7EFfAKc

  • #2
    Do you fancy working on Duke Nukem 3D at some point in time?

    Comment


    • #3
      Originally posted by Tea Monster View Post
      Do you fancy working on Duke Nukem 3D at some point in time?
      The eDuke 32 team are working on a new rendering engine as well.

      @finalpatch - Are you going to make a full engine from scratch, or are you targeting an engine like DarkPlaces where you just want to rewrite the renderer?

      If you're going to make an OpenGL renderer, are you going to target Vulkan?

      Comment


      • #4
        Originally posted by Tea Monster View Post
        Do you fancy working on Duke Nukem 3D at some point in time?
        There are a few reasons I don't want to do Duke

        1. The technology in Duke doesn't intrigue me as much as Quake

        2. The source code is not as clean as Quake

        3. There is less room for enhancement beyond the original

        Comment


        • #5
          Originally posted by enderandrew View Post
          @finalpatch - Are you going to make a full engine from scratch, or are you targeting an engine like DarkPlaces where you just want to rewrite the renderer?

          If you're going to make an OpenGL renderer, are you going to target Vulkan?
          This is not a full engine rewrite (although I might do it one day when I feel confident enough). What I did was: I cleaned up the original code, removing all unused and platform specific code(including GLquake, which is an ugly hack on top of the otherwise beautiful Quake code), leaving only portable C; ported the engine to run on SDL; extracted the renderer part into a separate module; created an OpenGL rendering module that works as a drop in replacement for the software renderer.

          About Vulkan, yes, that is indeed on the radar, but it has to wait until I have learned enough OpenGL and ready to move on.

          Comment


          • #6
            Hm, so quake isn't written in modern opengl? I wonder what's the difference then.

            Would be really interested in looking at your code, I'm about to learn opengl too. If you are still reading this thread. Maybe I can help in something, but I'm more likely to ask a bunch of stupid question instead.

            Comment


            • #7
              Originally posted by vibok View Post
              Hm, so quake isn't written in modern opengl? I wonder what's the difference then.

              Would be really interested in looking at your code, I'm about to learn opengl too. If you are still reading this thread. Maybe I can help in something, but I'm more likely to ask a bunch of stupid question instead.
              Hi vibok thanks for asking. I've been super busy recently and haven't got time to touch the project since March.
              You can find the code here https://github.com/finalpatch/MyQuake/
              Just don't take the way I do things as how they are supposed to be done as it may quite possibly be the wrong way.
              Regarding modern opengl, the main difference is the use of programmable pipeline. In the old opengl you configure a fixed pipeline, while in modern opengl you build your own pipeline.

              Comment


              • #8
                Have you looked at engines like darkplaces or fteqw? The latter even supports vulkan rendering.

                Comment


                • #9
                  This has already been done. It is called DARKPLACES!!!!!!!!!!!!

                  Redoing the wheel is USELESS !111111 (ONEEEEE)

                  Could you expand Darkplaces max entitiy count tho? 30k is not enough for amillion trees! fteqw has 4 million as a cap.

                  It "skips" the delete entity bit btw (a good decision) in counting entity number. Maybe port fte's code over to DP?!

                  Comment


                  • #10
                    Being able to set drawing-limit planes on models would be nice too... in QC... (say to decapitate models ) 11111!!!!!!!!!!!!!!!!11111!!!!!!!!!!111111!!11111! !111!!1111!111!111!!1111111!!111!11111

                    If u wants 2 code, bruh, it's be coo if we could set a limit plane on an entity.

                    Comment


                    • #11
                      yep, he always talks like that

                      Comment


                      • #12
                        i really like those square pixels =D

                        Comment


                        • #13
                          @This has already been done. It is called DARKPLACES!!!!!!!!!!!!

                          Nike already made my shoes so all other shoe manufacturers should shut down shop.

                          @Redoing the wheel is USELESS !111111 (ONEEEEE)

                          The wheel is being reinvented all the time. According to your theory we should have stopped at the first round stone with a peg shoved in it.

                          @chaos - Aside from your new idiotic vernacular it is surprising your mod is as good as it is cause you seem like a complete fucking idiot.

                          Comment

                          Working...
                          X