Thread: P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2018

    Post P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

    P2ST (Paranoia 2 Savior Tools) is not a continuation of ZHLT-VHLT branch. It is written on top of original compiler from Valve's HLSDK. development thread
    Running it with default settings produce a Goldsource compatible map.
    Do not hesitate to download and bugreport as Uncle Mike finds a lack of bug reports suspicious.

    Unkle Mike:
    So, the updated version of compilers is the result of a large number of comparative experiments, the main task of which, oddly enough, was the goal to compile ad_sepulcher (this is a map from Arcane Dimensions). It should be noted that the 16-bit delimiters in the original BSP30 do not allow this, but the compiler code itself is fully designed for this, since testing was performed on XashNT and BSP32 format (with 32-bit limits). The other nice features - recursive support for prefabs and patches, appeared when I decided to test the possibility of compiling maps from Quake3.

    List of changes (+ added, - removed, * changed)
    + ability to load wad from pak
    * in connection with this, wad should always be located in the game directory, but there is no need to indicate full paths to them, the name is sufficient.
    * -wadinclude now similarly need to specify the name of wad instead of the path
    + support for format of map Brush Primitive (Quake3)
    + support for Quake2 map format
    + support for Bezier Curves from Quake3 (non-solid, however q3map does not build a collision for them either)
    + support for misc_external_map from TyrUtils (non-recursive embedding of a prefab map, where all the brushes must be in worldspawn)
    + misc_model support (only ase format is supported)
    + support for recursive attachment of prefabs (through the very same misc_model, and only detailed brashes get into the map, misc_model and env_static, and everything else, including structural brashes - is deleted). Subsequently, you can create another entity for such prefabs and allow yourself to insert any entities from other maps.
    + If in hulls.txt clipplate sizes are zero, then such a hull is not calculated by a compiler, for example for Quake.
    * fixed -nullifytrigger parameter to -nonullifytrigger
    - removed "bevel" special textures
    - removed the parameter zhlt_forcelightmap, lightmap for water is always calculated (well, as in the original)
    + The _shadow and _dirt parameters, the first is similar to zhlt_lightflags 2 and is needed for compatibility with TyrUtils, the second prohibits \ allows dirtmapping on a face or group of faces. It also works for world brushes if you'll separate them to func_group.
    + New virtual entities func_detail_wall, func_detail_fence and func_detail_illusionary. Similar to those of TyrUtils and are something like ready-made presets for func_detail, for which you do not need to prescribe zhlt_detaillevel, zhlt_noclip, and so on.
    + Faces covered with skip texture for solid brush automatically turn into NULL - this is also the behavior from TyrUtils. If you want a strictly non-solid brush, then use zhlt_noclip 1 (by the way, mappers do just that).
    + nullification not only for AAATRIGGER textures but also for TRIGGER textures (for Quake)
    + The old classic algorithm for inflating the brush for building clips is enabled by the zhlt_precisionclip 1 parameter. The algorithm generates four times more clips than the Chinese one, so they should be used only if the Chinese one failed.
    * In theory, the CSG error was fixed, one leading to the fact that the brush covered with NULL, when cutting a regular one, received a higher priority in nullification of the walls of the neighbor. Usually this led to mysterious holes in geometry, I hope this will not happen again.
    - removed the parameters zhlt_clipnodedetaillevel, zhlt_chopup, zhlt_chopdown, zhlt_coplanarpriority.

    * classic progress bar when building a tree, instead of cryptic numbers.
    The * .prt file will be created even for a map with a hole (but remember that a leaky map will have a lot of polygons outside).
    + automatic detection of maxnodesize by default, in order to find the most optimal value (based on the size of the map)
    + some changes in portal generation, designed to speed up vis.

    + Portal visibility optimizer, something like the Valve's "Leafs Crosscheck", but acting right along the way of PortalFlow. In theory, it should speed up vis a little and improve its quality. No comparative tests were really done.
    * fixed bug with leaf ambient sound generation (wind in Quake).
    + RLE-compression does not always reduce the size of a vizdata, sometimes it, on the contrary, increases it. Both situations are now highlighted in green and red so that you do not wrestle with your head, how come visdata shrank from 200 kilobytes to 350 kilobytes.

    * revised constants for indirect lighting, I think should be more correct than it was.
    - removed zhlt_halflambert for vertex lighting, because it violates the integrity of the lighting model.
    * _minlight does not work if -bounce is greater than zero.
    * rewritten trail code to be able to cast shadows from solid objects (for example, patches). Fixed several minor bugs.
    + Drop To Floor for env_static now performs RAD. In order for the real position of the model to coincide with the shadow in the lightmap. That is, as long as the corresponding flag is set, of course.
    - removed the calculation of the vismatrix. In certain cases it saves a little time and in all cases saves from 10 to 400 megabytes of memory.
    + For light_environment vis is built, which made it possible to speed up the calculations of light from the sun.
    + Support for all types of Quake light bulbs (more details in the TyrUtils manual).
    + for most operations, the size of occupied memory is displayed for a preliminary estimate of total consumption.
    + consumption of 3GB of memory tested in real conditions. In addition, in case of API failure, the allocators still try to allocate a piece of memory for a minute (for example, if Windows rebuilds its swap, it may refuse to allocate memory for some time). Taking into account the fact that the vismatrix is ​​abolished, the situation when there may not be enough memory has become even less likely.
    + the -quake key is entered, which sets the gamma to 1.0, and -dscale to 0.5 and -sky 0.0, and also includes -lightbalance. Apart from the fact that there is no separate parameter for adjusting the gamma, this is actually a preset, in order to make the lighting purely solid, well, just like the folder structure. Useful for those who will make maps for Quake to run with my wrapper, for example.

    Known issues:
    In comparison with version 0.93, sometimes a hole may appear on some maps, although it is not actually there. The case is very rare, but nonetheless.

    Patches, how to put them on the map:
    I dont know. QuArK allows you to save Half-Life maps in Brush Primitive format. Moreover, the patch description is correctly supported for the Quake2 format. This should be taken into account in JackHammer, but I don’t know the details, because I do not use it. Just in case, I attach the source of the test map.

    compilers are fully compatible with the previous version 0.93 in input and output formats, so in the case of some kind of regression you can always replace the problem area and make sure that it is really it, and, of course, leave a bug report in this topic by attaching a map to replicate the bug.

    Update at 08/27/2018
    - fixed bug with mixed face contents
    - fixed bug with a crash
    - The limit of the model is raised back to 1024

    anniversary update at 11.09.2018
    - fixed bug with origin brushes
    - rad is not trying to calculate the lighting if there are 0 light sources on the map
    - necessary preparations for the future paranoia renderer (not yet relevant)
    - fixed bug with deluxmap (black parts of bump)
    - increased work speed for light_environment when -bounce 0
    - fixed bug with -ambient parameter, now it is working
    - added the -gamma parameter (range 0.3 - 1.0)
    - Jubilee build - exactly one year since the beginning of the development of compilers

    Update at 10/28/2018
    - new compilers included (hlrad is p2rad without a bump; and p1rad is for the first paranoia).
    - fixed bugs with added ambient (-ambient R G B parameter)
    - support of the zhlt_vertexlight parameter for any entity

    Update at 11/04/2018
    - fixed bug with parameter _spread for the sun

    Download P2ST_0.96beta_update1
    Attached Files Attached Files
    Last edited by crystallize; 14-12-2018 at 01:04 AM.

  2. #2
    Administrator Hezus's Avatar  
    Join Date
    Aug 2001
    The Netherlands

    Re: P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

    Just gave it a shot and it seems to work well with SC. I don't see any noticable errors or differences in the final compile of my small test level between these tools and the x64 tools from the SC SDK. Nice to see people are still adding tools to the old BSP formats.

  3. #3
    Registered User
    Join Date
    Jul 2018

    Re: P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

  4. #4
    Registered User ToTac's Avatar
    Join Date
    Nov 2016
    The Void

    Re: P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

    Amazing shapes on that demo map. Very interesting.

  5. #5
    Registered User
    Join Date
    Jul 2018

    Re: P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

    Unkle Mike returned to his alma mater of HLFX.

    New update: 0.97 update 1:

    - New. Fixed one bug that led to the seams of lightmaps on solid brushes.
    + New. Implemented loading of external textures for models to cast shadow from Additive surfaces, if the external texture has an alpha channel. In the testing stage.
    + New. Correct relighting of maps that were converted with the bsp31migrate utility.
    - fixed crash of p2rad at the start of BuildFaceLights.

    P.S. a reminder that these compilers are supposed to be in top folder i.e. Half-Life/Xash3D/Quake/etc. so they could access any studiomodels referenced in the map and cast shadows from it.
    Last edited by crystallize; 11-06-2019 at 12:49 PM.

  6. #6
    Registered User
    Join Date
    Jul 2018

    Re: P2ST 0.96 map compiler (Bezier Curves, Instancing) by Uncle Mike

    P2ST 0.98 beta

    - the memory limit is almost doubled (meaning that the compiler now consumes half as much memory on the same scenes).
    - The tracing of studio models was accelerated. In particular, Chernobyl is now processed in 10-15 minutes, although there are more than 10 million luxels.
    - minor VIS fixes (spied from the new TyrUtils)
    - CSG swears about the missing texture of the sky, which is necessary for RAD to calculate the light from the sun (yes, this is my overcomplicated approach).
    - implemented loading external textures for alpha-solid surfaces for models. It often happens that in the model itself people were too lazy to set alpha-bit and now there is no shadow from the fence. While in my compiler, the external texture is loaded and everything is fine. TGA and DDS are supported.

    Please note that memory acceleration and expansion are only for P2RAD. It’s not difficult for me to enable this in the config and other compilers, but let's test it first. I specifically started a separate topic to use the previous compilers as a reference.

    If someone still does not know: the lightmap on the model is enabled by setting the parameter "zhlt_modellightmap" "1" for env_static.
    Resolution is regulated by zhlt_texturestep as on brushes. And another new parameter zhlt_backfrac was added which helps to avoid lightleaks. Its use can be seen at the level in the Paranoia test level pack.

    Update at 07/02/2019
    - micro-update. The lightmap on the models had a constant selfshadow. Corrected.

    Download P2ST 0.98 beta
    Last edited by crystallize; 15-11-2019 at 12:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts