DayNightFix
修复自发光表面显示问题
Fix lighting issues on self-illuminating faces
简
EN
© Zbx1425
转载请注明链接
Please link to this page when redistributing
v1.2版存在严重问题,请勿使用。
There is a severe error in v1.2, please do not use.
本程序能干什么?
What is this tool for?
由于 OpenBVE的一个长期存在,但最近被修复了的Bug,CSV/B3D模型中同时指定了日间和夜间材质的所有面会在低光照下常亮。由于该Bug已经存在了很长一段时间,许多作者误将其作为特性来使用,致使此Bug修复时大量列车车内光照效果失效。手动大量修改代码十分麻烦,本工具可批量自动处理含有问题的模型,以协助作者迅速适配最新版本。
Because of a long present but recently fixed bug in OpenBVE, all faces applied with both Daytime and Nighttime texture will become self-illuminating at low brightness. As this bug has been around for quite a long time, many developers considered it a feature and misused it, causing the interior lighting effect of lots of trains to fail when the bug is fixed. Since manually modifying all the models is time-consuming, this tool is developed to batch-process models with such problem, in order to help developers adapt their models to the new standard.
关于上述Bug的详细说明
Detailed info about the aforementioned bug
在OpenBVE的老版本里,这样写LoadTexture指令能使面保持常亮:
In the older versions of OpenBVE, using a LoadTexture instruction like this will make the faces self-illuminating:
CreateMeshBuilder
......
LoadTexture, TrainInterior.png, TrainInterior.png
但是这个写法其实是错误的,这个常亮的效果上述长期存在的Bug凑巧导致的。现在由于该Bug已被修复,此写法在新版OpenBVE里也已不再有效 (除非打开 Enable hacks for buggy older content)。现在要想使一个面常亮,正确的写法是:
But this usage is actually incorrect, and the self-illuminating effect achieved by it is caused by the aforementioned bug. Since the bug is fixed now, it will no longer achieve the same effect in the newer versions of OpenBVE (unless "Enable hacks for buggy older content" is turned on). The correct way to make faces self-illuminating is:
CreateMeshBuilder
......
LoadTexture, TrainInterior.png
SetEmissiveColor, 255, 255, 255
使用说明
Instructions
致谢
Acknowledgements
本软件使用了@yinyue200 移植的 Mozilla Universal Charset Detector。
Mozilla Universal Charset Detector for .Net Standard by @yinyue200 is used in this program.
Changelog
修复愚蠢的错误
按照 Chris和S520大佬的指正 扩大了处理范围
使用BeginInvoke,少量增加性能
修复了TabIndex混乱的问题
使用BeginUpdate/EndUpdate,少量增加性能
增加了从列表中移除文件的功能
修改了不明确的措辞
初次发布