Announcement

Collapse
No announcement yet.

FTE QW engine.

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

  • I just checked with SVN 4613, and I do get replacement textures on q2bsp. The replacement textures I was using are TGA images, and they're located in baseq2/textures/e1u1/blah.tga and so forth.



    It should work.

    About particles, like Spike said, make your own particle config, eg "particles/myconfig.cfg".

    Then make yourself a default.cfg if you haven't got one, and put all the FTE related cvars in it. For particles, use "r_particledesc myconfig".

    ISTR parsing of custom particle configs being buggy in FTE atm. Loading r_particledesc from default.cfg works for me right now.

    Re: this forum being laggy, why don't you use IRC? It's the best way to learn about this stuff.
    Scout's Journey
    Rune of Earth Magic

    Comment


    • Still not loading replacements. Do I need to have the .wal files extracted from the .pak file next to the replacements maybe?

      Having a lot of fun with this engine. Seeing our 13 year old mod looking so good is thrilling.
      https://www.facebook.com/photo.php?v...type=3&theater

      Comment


      • No, I don't think you have to unpack the pak files. It might just be a path issue. They need to be in textures/.

        Put your replacements in baseq2/textures, or in yourmod/textures. If yours are PNG or JPG, try converting some to TGA.

        Make sure in Options/Texture Options, load replacements is on and max texture size is not too small.

        I got the light editor working in Quake 2:



        I simply put csaddon.dat in baseq2/. Typing ca_show 1 then brought up the editor as normal. The light bulb model is from SJ (cg_editor_lightmodel.)

        Edit; here is a collection of random useful cvars for FTE.

        Realtime lights:

        r_shadow_realtime_world (realtime light)
        r_shadow_realtime_world_shadows (realtime shadows, stencil shadows by default)
        r_shadow_realtime_world_lightmaps (loading lightmaps in addition to rtlights, this also takes values such as 0.5)

        r_shadow_realtime_dlight (realtime muzzleflash etc)
        r_shadow_realtime_dlight_shadows (realtime shadows from realtime dlights)

        r_shadow_shadowmapping (use shadowmaps instead of stencil shadows, aka soft shadows)
        r_shadow_shadowmapping_bias (play around with this if you get artifacts such as striped shadows)

        r_deluxemapping (bumpmapping with static lights)

        gl_specular (do specular highlighting aka gloss/specular maps if 1)


        other stuff:

        gl_overbright 2 (activate overbright stuff)

        gl_flashblend 2 (gl flashes, 2 is for clipping by corners or something)

        gl_texture_anisotropic_filtering (what it says)

        gl_font (load a truetype font, needs freetype lib)
        con_textsize (scale console text size)

        gl_conback (specify conback)

        crosshairimage (what crosshair to load)

        A lot of those random variables can be found on the FTE wiki but be aware that it might be out of date.

        Global Console Variables - FTE
        Last edited by golden_boy; 02-14-2014, 01:43 PM.
        Scout's Journey
        Rune of Earth Magic

        Comment


        • Thanks for all the help, guys. Hope you can help with these couple things. I have a couple lighting anomalies.
          -Dynamic lights and rlights affect my blended terrain in a strange way. Where the lightmap is cast, it erases the "top" texture and you can see the base texture fully regardless of blending.
          -When dl and rlights hit model faces that have a transparent texture, you can see a translucent appearance where iot should be clear. Strangely it affects all my transparent textures except one. lol. My one tree branch texture/shader dorsn't seem to be affected. You can see an example of both in the video below.
          https://drive.google.com/file/d/0B17...it?usp=sharing

          Terrain .shader
          Code:
          textures/blended_terrain/forest_1
          {
          	qer_editorimage textures/blended_terrain/grass_rockygrass1.jpg
          	q3map_nonplanar
          	//q3map_tcMod rotate 65
          	q3map_shadeAngle 120
          	q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
          	q3map_alphaMod dotproduct2 ( 0.0 0.0 0.99 )
          	q3map_surfaceModel models/plants/trees/tree_1.md3 196 .01 1 2 0 360 0
          	q3map_surfaceModel models/plants/trees/pine_1.md3 93 .01 2 .5 0 360 0
          	q3map_surfaceModel models/plants/ferns/fern_1.md3 64 .03 .3 1 0 360 0
          	q3map_surfaceModel models/plants/grass/grass_1.md3 49 .04 .4 2 0 360 0
          	q3map_surfaceModel models/plants/bushes/bush_1.md3 120 .02 .6 .1 0 360 0
          	q3map_surfaceModel models/plants/trees/tree_4.md3 145 .02 .2 1 0 360 0
                {
          		map textures/ground/grass_.tga
          		rgbGen identity
          	}
          	{
          		map textures/ground/dirt2_.tga
          		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA 
          		alphaFunc GE128 
          		rgbGen identity
          		alphaGen vertex
          
          	}
          	{
          		map $lightmap
          		blendFunc filter
          		rgbGen identity
          		tcGen lightmap
          	}
          }
          ]
          The transparent .shader that works right. The others are the the same though.

          Code:
          models/plants/trees/branch_4
          {
          	qer_editorimage models/plants/trees/branch_4.tga
          	surfaceparm trans
          	surfaceparm nonsolid
          	surfaceparm nomarks
          	surfaceparm alphaShadow
          	cull none
              
          
          	{
          		map models/plants/trees/branch_4.tga
          		blendFunc GL_ONE GL_ZERO
          		alphaFunc GE128
          		depthWrite
          		rgbGen vertex
          	}
          	{
          		map $lightmap
          		rgbGen vertex
          		blendFunc GL_DST_COLOR GL_ZERO
          		depthFunc equal
          	}
          }]

          Comment




          • Now i see it works. Awesome! But FTE QW is not using the original q2e dir/folders structure... The shaders, materials not working and many other things too. I know nothing. BTW: only 15 frames? Good job GB.

            Comment


            • -When dl and rlights hit model faces that have a transparent texture, you can see a translucent appearance where iot should be clear.
              I can actually confirm this is an FTE bug; I started seeing this in my maps a number of revisions ago. Yes, transparent parts of textures are illuminated by rtlights when they probably shouldn't be.

              One possible hotfix is to add "surfaceparm nodlight" to shaders. But yes, this needs to be fixed in FTE eventually. I think it requires GLSL.

              Not sure about the terrain issue. I guess Quake 3 terrain blending doesn't get a lot of testing in FTE.
              Scout's Journey
              Rune of Earth Magic

              Comment


              • @rab_d
                fte's shader parsing system is quite... lazy.
                the only thing rtlights actually see is the first (non-special) texture map which is assumed to be the diffuse texture, which means alpha blended stuff will simply not be used.
                your alpha test shader works because only the pixels that passed the alpha test have correct depth information. other surfaces are deemed to be obscured by other things and thus only the actual branches get lit, as desired, although the shadowmap code will also not notice the alpha func, and the entire mesh will cast shadows instead of just the textured parts.
                you can override the shader the engine uses for the various other backend modes using the 'bemode' command, Inside3d Forums • View topic - Absolute Beginners guide to using shaders contains an example of that, which is actually used by fte's 4-way-blended heightmap terrain.
                for the tree shadowmaps, something like the following added inside your existing models/plants/trees/branch_4 shader should do the trick:
                Code:
                bemode depthonly
                {
                program
                {
                varying vec2 tc;
                #ifdef VERTEX_SHADER
                attribute vec2 v_texcoord;
                void main ()
                {
                	gl_Position = ftetransform();
                	tc = v_texcoord;
                }
                #endif
                #ifdef FRAGMENT_SHADER
                uniform sampler2D s_t0;
                void main ()
                {
                	if (texture2D(s_t0, tc).a < 0.5)
                		discard;
                	//must always draw something, supposedly. It might as well be black.
                	gl_FragColor = vec4(0, 0, 0, 1);
                }
                #endif
                }
                {
                map models/plants/trees/branch_4.tga
                }
                }
                (in an ideal world, this would be just a single 'bemode depthonly depthonly#MASK=0.5', but the extra stuff required for that to work nicely simply isn't there yet)
                the terrain blending issue is more awkward to fix as it requires providing your own rtlight shader for your surface. you can see the 4-way terrain stuff I linked earlier as an alternative.
                It would be nice to get it to understand everything automatically, but it is still not able to at this time (and I'm kinda worried about glsl compile times!).
                Getting it to recognise common cases would be good though, yes.
                Q3 shaders are really not well suited to realtime lighting - DP took the easy approach and limited its support to a single(ish) pass - DP certainly avoids most of the headache that way.

                @Sza
                FTE does not use the directory structure that is original to Q2E, correct. FTE is not derived from Q2E, so this should be unsurprising.
                I know very little of Q2E, it seems even more poorly documented than FTE (but then I guess it does help to already know where to look).
                If you have any specific requests that wouldn't be a nightmare to emulate, feel free to suggest them.
                If the problem is just file locations, you can at least include symlinks inside pk3 files, which can allow your pk3s to effectively contain only one copy of a file but with multiple paths (although they are a pain to set up in windows).
                Some Game Thing

                Comment


                • But, why does one of the transparent textures/shaders not exhibit this behavior, when others do with the same script and .tga/alpha channel set up. The white birch tree in my video seems immune and I can't figure out what is different. lol.

                  Comment


                  • Originally posted by Rab_d View Post
                    But, why does one of the transparent textures/shaders not exhibit this behavior, when others do with the same script and .tga/alpha channel set up. The white birch tree in my video seems immune and I can't figure out what is different. lol.
                    I figured out why this happens. The texture must have the invisible areas with rgb at 0 0 0 (true black) regardless of the alpha channel. This makes producing transparent textures a bit harder because it's easier to have the unused area of the texture a similar color to the what makes up the visible area so your alpha channel perimeter doesn't have to be perfect.
                    Even with this, with specular setting on you can still see the invisible parts a little.

                    Comment


                    • Hey. Does the FTE dedicated server load q2 mods dll? I can't seem to get it to. I'm sure I am just missing some commands or is it not supported?

                      Comment


                      • urr, it should do. make sure the 'progs' cvar is clear (so that it doesn't insist on loading only q1 gamecode), and then make sure the dll is in your game path (path;flocate gamex86.dll - those two commands should give enough info to debug that).

                        if you're using a 64bit dedicated server, it'll try loading 'gameamd.dll' instead, or .so if you're on linux.

                        should be exactly the same as the non-dedicated builds.
                        any interesting errors appearing?

                        the irc channel is #fte on quakenet by the way.
                        Some Game Thing

                        Comment


                        • make sure _windowed_mouse is set to 1 otherwise it won't try to capture the mouse.
                          for expansions you can just use the gamedir console command to select them without having to use shortcuts.

                          regarding the gl issues, make sure you don't have any stale glsl files lying around messing things up. old versions of those are probably going to cause issues.
                          you can set gl_blacklist_debug_glsl 1;vid_restart to disable all glsl use as a test.
                          I can't think of any other reasons why it would fail for quake and be fine for quake2, other than config(some buggy cvar), shader(like ones that work only in DP), or glsl(ones that are old) files.
                          Last edited by Spike; 02-23-2014, 12:05 PM.
                          Some Game Thing

                          Comment


                          • Article: ODE physics in FTE | spawnhost

                            Get bouncy stuff into your game/mod using FTE (or darkplaces)!



                            Scout's Journey
                            Rune of Earth Magic

                            Comment


                            • Scout's Journey
                              Rune of Earth Magic

                              Comment


                              • Hi GB,

                                You're producing some nice looking stuff there. Very impressive. Makes my meager efforts look decidedly amateurish in comparison

                                Is any of it currently available in a downloadable map at the moment?

                                In any event, keep up the good work, it's very interesting to see just what's possible

                                Kind regards

                                Monty
                                Mr.Burns
                                "Helping to keep this community friendly, helpful, and clean of spammers since 2006"
                                WWW: Quake Terminus , QuakeVoid You Tube: QuakeVoid
                                Servers: Quake.shmack.net, damage.servequake.com

                                News: JCR's excellent ctsj_jcr map is being ported to OOT

                                Comment

                                Working...
                                X