x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Draw Material to Render Target doesn't work in begin play (standalone)

Hello there,

I discovered that the draw material to render target function (new in 4.13) doesn't properly execute when used in begin play.

Note that it works in editor but not in standalone or packaged game.

The workaround is to add a small delay in begin play but I still think this should be fixed.. there seems to be more inconsistencies in begin play, for example UE-36132.

Product Version: UE 4.13
Tags:
more ▼

asked Sep 25 '16 at 05:05 PM in Bug Reports

avatar image

TK-Master
161 13 16 24

avatar image Night Watcher Sep 25 '16 at 09:12 PM

I don't think it's a bug, but on event begin play, some assets are still loading, therefor, sometimes there is not object or material to project on to. In your event begin play try adding a delay before the draw material to render target.

Btw if you set a delay of 0ms, it will delay it one frame.

avatar image TK-Master Sep 26 '16 at 02:25 AM

I shouldn't have to add a delay though, the engine should take care of asset loading and whatnot before executing begin play. Plus it's inconsistent between editor and standalone so I would say that's a bug.

avatar image Night Watcher Sep 26 '16 at 02:32 AM

True, but does a delay actually fixes it in the first place? Just try it to know if that is the source of the problem

avatar image TK-Master Sep 27 '16 at 12:13 AM

That's odd.. that's how I have it setup too. You tried it in standalone right? just making sure.

avatar image AndrewHurley Sep 28 '16 at 02:15 PM

Yes, I tested in PIE, New Window, and Standalone mode. All worked as expected.

Let me know if you are still unable to get this working and I can provide you with a test project to reverse engineer and figure out the differences.

Thanks,

Andrew Hurley

avatar image TK-Master Sep 28 '16 at 03:28 PM

Alright, so I have uploaded a test project which also includes a packaged version (under WindowsNoEditor folder) just to make sure we are using the exact same thing. https://drive.google.com/file/d/0B7Z9rT16MoBodTRRSFhMVDJQUkE/ Also I'm using 4.13.0 from the launcher.

If you launch the packaged game (or run the project in standalone) you should see a black mesh (meaning the render target is black/empty). But if you start the project in viewport play/editor mode you should see an icon painted on the mesh instead.

I have also noticed that if I use a translucent (or alphaComposite etc.) material to draw to the render target then the game doesn't even start properly (freezes/black screen on startup).. definitely something weird going on here!

If it works for you the same in both modes then this could be a hardware bug/incompatibility(?).. in which case I will try testing this on another machine.

Thanks for your help so far Andrew!

avatar image AndrewHurley Sep 26 '16 at 03:49 PM

Hello Tk-Master,

Can you provide me with some screenshots of your setup as well as some steps so I can reproduce the issue on my end?

I ran some simple tests and did not get the same results. Below are the screenshots of my blueprint and the set up I used.

Construction Script alt text

Event Graph alt text

Event BeginPlay - Standalone alt text

This seems to be working as expected on my end, but let me know if you have additional questions and I will do my best to assist you.

Cheers,

Andrew Hurley

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello TK-Master,

Thanks for providing the test project as I was able to see what the differences between my own project and yours. I can confirm what you are reporting and have gone ahead and entered a bug report for the issue. You can track the issue following the link below on our new Public Issues Tracker.

UE-36558

Once the issue has been addressed by our engineers, the fix will be added to the release notes for fixed issues within an upcoming full engine or hotfix release.

Let me know if you have further questions or need additional assistance.

Cheers,

Andrew Hurley

more ▼

answered Sep 28 '16 at 07:05 PM

avatar image Dsine Apr 13 '17 at 04:35 PM

I have the same problem in 4.15.1, just a heads up (edit: if the CanvasRenderTarget2d texture is dynamically created in the blueprint, I don't have this problem)

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question