Vluzacn's Half-Life Tools v34 Created 12 years ago2011-12-26 08:32:24 UTC by Skals Skals

Created 12 years ago2011-12-26 08:32:24 UTC by Skals Skals

Posted 12 years ago2011-12-26 08:42:43 UTC Post #302027
In this thread I am going to compile a list of changes and new features in Vluzacn's Half-Life Tools.
____________
Thread: VHLT v34
____________
[b]Performance in general (Compared to SHLT 3.9):[/b]
-Compile time reduced by more than 50%, at no expense of quality.
-Compiled .bsp product around 50% smaller in size.
-Lighting looks quite a bit better.
-Error reports in greater detail.
-Fixed many errors with old compiling tools.
____________
Installation
____________
Since hlrad needs texture data, wad paths have to be provided.
This can be done by editing the file 'settings.txt' and replacing the 'C:Half-Lifexxx' after '-waddir' with wad folders of your game. (This feature can be disabled with hlrad parameter '-notextures'.)
In other words before your tools have been setup, you need to specify the directories where your wad files are located for VHLT to work properly.
Make sure you are also using the brand new .fgd file, and the brand new .wad file.

____________
New Entities and Features (in order of importance):
____________
[b]-func_detail
  • '-texreflectscale #' '-texreflectgamma #' (bouncing is affected by texture color)
-info_translucent and light_surface
-zhlt_usemodel
-info_sunlight
-light_shadow
-info_overview_point and info_hullzone
-func_group and info_texlights
-info_smoothvalue[/b]

____________
Explanations:
____________
func_detail
"Convert any brushes that are not parts of the basic structure of the map, to func_detail. They cannot be water brushes or sky brushes.
You can leave 'Detail level' to 1. For tiny objects, you might set it to 2, so that they won't chop the faces of other func_details.
For large shapes such as terrain and walls, you can set 'Lower its level to cut others' to no less than its detail level, so that they can chop adjacent world brushes like world brushes.
Before compiling the map, hide all entities and func_details, make sure there are no leaks and the structure is good enough for vis calculation."


From experience, this entity works great as it has a completely separate third cutting level to world brushes and entities. Before func_detail, we had two separate brush types; entity and world brushes, that would not cut eachothers faces. However now we have a third, a separate func_detail style. Furthermore using this entity, within its properties you can specify 1, 2 or 3, which can change how this entity will cut faces. The default is 1, and it will have its own special chop but can cut other func_details, 2 it won’t cut anything, even other func_details, and 3 it will chop world brushes as an entity.

Big benefit of func_detail: When player steps on a func_detail entity, his model will be lit properly as the surface he is standing on is. This was not the case for func_walls and they could lead to the players model going black bug.
Possible problem of this entity: Sometimes there can be lighting errors, it can sometimes incorrectly cut off sunlight making some weirdly lit faces, however the probability of this is about 2%, and if it does happen then you can change the entity back to a func_wall. (This is all from experience).

Note: This entity just like func_wall will not block light.
For more information, go here: Sven Co-op Forum Post

'-texreflectscale #' and '-texreflectgamma #'
You can now use a '-texreflectscale' parameter, to lower the reflectivity of the textures in general. The color of textures will affect how much light bounces in VHLT. Meaning a bright yellow map like dust2 will have a shiny luminescent effect, while something like a darkly colored half-life map will have more shadows.
How to use: For example '-texreflectscale 0.5' to hlrad will lower the reflectivity by half, making the map half as bright. Presuming that you leave the ‘-scale’ parameter unchanged, as that is an older feature that will give a less desirable effect.
'-texreflectgamma' is the same as’ texreflectscale’, but affects the gamma value of the textures.

info_translucent
“New translucent effect for materials such as fabric, coarse glass, plastic. They are now able to receive light that comes from the back side of the face.
Usage: Create an info_translucent entity, disable the Smart Edit mode, add keyvalues. Keys are names of textures, values are their translucent amount.
Values are from 0.0 to 1.0: 0.0 = normal; 0.3 = 30% light from back and 70% light from front; 1.0 = 100% light from back and 0% light from front. Also support 3 values mode to set r g b amount individually.
There is also a limitation in the shape of solids that use translucent textures: They must not be thicker than 2 units. (The max thickness '2' can be changed by hlrad parameter '-depth #').”
I am yet to test this entity.

[b]light_surface[/b]
“Usage: Place a light_surface entity near the face which you want to emit light.
'Texture name' shall be the name of texture of the face.
'Filter max distance' can exclude faces whose centers are far from this light_surface.
'Texture brightness' is the brightness value that the face obtains. 80 is enough to ensure brightness of the texture itself.
'Inner angle' and 'Outer angle' are 90 and 'Adjust emit scale' is 1.0 for normal texture lights by default. Smaller angle and larget scale can be used to simulate spotlight.
'Fast' is useful when the face is large and brightness is low. The result of fast lighting is very similar to bounce lighting.
The light_surface can be triggered and have appearance like other light entities. Actually its classname will be changed to 'light' or 'light_spot' according to your choice.
Note: If you want to set any of these value to 0, fill in 0.0 instead. Otherwise Hammer will ignore the keyvalue.”
I am yet to test this entity.

[b] zhlt_usemodel[/b]
“Add [key: zhlt_usemodel value: name of the source entity] to the target entity. Both source entity and target entity should have origin brush or be point entiy.
'zhlt_copylight' is a hack to correct brightness of mdl placed in the map by changing the color of face lightmap sample under the mdl. It is not useful in your case.
A sample map of 'zhlt_usemodel' (in attachment): forums.svencoop.com/attachment.php?attachmentid=14797&d=1324822909 “
As far as I understand, these can be used to hack the light values of models in hammer, to change their appearance in game.

[b]“info_sunlight”[/b]
“You may disable engine's detection of light_environment entity by adding an info_sunlight entity (this entity is in fgd file 'zhlt.fgd', and note that the compiler makes it work by placing an fake light_environment entity into the map) and set its brightness to '0 0 0 0'.”

[b]“light_shadow”[/b]
“Added entity 'light_shadow' to dynamically control the opacity of brush entity.
Example: Build an opaque entity (note: 'custom shadow' key is not allowed) and give it a name. Then place a 'light_shadow' entity with a name, and set the opaque entity as its target. Now, light blocked by the opaque entity will be added into the light_shadow's light style. You can switch the 'light_shadow' off/on just like normal lights to make shadow appear/disappear.('light_shadow' entity will be changed into 'light' in BSP file)
This feature affects bounce light unless option '-incremental' is set, and doesn't affect dynamic light with different style.”
An interesting new entity, lets you add shadow that can be turned on and off just like normal lights.

[b]“ info_overview_point”[/b]
“You can make all other vis leafs visible from a vis Leaf by placing an info_overview_point entity inside it. Useful for creating overview.”

[b]“ info_hullzone”[/b]
“You can assign areas that need to generate clip hulls, to reduce clipnode count. Create an info_hullzone entity that covers where players are allowed to go, then clip hulls of brushes that doesn't intersect with this entity will be stripped. This will not affect brush based entities and CLIP brushes, so enclose the map with CLIP if you encounter the leak error.”

[b]“ func_group and info_texlights”[/b]
“Same to the original ZHLT. But note that the color of the texture is now added into the texture light that it emits, which should be considered when you set the color of a texture light.”

[b]“ info_smoothvalue”[/b]
“The way of use is similar to info_texlights. The key you added is texture name, and the value is the angle that overrides '-smooth' for this texture.”
Skals SkalsLevel Designer
Posted 12 years ago2011-12-26 08:47:29 UTC Post #302028
Whoa that is some cool new features, even if i don't understand what half of them actually do! Which enhanced entities do you use alot?

I'll definitely be using vhlt the next time i have a goldsource project! Might be also fun to recompile some old maps, and compare compile times(i log my compile logs along with rmf backups).

BTW, can you furnish links for the fgd files you use for HL and CS?
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-26 08:49:12 UTC Post #302029
Use ZHLT.fgd along with our CS/HL fgd.

Here, you can get all that stuff here:
https://sites.google.com/site/gshltools/mapping-tools
Stojke StojkeUnreal
Posted 12 years ago2011-12-26 08:51:51 UTC Post #302030
VHLT 25 comes with zhlt.wad and zhlt.fgd, both of which you should use. As for my cs fgd, I doubt I have the latest one I haven't updated it in ages.

As for half of the entities, I don't know what they do either, so far I've only tested func_detail and the light entities :)

@Stojke: Is the hex fgd better than the toms one then?
Skals SkalsLevel Designer
Posted 12 years ago2011-12-26 08:53:05 UTC Post #302031
Lol is it, yeah its much better. Use HEX805 for CS.
Stojke StojkeUnreal
Posted 12 years ago2011-12-26 08:55:25 UTC Post #302032
Oh cool, inform me if there ever is a newer version.
Btw, sticky plz :D
Skals SkalsLevel Designer
Posted 12 years ago2011-12-26 08:56:13 UTC Post #302033
Nice! TY Herr Skals and Herr Stojkens! :P
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-26 09:03:29 UTC Post #302034
Oh cool, inform me if there ever is a newer version.
Btw, sticky plz
Just got to my handsome Google sites web site, you'll find updates there.
Nice! TY Herr Skals and Herr Stojkens!
You're welcome mister! :D
Stojke StojkeUnreal
Posted 12 years ago2011-12-26 14:02:33 UTC Post #302035
I have learned a couple new things using info_sunlight and info_translucent.

[u]Info_sunlight[/u] is used to light up the player model in any color chosen, anywhere where sunlight from light_environment is shining. This means whenever player is in direct sunlight he will be this color, this can prevent some errors with light on player model.

Here is a conversation I had with vluzacn:

Me: What is the use for info_sunlight? Is it just for lighting up the player model?

Vluzacn: Yes. It is only needed when the brightness of player models and other models are not correct, usually the result of having multiple light_environments or being at night with very dark light_environment.

[u]Info_translucent[/u]: It's an entity that determines how much light is taken from each side of the face, with this you can create some cool looking objects with a translucent effect. The value lets you go from 0.0 to 1.0, with 0.0 being normal (100% of the light is taken from the front) 0.5 for 50%, and so on. This entity is used just like info_texlights, meaning you can give translucent effect to any texture.

Lighting comparison from zhlt 3.4 to vhlt 2.3:
User posted image
The light becomes more atmospheric and better, this is because the color of the texture determines the color of the bounced light.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-26 15:08:26 UTC Post #302041
hmm what i like is "Compile time reduced by more than 50%, at no expense of quality."

going to test is out :)
Posted 12 years ago2011-12-26 15:55:29 UTC Post #302046
The light becomes more atmospheric and better, this is because the color of the texture determines the color of the bounced light.
I came.
monster_urby monster_urbyGoldsourcerer
Posted 12 years ago2011-12-27 13:12:56 UTC Post #302106
Hm. I just might have to upgrade to these once the new compilator is out. (Not much point doing it until then, though. I'm sure it will be before I finish C42) this light_surface entity doesn't replace texturelights, does it? I mean, it seems that it does, but the tools are still compatible with info_texlights, right?
Notewell NotewellGIASFELFEBREHBER
Posted 12 years ago2011-12-27 13:38:50 UTC Post #302107
with light_surface you can change the texlight of each individual surface in the map.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-27 15:20:28 UTC Post #302108
The light becomes more atmospheric and better, this is because the color of the texture determines the color of the bounced light.
I assume this is done by default?
I would never have thought that anyone would continue to work on HL compile tools. This is great. How old is this project?
Posted 12 years ago2011-12-27 16:30:29 UTC Post #302112
"I assume this is done by default? "
Yes, and I believe this feature can be disabled too.

How old is it? It's improving as we speak, with the latest version (2.5) only a month old.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-27 18:14:19 UTC Post #302119
Will give it a shot once I come back from holidays. With all that sexy lighting I'm eager to recompile and compare my most recent map.
Posted 12 years ago2011-12-29 09:04:37 UTC Post #302207
omg these tools are orgasmic.
Rimrook RimrookSince 2003
Posted 12 years ago2011-12-29 09:32:57 UTC Post #302208
Makes me want to keep mapping for Goldsource, well almost! :P
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-29 15:38:49 UTC Post #302213
can u post moar screenshoots?
Posted 12 years ago2011-12-29 16:52:09 UTC Post #302215
Yeah, not got round to using these yet. Some screeny goodness might tickle my fancy.
monster_urby monster_urbyGoldsourcerer
Posted 12 years ago2011-12-29 19:36:47 UTC Post #302218
:@ you guys

ok how about this, sexy vhlt lighting:
User posted image
Skals SkalsLevel Designer
Posted 12 years ago2011-12-29 20:28:52 UTC Post #302219
How?
Rimrook RimrookSince 2003
Posted 12 years ago2011-12-29 20:44:01 UTC Post #302220
How what?

I have some more screenshots to post, but they were all taken in my WIP competition map so i don't think that's a good idea. See that reflective floor image I posted? That's an area of my map.

Edit: Oh wait I didn't post it. Fine here it is:
User posted image
Skals SkalsLevel Designer
Posted 12 years ago2011-12-29 22:03:52 UTC Post #302225
I'd say those are some epic tools then. :)
Posted 12 years ago2011-12-29 22:36:56 UTC Post #302226
I disagree with the claim that compile times decrease. RAD takes significantly longer on a sparse compile, but the effect is definitely worthwhile.
Archie ArchieGoodbye Moonmen
Posted 12 years ago2011-12-30 00:03:02 UTC Post #302229
Whoa that first one looks sick. I'm really tempted to stop work on my c32 and GameBanana compos to play with these new tools a bit; I'll think i'll wait until i hit mapper's block and then experiment a little. :P
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-30 04:06:31 UTC Post #302238
My pants are full of jizzum right now. One would expect it to flow out, but they just filled up like a balloon.
It's a pity I can't use them yet. D:
Alabastor_Twob Alabastor_Twobformerly TJB
Posted 12 years ago2011-12-30 11:46:43 UTC Post #302250
I disagree with the claim that compile times decrease.
My Secret Santa VIS compile was ~5x shorter (2.5hrs > 30mins). RAD did end up taking slightly longer, but all-in-all it was a huge gain in my case.
Daubster DaubsterVault Dweller
Posted 12 years ago2011-12-30 15:17:26 UTC Post #302260
Oh yeah I forgot to mention, the max texture size for VHLT is 4096x4096. It is no longer limited to 512x512.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-30 15:29:24 UTC Post #302261
WTF why do you need 4096 x 4096?! O_o
Stojke StojkeUnreal
Posted 12 years ago2011-12-30 15:56:30 UTC Post #302263
I used 1024x1024 before, with no problems. Seems to me that 4096x4096 would lag like hell.
Posted 12 years ago2011-12-30 16:53:06 UTC Post #302264
Yes, and the compiler gave you a yellow error saying that it's exceeding max texture size.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-30 20:47:13 UTC Post #302271
A warning, mind you. And without any color! Still worked though.
Posted 12 years ago2011-12-30 21:14:36 UTC Post #302272
Doesn't it re-mip the huge image to 256x256 though? Or does it actually render the whole texture properly?
Daubster DaubsterVault Dweller
Posted 12 years ago2011-12-30 21:51:13 UTC Post #302275
I'm not sure, ask Vluzacn. He posted that he changed the limit from 512x512 to 4096x4096, he didn't say much else. if going past 512x512 would make the texture render out as a 256x256, then yes, it will render properly for up to 4096x4096 now. Otherwise I don't know.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-31 07:12:37 UTC Post #302281
AW! i was excited by the prospect of importing a huge texture into hammer, and texturing large items in one shot, without stretching it. ='(

So the whole point of boosting the max sized is to allow for REALLY high-res textures? (i wonder if this can be applied in any way to the env files, which would be awesome)

I'm gonna try compiling my compo map with vhlt right now, can't wait to see the results!
Edit: Results compiling with VHLT:
First, i would like to say i like the vhlt lighting better for most situations. It would be fun using some ironic-looking textures in some rooms, just to see what sort of texture reflections you'd get. =)

Recompiling my unedited final map from C31, here are the resutls:
Compile time
Full VIS time was negligible, but RAD took about 20 minutes longer. (i never compiled my map on full vis with the old tools, so i can't make a full-vis time comparison)

The look
My lighting for this map was originally really shit, so i wasn't expecting vhlt to perform a miracle, but it does a really neat job reflecting colors off other textures as skals said.
The following slideshow shows the original image first, and with vhlt second. (the fade effect from Imageshack relly blows, but it's the only one of 4 you can use, and afaik you have to use one of the effects)

ImgShack Slideshow

Notes
I had one visual error where i could see outside world that i did not have in the original map, but i don't consider that a big deal.

I did however try an experiment with a second compile, changing all my func_illusionarys(i uses illusionary to cut down on clip budget) to func detail and i didn't really like the results: The map was very dark, took a full extra hour to light, and there were a few more visual dissappearing face errors.

This is not to say i will never use func_detail for goldsource; i will definitely play around with it some more.
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-31 08:44:08 UTC Post #302283
func_detail will add clipnodes, illusionary is still better in most situations. func_detail also blocks light like normal world brushes, that's why you had the darkness problem.
You need to get used to the entity, it has several properties you'd have to change, to get the best effect out of it.

As for the compile time, yes the rad is longer because of the new rad features, however the rest of the tools are faster, so if you put rad on fast and don't turn on any additional rad flags it will be really quick.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-31 09:49:57 UTC Post #302284
OH, i didn't even think of messing with the RAD paramaters. here are the rad data i used:

-extra -sparse -bounce 1 -chop 72 -texdata 8192 -low -chart -estimate

Gonna fuck around with some big textures right now and see what happens :badass:
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-31 10:37:03 UTC Post #302285
Use these: -chop 32, -texture chop 16 (the lowest you can get ;D) The lighting will be epic then but the compile will take ages. Also try -texreflectscale 3.0, it might make the light a bit sexier.

What is sparse for?
Skals SkalsLevel Designer
Posted 12 years ago2011-12-31 10:59:46 UTC Post #302286
Nice Thanks!

Idk what sparse is for it's been there a while, probably because somebody recommended it a while ago, and i just did it without even testing what it did.. +)

BTW, i tried some big textures(960x816), but half-life refused to open it. Looked pretty sexy in crafty tho. :P Is there something else i have to configure to get them working?
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-31 11:03:31 UTC Post #302287
What do you mean half-life refused to open it? Try getting the values of 2 correctly maybe.
Skals SkalsLevel Designer
Posted 12 years ago2011-12-31 11:22:10 UTC Post #302289
Yeah HL.exe just crashes. I'm using WON also so i don't know if that factors in.

How do you get the values of 2 correct? I seem to remember reading something about this, but i don't quite remember what it means. In the past, i've only ever made textures with both dimensions divisible by 16 and never yet had a problemo.
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-31 11:29:50 UTC Post #302290
2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096.

Also a question from me:

For goldsource, is it allowed to put skip and clip textures on one brush, so the clip hull is placed on one face of the brush, rather than the entire thing, possibly saving some hulls?
Skals SkalsLevel Designer
Posted 12 years ago2011-12-31 11:46:14 UTC Post #302291
So basically they have to be a square, or a rectangle where one side is double the size of the other? gay. Ok i will resize all the textures and try again, but now alignment is going to be a bitch with all the extra space...

I don't use skip or hint texturers, so idk. I've tried using hint brushes a bunch of times but I could never get them to work with my maps.
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2011-12-31 12:01:53 UTC Post #302292
So basically they have to be a square, or a rectangle where one side is double the size of the other?
Yeah. Don't tell me you didn't know that? It's been like that for ages. :nuts:
Posted 12 years ago2011-12-31 12:06:56 UTC Post #302293
It doesn't have to be like that, you can technically use something like 256x192 (so long as it's a multiple of 16), but a texture of that size would be re-mipped to 256x256 in the engine, so there's not much of a point.
Daubster DaubsterVault Dweller
Posted 12 years ago2012-01-01 12:59:34 UTC Post #302328
Anyone know how to set lighting perameters in The Compilater? I want texreflect but it's not an option. Grrr.
monster_urby monster_urbyGoldsourcerer
Posted 12 years ago2012-01-01 13:34:26 UTC Post #302329
Profiles - Profile manager - command line.
Skals SkalsLevel Designer
Posted 12 years ago2012-01-01 13:58:58 UTC Post #302331
Skals thats for game lunch options xD
Stojke StojkeUnreal
Posted 12 years ago2012-01-01 14:14:46 UTC Post #302332
I already got a PM from Stojke asking me to add support for additional tool parameters. It will be added.

The Command Line box on the Profile Manager is not for lunch, but for game launch parameters such as -console, -dev, and all that good stuff.
You must be logged in to post a response.