Thread: Problem with zhlt_copylight - I don't understand that.

Results 1 to 8 of 8
  1. #1
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    803

    Problem with zhlt_copylight - I don't understand that.

    Hello everyone,

    I really want understand but zhlt_copylight doesn't work for me. ( PS I don't understand what does it mean from website entity explanation is really ununderstandably. )

    How do I use mdl with zhlt_copylight?

    Can I have example of map with zhlt_copylight?

    Is it correct or wrong? How do I understandf with stupid copylight into brush or model?

    https://www.msremake.com/threads/fix...2/#post-110887

    How do I get success emittable models and brushes?

    From forum:
    Last edited by SourceSkyBoxer; 25-08-2017 at 07:57 PM.
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

  2. #2
    QPU-aligned Silencer's Avatar  
    Contributor
    Join Date
    May 2006
    Posts
    6,078

    Re: Problem with zhlt_copylight - I don't understand that.

    After lighting calculations are done, if the zhlt_copylight key is found on an entity, it will look for an entity with the name provided, sample the light from the nearest texel below its origin, and apply that color to the texel below the origin of the entity which has the zhlt_copylight key set. This is to be used on models, because they sample light from the texel directly below them. You could e.g. use a bunch of info_nulls with zhlt_copylight to manually write texel data (of ground planes, anyway), but that'd be a real stretch on what it is intended to be used for. You should not use zhlt_copylight on brush entities.

  3. #3
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    803

    Re: Problem with zhlt_copylight - I don't understand that.

    You mean this:

    Entity: info_null or info_target with zhl_copylight "name of model" ( Smart button and add key )

    Entity cycle or env_model: "name of model"

    Entity light should origin of info_null or info_target

    Is it correct? Like this
    Scroll down and find "zhl_copylight" It looks like xen head ( left normal, right color with pink ) Is it like model-light?

    1. method: It looks like texlight with brush BLACK_BEVER than it can use zhl_copylight too.
    What does it mean?

    Your method is like my screenshot:
    [IMG][/IMG]
    In J.A.C.K


    Is it correct or wrong? It looks like other if it is wrong than I let to know

    // Edit is it correct?

    cycler with zhlt_copylight "name of target or null"

    info_null or info_target is "name of target or null"

    light catches to info_target or info_null

    screenshot:


    // EDIT:
    I don't understand what does it mean?
    Method 1: Place info_texlights on your map, and using the smart edit mode add new 'BLACK_HIDDEN' key, and a value of custom light color and brightness, in a format: 255 255 128 2000 (red, green, blue and brightness). This work in the same way as other texture lightning, but it will produce a light over all 'BLACK_HIDDEN' brushes, to affect models only. From now, every model's origin placed ABOVE brush completely covered with 'BLACK_HIDDEN' texture receives light specified in info_texlight.
    It's recommended to turn this brush into func_detail, and texture all it's faces except top with 'SKIP' textures, to disable it's collision. Note that this will affect all models that appear above this brush entity, even monsters and players.
    I tried this


    In-game still dark. Why does it explain bad to me. I always tried no success
    Last edited by SourceSkyBoxer; 26-08-2017 at 09:37 AM.
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

  4. #4
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,458

    Re: Problem with zhlt_copylight - I don't understand that.

    @SourceSkyBoxer, I can't really answer your questions without re-creating what you have done but maybe this will help.

    1st thing, You are actually asking about zhlt_usemodel, which was developed as "Hack" to reduce Edicts or Entities and get around the "Old Model Limit". (i.e. The days before SC 5.0 & the increased Engine Limits, So... "the Original" reason for using it is "Largely Irrelevant" except maybe in some edge cases or to do some special non-standard Light effects [So let us assume you do have such as reason, But again you can probably do these "Light Effects" in other easier ways, it really depends on what you want to do].

    So we then get to the point where "zhlt_usemodel" allowed us to add more "models" in map without it crashing. (Again in days before SC 5.0)

    These "Point.mdl's" or "Brush.mdl's" could and still have functionality behind them, e.g. Doors, Buttons, func_breakables, "Prop Models" etc.
    The Only thing you would NOT DO is use zhlt_usemodel to clone a Monster_xxx because of AI attached (Unless you want "Undefined Behavior/crashes") and Because
    a normal squadmaker (via mcache) does not increase "model count" (It only adds to edicts and entities) so there was no "mapping reason". Why Cone a AI model when you could use Squadmaker and get "Free working AI" as well.

    2 - Then mappers found that there "cloned" models (made with zhlt_usemodel) had Lighting Problems, the main complaint was a lot of Clone.mdl/"Brush Models" were Dark in map.
    The Attribute "zhlt_copylight", was added to control this problem. Because the Glow Effect was already a copy'able feature under certain circumstances. (See the more or less depreciated, Old and now possibly wrong [Tutorial on Model Limit and Mcache. ] )

    Finally, Your Question(s) and I am assuming they are all for "Brush.mdl's":
    Using "zhlt_usemodel" (Note: no zhlt_copylight attribute yet)
    Place an Original floating (e.g. 64 units up) "brush.mdl then tie to an origin brush", then add a 64 units above a "Light".
    Clone Brush.mdl in a different place, you can get a "light face" on the "clone model" one, two or several sides (By moving position of light source 90 Deg. in front, -> to edge, -> above etc.) Also try a normal brush and then making "brush transparent". [Note the "light" may need to be touching or half inside your model because it is a "brush model"]
    As far as I am concerned the resulting "Light" is actually an "after Glow".


    Now try adding a "proper light" by also using attribute:zhlt_copylight on the clone and give it the name of the "Original brush".
    Place/re-place the "Light" above your "Original floating Brush.mdl", now looking at the clone brush.mdl you should see what looks like a "light spot" under the "clone model".
    As far as I am concerned this is "Real Light" in that is offers reflection/bouncing to some extent. (Combine with above glow if you wish).

    Now reduce the "floating height" on the original brush.mdl (to 1 unit above floor, then later to touching floor) and check how it effects your clone brush.mdl (Check effect with and without zhlt_copylight and by leaving original floating and moving clone down)

    Now remember that you can also use "Tex_lights", so try adding a new "Tex_light brush" and then tie to "existing Original Brush + Origin". (Check effect with and without zhlt_copylight and by leaving original floating and moving clone down)

    Plus remember you have "Minimum Light Level" ( _minlight ) which gives you as sort of "full bright" that you can apply to "Original brush.mdl" (Check effect with and without zhlt_copylight and by leaving original floating and moving clone down)

    It has been some time since I actually did all this stuff but it should hopefully still work (or give different light results.)
    Last edited by wolf-3d; 26-08-2017 at 11:56 AM.
    Regards
    Wolf-3D

  5. #5
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    803

    Re: Problem with zhlt_copylight - I don't understand that.

    Thanks Wolf3D but I really want know like
    [IMG][/IMG]

    for what black_hidden brush should to convert to func_detail and it can throw light into model. But It doesn't work. I already tried. And I have tried multi texture light but I don't understand why does light_surface not woprk if I want 2. texture same name but other light color.
    Like I have said my mapping

    high yellow cube is info_texlight
    pink yellow Skip cube is func_detail
    black cube down of model is func_wall via zhlt_copylight
    cycle is model can.mdl

    than in-game doesn't show light from model with black_hidden texture. How do I fix?
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

  6. #6
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    803

    Re: Problem with zhlt_copylight - I don't understand that.

    Hello my method is easy

    2 x cycle ( 1. cycler without zhlt_copylight and 2. cycler with zhlt_copylight )
    1 x info_target or info_null in hidden room
    1 x info_texlight
    1 x light in hidden room
    1 x func_wall, func_illusionary

    Make simple light model from SketchUp or Blender and make sure into KHed and make assign of uv-mapping and export to mdl file

    Open J.A.C.K. and create own room

    and add 1 cycler
    Render Mode: Additive
    FX Amount 255
    Color of current your light model if you have color white than 255 255 255

    Copy cycler and 2. cycle add zhlt_copylight "light_target"

    create small room ( hidden room )
    add info_target or info_null and input name light_target and add light to info_target or info_null

    Create brush and make sure whole blank color like WHITE if you have other color than make sure light_surface ( zhlt_texlightreflection ( I don't know )

    than convert to func_illusionary or func_wall set
    Render Mode: Additive
    FX Amount 0 <- But why it is 0 because brush should be invisible
    color < your color if you use WHITE than 255 255 255>
    ZHLT_Lightflags is 2 Opaque (blocks light)

    Add info_texlight and add Key WHITE 255 255 255 2500

    result:


    Is it correct? It looks real like light volumic If it is okay? Or I need know...

    // EDIT Bonus tip:

    If I use next func_illusionary for real shadow like throw or from grid ( I think sure 256 x 256 or 512 x 512 texture like by Sven M.


    Or Trempler's light_prefab
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

  7. #7
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,458

    Re: Problem with zhlt_copylight - I don't understand that.

    How do I use mdl with zhlt_copylight?
    Can I have example of map with zhlt_copylight?
    ...
    ...
    How do I get success emittable models and brushes?
    Just re-read your inital post and think I now understand what you want. (The dangers of skim reading and making assumptions!)

    1) Yes zhlt_copylight does work with SC 5.0+

    2) Example: [zhlt_copylight.7z .bsp & . rmf]

    3) "emittable models and brushes" ? -> I think this is what threw/confused me, as per Silencer the zhlt_copylight Light Source is from the Base of a model (a "underlight"). Emittable "Model/Brush Light" is a different topic.

    zhlt_copylight is very easy to do, explanation of example.
    A) Place light (I used a spotlight)
    B) Place "Source Model" Below light.
    C) Give a Name to "Source Model"

    D) Put a destination model somewhere else.
    E) "Smart Edit" the attributes for the Destination Model.
    F) Press "Add", in pop-up window in Key Box: zhlt_copylight, in Value Box: NameOfSourceModel

    save, compile and that should be it.
    PS: I mixed the model names up so that the colours would not be directly opposite each other.
    Regards
    Wolf-3D

  8. #8
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    803

    Re: Problem with zhlt_copylight - I don't understand that.

    Thanks Wolf3D I know now. Like same to Half-Life.
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!
    Muhahaha, Facebook crashed!

Posting Permissions

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