Render to Texture ?

Hi guys,

I need functionality to add camera to the world and to render what it sees onto a texture that I can use later. Something like rear view mirror or portals. The only thing I found was RenderWorld call on 3DEngine class, but calling it directly either break the rendering of the game( triggers asserts when in editor mode, or some of the rendering is broken), or just nothing is rendered in my texture, which is set as render target. Is there easier way or I’m just sending wrong parameters to RenderWorld call ?

The parameters passed to RenderWorld are taken from QModelViewport.cpp where RenderWorld is called.

Hi @Aleksandar

I’ve added a request for a code sample to document this and will post back here when it’s available.

UPDATE: a preview of the feature is available in 1.18 https://docs.aws.amazon.com/lumberyard/latest/userguide/component-render-to-texture.html

Any news on that code sample? I’d be interested in this topic.

Just wanted to let you all know that there has been no update on this yet as far as Lumberyard supporting this feature. It is on the roadmap/radar, but we don’t anything to share just yet.

Hi @Binky_LMBR
Is there any update or ETA on render to texture yet?
Regards,
Uriah

Hi @Uriah, we do not have an ETA on the feature but are working on the feature from multiple approaches.

5703-giphy-downsized.gif

Ha ha! @petrocket I will accept this great GIF in the meantime! =D

Hello, have there been any updates regarding this topic or plans to implement it or multiple view ports in cameras in nearby future?

Regards, Vidas.

Hi @Vidas_Maslauskas, the render to texture feature we are working on is about to undergo additional QA that is required for inclusion in a full release. Depending on how that goes will determine which release it can go in. However, I should note that the feature currently does not work on mobile, just PC and Mac. Were you planning on using it on a mobile platform?

Thank you for the reply @petrocket.

I’m happy to hear that the feature is coming along but I was planning to use it on mobile.

@petrocket, I was planning on having a second mini screen from a different camera in the corner of the screen at least to see the performance impact of it but we’re scrapping that idea for now and will stick with one camera.

@Vidas_Maslauskas, can you provide more details about how you intend to use the feature on mobile? Would it be for displaying animated 3D models in UI or something else like an in-game camera?

@Vidas_Maslauskas, thanks for the feedback. I’ll make a note to investigate making the feature work on mobile devices. The current issue is the limited amount of memory available on most mobile GPUs. The initial implementation of the render to texture feature allocates its own buffers to avoid corrupting the main pass buffers, and also because a number of shaders would need to be updated to work with partial areas of render targets.

@petrocket hi, do you have an update on the release version for RTT? Possibly 1.18?! =D

Hi @Uriah, the answer is… yes! https://docs.aws.amazon.com/lumberyard/latest/userguide/component-render-to-texture.html

That is absolutely fantastic news! Thanks @petrocket!

@petrocket

I tried to respond to a 2019 post but the system won’t let me, why isn’t the system board being updated yet, will it ever ?

Beyond frustrating.

Also render to texture isn’t working, as in I loaded OR tried to, and it won’t boot up given:

An error occurred while loading gems.

This can happen when new gems are added to a project, but those gems need to be built in order to function.

This can also happen when switching to a different project, one which uses gems which are not yet built.

To continue, please build the current project before attempting to run Asset Processor again.

Full error text:

Failed to load dynamic library at path “E:/Amazon/Lumberyard/1.18.0.0/dev/Bin64vc140/Gem.RenderToTexture.Editor.b895c3bc4f894c1ebb9562a3577248f9.v0.1.0.dll”.

I enabled gem, GOT NO ERROR while doing so, yet I get error here.

I realize it took forever to get this feature going, so is it borked still given my error ?