kalysti / terrain-tool-godot4 Goto Github PK
View Code? Open in Web Editor NEWGODOT 4 3D Terrain Editor (C# Plugin)
License: MIT License
GODOT 4 3D Terrain Editor (C# Plugin)
License: MIT License
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):
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
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.
Desktop (please complete the following information):
Describe the bug:
As soon as I import the 'Addons' folder in the FileSystem my debugger get few errors.
Errors:
`
Desktop:
OS: Windows 10
Additional context:
I'm using Godot 4.1
C# file not support it required d script
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:
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):
Additional context
Add any other context about the problem here.
Godot 4.1 now supports GlobalClasses AKA Resources, we can use this to make adding Terrain3D Node more context sensitive.
Describe the bug
After generating the terrain doesn't have a texture.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
after a click on "ok" the terrain should be visible with the default texture as rendered texture.
Desktop
To improve discoverability we could add a couple more tags to the about on the right side:
cshar, godotengine, mapbox, heightmap, godot4
The Popup has 2 Fields, which are about the heightmap image (see provided pic).
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)
**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)
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:
Expected behavior
Plugin is shown in Plugins tab in settings, enabling results in no errors.
Desktop (please complete the following information):
Additional context
Output of terminal: ERROR: Transient parent has another exclusive child. at: set_visible (scene/main/window.cpp:470)
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.
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?
Describe the bug
plugin has depricated types
To Reproduce
Steps to reproduce the behavior:
download plugin
Expected behavior
there should be no error
Additional context
in godot stable change log it says "Rename PORT_TYPE_VECTOR
to PORT_TYPE_VECTOR_3D
" but in some scripts in plugin, PORT_TYPE_VECTOR exists. it needs to change
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:
Expected behavior
No error
Desktop (please complete the following information):
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.
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.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
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):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
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
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:
Expected behavior
The Editor continues to run and renders the chunks
Desktop (please complete the following information):
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 --
Are you working on it? If yes, I might help, or I'm thinking of doing this from scratch
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.
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.
Describe the bug
Cannot open TerrainPlugin.cs when enabling the plugin
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Enabled plugin
Desktop (please complete the following information):
Additional context
Godot 4 mono and .net 6 are installed
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 :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.