MonkeyFirst / Urho3D_GeomBeamLight

geometry beam light shader for Urho3d (WIP / OpenGL and DX11 Supports )
MIT License
3 stars 1 forks source link

loading level1.xml #1

Open pax7 opened 7 years ago

pax7 commented 7 years ago

Can you please provide a simple guide to load level1.xml with the editor? For some reason all I see is this:

The only thing I changed on my end was making the floor Stone.xml instead of BlockWithEnv.xml .

image

MonkeyFirst commented 7 years ago

hmm it's looks weird... maybe you may take a look on log file? just for the figure out what actually happening on level loading. probably there is exist some error related with shader code or something else. take a look at the end of this file C:\Users\home-pc\AppData\Roaming\urho3d\logs\Editor.log

pax7 commented 7 years ago

Maybe I need to somehow force it into opengl mode? I'm on Windows 10.

Here is the log:

[Sun Nov 12 10:36:32 2017] INFO: Opened log file C:/Users/pax/AppData/Roaming/urho3d/logs/Editor.as.log [Sun Nov 12 10:36:32 2017] INFO: Created 9 worker threads [Sun Nov 12 10:36:32 2017] INFO: Added resource path D:/dev/Urho3D_VS2015/bin/Data/ [Sun Nov 12 10:36:32 2017] INFO: Added resource path D:/dev/Urho3D_VS2015/bin/CoreData/ [Sun Nov 12 10:36:32 2017] INFO: Added resource path D:/dev/Urho3D_VS2015/bin/Autoload/LargeData/ [Sun Nov 12 10:36:32 2017] INFO: Created Direct3D9 device [Sun Nov 12 10:36:32 2017] INFO: Set screen mode 3840x2093 windowed monitor 0 resizable [Sun Nov 12 10:36:32 2017] INFO: Initialized input [Sun Nov 12 10:36:32 2017] INFO: Initialized user interface [Sun Nov 12 10:36:32 2017] INFO: Initialized renderer [Sun Nov 12 10:36:32 2017] INFO: Set audio mode 44100 Hz stereo interpolated [Sun Nov 12 10:36:32 2017] INFO: Initialized engine [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorTerrain.as:484,5 Compiling void TerrainEditor::UpdateTerrainRaiseLower(Image@, IntVector2, TerrainEditorUpdateChanges@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorTerrain.as:503,27 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorTerrain.as:505,31 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorTerrain.as:526,5 Compiling void TerrainEditor::UpdateTerrainSmooth(Image@, IntVector2, TerrainEditorUpdateChanges@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorTerrain.as:541,27 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorTerrain.as:543,31 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorTerrain.as:588,5 Compiling void TerrainEditor::UpdateTerrainSetHeight(Image@, IntVector2, TerrainEditorUpdateChanges@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorTerrain.as:605,27 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorTerrain.as:607,31 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorScene.as:1128,1 Compiling uint SceneFindChildIndex(Node@, Node@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorScene.as:1136,12 Implicit conversion changed sign of value [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorScene.as:1139,1 Compiling uint SceneFindComponentIndex(Node@, Component@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorScene.as:1147,12 Implicit conversion changed sign of value [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:91,1 Compiling void UpdateOrigins() [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:98,59 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:133,37 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:160,33 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:193,51 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:204,1 Compiling bool isThisNodeOneOfSelected(Node@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:208,23 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:217,1 Compiling void ShowSelectedNodeOrigin(Node@, int) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:236,28 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:254,1 Compiling void CreateOrigin(int, bool = false) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:256,29 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:284,1 Compiling void MoveOrigin(int, bool = false) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:286,29 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:329,1 Compiling bool IsSceneOrigin(UIElement@) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:333,21 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewSelectableOrigins.as:371,1 Compiling String NodeInfo(Node&inout, int) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewSelectableOrigins.as:385,27 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewPaintSelection.as:46,1 Compiling void UpdatePaintSelection() [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewPaintSelection.as:53,67 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewPaintSelection.as:74,110 Float value truncated in implicit conversion to integer [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewPaintSelection.as:74,60 Float value truncated in implicit conversion to integer [Sun Nov 12 10:36:32 2017] INFO: Scripts/Editor/EditorViewPaintSelection.as:118,1 Compiling void SelectOriginsByPaintSelection(IntVector2, float, bool = true) [Sun Nov 12 10:36:32 2017] WARNING: Scripts/Editor/EditorViewPaintSelection.as:122,21 Signed/Unsigned mismatch [Sun Nov 12 10:36:32 2017] INFO: Compiled script module Scripts/Editor.as [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("Import animation...") not found translation, language="en" [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("Inverse Kinematics") not found translation, language="en" [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("Terrain editor") not found translation, language="en" [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("ShowOrigin") not found translation, language="en" [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("RibbonTrail") not found translation, language="en" [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("Shader compile defines") not found translation, language="en" [Sun Nov 12 10:36:32 2017] WARNING: Localization::Get("Shader compile defines") not found translation, language="en" [Sun Nov 12 10:36:37 2017] INFO: Loading scene from D:/dev/Urho3D_VS2015/bin/Data/Scenes/level0.9.xml [Sun Nov 12 10:36:41 2017] ERROR: Could not find resource Shaders/HLSL/GeomBeamSpotlight.hlsl [Sun Nov 12 10:36:41 2017] ERROR: Technique Techniques/GeomBeamSpotlightsAdd.xml has missing shaders

MonkeyFirst commented 7 years ago

well, this shader available only for OpenGL-Renderer (for while) but as I see from your logs, you use DX-renderer, so that's why you got this error you may try to build engine with GL renderer option in CMAKE.

pax7 commented 7 years ago

Thanks that sounds like my problem :).

pax7 commented 7 years ago

Here is some new info: The original VolumetricsSpotlights.glsl renders something, interestingly with the latest urho 1.7 version I don't see the beam disappearing from certain angles.

However, the latest GeomBeamSpotlight.glsl commits are not doing anything. Is there something that you may have set in your environment that is somehow not captured in the repo?

Even more info: I tried every commit and here is what I found commit: f84e591 works on my end (urho editor and urhosharp) everything after and including 7f757e7 doesn't for some reason - I don't know what could be different to make the shader not work - also the running log doesn't show any errors.

pax7 commented 7 years ago

Even more info:

Failed to compile vertex shader GeomBeamSpotlight(): ERROR: 0:81: 'clamp' : no matching overloaded function found ERROR: 0:82: 'clamp' : no matching overloaded function found

something tells me these may be related (I got these when deploying to Android)

EDIT: It also can't seem to know about transpose when I use VolumetricsSpotlights.glsl which works on the desktop. Is this shader not really supposed to work on Android?

MonkeyFirst commented 7 years ago

I tested this shader only on my PC with Nvidia. Anyways I checked specs for GL ES 2.0 and find that clamp (in-build function) also included into specs even on GL ES. So I do not know why it have problem with clamp function. May be if it will be replaced with min / max, this help some how to compile shader on android device. I updated repo with shader so you may try it's again. Alos you need use proper RenderPath with Depth RT that allowed read in PS. So you need use one of these RenderPaths. 123


    virtual void Setup()
    {
...
        engineParameters_[EP_RENDER_PATH] = "CoreData/RenderPaths/ForwardDepth.xml";
...
    }```
pax7 commented 7 years ago

Thanks for the followups @MonkeyFirst I will check this in a few hours when I get home and update this comment with the result. What is weird about not finding 'clamp' was that it couldn't even find 'transpose' in earlier the Volumetric*.glsl in my env. My main test machine is Windows 10 + NVIDIA, and then Android sim and tab;et and iOS sim - all with the latest updates.

Update1: using ForwardDepth makes it work fine when cmake is built with the opengl flag. I am however seething this artefact, the light cone seems to go through the cube, while in your preview image it seems to be blocked (lease feel free to correct me if I'm interpreting this wrong or if there are other render path selections I need to make. image

MonkeyFirst commented 7 years ago

the light go through the cube

this is normal situation for this kind of fakes of light. the volumetric light with raytracing shadow map to cut out falling light and this geom beam (fake) - it's different things. mb someday I write volumetric light (with SM's ray tracing), but for now only this fake )

pax7 commented 7 years ago

Don't get me wrong, it looks really good! Hopefully the shader compilation issue i am having is something temporary in urhosharp+android. I haven't checked iOS yet. I'll let you know once it's working.