Home Unreal Engine

Get object pivot point but for an instance?

grand marshal polycounter
Online / Send Message
Alex_J grand marshal polycounter
using the object pivot point as base for adjusting normals from gives a nice soft look for foliage
but when this material is used on foliage instances, the normals break. Pretty sure it is because the object pivot point is not per instance, so it's probably at 0,0,0 or something. 
Does anybody know if there is a way to get the pivot point of the instance? Or the minimum of the instances bounding volume would work too. 
Using object position  and absolute world position seems to work per instance, but then the normals on lower half of tree look bad (too dark). This seems to be because the object position is center of the bounding box.
I found that going from the bottom looks a lot nicer. 


  • Alex_J
    Online / Send Message
    Alex_J grand marshal polycounter
    okay was asking for friend and hadnt actually messed with it much myself
    but after actually looking in the material function i think it was simple solution
    the second output is for instances
    then seems that need to subtract from the world position rather than object, seems like object position for foliage instances is always the same - whatever the case is, it gives a weird result while absolute world position looks correct

    Result is that normals for an actor (selected) and normals for instances look the same
    I think, but have to test in full project to see. if no other reply from me here then that is the solution

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    I'm not firing unreal up now to work out the exact mechanics of it but iirc you can get position information via the vertex interpolator node

    It's been a couple of years since i was fiddling with this but I have a feeling I never solved the pivot placement properly and ended up just baking the information into vertex color

Sign In or Register to comment.