How can i use RotateAboutAxis node in material editor with Instances?

In my material, RotateaAboutAxis with world position works great to rotate an airconditioner fan mesh around its pivot point. But it wont work right with instances. The only temp solution i have is to use custom primitive data for the pivot point, but id prefer not having to set that for every mesh. Is there a way to get instances to recognize the pivot point correctly for this purpose?

Any good?

axis2

(post deleted by author)

unfortunately that breaks my spinning and starts making hte mesh wobble and scale with time over and over again. unless the mesh is at 0,0,0 rotation. Not just on instance , but also on regular static mesh.

1 Like

As you can see, it works with a cube. What is different for you?

Can you show the material?

(post deleted by author)

lots of experimentation. Not even sure if im modifying the normal correctly

basically with mine im free to rotate the static mesh around in 3d space and keep it rotating correctly (just not in instances) … object rotation… unless i use custom primtive data to give it the rotations every time i move it.. which i dont want to do….

1 Like

This is what I’m saying, for instances, you have to translate 0,0,0 to world position to get the pivot.

As for the normals, good luck with that, I wouldn’t like to try :rofl:

The normals i set up seem to be working correctly. But as i said your method seems to not work for rotating the model… for instance i want the fan pointing left instead of right at the start… rotation 0,0,0 starts it at point at the right where it would be correct, but if i rotate my mesh it will no longer work with your method.

But my method works with using CPD … i bake it with a blutility from the current mesh rotation …. then i switch the material to my CPD instance version. Its just an extra step for a level designer to have to do i suppose…

i was just hoping i could find a way to not rely on CPD and just work fine… since i accidentally made that work with a triplanar material i made with a local triplanar method. Im not trained in this .. sometimes i just get happy accidents while learning.

1 Like

Yes, this method rotates the fan around Z. If the pivot on the fan mesh is orientated some other way, you need to change the axis here

to X or Y.

left with the same problem. If i rotate the mesh it goes out of wack without changing the material properties or custom primitive data values.

1 Like

Its rotating the mesh with respect to local space.

Mine keeps rotation based on my actors direction.. or i copy my actors rotation into custom primitive data for the instancing.

1 Like

If you do this

you can have each instance in a different rotation ( note, my fan needs to rotate on Y )

axis3

(post deleted by author)

This is with your exact material except im using 1,0,0 for the normalized rotation axis

The one from the latest video.

Im using unreal engine 5.7.1 if that matters

any other ideas? I dont think adjusting the actual model to aim up or at another direction in a 3d package would work since the last video shows it it gets skewed in all 3 rotation directions with this last method..

1 Like

Bizarre. I did have the same problem, until I put the last transform node in. But now you can see, it works :rofl:

This is also 5.7.1.

Sorry, I don’t have another recommendation at the moment…

I can even rotate them in the blueprint ( on Z ), while the material is rotating Y!

axis5

I even edited the pivot to match yours

Same thing ( after I use 1,0,0 for the axis ).