[SOLVED] Reason for Black Screen

I’m trying to understand the reason for the black screen
I looked at this thread, as well as this, but neither of those seem to help.

It’s puzzling, because The examples run fine, without that issue, but once I start a project from scratch, I get a black screen.
The thing is, I don’t always get a black screen… maybe 9 times out of 10, and that 1 time becomes the 10th time, when I restart Blender.

I tried enabling and disabling “Legacy Shaders”, but that made no difference. Except that I got this…

Error compiling to GLSL ES 100: Unsigned integers are not supported on legacy targets.

when running an example in the browser, having “Legacy Shaders” enabled.
I don’t get the error with “Legacy Shaders” disabled, but the screen is black.

I really would like to get this solved, and move on, so it’s really frustrating me.
I’d appreciate any possible solutions. Thanks.

1 Like

Hi. A slightly dumb question from me, but have you tried clearing your project cache?

Well, am I allowed to ask a dumb question… Why did that solve the problem? :grin:

Yes, that worked, so your question was a good one.
I guess an example or two, uses a different glsl version, which doesn’t work with the latest renderer?

I’m not sure of the technical reason why you were getting GLSL errors, but the cache can cause problems at runtime because the cache is attempting to access or set data that no longer exists.

To prevent this problem more in the future, you might consider disabling the cache setting. Be aware that not caching results may result in much more loading times, because it has to compile everything again.

1 Like

Okay.
What about the browser?

Do you have any idea why the screen is black in the browser.
I don’t know how to use a different browser without changing my default browser. Are there settings for doing so in Armory.

I’m using Internet Explorer.

Please check your browser’s console for errors. Most browsers have F12 to open their console.

To my knowledge, no, at least not without modifying the Armory add-on’s source. Maybe open a feature request on Github and request a feature where we can state a custom browser (not just default browser). Similar to how the Armory add-on allows custom choosing of a text editor.

Once your run your project in a browser, and you don’t exit Blender, the created localhost should remain active, allowing you to simply copy-paste the localhost URL of your compiled HTML5 project: you can find the URL in your default browser when it opens with your compiled project.

1 Like

Thanks a lot.
The project worked well in Firefox (no black screen).
I guess Internet Explorer settings may need adjusting, but I won’t worry with that.
I’m happy, to get past that problem. :smiley:

I suspect your Edge browser has cached the export build as well. Try refreshing after attempting to clear your cache.

image

Yes, but you need to set an environment variable for this: Custom play launch commands by tong · Pull Request #2605 · armory3d/armory · GitHub.

As for using Internet Explorer, I guess one can expect that things don’t run as smoothly there. Kha has some IE specific code, but I think it’s not tested very well and I’m not sure if anyone still cares about it… I wouldn’t be surprised if Rob (the Kha developer) decides to drop support for it now that Microsoft doesn’t support it anymore.

2 Likes

We should document this. I don’t think it is.

1 Like

I don’t know what that did to my system, but after setting

ARMORY_PLAY_HTML5=…\FirefoxPortableDeveloper\FirefoxPortable.exe

and running Play, Blender froze. In fact, everything froze.
I had to do a hard reset.
After boot up, Blender would not open, but the console error message read…

Failed to replace function free in module ucrtbase.dll

A solution on this page - set TBB_MALLOC_DISABLE_REPLACEMENT = 1 got Blender running again, but I didn’t like whatever happened there, so I did a system restore to set things as they were before.

Not going to try that again. :disappointed_relieved:

The browser arguments, as well as a few examples are now listed at the Armory documentation. Special thanks to @tong for documenting the new content there.

1 Like

My Krom starts with a completely black screen:

Armory v2023.5 ($Id: 43f52a020640b369ccfc1460a76441784112c675 $)
Blender: 3.3.7, Target: krom, GAPI: direct3d11
Saved: 'D:\Game_Jam]\Assets_Mobile\Tutorial_Armory\build_TutorialArmory\compiled\Assets\envmaps\env_World.jpg'
 Time: 00:00.41 (Saving: 00:00.01)

CMFT info: Converting latlong image to cubemap.
CMFT info: Saving spherical harmonics coefficients to D:\Game_Jam]\Assets_Mobile\Tutorial_Armory\build_TutorialArmory/compiled/Assets/envmaps/env_World_irradiance.c
CMFT info: Done.
['D:\\Program Files\\armsdk/lib/armory_tools/cmft/cmft.exe', '--input', 'D:\\Game_Jam]\\Assets_Mobile\\Tutorial_Armory\\build_TutorialArmory/compiled/Assets/envmaps/env_World_radiance.jpg', '--filter', 'radiance', '--dstFaceSize', '128.0', '--srcFaceSize', '128.0', '--excludeBase', 'false', '--glossScale', '8', '--glossBias', '3', '--lightingModel', 'blinnbrdf', '--edgeFixup', 'none', '--numCpuProcessingThreads', '4', '--useOpenCL', 'true', '--clVendor', 'anyGpuVendor', '--deviceType', 'gpu', '--deviceIndex', '0', '--generateMipChain', 'true', '--inputGammaNumerator', '1.0', '--inputGammaDenominator', '1.0', '--outputGammaNumerator', '1.0', '--outputGammaDenominator', '1.0', '--outputNum', '1', '--output0', 'D:\\Game_Jam]\\Assets_Mobile\\Tutorial_Armory\\build_TutorialArmory/compiled/Assets/envmaps/env_World_radiance', '--output0params', 'hdr,rgbe,latlong']
CMFT info: Converting latlong image to cubemap.
CMFT info: Resizing source image from 256x256 to 128x128.
CMFT info: Running radiance filter for:
        [srcFaceSize=128]
        [lightingModel=blinnbrdf]
        [excludeBase=false]
        [mipCount=8]
        [glossScale=8]
        [glossBias=3]
        [dstFaceSize=128]
CMFT info: Radiance -> Starting filter...
CMFT info: Radiance -> Utilizing 4 CPU processing threads and NVIDIA GeForce GTX 1060.
CMFT info: Radiance -> ------------------------------------
CMFT info: Radiance ->  Device / Face /     Time /    Total
CMFT info: Radiance -> ------------------------------------
CMFT info: Radiance -> [CPU0]  |    1 |   0.001s |   0.004s
CMFT info: Radiance -> [CPU1]  |    1 |   0.001s |   0.004s
CMFT info: Radiance -> [CPU3]  |    1 |   0.001s |   0.004s
CMFT info: Radiance -> [CPU2]  |    1 |   0.001s |   0.004s
CMFT info: Radiance -> [CPU0]  |    1 |   0.001s |   0.005s
CMFT info: Radiance -> [CPU1]  |    1 |   0.001s |   0.005s
CMFT info: Radiance -> [CPU0]  |    2 |   0.003s |   0.008s
CMFT info: Radiance -> [CPU3]  |    2 |   0.004s |   0.009s
CMFT info: Radiance -> [CPU2]  |    2 |   0.004s |   0.009s
CMFT info: Radiance -> [CPU1]  |    2 |   0.004s |   0.011s
CMFT info: Radiance -> [CPU0]  |    2 |   0.004s |   0.012s
CMFT info: Radiance -> [CPU3]  |    2 |   0.005s |   0.014s
CMFT info: Radiance -> [CPU2]  |    4 |   0.012s |   0.022s
CMFT info: Radiance -> [CPU0]  |    4 |   0.011s |   0.024s
CMFT info: Radiance -> [CPU1]  |    4 |   0.013s |   0.024s
CMFT info: Radiance -> [CPU3]  |    4 |   0.011s |   0.026s
CMFT info: Radiance ->  <GPU>  |  128 |   0.026s |   0.029s
CMFT info: Radiance -> [CPU2]  |    4 |   0.012s |   0.034s
CMFT info: Radiance -> [CPU0]  |    4 |   0.012s |   0.036s
CMFT info: Radiance ->  <GPU>  |  128 |   0.013s |   0.042s
CMFT info: Radiance ->  <GPU>  |  128 |   0.009s |   0.051s
CMFT info: Radiance -> [CPU1]  |    8 |   0.031s |   0.055s
CMFT info: Radiance -> [CPU3]  |    8 |   0.031s |   0.057s
CMFT info: Radiance -> [CPU2]  |    8 |   0.026s |   0.060s
CMFT info: Radiance -> [CPU0]  |    8 |   0.025s |   0.061s
CMFT info: Radiance -> [CPU1]  |    8 |   0.022s |   0.078s
CMFT info: Radiance ->  <GPU>  |  128 |   0.026s |   0.078s
CMFT info: Radiance -> [CPU3]  |    8 |   0.024s |   0.081s
CMFT info: Radiance ->  <GPU>  |  128 |   0.016s |   0.094s
CMFT info: Radiance ->  <GPU>  |  128 |   0.017s |   0.111s
CMFT info: Radiance -> [CPU2]  |   16 |   0.054s |   0.114s
CMFT info: Radiance -> [CPU0]  |   16 |   0.057s |   0.118s
CMFT info: Radiance ->  <GPU>  |   64 |   0.012s |   0.124s
CMFT info: Radiance -> [CPU3]  |   16 |   0.049s |   0.131s
CMFT info: Radiance -> [CPU1]  |   16 |   0.054s |   0.131s
CMFT info: Radiance ->  <GPU>  |   64 |   0.015s |   0.138s
CMFT info: Radiance ->  <GPU>  |   64 |   0.017s |   0.156s
CMFT info: Radiance -> [CPU2]  |   16 |   0.056s |   0.170s
CMFT info: Radiance ->  <GPU>  |   64 |   0.015s |   0.171s
CMFT info: Radiance -> [CPU0]  |   16 |   0.058s |   0.176s
CMFT info: Radiance ->  <GPU>  |   64 |   0.015s |   0.186s
CMFT info: Radiance ->  <GPU>  |   64 |   0.016s |   0.201s
CMFT info: Radiance ->  <GPU>  |   32 |   0.009s |   0.211s
CMFT info: Radiance ->  <GPU>  |   32 |   0.016s |   0.228s
CMFT info: Radiance -> [CPU1]  |   32 |   0.125s |   0.257s
CMFT info: Radiance -> [CPU3]  |   32 |   0.131s |   0.262s
CMFT info: Radiance -> [CPU2]  |   32 |   0.118s |   0.288s
CMFT info: Radiance -> [CPU0]  |   32 |   0.115s |   0.291s
CMFT info: Radiance -> ------------------------------------
CMFT info: Radiance -> Total faces processed on [CPU]: 34
CMFT info: Radiance -> Total faces processed on <GPU>: 14
CMFT info: Radiance -> Total time: 0.291 seconds.
CMFT info: Saving D:\Game_Jam]\Assets_Mobile\Tutorial_Armory\build_TutorialArmory/compiled/Assets/envmaps/env_World_radiance.hdr [HDR 512x256 RGBE LatLong 1-faces 8-mips].
CMFT info: Done.
#512x256
#256x128
#128x64
#64x32
#32x16
#16x8
#8x4
#4x2
#2x1
#1x1
Exporting Scene
Exporting mesh Cube
Scene exported in 0.429s
Exported modules: audio
Shader flags: _Irr, _Rad, _Deferred, _ShadowMap, _CSM, _SinglePoint, _Brdf, _SMAA, _SSAO
Compositor flags: _CToneFilmic
Khafile flags: arm_deferred, arm_csm, rp_hdr, rp_renderer=Deferred, rp_shadowmap, rp_shadowmap_cascade=1024, rp_shadowmap_cube=512, rp_background=World, rp_render_to_texture, rp_compositornodes, rp_antialiasing=SMAA, rp_supersampling=1, rp_ssgi=SSAO
D:\Program Files\armsdk/nodejs/node.exe D:\Program Files\armsdk/Kha/make krom -g direct3d11 --shaderversion 330 --parallelAssetConversion 4 --to build_TutorialArmory/debug
Using Kha (git-error) from D:\Program Files\armsdk\Kha
Creating Kha project.
Exporting asset 1 of 1 (brdf.png).
Exporting asset 1 of 1 (smaa_area.png).
Exporting asset 1 of 1 (smaa_search.png).
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 9.293s
D:\Program Files\armsdk/Krom/Krom.exe D:\Game_Jam]\Assets_Mobile\Tutorial_Armory\build_TutorialArmory/debug/krom D:\Game_Jam]\Assets_Mobile\Tutorial_Armory\build_TutorialArmory/debug/krom-resources --consolepid 7464
DirectInput8 / Pad0 / initialized
DirectInput8 / Pad1 / initialized
Initializing a new default audio device.
..\..\..\..\..\Program Files\armsdk\iron\Sources/iron/data/Data.hx:424: {
        url : Scene.arm,
        error : Could not load blob(s)
}

Moderator edit: formatted the error message above.

Hi, this might be caused by the closing square bracket in the folder called Game_Jam]. You should generally try to avoid special characters in file or folder names since this often leads to weird errors (not only in Armory).