[SOLVED] Screen To World Space gives NaN values


#1

Greetings to the Armory3D users and developers.

I don’t know why “Screen To World Space” gives (NaN, NaN, NaN, 1) values.

The information from Blender3D splash screen is as follows. 2.8 Alpha 2, date: 2018-09-03 21:02, hash: d6978a18, branch: master (modified).

I’ve created logic nodes and attached it to the object in the scene. In logic nodes:

MouseCoords [Coords] -> [Vector] ScreenToWorldSpace [Vector] -> [Value] Print ()
OnMouse [Out] -> [In] Print (
)

I launched Krom Player and have clicked on the scene. So it produced the following log. And I don’t know why ScreenToWorldSpace gave NaN values.

Armory v0.6 ($Id: 850c75e7bd357473d12e3431959aca937bf723eb $)

OS: mac, Target: krom, GAPI: opengl, Blender: 2.80 (sub 21)

Exporting Scene

Scene built in 0.015712976455688477

Exported modules: [‘hscript’, ‘format’]

Shader flags: [’_Irr’, ‘_EnvTex’, ‘_EnvLDR’, ‘_EnvStr’, ‘_LDR’]

Running: [’/Users/dmitryshm/Desktop/work/Armory_05_mac_b28/blender.app//armsdk//nodejs/node-osx’, ‘/Users/dmitryshm/Desktop/work/Armory_05_mac_b28/blender.app//armsdk//Kha/make’, ‘krom’, ‘-g’, ‘opengl’, ‘–shaderversion’, ‘330’, ‘–parallelAssetConversion’, ‘4’, ‘–to’, ‘build_room/debug’]

Using project from /Users/dmitryshm/Desktop/work/Flower-A/room3

Using Kha from /Users/dmitryshm/Desktop/work/Armory_05_mac_b28/blender.app/armsdk/Kha

Creating Kha project.

Exporting asset 1 of 24 (Scene.arm).

Exporting asset 2 of 24 (Arm_irradiance.arm).

Exporting asset 3 of 24 (HDR0024_paris_alley_hdri_sphere_tone_S_irradiance.arm).

Exporting asset 4 of 24 (HDR0024_paris_alley_hdri_sphere_tone_S_radiance.jpg).

Exporting asset 5 of 24 (mesh_Circle.arm).

Exporting asset 6 of 24 (mesh_Cube.001.arm).

Exporting asset 7 of 24 (mesh_Cube.002.arm).

Exporting asset 8 of 24 (mesh_Cube.004.arm).

Exporting asset 9 of 24 (mesh_Mesh.001.arm).

Exporting asset 10 of 24 (mesh_Mesh.002.arm).

Exporting asset 11 of 24 (mesh_Mesh.003.arm).

Exporting asset 12 of 24 (mesh_Mesh.arm).

Exporting asset 13 of 24 (mesh_Plane.arm).

Exporting asset 14 of 24 (mesh_Sphere.001.arm).

Exporting asset 15 of 24 (mesh_Sphere.002.arm).

Exporting asset 16 of 24 (mesh_Sphere.003.arm).

Exporting asset 17 of 24 (mesh_Sphere.004.arm).

Exporting asset 18 of 24 (mesh_Sphere.005.arm).

Exporting asset 19 of 24 (mesh_Sphere.006.arm).

Exporting asset 20 of 24 (mesh_Sphere.007.arm).

Exporting asset 21 of 24 (mesh_Sphere.008.arm).

Exporting asset 22 of 24 (mesh_Sphere.009.arm).

Exporting asset 23 of 24 (mesh_Sphere.010.arm).

Exporting asset 24 of 24 (mesh_Sphere.arm).

Exporting asset 1 of 6 (DarkLaminat_data.arm).

Exporting asset 2 of 6 (Material_Ceiling_Ceiling_temp_data.arm).

Exporting asset 3 of 6 (pot2_data.arm).

Exporting asset 4 of 6 (shader_datas.arm).

Exporting asset 5 of 6 (soil_data.arm).

Exporting asset 6 of 6 (table_brown_for_blue_data.arm).

Exporting asset 1 of 1 (HDR0024_paris_alley_hdri_sphere_tone_S.jpg).

Exporting asset 1 of 1 (TexturesCom_ConcreteStucco0179_1_seamless_S.jpg).

Exporting asset 1 of 1 (TexturesCom_OrnamentsMoorishStucco0036_1_seamless_S.jpg).

Exporting asset 1 of 1 (TexturesCom_OrnamentsMoorishStucco0036_1_seamless_S_bump.jpg).

Exporting asset 1 of 1 (cracked1-bump.jpg).

Exporting asset 1 of 1 (cracked1.jpg).

Exporting asset 1 of 1 (dark-laminat-bump.jpg).

Exporting asset 1 of 1 (dark-laminat.jpg).

Exporting asset 1 of 1 (table-brown-for-blue.png).

Compiling shader 1 of 13 (DarkLaminat_mesh.frag.glsl).

Compiling shader 2 of 13 (DarkLaminat_mesh.vert.glsl).

Compiling shader 3 of 13 (Material_Ceiling_Ceiling_temp_mesh.frag.glsl).

Compiling shader 4 of 13 (Material_Ceiling_Ceiling_temp_mesh.vert.glsl).

Compiling shader 5 of 13 (pot2_mesh.frag.glsl).

Compiling shader 6 of 13 (pot2_mesh.vert.glsl).

Compiling shader 7 of 13 (pot2_shadowmap.frag.glsl).

Compiling shader 8 of 13 (pot2_shadowmap.vert.glsl).

Compiling shader 9 of 13 (soil_mesh.frag.glsl).

Compiling shader 10 of 13 (table_brown_for_blue_mesh.frag.glsl).

Compiling shader 11 of 13 (table_brown_for_blue_shadowmap.vert.glsl).

Compiling shader 12 of 13 (world_pass.frag.glsl).

Compiling shader 13 of 13 (world_pass.vert.glsl).

Compiling shader 1 of 8 (painter-colored.frag.glsl).

Compiling shader 2 of 8 (painter-colored.vert.glsl).

Compiling shader 3 of 8 (painter-image.frag.glsl).

Compiling shader 4 of 8 (painter-image.vert.glsl).

Compiling shader 5 of 8 (painter-text.frag.glsl).

Compiling shader 6 of 8 (painter-text.vert.glsl).

Compiling shader 7 of 8 (painter-video.frag.glsl).

Compiling shader 8 of 8 (painter-video.vert.glsl).

Done.

Finished in 3.895359992980957

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 399

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

GL Error 1286 /Users/lubos/Downloads/Krom/Kore/Backends/Graphics4/OpenGL/Sources/Kore/OpenGL.cpp 275

armory.logicnode.PrintNode:12: (-6.127199470431473, -119.20573695774241, 22.632799801920846, 1

armory.logicnode.PrintNode:12: (NaN, NaN, NaN, 1

armory.logicnode.PrintNode:12: (NaN, NaN, NaN, 1


#2

There’s error in the logic, so in first time ScreenToWorldSpace’s giving correct values but then everything is filled by NaNs.


#3

Open a github issue, better if you can add some example project.