Download

Vertex painting and World position offset problem for guiding a flame

Don’t know if I’m posting this in the right part of the forum but there we go :

I’m trying to create a flame that always points towards a door in my level but i’m having trouble with the method i’m using. I’m trying to use vertex painting on my mesh and the World Position Offset of my flame material to make the upper part of the flame bend and always point towards the door in my level.

That method works pretty nicely but the very top part of my vertex painted mesh doesn’t seem to be affected by the WPO i’m inputing.

Here’s what happens :
9f4ce3e5184bd9a14e9a49b68ed6f46326d5f53b.jpeg

I’m calculating a vector between the location of my flame actor and my door actor and setting this vector as an offset i’m applying to my flame material on tick.

Here’s my mesh, material and flame actor blueprints for reference :
f761986120239d30239beb901a7e68b7fe9ea4d9.jpeg
b78daf07003d16895857e30e20a4a8aa85291f42.jpeg
d08cf26447f73de29a0e0b3b3698e7a25528e810.jpeg

Can someone help me make this work?

Looks like your gradient is clamping out at both white and black. Try using the UV coordinates for the gradient instead. Place a texture coordinate node then a component mask node and select the G channel. That should be a linear gradient.

Looking at your gradient the result is correct. You are getting full red (and by extension full blend) just above the midpoint. You want a linear gradient that only reaches full red at the last row of pixels. RyanB is right, just use the UV Green channel.