Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FishOfTheNorthStar authored Apr 24, 2024
1 parent 2d1449d commit 61594a4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,37 @@ You are probably looking for this:

I'm trying some things with the code and posting it as I go in case any of it helps the project authors. Trying to use this in your project is not recommended at this time. Go use the properly supported Terrain3D project instead, link above.


-- Change log

* Organized Terrain3DMaterial properties into groups, most groups have an 'on/off' enable checkbox, and all have a (very) crude in-line help system implemented as a temporary measure until the GDextension documentation situation with Godot improves. Currently there is just no way to integrate GDExtension help docs in with Godot that I can figure out, but they're working on it. Until then, these little read-only multiline text areas are better than nothing.

* Utilized extensive macro templates to compartmentalize related/similar code (see __MACROS.H) related to 'godot property groups that are also glsl property groups', and managing that functionality.

* Phased out 90% of the existing dynamic shader construction process in favor of a largely static shader that implements gdshaderinc files and #define's to enable/disable specific functionality. Be aware that due to what seems like a bug in Godot, having a Custom Shader enabled and open in Godot's shader editor will disable it's ability to have it's define's changed dynamically. So if you are using a custom shader, and you want the on/off toggles to work, either close the file in the Shader Editor, or instead just comment out / add the relevant #defines yourself manually. Be aware there is still some functionality that require the shader to be recreated, so if you try to manually change a define and it doesn't work right, try creating a new custom shader with the enabled options on and compare the differences (probably a few extra bits of code injected). Soon it will be more unified.

* Take care breaking the shader, it produces absolutely profuse amounts of log spam now from the FastNoiseLite library addition. Working on that issue, but for now either A) don't break the shader or b) don't be in a --verbose console opened Godot when you do.

* Added an alternate world-noise setting, so now there's Blank, Flat, Noise_1 (previously just Noise), and Noise_2 (FastNoiseLite based). As much as possible, I unified the scale/height/offset settings. In FNL mode, the octaves setting currently doesn't work, also it makes no attempt at all to blend it in with the regions. Working on that.

* Changed the way most 'pick a scale for this element' sliders work, so instead of (slider value) * max_thing_value = applied_thing_scale_value, now it's more like (THING_GLOBAL_SCALE_MAX / (max(0.01, thing_slider_value)) = applied_thing_scale_value. In this way, left / lower values produce smaller features, and right / larger numbers product larger, and it generally adjusts more intuitively.

* Add the start of a UV Distortion feature that, when enabled, can shift around UV co-ordinates a little one way or another based on size and power settings you set under the UV Distortion property group.

* Grouped Noise based color tinting options into new property group "Tint Noise". This group does not have an enable/disable option yet (why would you ever want to disable it?!?), but it will soon. Also testing out a world-space procedural generation of that noise tint texture, so there is no texture it just pulls a random noise value based on X/Z world pos and stores it as a varying. That works really well and I'll be expanding on that soon.

* Completely removed per pixel normal calculation. There are numerous artifacts from this, known issues being addressed now. Blending between manually edited tiles and world-noise generated areas is creating some normal issues, and the texture UV isn't lining up properly. These are new issues specific to this custom fork, and they'll be corrected soon. I haven't done extensive performance testing yet, that'll happen when i can easily toggle on/off my changes, but I suspect frame rate went up a bit from moving the normal calculations into the vertex shader.

* More or less removed get_height() and do all that within the vertex shader if 2x2 patches at a time with textureGather(), at the same time as normal calculation.

* This build does seem to completely correct the issue of tiles having a half pixel error in the normals at the borders, so it might be worth a look to see the differences. Notably this issue has already been corrected on the Terrain3D main branch, but maybe this way is more performant. My version has no conditional checks, which can get a bit expensive in GPU time.

* Switched the find_cameras() function in Terrain3D.cpp over to the Godot 4.2+ method outlined in the comments. Works fine, maybe have helped with an intermittent stability issue i was encountering at startup, hard to say. Certainly faster than recursively parsing the scenetree.

* Built a copy of the documentation. It was an epic jounrney of weird documentation apps, libraries, modules and sub modules i never heard of before, but it did eventually build the requisite files. But as it turns out, that doesn't matter because Godot currently has no way to actually implment those generated files within it's own database, for GDExtensions. The generated HTML docs look quite nice though, so if anyone else was having problems getting it to generate from XML, maybe have a look. I had to change a couple things to get it to work, mostly adding a class.rst file on level above the docs xml.

*



*

0 comments on commit 61594a4

Please sign in to comment.