Announcement

Collapse
No announcement yet.

Darkplaces and viewmodel FOV

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

  • Darkplaces and viewmodel FOV

    To my knowledge DP doesn't have the equivalent of "viewmodel_fov". Does anyone know of a way around this (i.e. control viewport fov and viewmodel fov independently)? I'm willing to try anything at this point. I've already tried distorting the models themselves to look like they're a lower fov, but of course that only works as long as they don't animate :/
    www.youtube.com/user/KillPixel

  • #2
    renderscene twice. somewhat lame, but might work..
    Some Game Thing

    Comment


    • #3
      I don't think there's a workaround, but i can be wrong. What do you want to achieve? You can always manipulate the screenposition of the weapon with code, even with 0.X digits but i don't think that helps you. :-/
      I once was a Ranger like you. But then i took a rocket to the knee.
      My little gore mod : http://quakeone.com/forum/quake-mod-...76473-gore-mod

      Comment


      • #4
        Spike - FTE wouldn't happen to have viewmodel FOV controls, would it?

        TheKillingJoke - yeah, positioning isn't the issue here, I'm afraid. FOV controls would allow me to adjust the depth distortion of the model. A common viewmodel_fov is ~65 (with a 90 viewport fov).

        EDIT: rough example (notice the extreme viewmodel distortion on the wider fov):
        Attached Files
        Last edited by KillPixel; 11-21-2017, 07:23 PM.
        www.youtube.com/user/KillPixel

        Comment


        • #5
          I know MarkV has this feature...but if this is concerning your game development, it probably lacks too many other features.
          'Replacement Player Models' Project

          Comment


          • #6
            Dutch - Yeah, I've considered MarkV on a few occasions. It could be done with that engine with the sacrifice of some niceties. Diggin' your new viewmodels, BTW
            www.youtube.com/user/KillPixel

            Comment


            • #7
              KillPixel

              Thanks man! Looking forward to more showcasing of your game.
              'Replacement Player Models' Project

              Comment


              • #8
                someone posted the code (Pheonix?) on the old QuakeSource website, I added it to Qrack. Basically what it does is scale the view model to look like fov90 no matter what FOV you use.
                not sure how to port it to DP but you can look at the code here: https://github.com/sputnikutah/Qrack...ter/gl_rmain.c do a search for cl_gun_fovscale

                Code:
                 
                if ((ent == &cl.viewent) || (clmodel->modhint == MOD_FLAME) || (gl_interpolate_transform.value == 0) || (!sv.active))
                {
                R_RotateForViewEntity (ent);
                }
                else
                {
                R_RotateForEntity (ent, false);
                }
                if (clmodel->modhint == MOD_EYES && gl_doubleeyes.value)
                {
                glTranslatef (paliashdr->scale_origin[0], paliashdr->scale_origin[1], paliashdr->scale_origin[2] - (22 + 8));
                glScalef (paliashdr->scale[0] * 2, paliashdr->scale[1] * 2, paliashdr->scale[2] * 2);
                }
                else
                {
                if ((ent == &cl.viewent) && (cl_gun_fovscale.value) && (scr_fov.value != 0))
                {
                if (scr_fov.value <= 90)
                scale = 1.0f;
                else
                scale = 1.0f / tan(DEG2RAD(scr_fov.value/2));//Phoenix
                glTranslatef(paliashdr->scale_origin[0]*scale, paliashdr->scale_origin[1], paliashdr->scale_origin[2]);
                glScalef(paliashdr->scale[0] * scale, paliashdr->scale[1], paliashdr->scale[2]);
                }
                else
                {
                if ((ent == &cl.viewent) && (r_drawviewmodelsize.value > 0))
                {
                scale = 0.5 + bound(0, r_drawviewmodelsize.value, 1) / 2;
                glTranslatef(paliashdr->scale_origin[0]*scale, paliashdr->scale_origin[1], paliashdr->scale_origin[2]);
                glScalef(paliashdr->scale[0] * scale, paliashdr->scale[1], paliashdr->scale[2]);
                }
                else
                {
                glTranslatef (paliashdr->scale_origin[0], paliashdr->scale_origin[1], paliashdr->scale_origin[2]);
                glScalef (paliashdr->scale[0], paliashdr->scale[1], paliashdr->scale[2]);
                }
                }
                }
                Last edited by R00k; 11-27-2017, 09:29 PM.
                www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                Comment


                • #9
                  Ah, thanks R00k, this may come in handy later.
                  www.youtube.com/user/KillPixel

                  Comment

                  Working...
                  X