Rotation optimization, GPU accelerated
An experimental release, with a possible large increase in rotation performance.
TLDR; Rotation will now cost minimal CPU and animation can be paused while rotation will still work. In one case it goes from 25% of CPU to 0% CPU to rotate multiple complex models.
I moved the rotation calculations from the CPU to GPU by using changing the C3 Model/View matrix to Include the x,y,z rotation angles. The rotation calculation is now done in the C3 standard vertex shader in the GPU with no real increase in GPU performance requirement and the CPU performance for rotation is almost completely eliminated (except for the Model/View matrix calculation.)
You can now pause animation and rotation will continue to work. If animation is not required, this is recommended (I may also change animation paused to the default initialized state.)
Note that rotation with Euler angles (x,y,z) still will suffer from gimbal lock, so if possible, pre-rotate your models in a 3d modeling program (like Blender) to reduce the change of gimbal lock.
Note that animation will still continue to run on CPU and will still be somewhat expensive based on the animation rate and the number of vertices/triangles that must rotate. It's not obvious yet if the animation calculations can be done on the CPU, because in the case of skinned nodes, each vertice may have a different blended transform.)
There may be some issues with this new update in terms of the bounding box, z height, since they are not yet updated based on rotation done on the GPU, this may make the 3DObject 'clip' early. I will work on updating the bounding box and z height to match the GPU based rotation of the vertices.
Please leave feedback, if you see performance improve with rotation (w/o animation) or if you see issues in more complex C3 examples (I restore the C3 Model/View matrix, but there could be issues with changing the matrix or with the original matrix being used.)
Files
Get Construct 3 3DObject Plugin - SDK V1 only
Construct 3 3DObject Plugin - SDK V1 only
Construct 3 3DObject, loaded from 3D model files (gltf embedded format)
| Status | Released |
| Category | Assets |
| Author | kindeyegames |
| Tags | 3D, construct, construct-3 |
More posts
- Vertex lighting for my pal AbstractPolygon21 days ago
- Update to ssao, small changes, better quality?25 days ago
- Add disable load and gltfPath ACE expression52 days ago
- 3D effect lighting bug fix75 days ago
- Congrats to dev Bilge on new game release!Aug 07, 2025
- Add ACES: disable/enable all nodesJul 25, 2025
- fix opacity and color for non 3dobject rendersJul 24, 2025
- Fix opacity and color tint for static geometry and gpu skinningJul 24, 2025
- Complete uniform caching for worker mode alsoJul 12, 2025
- Add back uniform location caching (speed up render)Jul 12, 2025
Comments
Log in with itch.io to leave a comment.
nice!!!