Blender-For-UnrealEngine-Addons
Blender-For-UnrealEngine-Addons copied to clipboard
Rotation/Twist problem with Spline Importing using "Copy Active spline for Unreal"
I'm getting a rotation/twist problem within Unreal when importing a spline using the Copy to clipboard function.
I've got a spline with 3 points I'm trying to import from Blender to Unreal.
This is how it looks within Blender
However within Unreal, if I Visualize the Roll and Scale, I can see that the second point, while it has the correct tangents, does not have the correct rotation, causing it to twist.
This is the values of the second point which leads me to assume the rotation is not being input at all.
Any idea how I can fix this, unless it's a bug with the addon itself?
Hello, I just see this issue post, sadly Blender and Unreal don't manage the twist in the same way, I will check and try to fix. Maybe you can also give me the blend file?
Unfortunately I do not have the blender file for this but this seemed to be the happening with any spline I make. Right clicking the spline in Unreal and clicking "Visualize Roll and Scale" would show that the actual rotation value of the spline was not written at all. The tangents were correct.
Hello! sorry for the delay, It took time because I need to work on the next version of addon at the same time.
I was able to test in the new version and all seam to work without issue, the position and tilt is like in Blender. Maybe the issue come from a specific version of Blender or Unreal Engine? You use what version ?
https://github.com/user-attachments/assets/5e183b6d-a561-4b9e-8660-9b5393c019f8
Oh, very interesting. I am working with Unreal 5.4 and Blender 4.3.
Here's the difference between the engine and blender. While it does rotate in Unreal. It doesn't follow Blender's actual rotation and twist.
https://github.com/user-attachments/assets/65fdba3b-f9b1-45e1-b13e-186dd7283d35
Here is the blend file I've used for this
Hey @Michael4Numbers Thanks for the file!
I was able to reproduce the issue and partially fix it. I worked on it the full day.
I think I'll finish the fix tomorrow.
About the roll Unreal don't support at roll bigger than 180 degrees between the points like Blender, but you easily fix it by adding more points. Also Blender API don't support true roll access from the API so you will have to use the twist method Z-Up to get the twist value.
That's awesome to hear! I was already using Z-Up since I like it better for consistency. Can't wait to try out the fixed version! This addon has been incredible so far for my workflow!
Hello @Michael4Numbers! It was was hard to understand all and it took time, but I was able to fix! The math behind is not perfect and I will have to do clean pass on the scripts but now it work a way better.
https://github.com/user-attachments/assets/002cb25d-4c73-4d7c-b4c3-aa8aa0992870
I will include the changes in the next update, I already pushed the changes in the Dev Branch if you want to test now https://github.com/xavier150/Blender-For-UnrealEngine-Addons/wiki/Download-And-Installation-From-Dev-Branch
Incredible work! The spline will look a bit funny in Blender when using Z-Up but it works like a charm in Unreal! Thank you so much for doing this!
https://github.com/user-attachments/assets/47e563d8-5302-4949-a79f-1c114b2bcd40
Haha, I'm very glad all is working good now! :3 Since, I did some cleans and fixed bug in the Dev Branch, if you use the addon to export animations I recommend to use the last dev branch changes. I will close this issue now, enjoy dev on sonic!