Thread: [ARCHIVE] Custom ZHLT by vluzacn

Results 1 to 25 of 825

Threaded View

  1. #1
    Registered User vluzacn's Avatar
    Join Date
    May 2010

    [ARCHIVE] Custom ZHLT by vluzacn

    The latest update is Vluzacn's ZHLT v33 released on 2014/2/2.

    v33 Details:
    v33 Download:

    Details of previous updates:
    v16: on this page
    v13: on this page


    I am here to ask for advice for my custom version of zhlt, since I have noticed that there are also people working on zhlt here.
    Note: my English is poor.

    It is based on hlcsg, hlbsp in v3.4 and hlvis, hlrad in merl's version, and I carefully added in 'transparency.cpp' of v3.4 hlrad.

    You can search for 'vluzacn' to find out all my changes in code.


    1. opaque entities
    Faster code in 'TestSegmentAgainstOpaqueList': by grouping opaque faces according to their model number.
    No bugs in all procedures (direct, bounce), all kinds of light (point, sun, sky) and all vismatrix settings.
    In hlcsg, added a flag to automatically copy all brushes of an opaque entity to world and retexture with 'SKIP', so it can chop solid faces.
    Disabled reducing of facelight in semiopaque entities.
    Fixed wrong opacity when light goes through edge of adjacent semiopaque face.

    2. bounce light
    Fixed bad assumption that 50% of light of a face must be send out to other faces, witch result in incorrect lighting when sky is used. Then 'SwapTransfers' procedure was removed.
    Added a option to adjuct the precentage of light bounced, instead of the constant 50%.
    Compress transfer data to cut down memory usage.

    3. dynamic light
    In gamma correction, consider dynamic light and static together (because in game, they are added without gamma).
    Added support for multiple light_environments.
    Coring preforms pre style instead of per light, and also performs in bounced light.

    4. tricks for entities
    Use 'zhlt_transform' key to scale(use its origin as center) or move an entity. Use '-scale #' option in hlcsg to scale the whole map.
    Use 'zhlt_usemodel' key to delete model of this entity and copy 'model' value from another entity specified by the value of 'zhlt_usemodel'.
    Text string in entity 'game_text' converts to UTF8 format.
    You can alter the brightness of the sample under a mdl(such as 'cycler' entity) to fix incorrect brightness of mdl. Add key 'zhlt_copylight' to mdl entity, then lighting information will be copied from the sample under the target entity of 'zhlt_copylight' to the sample under the mdl.

    5. compiling
    Popup a console window if the compiler is not running in console.
    Options can be setted in 'settings.txt'.

    6. other features
    Allow faces to be outside +/-4096 to build a larger map. Note, origin of visible objects (such as player, brush entity) should never be outside +/-4096.
    Use textures such as 'nullnoclip' for advanced cliphull edit of brush.
    Strip lightmap data of an entity if key 'zhlt_striprad' is setted.
    Fixed sample position bug when a face is blocked but not chopped.

    There are also many features that I intend to include in the future, such as special shadow for '{' texture, different bounce scale for different texture color, 'light_texture' entity, etc.

    Please download from the link at the top. Don't download this older version:
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	c1.png 
Views:	2695 
Size:	71.0 KB 
ID:	14148  
    Last edited by vluzacn; 05-02-2014 at 08:32 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