# How to Read a RenderTarget2D's Data through Grid2DCollection

**URL:** <https://forums.unrealengine.com/t/how-to-read-a-rendertarget2ds-data-through-grid2dcollection/262087>\
**Category:** FX\
**Tags:** unreal-engine\
**Created:** [November 22, 2021, 8:15am UTC](https://forums.unrealengine.com/t/how-to-read-a-rendertarget2ds-data-through-grid2dcollection/262087 "2021-11-22T08:15:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymous\_60be6afb01bc77d0f70fff9220e03300](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/anonymous_60be6afb01bc77d0f70fff9220e03300/32/88708_2.png) [@Anonymous\_60be6afb01bc77d0f70fff9220e03300](https://forums.unrealengine.com/u/Anonymous_60be6afb01bc77d0f70fff9220e03300)\
**Post date:** [November 22, 2021, 8:15am UTC](https://forums.unrealengine.com/t/how-to-read-a-rendertarget2ds-data-through-grid2dcollection/262087/1 "2021-11-22T08:15:46Z")

</div>

I created a UTextureRenderTarget2D object by code and passed it through Niagara’s API SetVariableTextureRenderTarget to the FX. I want to read the data through Grid2dCollection. I binded the rendertarget to grid like below.  
 ![图片](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/7/57b9fd3818bb732707a1064d041b2a26699f7d44.png)

and I read data

 ![图片](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/5/e5eb22240af8929c001592607eae8790cfd49e3b.png)

But, something maybe wrong, I always get zero result, I just searched google and the Epic’s content samples, still can not find how to read the Render Target in Niagara, but some teaches how to write.

Anyone knows? Many thanks in advance

---

<div class="post-metadata">

**Author:** ![Anonymous\_60be6afb01bc77d0f70fff9220e03300](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/anonymous_60be6afb01bc77d0f70fff9220e03300/32/88708_2.png) [@Anonymous\_60be6afb01bc77d0f70fff9220e03300](https://forums.unrealengine.com/u/Anonymous_60be6afb01bc77d0f70fff9220e03300)\
**Post date:** [November 22, 2021, 10:17am UTC](https://forums.unrealengine.com/t/how-to-read-a-rendertarget2ds-data-through-grid2dcollection/262087/2 "2021-11-22T10:17:49Z")

</div>

I just debugged the source codes of the engine.

 ![图片](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/1/e1b5eb1d036c962e1d1adf1df6cbf6e2da569a04.png)  
it seems only 3 types(float, half float and byte) are support?  
My RT’s format is RGB32F. So when it passed into, it will be recreated and cleared for the codes below:  
 ![图片](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/c/cc0e437080e0fbf79e6aa5996694761fb856d7c5.png)  
I’m not sure if it is the problem. I will try again
