Reading texture color data using UV values

I’ve been searching online for a solution to this, but to no avail.

I am trying to read color data from a texture using the UV coordinates. As you can see in the image below, I am successful in acquiring the UV values.

For my research, I am simulating beam wander and turbulence through a volume. As I know, Unreal’s particle system and weather is purely visual. I’m hoping that I can layer many transparent “screens” with – let’s say green dots – to represent dust and other particles in the air. By layering them I hope to hack in volumetric atmosphere that, when the laser impacts a particle, undergoes some kind of interference, and in the event that the laser hits only a transparent surface, passes through easily.

https://forums.unrealengine.com/filedata/fetch?id=1767117&d=1590516930

All sources say this can’t be done in blueprints. Is there such a way? I’m currently trying to keep away from C++ unless totally necessary. Additionally, is there a better way for what I’m trying to accomplish?

This can be done, I’ve seen it in these tutorials ( I have a feeling of deja vu ):

Hey Clockwork! I replied to your post but I guess it’s still “unapproved”.

Wanted to ask you if you remembered at all how to do it/what blueprint nodes were involved. It’ll help me narrow down the search

Yeah, sorry, I’ve like watch the whole lot in the last week, I’m having trouble locating it!

I do recall he just pointed it out in passing and just said something like ‘and you could use that to read the color value at a given point, very powerful’…

I’m tempted to think it was in the shader 101 series ( 4 I think ).

I will look further…

No apologies needed. Appreciate you looking into this! Let me know if you find anything.

They are illuminating vids anyway, thoroughly recommend them. He shows you how to do much better landscape material and vertex painting than the UE system, it just goes around it!..

EDIT: I do know it’s not a ‘get pixel color’ node or anything like that, it’s a clever combo of basic nodes…

No, it’s no good, can’t find the ■■■■ thing. Try mailing him, he’s very open to that. His email is at the bottom of all vids.

Ahhhhh… the cogs are whirring…

Dot product.

You have the U and V, the dot product is the ‘Z’ which is color, something like that I think… :smiley:

No, I typed garbage, but it’s that sort of simple thing… UV are basically like XY, but I can’t recall the rest. Best to mail him… :smiley:

Hmm. That doesn’t seem right to me. UV are just (x,y) coordinates from (0,0) → (1,1) so dot product on them would just create a gradient from RGB (0,0) to (1,1)

Sure sure I’ll reach out to him haha!

Tell me when you find out, I want to know now…

He reached out! Thanks. I ended up moving away from reading color coordinates and just storing values into an array.

Was there an answer!?

Here is an solution:

Notice you should have “Trace Complex” and “Support UV From Hit Result” check-boxes turned ON both!
“Trace Complex” check box is in your Line Trace node.
“Support UV From Hit Result” you can find in: Setting>Physics>Optimization>Support UV From Hit Result.

Exactly what I needed. Thank you man.

Here’s the video that he linked: Debugging Materials with Graphs in Unreal - YouTube

He also said that using the render target would be an option; albeit slow and inefficient. Though for my purposes, I find it sufficient.