Home Unreal Engine

Invert Scale in Material World Position Offset?

greentooth
Offline / Send Message
another caveman greentooth
Hi,

Is it possible to invert a mesh scale through its material and displacing vertices ?
Thanks
I tried displacing along normals when all normals were facing toward my desired origin point but that resulted funky but not a -1 scale.
Perhaps multiplying these normals with totally vertical ones..?!
Or maybe it's simply not possible and instancing the mesh and -1 on the instance is the best solution to this

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    i think you'd want to do this in the vertex shader really

    however... 

    this "should" flip the point across the yz plane 
    position - (2*position.x, 0, 0) 

    Obviously you'd have to account for the object's position - which is fairly easy but then you'd have to account for orientation which is where things are going to get pretty complicated and you really need to start using matrices.
    There's no matrix type in an unreal material so that means you have to build the matrix operations yourself - its doable (I've done it in substance designer)  but you're getting well into the weeds at this point. 

    Assuming you get all that working I'd be very surprised if it didn't provoke some sort of horrible artefact (flipped normals are the obvious but i suspect it'll be worse than that)

Sign In or Register to comment.