Code Monkey home page Code Monkey logo

terrain-tool-godot4's People

Contributors

furtherorbit avatar kalysti avatar sythelux avatar valkyrienyanko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terrain-tool-godot4's Issues

Terrain Generation not working, Just square mesh

Describe the bug
When I generate terrain I just get a tiny square, no matter what I do I cant get anything but the square, and importing heightmaps seem to not work. Sometimes when I exit the scene and return to it it causes the program to lag, even crash.

To Reproduce
Steps to reproduce the behavior:

  1. place down a Terrain3D
  2. create terrain
  3. click on ok on create terrain

Expected behavior
Terrain to appear and being able to use the tool with a visual indication like a circle on the terrain

Screenshots
https://ibb.co/McQ85QD
https://ibb.co/k5RX9x1

Desktop (please complete the following information):

  • OS: Windows 11
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Rework to GlobalClasses

Godot 4.1 now supports GlobalClasses AKA Resources, we can use this to make adding Terrain3D Node more context sensitive.

Lots of errors when import the addons file

Describe the bug:
As soon as I import the 'Addons' folder in the FileSystem my debugger get few errors.

Errors:
`

  • res://addons/TerrainPlugin/Shader/VisualShaderNodeNoisePerlin2D.gd:63 - Parse Error: The function signature doesn't match the parent. Parent signature is "_get_global_code(Shader.Mode) -> String".
  • res://addons/TerrainPlugin/Shader/VisualShaderNodeNoisePerlin2D.gd:111 - Parse Error: The function signature doesn't match the parent. Parent signature is "_get_code(Array[String], Array[String], Shader.Mode, VisualShader.Type) -> String".
  • No loader found for resource: res://addons/TerrainPlugin/TerrainPlugin.cs.`

Desktop:

OS: Windows 10

Additional context:
I'm using Godot 4.1

Cannot enable plugin

Describe the bug
Cannot open TerrainPlugin.cs when enabling the plugin

To Reproduce
Steps to reproduce the behavior:

  1. Install plugin from asset lib
  2. Move all files to addons/terrain
  3. Enable plugin in project settings

Expected behavior
Enabled plugin

Screenshots
image

Desktop (please complete the following information):

  • Windows 10

Additional context
Godot 4 mono and .net 6 are installed

Character doesn't move

This doesn't work in Godot 4 Alpha 7. Needs to also set_velocity(motion_velocity) prior to calling move_and_slide(), and define var motion_velocity = Vector3.ZERO at the top of the ThirdPersonController script.

Edit: This was intended for the ThirdPerson Character Controller. But it won't let me delete it. Feel free to just close this.

Cannot install with Godot 4.0 Beta 2 release

Describe the bug
When installing from AssetLib the files are downloaded into the root directory of the project and is not shown in the plugins tab in settings. Cloning from Github into addons/TerrainPlugin results in 'Unable to load addon script from path: 'res://addons/terrain-tool-godot4/TerrainPlugin.cs'. This might be due to a code error in that script. Disabling the addon at 'res://addons/terrain-tool-godot4/plugin.cfg' to prevent further errors.'

To Reproduce
Steps to reproduce the behavior:

  1. Install Godot 4.0 Beta 2 (Mono)
  2. Open project
  3. Install Terrain plugin from either the AssetLib or from Github directly
  4. See error

Expected behavior
Plugin is shown in Plugins tab in settings, enabling results in no errors.

Screenshots
image

Desktop (please complete the following information):

  • OS: Arch Linux, Kernel 5.19.12-arch1-1
  • Browser: Firefox

Additional context
Output of terminal: ERROR: Transient parent has another exclusive child. at: set_visible (scene/main/window.cpp:470)

Gdscript APIs for run time terrain manipulation

**Is your feature request related to a problem?
To generate and manipulate terrain during gameplay

Describe the solution you'd like
A nice set of Gdscript APIs like

Terrain.RiseHeight(x,y)
Terrain.AddDetail(x,y)

Seems C# has API breaking changes

Describe the bug
Using Godot 4.1 dev 3
The Godot C# API has been updated in a way that cases compilation issues.

To Reproduce
Steps to reproduce the behavior:
Download the project, build it and get hundreds of errors

Expected behavior
No build errors

To be real, I started fixing them and realized I may need about a 1 or 2 days to fix them.

If this project is still active, I'll do what I can to fix all the compilation errors and even work on the project.
What's the state of this being moved to C++ core?

Cant enable the plugin...

Describe the bug
When I try to enable the plugin the engine just shows a popup that says:
"Unable to load addon script from path: 'res://addons/TerrainPlugin/TerrainPlugin.cs'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/TerrainPlugin/plugin.cfg' to prevent further errors."

Desktop (please complete the following information):

  • OS: Windows 10
  • Engine: Godot 4.0
  • Version of the plugin: 1.0

Can't enable it (different error even after fix)

Describe the bug
Getting an error when trying to enable it:

ERROR: Transient parent has another exclusive child.
   at: (scene/main/window.cpp:712)

To Reproduce
Steps to reproduce the behavior:

  1. Follow install instructions
  2. Try to enable it
  3. See error

Expected behavior
No error

Desktop (please complete the following information):

  • OS: Windows 10 64bit
  • Godot Engine v4.0.beta17.mono.official.c40020513

Additional context
Using @Sythelux 's #23

"educated Guess" for Create a Terrain Popup.

The Popup has 2 Fields, which are about the heightmap image (see provided pic).

image

when I choose the wrong heightmap algo the "create" button will throw an error. So there seems to be a way to decide which heightmap algos are suitable for a provided pic or not. We should filter heightmap algos out, that are not possible with the provided image.

(my guess is, that there is only one algorithm possible and we can drop the field anyway and reduce confusion)

Rework Shader Node Generation

in addons/TerrainPlugin/Shader are a bunch of GDScripts for shader nodes. We now can use C# to write those and can improve on the code-generation. So I suggest we do as quality of life.

Cannot be enabled in Godot 4 Alpha 11

At the risk of you saying this project is abandoned (totally understandable), I'm letting you know that this plugin cannot be enabled in the latest Godot alpha. No error is provided, other than a dialog box saying it cannot be enabled.

application crash, when trying to load MapBox or map with more than 1 patch

Describe the bug
When I add my Terrain3D and try to load a map and set the patch size x or y to be above 1 the whole editor crashes after a while. The same thing happens, when I try to load a terrain from mapbox

I tried to troubleshoot it with removing and readding code and can't seem to get it to stop. I suppose it has something to do with multiple Patches using the same Material and accessing the same material ID?

It could also be currently buggy, that we hand down the image by ref. I really have no idea. This stuff is pretty much to high for my knowledge level.

To Reproduce
Steps to reproduce the behavior:

  1. see above
  2. after a while (usually after a few hundred milliseconds) the editor crashes

Expected behavior
The Editor continues to run and renders the chunks

Desktop (please complete the following information):

  • OS: PopOS 22.04
  • Engine +version: v4.0.beta.mono.custom_build (e93251e6f96cff29cfc9faed525a496e1d436363)
  • (the same happens with Godot 4 beta 2

Additional context
I have the a stack trace here, but it isn't really helpful.

ERROR: FATAL: Condition "!Object::cast_to<RefCounted>(p_ptr)" is true.
   at: godotsharp_internal_refcounted_disposed (modules/mono/glue/runtime_interop.cpp:155)

================================================================
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.0.beta.mono.custom_build (e93251e6f96cff29cfc9faed525a496e1d436363)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/dotnet/dotnet6-6.0.109/shared/Microsoft.NETCore.App/6.0.9/libcoreclr.so(+0x4b536e) [0x7f1467cb536e] (??:0)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f14a3642520] (??:0)
[3] /opt/Godot/Godot_v4-master_x11_64/godot.linuxbsd.editor.x86_64.llvm.mono(+0xc9880f) [0x5610f282c80f] (??:0)
[4] [0x7f13f0544d5d] (??:0)
-- END OF BACKTRACE --

Documentation of how to use tool

Not really a feature request, or a bug (at least as far as I can tell). I think I just couldn't figure out how to use the tool to use the terrain brush. Is it possible to add some more details on how to go about using your tool?

I was able to enable it thanks to the c# compile trick from another issue. But, I couldn't really get the tool to do anything after generating a mesh. Thanks for any help! Keep up the good work. A good terrain editor is really what's missing from Godot.

Terrain texture is not rendering

Describe the bug
After generating the terrain doesn't have a texture.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Terrain3D node to the scene
  2. Set a texture and the default shader
  3. go to the Terrain button and create a terrain.
  4. Choose a heightmap and click ok

Expected behavior
after a click on "ok" the terrain should be visible with the default texture as rendered texture.

Desktop

  • OS: PopOS 22.04
  • Engine version: Godot Engine v4.0.beta.mono.custom_build (e93251e6f96cff29cfc9faed525a496e1d436363)

Plugin cannot be activated in Godot 4 beta 8

Describe the bug

To Reproduce
I have created a new empty project and immediately downloaded the plugin without issues, plugin data are in the res:// folder but the plugin is not visible in the Project settings -> Plugins to activate

Output contains:
Godot Engine v4.0.beta8.official (c) 2007-2022 Juan Linietsky, Ariel Manzur & Godot Contributors.
modules/gltf/register_types.cpp:99 - FBX file import is enabled in the project settings, but no FBX2glTF path is configured in the editor settings. FBX files will not be imported.
Transient parent has another exclusive child.
--res://Shader/TerrainVisualShader.tres::34--
1 | shader_type spatial;
2 | render_mode depth_draw_always;
3 |
E 4-> uniform sampler2D Layer_1 : hint_albedo;
5 | uniform sampler2D Layer_1_Dis : hint_albedo;
(...)
630 | }
631 |
res://Shader/TerrainVisualShader.tres::34:4 - Expected valid type hint after ':'.
Shader compilation failed.

Issue appeared in Godot 4 beta 6 and beta 8
Issue does not appear in 3.5.1 stable on the same computer

OS: Fedora 37
Terrain_editor_bug.odt

Thank you for checking

Add more Tags to Project

To improve discoverability we could add a couple more tags to the about on the right side:

cshar, godotengine, mapbox, heightmap, godot4

Use with Godot 4.0.beta1.mono

Hi I tried to use the plugin with the lastest beta of godot that has support for C#, but it fails to enable, and gives severals compilation errors. Is it supported yet, or am I missing some steps? Thank you :)

Terrain tools do nothing

Describe the bug
Testing this with latest Godot, the terrain is loaded fine, but the tools do not nothing.

Nothing shows up above the terrain when using the tools and clicking on the terrain has no effect.

To Reproduce
Steps to reproduce the behavior:
Load Terrain3D.tscn and click the Terrain3D node.

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux

PSA: Will no longer load in Godot 4 (Beta 3)

I know this isn't formated all that good, but i just wanted to quickly document it.

Just letting everyone (Including devs) know

The error message was trimed to errors only because github said it was too long. i can upload in a text file if needed.

C:\Users\nixgo\Documents\FPS\addons\TerrainPlugin\TerrainGizmoPlugin.cs(203,33): 'EditorNode3DGizmo' does not contain a definition for 'GetSpatialNode' and no accessible extension method 'GetSpatialNode' accepting a first argument of type 'EditorNode3DGizmo' could be found (are you missing a using directive or an assembly reference?)


C:\Users\nixgo\Documents\FPS\addons\TerrainPlugin\TerrainPlugin.cs(370,13): The name 'AddSpatialGizmoPlugin' does not exist in the current context

C:\Users\nixgo\Documents\FPS\addons\TerrainPlugin\TerrainPlugin.cs(890,13): The name 'RemoveSpatialGizmoPlugin' does not exist in the current context

Running:  "C:\Program Files\dotnet\dotnet.EXE" build C:/Users/nixgo/Documents/FPS/FPS.sln -c Debug -v normal -l:GodotTools.BuildLogger.GodotBuildLogger,C:/Users/nixgo/Downloads/Godot_v4.0-beta3_mono_win64/Godot_v4.0-beta3_mono_win64/GodotSharp/Tools\GodotTools.BuildLogger.dll;C:/Users/nixgo/AppData/Roaming/Godot/mono/build_logs\9b10338495af74d4babe7d4cf5956159_Debug -p:GodotTargetPlatform=windows
MSBuild version 17.3.1+2badb37d1 for .NET
Build started 10/14/2022 8:12:07 PM.
     1>Project "C:\Users\nixgo\Documents\FPS\FPS.sln" on node 1 (Restore target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Debug|Any CPU".
       _GetAllRestoreProjectPathItems:
         Determining projects to restore...
       Restore:
         X.509 certificate chain validation will use the default trust store selected by .NET.
         Restoring packages for C:\Users\nixgo\Documents\FPS\FPS.csproj...
         Generating MSBuild file C:\Users\nixgo\Documents\FPS\.godot\mono\temp\obj\FPS.csproj.nuget.g.props.
         Writing assets file to disk. Path: C:\Users\nixgo\Documents\FPS\.godot\mono\temp\obj\project.assets.json
         Restored C:\Users\nixgo\Documents\FPS\FPS.csproj (in 249 ms).
         
         NuGet Config files used:
             C:\Users\nixgo\AppData\Roaming\NuGet\NuGet.Config
             C:\Users\nixgo\AppData\Roaming\NuGet\config\Godot.Offline.Config
             C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
         
         Feeds used:
             https://api.nuget.org/v3/index.json
             C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
     1>Done Building Project "C:\Users\nixgo\Documents\FPS\FPS.sln" (Restore target(s)).
   1:2>Project "C:\Users\nixgo\Documents\FPS\FPS.sln" on node 1 (default targets).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Debug|Any CPU".
   1:2>Project "C:\Users\nixgo\Documents\FPS\FPS.sln" (1:2) is building "C:\Users\nixgo\Documents\FPS\FPS.csproj" (2:6) on node 1 (default targets).
     2>GenerateTargetFrameworkMonikerAttribute:
       Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
       CoreGenerateAssemblyInfo:
       Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
       CoreCompile:
         C:\Program Files\dotnet\dotnet.EXE exec "C:\Program Files\dotnet\sdk\6.0.401\Roslyn\bincore\csc.dll" /noconfig /unsafe- 

       "C:\Users\nixgo\Documents\FPS\FPS.sln" (default target) (1:2) ->
       "C:\Users\nixgo\Documents\FPS\FPS.csproj" (default target) (2:6) ->
       (CoreCompile target) -> 
    
       "C:\Users\nixgo\Documents\FPS\FPS.sln" (default target) (1:2) ->
       "C:\Users\nixgo\Documents\FPS\FPS.csproj" (default target) (2:6) ->
       (CoreCompile target) -> 
         C:\Users\nixgo\Documents\FPS\addons\TerrainPlugin\TerrainGizmoPlugin.cs(203,33): error CS1061: 'EditorNode3DGizmo' does not contain a definition for 'GetSpatialNode' and no accessible extension method 'GetSpatialNode' accepting a first argument of type 'EditorNode3DGizmo' could be found (are you missing a using directive or an assembly reference?) [C:\Users\nixgo\Documents\FPS\FPS.csproj]
         C:\Users\nixgo\Documents\FPS\addons\TerrainPlugin\TerrainPlugin.cs(370,13): error CS0103: The name 'AddSpatialGizmoPlugin' does not exist in the current context [C:\Users\nixgo\Documents\FPS\FPS.csproj]
         C:\Users\nixgo\Documents\FPS\addons\TerrainPlugin\TerrainPlugin.cs(890,13): error CS0103: The name 'RemoveSpatialGizmoPlugin' does not exist in the current context [C:\Users\nixgo\Documents\FPS\FPS.csproj]

    77 Warning(s)
    3 Error(s)

Time Elapsed 00:00:03.28

Plugin spams warning CS8632

0>TerrainPlugin.cs(465,18): Warning CS8632 : The annotation for nullable reference types should only be used in code within a '#nullable' context

I'll also provide a Pull-request in a second as it is my fault all along.

cannot install in beta4

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.