FlaxEngine / FlaxEngine/FlaxEngine

Position Transform in Material

Open
#3,419 0 comments 3 reactions 0 assignees View on GitHub
graphics suggestion
Dominant language
C++
Stars
7k
Forks
713
Avg merge
7d 11h
Merged PRs (30d)
19

Description

Not sure if this is a bug report or a feature request, but here is the issue:

Right now I'm trying to make vertex animation textures work in flax. The `Position Offset` in the material node moves vertecies in world space, which means the rotation of an actor is not respected. If I want to animate vertecies to move to the right of the actor, the material will move the vertecies on the global x axis, but not to the right of the model.

> Axis aligned. X - axis gets proberly displaced, because model x - axis is same as world x - axis
![Image](https://github.com/user-attachments/assets/d5498c20-7b07-404a-b9e5-88410fa0f5dd)

> Not axis aligned. Vertecies gets pushed on the world x - axis, but local x - axis is desired
![Image](https://github.com/user-attachments/assets/0ddd825a-5931-4814-9e31-428c26c31a06)

I know there is the `Vector Transform` Node, but this will not work corretly, if the vector is a position and not a direction. If this should be working with positions, too, then this as a bug report, I'm happy to provide a sample project.

If it's not a bug, I would like to make one of the following suggestions:

- a `Position Transform` Node, that works like the Vector Transform Node, but for position vectors
- a Option in the Material Settings to toggle Position Offset to local space instead of world space

The usecase is local position based masking (i.e top to bottom for character wetness), local procedural animation (i.e wind on a flag, but it doesn't matter if the flag is vertical or horizontal) and of course vertex animation textures. And other effects that aren't rotation neutral

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.