Shader Misses and Black Render Textures

0

I have been metaphorically banging my head against a wall with this issue for the past few hours.

All render textures are showing up black in my release build. I have Exported to Engine, ran the paks and shaders .bat files multiple times, and none of this helps solve the problem. I think I am missing some "obvious" setting, but I have run our of other things to try. I think it might be related to all of the shader misses that I have in my project, but I am not sure (I have been forming the shader list by walking through the level; see attached). My level consists of 2 cubes and a plane (2 of which display a UI canvas, the other a movie).

Any ideas for fixing this render texture problem/shader misses problem? Everything works fine in the editor, so I think I might be something in the build process I am missing. I there is any more information I need to provide, let me know (I am running my own project).

EDIT: After following the same build process with SampleProject (which worked fine for the UiIn3DWorld level), I am at a loss. I tried clearing the Cache folder for my project (and also rebuilding everything from scratch), and that didn't work either.

6621-shaderlist.txt|attachment (24.1 KB)shaderlist.txt

6560-shadercachemisses.txt|attachment (64.6 KB)shadercachemisses.txt

asked 6 years ago183 views
11 Answers
0
Accepted Answer

Hi @REDACTEDUSER

A couple suggestions

  • Have you run your game in the launcher from profile mode and generated the shaders that way instead of using the editor?
  • Is it possible your graphics settings are different between editor and what is in release mode?
  • You can check some of your settings in release mode by enabling the console using sys_DeactivateConsole=0 in your system_windows_pc.cfg or append +sys_DeactivateConsole 0 when running the launcher.
  • If the render texture is black I'm wondering if the UI Canvas is even getting loaded and updated? Can you verify that?
  • There is a cvar r_showrendertarget which can draw the contents of your render target in debug view - not sure if this works in release mode but if it does you should be able to type r_showrendertarget <name of your rendertarget> in the console and it should display the contents of your target so you can see if the target is actually getting updated in memory but not on the 3d object in the world.
answered 6 years ago
0

Hi @REDACTEDUSER

If the render target is getting updated correct when you run r_showrendertarget <your rendertarget name> in profile then that means the problem probably exists with the material, texture name or shader. If all the other shaders are appearing in profile mode then I don't think it's a shader problem.

Does the name of your render target begin with a $ character? If not, try adding $ as a prefix because that is the specification for render target texture names and there are a lot of code checks in the engine the for '$' prefix.

The next thing to check would be for you to zip up your level and the material you are using and attach them to this post so I can take a look and repro it here.

Cheers!

answered 6 years ago
0

Hello @REDACTEDUSER

I am sorry it took me so long to respond to this. I tried making a smaller level that could reproduce the issue, but it turned out that in creating a newer level the problem went away in the profile build (but was still present in the release build), while simultaneously breaking that command (none of my own made render textures show up anymore).

The name of the level is testLevel, and the render texture is $bonu. It is attached to an object that renders a video, which will show up in the UI. You should be able to press a button on the main screen to play the video. Let me know if these were the files you needed (the file size was much smaller than I expected, so I think I might be missing something).

6633-projectgamefiles.zip|attachment (65.1 KB)projectgamefiles.zip

answered 6 years ago
0

@REDACTEDUSER

answered 6 years ago
0

Thanks @REDACTEDUSER

answered 6 years ago
0

@REDACTEDUSER

answered 6 years ago
0

Hi @REDACTEDUSER

Sorry for the delay, but I was unable to use the files provided to duplicate the error. I think this is because the level has a number of missing assets including several .slice files, a .uicanvas and some .lua files. Can you either include those missing assets, or create an example level that doesn't use them? Thanks.

answered 6 years ago
0

@REDACTEDUSER Sorry that this took a bit of time; I ended up having to create a new level in order to reproduce this error. I think there is a problem with the render texture I am using for the movie (the UI I created shows fine in both profile and release builds, and the movie only shows in profile builds). I am able to see the render texture for the UI, but not for the movie. Using the r_showrendertarget -l command, only the UI render texture shows.

I changed the render texture names to $testrender for the UI and $testvideo for the movie. The movie should be a trailer for some bunny movie. The UI uses testmaterialUI, and the video uses testmatherialvideo

I am attaching the level folder as a .zip file. This should have everything required to run the level (relying only on things within that folder or default engine assets). If there are still missing assets, please let me know.

6860-testly.zip|attachment (2.17 MB)testly.zip

answered 6 years ago
0

Hi @REDACTEDUSER

answered 6 years ago
0

@petrocket Thank you for the response

  • I tried launching the game from profile mode to build the shaders, and it didn't work. Interestingly, the textures also appeared black when I ran launcher in profile mode (from the Build64vc140 folder).
  • I am not sure about my graphics settings, but I don't think I have changed them from whatever the defaults are. If there is a log where this information is printed for both modes, tell me where they are and I will give them to you.
  • I can confirm that the UI is actually getting loaded (I have an object in the UI that prints to a file when it is activated). I have also launched the UI fine without rendering it to a texture.
  • With the r_showrendertarget command, both the editor (which shows the UI on the object) and the profile build (which shows the black texture) show the UI rendering using the command. The release build recognizes the command, but doesn't show anything. EDIT: the profile build says that this is a "cheat command" as well, the editor and the release build say nothing. EDIT`: After trying this same command on the profile and release builds of the sample project, I don't think this command works on release builds.
answered 6 years ago
0

@REDACTEDUSER

I believe the problem may be that the video playback gem does not find the webm video file in the level .pak - to fix this try placing your .webm file outside the .pak file with the same folder path it had before.

For example if your .webm file is in

c:\Amazon\Lumberyard\1.4.0.1\dev\MyProject\Levels\test\MyMovie.webm

and your folder with all the built PAK files is

c:\Amazon\Lumberyard\1.4.0.1\dev\MyProjectPaks_PC

place the file in

c:\Amazon\Lumberyard.1.4.0.1\dev\MyProjectPaks_PC\MyProject\Levels\test\MyMovie.webm

I'm also going to post this answer in your corresponding post here:

https://forums.awsgametech.com/t/video-plays-in-engine-profile-build-but-shows-black-screen-in-release-build/4858/1,

answered 6 years ago

This post is closed: Adding new answers, comments, and votes is disabled.