设为首页收藏本站新闻投稿

MOD中国同盟社

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1459|回复: 3

[中级] 【纹理相关】zhlt.wad纹理的用法和分析 [复制链接]

Rank: 5Rank: 5

帖子
209
精华
2
声望
748 点
金币
351 Mold
被赞许
20 次
注册时间
2010-11-28

可爱小猫

发表于 2010-12-1 20:17:08 |显示全部楼层
本帖最后由 medicine 于 2011-3-30 13:45 编辑

这是E文的:
These are new textures, found in the zhlt.wad file. They do not act like normal textures as they are not rendered, but instead tell the compile tools to perform certain functions. An example of an existing special texture is the CLIP texture from the Half-Life wads, which is used to create a solid but invisible barrier.

The BEVEL texture
This texture acts like a NULL texture but also doesn't expand when generating clip hulls. It can be used to eliminate exterior corner clipping bugs without using "-cliptype precise" (although "-cliptype precise" is still the recommended method for removing clipping errors, as this feature is experimental).

The HINT texture
This texture is used to force BSP to create a break in the VIS block. It is used in certain situations to reduce r_speed values, although misuse can increase r_speed values. The HINT texture is applied to only one face of a brush, the other faces must be SKIP, and the whole brush is known as a "hint brush".

More information about how to use the HINT/SKIP textures is available here.

The NULL texture
The NULL texture is one that is removed from the map during compilation, so that it won't exist when you play the compiled .bsp file in Half-Life. You should be able to apply it to any entity or world brush within your map.

The main point of this texture is to use it on faces that the player would under normal circumstances never see, so that those faces will not add to the w_poly count and lower the fps (frames per second) rate (that doesn't mean you can't use it for whatever you want, however). You can also use the SKY texture for this exact same purpose, although it is debatable whether this is actually beneficial. While it does lower the w_poly count, it apparently also lowers the fps rate, thereby defeating its original purpose.

Note that:

NULL textured brushes still block VIS.
If you have a NULL su***ce on a HULL brush (i.e. a brush acting as the outer layer of your map, sealing it from the void), then in Half-Life the absence of any textured polygon(s) being rendered in that space will cause a Hall of Mirrors effect. This is intended behaviour, and should be accounted for by the mapper.
NULL textures will still block the player in Half-Life (and anything else that should collide with a wall), even though they are not rendered. This is to preserve the collision detection of the entire brush. If you want to disable this, then just make the brush a func_illusionary.
The CLIP texture now works in the same fashion as the NULL texture for backwards compadibility.

The SKIP texture
The SKIP texture is used to cover all the other faces of a brush which have a face with a HINT texture. The SKIP texture is non-solid and has no special effects.

我水平太菜,谁能详细解释一下啊,我可以去参考哪里。或者知道一个说一个,请详细介绍用法和优缺点,,谢谢

使用道具 举报

Rank: 7Rank: 7Rank: 7

帖子
582
精华
8
声望
10792 点
金币
3444 Mold
被赞许
20 次
注册时间
2009-4-28

星界财团

发表于 2010-12-2 00:33:14 |显示全部楼层
本帖最后由 vluzacn 于 2010-12-2 00:39 编辑

普通纹理:
固体块的内容是固体.内容是固体意味着,会切除其他固体块(其他固体块的面,如果有一部分进到了此固体块内部,就会切除进入的部分),会阻挡VIS(两个区块用这个固体块隔开后,就无法站在一个区块中看到另一个区块里的面),会阻挡子弹,会阻挡玩家.
固体块上的全部面都是可见面,除非进入其他固体导致被切除.
sky:
分两种.一种是固体块所有面都贴sky.即通常的天空.
这种固体块的内容是天空.天空与固体很相似,但是子弹可以穿透,并且可以根据light_environment发光.
另一种是固体块只有一部分面贴sky纹理,其他面贴普通纹理.
这种固体块的内容是固体.贴sky的面会显示为天空,其他面仍然是普通可见面.
NULL:
固体块一部分面或者全部面贴NULL纹理,其他面贴普通纹理.
这种固体块的内容是固体.贴NULL的面会自动删除,其他面仍然可见.
可以减少可见面数量,从而减小地图体积.
CLIP:
必须固体块的全部面贴CLIP纹理.
这种固体块的内容是空的,并且没有可见面.但是和固体一样有阻挡玩家的功能.
SKIP和HINT:
一般一个面贴HINT,其他所有面贴SKIP纹理.
这种固体块的内容是空的,并且没有可见面.
特殊之处是贴HINT那个面可以像普通固体的面一样切分区块.
另外,如果你用的是vluzacn版zhlt编译程序,可以把贴HINT的面改贴NULL(其余面仍贴SKIP),效果更好.
切分区块的作用是:
游戏中并不会同时绘制地图中所有的可见面,因为同一时刻很多可见面是被物体遮挡看不到的,如果都绘制的话fps会很低.
游戏判断是否绘制某个可见面的方法是,玩家位于一个区块中,该可见面位于另一个区块中,如果玩家所在的区块与可见面所在区块是相互可见的,才绘制该可见面.
BSP编译过程会生成地图所有区块.VIS编译过程就是计算区块之间是否可能相互看到,并把结果保存到地图文件供游戏使用.
区块的生成过程是,编译程序找到地图中所有的可见面,包括普通面以及贴NULL或HINT纹理的面,不包括贴CLIP或SKIP纹理的面,然后按照某种方法挑选其中一个面,用这个面所在的平面把地图切分为两个区块,然后每一个区块再挑选该区块中的一个面用它继续细为两个区块,直到所有面的正面和背面都位于两个不同的区块中.
显而易见,区块的划分越粗糙,区块尺寸就越大,区块之间可以互相看到的可能性就越大,在游戏中绘制的多余的面就越多.因为只要区块A的任何一个位置能看到区块B,即使区块A中大部分位置看不到区块B,也会认为区块A和区块B是相互可见的.如果用HINT纹理把区块A进行细分,把区块A中看不到B的部分分割出来,就可以避免当玩家位于该部分时绘制区块B,从而提高fps.

使用道具 举报

Rank: 5Rank: 5

帖子
209
精华
2
声望
748 点
金币
351 Mold
被赞许
20 次
注册时间
2010-11-28

可爱小猫

发表于 2010-12-2 19:35:03 |显示全部楼层
我崇拜你,感谢你!!!
这么说 skip,null/hint贴图固体可以代替sky在地图内的划分吗?会不会影响light_environment发光,子弹穿透或其它什么?

使用道具 举报

Moderator

百贴杀阵!

Rank: 8Rank: 8

帖子
870
精华
2
声望
7093 点
金币
1400 Mold
被赞许
28 次
注册时间
2005-2-20
发表于 2012-11-26 19:57:07 |显示全部楼层
这个好东西~
这个好东西~
这个好东西~
萎靡中

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

回顶部