qbism / q2tools-220

Quake 2 map compiler tools with v220 map support, automatic phong, enhancements, and fixes.
GNU General Public License v2.0
61 stars 20 forks source link

Does these tools work with Kingpin and J.A.C.K.? #7

Closed Cianez closed 4 years ago

Cianez commented 4 years ago

I usually run hlrad_x64.exe with "-smooth 200" on GoldSrc maps (using VHLT). I'm asking this because even if I use "-smooth" on Kingpin, faces doesn't get smoothed at all (with the same values). Basically, "-smooth 0" or "-smooth 200" makes no difference; every rounded brush is not smoothed. "-bounce" doesn't seem to affect the lighting either.

I'm using J.A.C.K. with these compiling options on "$light_exe":

-extra -smooth 200 -bounce 30 "$bspdir/$file"

Do I have to setup J.A.C.K. in a different way maybe? I'm currently using the Quake 2 profile for Kingpin and I've edited "VDKGameCfg.ini" to make the Q2 configuration read TGA files.

Any help is appreciated.

qbism commented 4 years ago

Thanks for the feedback. This is multiple issues that need breaking down but I'll take the main issue as 'smooth'. This post shows an example with '-smooth 46' and explanation: https://qbism.com/viewtopic.php?f=5&t=58&p=32693#p32693

The tools are based on the ones distributed with J.A.C.K. and should behave the same with tga loading and bounce. Probably need a case where bounce works as expected with another open-source qrad3 such as original q2 tools or Dewan's.

Cianez commented 4 years ago

I'd love to use your tools to make my maps for Kingpin once you manage to make -smooth work as intended. As of now, I don't know why because I'm not a programmer, on a 16 sided cylinder it doesn't seem to work at all... kingpin 2020-02-16 23-48-34-24 Unless I need to guess/calculate the angle's degrees to make it work properly, but that wouldn't make it work on other angles on different brushes (or I'm missing something).

Anyway, if you're interested I'm up for some testing with your tools. You can contact me on Discord ([TC]Čiαиєz#3698) as these tools could make us Kingpin mappers' life easier.

hypov8 commented 4 years ago

small faces have allways been hard to phong shade, even arghrad struggles to phong shade them. sky sun is also very grainy. you may just need some point lights to brighten the back/dark surfaces. also consider that one faces on the bin is likely to be 1 or 2 pixels in total for the lightmap. so phong shading will never work. thats why q3 uses vertex light on their map models. one other thing to consider is that the uv also needs to be calculated and will have spits where least desirable. you could export as a .obj to inspect

hypov8 commented 4 years ago

thats how many pixels with a .75 texture stretch on the bin.. 1pixel cant be "shaded" lightmap_pix

Cianez commented 4 years ago

It does work everytime on every shape and face's angle degree with hlrad.exe on Goldsrc games though. He's using VHLT as a base so I thought it was possible (mainly because Goldsrc and idTech2 are very similar code-wise).

qbism commented 4 years ago

Some engines allow lightmap scale independent of bitmap, but not stock idtech2. Scaling the texture is a trick for small faces: pic006

pic005

Cianez commented 4 years ago

That barrel texture I made on my screenshot is scaled to something like 0.050 (the texture's size is 1024x512), so it's very low, but nothing gets smoothed for some reason. Unless it's Kingpin's renderer not understanding the smoothing algorythm. Are the screenshots you posting from Quake 2? Maybe I can try loading your BSP on Kingpin and see if I get the same effect.

hypov8 commented 4 years ago

it must be something you are doing with your compiles or map structure. a faulty brushes maybe? from the screenshots qbism posted. the tools are working arghrad works fine when you have some texture space to work with. it not the kp render. its rendering a precompiled texture inside the bsp kingpin030

Cianez commented 4 years ago

I've just found out that I was using values too high (-smooth 200). VHLT on HLRAD works "the higher the smoother", so I thought the same rule applied here. By using -smooth 44 I do get smoothing but not as much as I want. If I try to increase it a bit further the default value (44) I don't see any difference, and if I go even further it doesn't get smoothed at all. So I guess this can be made better?

For your info:

-smooth 44 kingpin 2020-02-22 06-18-58-40

-smooth 100 kingpin 2020-02-22 06-19-45-22

qbism commented 4 years ago

This is an angle value, clamped between 0 and 90 degrees. 200 should still work; it will be clamped to 90. So I'll look at this.

The only way to get more smoothing is - extra. Sometimes it helps, sometimes not.

hypov8 commented 4 years ago

i knew your value was wrong... it seemed like you didnt read the instructions of what it actual does if you shade at 90 deg. you will include the top of the bin and the floor in the smoothing algorithm. this will adversely effect the sides of the barrels shading.

just to clarify.. the -smooth value/angle is to decide if the face IS or ISNOT shaded with neighbor face.. On or OFF. its not the quality value

qbism commented 4 years ago

This is the expected behavior so have closed this issue.