Closed URAKOLOUY5 closed 4 months ago
Hello @URAKOLOUY5! Thank you for contribution!
Would be good if you put these settings into the vmf.config.json
in the import
section. For example:
"import": {
"scale": 0.025,
+ "lightmapTexelSize": 0.03,
"generateCollision": true,
+ "generateLightmapUV2": true,
"instancesFolder": "res://examples/instances",
"entitiesFolder": "res://examples/entities"
},
To get access to the config use VMFConfig.config
Also for new features, adding docs here is required.
Got it!
There's now 3 new options
generateLightmapUV2
- enable/disablelightmapTexelSize
- texel sizelightmapTexelSize
- texel size for modelsNote: it can be overridden by the lightmapTexelSize
keyvalue in prop_static (can be manually added to prop_static or in the .fgd file for convenience).
Since we can't write metadata to the PackedScene (https://github.com/godotengine/godot/issues/76366), I decided to create a small JSON file to store the texel size. When the mapper updates the texel size in the prop properties, MDLManager recreates the cached version of that model.
However, there's a possibility for a race condition where several props define different texel sizes.
@URAKOLOUY5 Approved. Thank you for contribution :)
Greetings, H2xDev.
Recently, I found this project while searching for a more convenient way to create geometry for levels, and I really liked it, since I used to Source/2. However, manual creation of UV2 maps each time is not good. As it turns out, by adding a few lines of code, the ability to automatically generate UV2 maps becomes available.
New properties in VMFNode