UE5. If you are writing a plugin which you want to work ONLY in non-shipping game/editor builds (think of a helper plugin used only during development) you can configure the uplugin file like in the screenshot below.
16.10.2025 16:21 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
https://youtu.be/vgsZGZ0csVQ?t=987
t.co/7QUI33zwGY
30.09.2025 20:28 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
UE5: So there are these comps for dealing with dynamic geometry:
- ProceduralMeshComponent
- CustomMeshComponent
- DynamicMeshComponent
Apparently starting with UE5 we should be using DynamicMeshComponent. The other two are legacy.
30.09.2025 20:28 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Rotate About Axis Node | Shader Graph | 6.9.2
References:
[1] docs.unity3d.com/Packages/com...
[2] en.wikipedia.org/wiki/Rodrigu...
29.07.2025 08:55 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
๐ฐ. Unreal uses an even different algorithm with projecting the point to rotate onto the rotation axis. If you make a material using the image below and in the UE material editor go to ๐ช๐ถ๐ป๐ฑ๐ผ๐ -> ๐ฆ๐ต๐ฎ๐ฑ๐ฒ๐ฟ ๐๐ผ๐ฑ๐ฒ -> ๐๐๐ฆ๐ ๐๐ผ๐ฑ๐ฒ you can look up implementation of ๐ฅ๐ผ๐๐ฎ๐๐ฒ๐๐ฏ๐ผ๐๐๐๐
๐ถ๐ function.
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
๐ฏ. Use Rodrigues' rotation formula (minding the pivot point). This is a pretty neat and fairly short formula that can be used if you don't feel like using matrices or quaternions [2].
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
๐ฎ. Use a quaternion. Construct a rotation quaternion and transform by it the point we want to rotate (minding the pivot point).
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
And how can such a rotation be implemented? There are at a least a few ways:
๐ญ. Use a 3x3 rotation matrix. Build a rotation matrix and transform by it the point we want to rotate (minding the pivot point). Unity seems to be using that approach [1].
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
In Unity's shader graph (Unity's counterpart of Unreal's material editor) we set the position of the vertex directly, and that is reflected in its ๐ฅ๐ผ๐๐ฎ๐๐ฒ ๐๐ฏ๐ผ๐๐ ๐๐
๐ถ๐ node, which contrary to Unreal does not return the offset but returns the absolute rotated point position.
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
So it returns the difference between the rotated point and the input point. This is very much likely due to the fact that in UE5 materials one of the output pins is ๐ช๐ผ๐ฟ๐น๐ฑ ๐ฃ๐ผ๐๐ถ๐๐ถ๐ผ๐ป ๐ข๐ณ๐ณ๐๐ฒ๐, where we put an ๐ผ๐ณ๐ณ๐๐ฒ๐ to the vertex position, instead of setting direct value for the vertex position.
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
It is important to realize what is the output of that node because ๐ถ๐ ๐ถ๐ ๐ป๐ผ๐ the rotated position/point! It actually returns the value of:
๐ฅ๐ผ๐๐ฎ๐๐ฒ๐ฑ๐ฃ๐ผ๐๐ถ๐๐ถ๐ผ๐ป - ๐ฃ๐ผ๐๐ถ๐๐ถ๐ผ๐ป
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
- ๐ฃ๐ถ๐๐ผ๐๐ฃ๐ผ๐ถ๐ป๐ - That is the center of rotation, a point around which the rotation will occur.
- ๐ฃ๐ผ๐๐ถ๐๐ถ๐ผ๐ป - This is the point/vector that we want to rotate.
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
- ๐ก๐ผ๐ฟ๐บ๐ฎ๐น๐ถ๐๐ฒ๐ฑ๐ฅ๐ผ๐๐ฎ๐๐ถ๐ผ๐ป๐๐
๐ถ๐ - That is our axis of rotation.
- ๐ฅ๐ผ๐๐ฎ๐๐ถ๐ผ๐ป๐๐ป๐ด๐น๐ฒ - That is the angle of rotation. It is quite quirky, because this angle is not expressed in radians or degrees, but in normalized units. A value of 1.0, 2.0, 3.0, ... is a full revolution. 0.5 is 180 degrees rotation, etc.
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
3D engines, like Unreal or Unity, usually expose some functionality that makes such rotations easy. In UE5, in the material editor, as shown in the image below, there is a node called ๐ฅ๐ผ๐๐ฎ๐๐ฒ๐๐ฏ๐ผ๐๐๐๐
๐ถ๐. It takes four inputs:
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Rotation of points and/or vectors is an extremely important geometrical operation. In 2D it's quite simple because there is only one axis of rotation (the axis perpendicular to the XY plane) but in 3D we have an infinite number of axes that we could rotate about.
29.07.2025 08:49 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
This is how you can inspect HLSL code of a material authored in UE material editor:
27.07.2025 16:00 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
27.07.2025 15:55 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
In Unreal Engine, in the material editor there is this node called RotateAboutAxis for rotating points/vectors about a given axis and angle. Here's how it is implemented:
27.07.2025 15:55 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Advanced Graphics Programming in Unreal, part 1
This is a seven-part article series.
If you do custom rendering in UE5, here's a pretty good series of articles
medium.com/@manning.w27...
11.07.2025 21:43 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
Here's C# implementation:
29.06.2025 14:07 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
Rodrigues' rotation formula - Wikipedia
For axis-angle rotation in 3D we usually use either a matrix or a quaternion. But if for some reason you do not want to involve either of these "math objects" you can use this neat formula directly: en.wikipedia.org/wiki/Rodrigu...
29.06.2025 14:07 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
YouTube video by GOTO Conferences
What Every Programmer Should Know about How CPUs Work โข Matt Godbolt โข GOTO 2024
Pretty cool presentation
www.youtube.com/watch?v=-HNp...
17.06.2025 16:23 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
The bolded part is crucial. Nanite, for each pixel has to evaluate 3 vertex positions (of the triangle the pixel belongs to). For that evaluation WPO for each vertex is needed, hence WPO is calculated 3x per pixel.
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
โข ๐๐ด๐ฆ๐ด ๐ต๐ฉ๐ฐ๐ด๐ฆ ๐ต๐ฐ ๐ฅ๐ฆ๐ณ๐ช๐ท๐ฆ ๐ต๐ฉ๐ฆ ๐ฃ๐ข๐ณ๐บ๐ค๐ฆ๐ฏ๐ต๐ณ๐ช๐ค ๐ค๐ฐ๐ฐ๐ณ๐ฅ๐ช๐ฏ๐ข๐ต๐ฆ๐ด ๐ง๐ฐ๐ณ ๐ต๐ฉ๐ช๐ด ๐ฑ๐ช๐น๐ฆ๐ญ
โข ๐๐ฏ๐ฅ ๐ธ๐ช๐ต๐ฉ ๐ต๐ฉ๐ฐ๐ด๐ฆ, ๐ญ๐ฐ๐ข๐ฅ๐ด ๐ข๐ฏ๐ฅ ๐ช๐ฏ๐ต๐ฆ๐ณ๐ฑ๐ฐ๐ญ๐ข๐ต๐ฆ๐ด ๐ต๐ฉ๐ฆ ๐ท๐ฆ๐ณ๐ต๐ฆ๐น ๐ข๐ต๐ต๐ณ๐ช๐ฃ๐ถ๐ต๐ฆ๐ด."
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Reference [2] is a link to a presentation from Epic on Nanite, where on slide 23 it says:
"๐๐ฉ๐ฆ๐ฏ ๐ข ๐ฎ๐ข๐ต๐ฆ๐ณ๐ช๐ข๐ญ ๐ด๐ฉ๐ข๐ฅ๐ฆ๐ณ ๐ฑ๐ฆ๐ณ ๐ฑ๐ช๐น๐ฆ๐ญ:
โข ๐๐ฐ๐ข๐ฅ๐ด ๐ต๐ฉ๐ฆ ๐ท๐ช๐ด ๐ฃ๐ถ๐ง๐ง๐ฆ๐ณ
โข ๐๐ฐ๐ข๐ฅ๐ด ๐ต๐ฉ๐ฆ ๐ต๐ณ๐ช๐ข๐ฏ๐จ๐ญ๐ฆ ๐ฅ๐ข๐ต๐ข
โข ๐๐ง๐๐ฃ๐จ๐๐ค๐ง๐ข๐จ ๐ฉ๐๐ 3 ๐ซ๐๐ง๐ฉ๐๐ญ ๐ฅ๐ค๐จ๐๐ฉ๐๐ค๐ฃ๐จ ๐ฉ๐ค ๐ฉ๐๐ ๐จ๐๐ง๐๐๐ฃ
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
In the ๐ก๐ฎ๐ป๐ถ๐๐ฒ scenario the cost of WPO is dependent on the number of pixels that the mesh occupies on the screen. For that particular mesh here, covering ~120 000 pixels, WPO would be calculated ~360 000 times (!). That is WPO is calculated 3x per pixel.
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
In ๐๐๐ฎ๐ป๐ฑ๐ฎ๐ฟ๐ฑ (๐ป๐ผ๐ป-๐ก๐ฎ๐ป๐ถ๐๐ฒ) scenario, when rendering that mesh, WPO in the material would have to be calculated 54 times, as that is the number of vertices of the cube. But with Nanite it's different.
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
But why is WPO expensive with Nanite in the first place? Have a look at the image attached. It depicts a simple cube that is made of just 54 vertices (it is an Unreal's built-in mesh). This cube occupies roughly 120 000 pixels on the screen.
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Long story short: they pre-computed the animation offline and pass it to WPO instead of calculating it all in the material every frame.
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Epic even wrote an article where they explain how they dealt with that problem when they ported Fortnite to UE5/Nanite - section "Wind animation" in reference [1] (links are in the comments).
17.06.2025 09:11 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0