Storing object positions in RVT

Hello,

In order to achieve an effect I need to store some objects world positions in a RVT.

My end goal is to fill the RVT with masks (circles) around some objects that are more or less intense according to the distance from their respective objects.

Here’s what I’ve tried:

I have an object with a material (setup as Alpha Holdout) that sets Object Position as the BaseColor of my RVT Output. In the objects that I want to “render” in the RVT I have a plane with this material attached.

Then I have another material applied to a simple plane. In it I’m getting the length of a vector from the sampled RVT BaseColor to the World Pos with a Step in order to cut a circle.

It looks that I’m unable to get the position in BaseColor correctly as I’m only able to get a circle centered around 0,0,0. If I feed a Const3 color with temp values my circle moves, which proves the (simple) maths are correct :confused:

I guess I’m unable to store large X,Y,Z in the BaseColor and that it’s clamped, precision issue ?

Am I right ? Do you see any alternative in order to achieve my goal ?

Thanks in advance !

Sounds correct. Whatever is fed into Basecolor ends up being clamped. So its not a great way to store world position of an asset.

I wish I could help you but I also don’t understand what the original intent is tbh. Maybe if you explain it a bit further?

Thank you for your answer,

I’m doing a multiplayer prototype and I need a shader to react to every player’s position, so I wanted to render X,Y,Z of each pawn as RGB in my RVT.
I still can’t find a proper way to do that :confused: