Zylann / godot_heightmap_plugin

HeightMap terrain for Godot implemented in GDScript
Other
1.74k stars 159 forks source link

terrain black missing texture classic4 shader does not show mesh shadows #224

Open ghost opened 3 years ago

ghost commented 3 years ago

editor_screenshot_2020-12-17T183051+0300

Godot Engine v3.2.3.stable.mono.official (c) 2007-2020 Juan Linietsky, Ariel Manzur & Godot Contributors. --- GDScript language server started --- Can't open dynamic library: D:/Godot/Projects/3dTuts/addons/zylann.hterrain/native/bin/win64/hterrain_native.dll, error: Error 126: The specified module could not be found. . modules/gdnative/gdnative.cpp:501 - No valid library handle, can't get symbol from GDNative object modules/gdnative/nativescript/nativescript.cpp:1506 - No nativescript_init in "res://addons/zylann.hterrain/native/bin/win64/hterrain_native.dll" found Switch Scene Tab res://addons/zylann.hterrain/native/factory.gd:27 - Attempt to call function 'new' in base 'NativeScript' on a null instance. core/image.cpp:1894 - Loaded resource as image file, this will not work on export: 'res://assets/terrain/normal.png'. Instead, import the image file as an Image resource and load it normally as a resource. core/image.cpp:1894 - Loaded resource as image file, this will not work on export: 'res://assets/terrain/splat.png'. Instead, import the image file as an Image resource and load it normally as a resource. core/image.cpp:1894 - Loaded resource as image file, this will not work on export: 'res://assets/terrain/splat2.png'. Instead, import the image file as an Image resource and load it normally as a resource. core/image.cpp:1894 - Loaded resource as image file, this will not work on export: 'res://assets/terrain/splat3.png'. Instead, import the image file as an Image resource and load it normally as a resource. core/image.cpp:1894 - Loaded resource as image file, this will not work on export: 'res://assets/terrain/splat4.png'. Instead, import the image file as an Image resource and load it normally as a resource. core/image.cpp:1894 - Loaded resource as image file, this will not work on export: 'res://assets/terrain/color.png'. Instead, import the image file as an Image resource and load it normally as a resource. res://addons/zylann.hterrain/hterrain_data.gd:885 - Invalid call. Nonexistent function 'get_red_range' in base 'Nil'. res://addons/zylann.hterrain/hterrain_data.gd:875 - Invalid get index 'x' (on base: 'Nil').

ghost commented 3 years ago

Capture

Recently i updated my OS to windows 8.1 is there any library Or missing files i need to install and GD-Natives need it to work . hterrain_native.dll ?

Zylann commented 3 years ago

The dll should clearly be present here: https://github.com/Zylann/godot_heightmap_plugin/tree/master/addons/zylann.hterrain/native/bin/win64 Do you have it?

I never tested it on Windows 8.

Is your OS 32-bit? Is your Godot version 32-bit? Does it work with a non-mono version of Godot?

About the black square, how did you make it happen? I believe it was fixed in master. You can try downloading it from Github directly, or wait until I upload the first patch release to the asset library.

ghost commented 3 years ago

i have the dll file in windows 7 the plugin work fine its 64X OS no Godot_v3.2.3-stable_mono_win64 i did not try the non mono version About the black square, how did you make it happen? this is the big question it was work fine at first . but when i lunch godot its say Capture also note the flat white terrain when lunching the editor . the node tree is empty?????????????????? do i need to install any c++ or python library

Zylann commented 3 years ago

The DLL not loading does not necessarily mean the plugin won't work, it only means the plugin will be slower at doing some operations. But in your case it might be problematic, it seems your OS's runtime straight up doesn't support the dll. I have no clue what Windows 8 requires specifically. Godot does not even allow to setup a library per version of the OS (also Windows 8 is really not the most popular version of Windows). If you really want to keep using Windows 8 (instead of 7 or 10) maybe you can try turning off the GDNative component by editing this file: https://github.com/Zylann/godot_heightmap_plugin/blob/e18ebe26edffb5bab7281e6347f8f49f78eab8b4/addons/zylann.hterrain/native/factory.gd#L7 Comment out Windows, and restart Godot.

note the flat white terrain when lunching the editor . the node tree is empty??????????????????

I don't see anything in your screenshot. The scene is empty. There isn't even a terrain visible here.

ghost commented 3 years ago

Capture

I ts work but so many errors an terrain missing clusters
you just awesome how did you write all this wow your plugin is better than unity terrain system

Zylann commented 3 years ago

The errors happen because the plugin failed to load the GDNative component. For some reason Windows 8 specifically fails to load the dll for reasons beyond my understanding. For now you can workaround this by turning off the component https://github.com/Zylann/godot_heightmap_plugin/issues/224#issuecomment-747669412

ghost commented 3 years ago

Capture that did not fix any thing it still say Can't open dynamic library: but what the job of that gdnative component

what you meant by saying this "Godot does not even allow to setup a library per version of the OS "

Zylann commented 3 years ago

The error might still be printed only because Godot parses the .gdnlib file even if the plugin in no longer loads the library. But it should be harmless. Commenting out Windows is only to make sure that the plugin won't attempt to use it.

what the job of that gdnative component

It makes some operations faster. If it's not available, it will fallback to GDScript, which is slower.

what you meant by saying this "Godot does not even allow to setup a library per version of the OS "

In GDNative resources Godot allows us to specify a library for each platform: Windows, Linux, OSX, 32 and 64 bits. But there is no way to specify a library for "Windows 7", "Windows 8" and "Windows 10". There is only "Windows". So there can be only one version of the library on all Windows platforms. The library shipped in the plugin is known to work on Windows 10 64 bits, and apparently Windows 7 64 bits too.

ghost commented 3 years ago

good afternoon awesome Zylann i fixed the GD-native library by first installing this update https://www.microsoft.com/en-us/download/details.aspx?id=42335 using windows update . and also install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads and install Microsoft .NET Framework 4.7 Developer Pack and Language Packs (because im using c#) https://www.microsoft.com/en-us/download/confirmation.aspx?id=55168

my graphic card Intel hd4000 i tried all the terrain Shaders 1- classic4 lite work fine but with out normal maps textures looks from previous generation
classic4 lite

2- Classic4 work with out shadows but texture looks better than lite version

classic4

3- low poly work fine lowPoly

4- Array shadows work fine but texture paint brush does not work its just apply the first texture in the array Array

5- multi split lite -does not work splate lite

6 - multi split - crash my GPU for second splate

Zylann commented 3 years ago

Looks like your graphics card doesn't like this shader at all. Not sure if I can do anything about it.

If you want to use normalmaps you may try non-lite classic4.

ghost commented 3 years ago

but non-lite classic4 work without shadows see the second picture why you can not do anything about it you the one wrote the shaders right ! why your terrain system is not part of the engine system yet . its big task for single person >your license is MIT ?

Calinou commented 3 years ago

why your terrain system is not part of the engine system yet . its big task for single person >your license is MIT ?

It's hard to do terrain "right". If we have a terrain system in the core engine, people would be reliant on the engine developers to improve it. This is why integrating a terrain system isn't a priority for 4.0. See https://github.com/godotengine/godot-proposals/issues/445.

Zylann commented 3 years ago

Honestly I am very inclined to think that this is a graphics card issue. classic4 and shadows support have nothing in common. Shadows should have worked regardless, so I think this is caused by a bad GLES3 driver, or eventually a bug in Godot's renderer... it could also be that a limit of [something] is getting reached (too many texture samplers?) but not getting reported at all. If that's the case it would means your graphics card is only suited for the lite shader (which is why there is choice of shader after all).