4 ms·
Show HN: Complete Numpy-only 3D rendering pipeline
- stanfordkid 7y agoIt doesn’t do rasterization or culling in Numpy, so I wouldn’t call it a complete rendering pipeline. Cool proof of concept — But not particularly surprising that you can do matrix multiplications on points using a matrix library. Pyrr is another good library that is built specifically for this 3D use case.
- belzebalex 7y agoYeah, that's just for teaching purpose. There's no way to lose yourself in the code as there's only a few lines for parsing the .obj file and everything else is the pipeline.
- stanfordkid 7y agoNice! It is definitely a very easy way to understand the different matrices involved in 3D rendering.
- osmanmesutozcan 7y agoCool stuff! I have something very similar built in JS https://codepen.io/osmanmesutozcan/pen/wjNvvP https://codepen.io/osmanmesutozcan/pen/wjNvvP
- belzebalex 7y agoYes and no: you're doing all the rendering in JS without any framework, that's true. But, you're not using a traditional "everything is a matrix multiplication" concept using homogenous coordinates. You're suming vectors coordinates instead of multiplying by a translation matrix.