A collection of Blender scripts for undoing the projection transform of 3D scenes from GPU rips.
A projection matrix looks the following way.
a 0 0 0
0 b 0 0
0 0 c 1
0 0 d 0
The most powerful script which finds the linear transform between the post-vertex shader mesh and the pre-vertex shader mesh.
Take note this finds not a projection matrix, but an inverted WVP matrix.
Similar to 3DRipperDX automatic aspect ratio and FoV determination feature.
This script requires importing the same mesh in two states: post-vs (world space) and pre-vs (local space).
This script takes a sphere which distorted to an axis-aligned ellispoid, and finds its dimensions by approximate the surface using a least-squates method. Then it scales the scene to return the ellispoid to the sphere shape. The idea is that a sphere is symmetry in all directions and doesn't depend on a scene rotation.
It is independent of the number of sphere polygons. The best result is achieved if all selected vertexes lie on the sphere surface. The perfect sample is an icosahedron. Supports partial spheres, like a dome, and imperfect spheres, like an eye. The minimal required number of vertexes is 6.
Similar to FoV Sphere addon, but has higher precision and doesn't require to reload the scene.
Allows manually adjust the aspect ratio and FoV in real-time.
Similar to Ninja Ripper 2 Noesis addon, but works seamless.
It aligns selected vertexes to the world plane, axis or origin. Useful for moving the object to the world origin after undoing the projection transform.
You have to import x, y, w components of a SV_Position0 parameter from the vertex shader output buffer.
In NR2 it can be done the following way. This imports x, y, w components of a SV_Position0 parameter, while the default identity matrix imports x, y, z.
- Import > Ninja Ripper 2 World Space
- Position: Matrix From Log
- Projection Matrix: [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]