# Will it be possible to sample textures inside Niagara modules?

**URL:** <https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062>\
**Category:** FX\
**Tags:** unreal-engine\
**Created:** [June 10, 2018, 10:53pm UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062 "2018-06-10T22:53:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terzalo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Terzalo](https://forums.unrealengine.com/u/Terzalo)\
**Post date:** [June 10, 2018, 10:53pm UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/1 "2018-06-10T22:53:01Z")

</div>

Hello!

I spent some time with Niagara in 4.20p1 today, and didn’t notice any functionality for sampling textures. Is there any plans for such features?

Example use cases: spawning particles on certain areas of a mesh defined by a texture; using a texture to determine initial properties of a particle; using flow maps to match particle movement with surface material.

---

<div class="post-metadata">

**Author:** ![FrederickD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FrederickD](https://forums.unrealengine.com/u/FrederickD)\
**Post date:** [July 2, 2018, 9:17pm UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/2 "2018-07-02T21:17:20Z")

</div>

I’m surprised it’s not there too… It could be implemented as a data interface i suppose, same as static mesh is .

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [July 3, 2018, 8:43am UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/3 "2018-07-03T08:43:33Z")

</div>

It’s no surprise it’s not there by default, that’s a really advanced behaviour you’re looking for. The advantage of Niagara though is that once someone has written that module the community can share it.

Sampling a texture should be pretty easy in HLSL, but it probably won’t be very efficient on the CPU side.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c8c992b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c8c992b](https://forums.unrealengine.com/u/anonymous_user_1c8c992b)\
**Post date:** [July 7, 2018, 2:44am UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/4 "2018-07-07T02:44:13Z")

</div>

Does someone have an idea how Epic managed to do that without texture sampling?

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/7136460cbcfcb8c06fbee9fc0b1f68c8bcf0d684.jpeg "Programmable VFX with Unreal Engine's Niagara | GDC 2018 | Unreal Engine") ](https://www.youtube.com/watch?v=mNPYdfRVPtM)

---

<div class="post-metadata">

**Author:** ![FrederickD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FrederickD](https://forums.unrealengine.com/u/FrederickD)\
**Post date:** [July 7, 2018, 10:55am UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/5 "2018-07-07T10:55:48Z")

</div>

> [@anonymous\_user\_1c8c992b](#):
>
> Does someone have an idea how Epic managed to do that without texture sampling?  
> [https://youtu.be/mNPYdfRVPtM?t=2513](https://youtu.be/mNPYdfRVPtM?t=2513)

There is a Static/Skeletal Mesh data interface. There is also a getTricolor function using tri id and barycentric coordinates…

So you could do texture sampling using a quad plane static mesh with your texture on it, but it’s a serious workaround to having a texture data interface.

---

<div class="post-metadata">

**Author:** ![Shaun\_Kime](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shaun_kime/32/735096_2.png) [@Shaun\_Kime](https://forums.unrealengine.com/u/Shaun_Kime)\
**Post date:** [July 26, 2018, 9:15pm UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/6 "2018-07-26T21:15:42Z")

</div>

An early version is now available in the Dev-Niagara stream

---

<div class="post-metadata">

**Author:** ![Bob3DGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob3DGames](https://forums.unrealengine.com/u/Bob3DGames)\
**Post date:** [May 8, 2021, 2:27pm UTC](https://forums.unrealengine.com/t/will-it-be-possible-to-sample-textures-inside-niagara-modules/112062/7 "2021-05-08T14:27:13Z")

</div>

Would you happen to know how to use the skeletal mesh data interface, or a volume texture sampler, in HLSL?
