3 ms·
Funny story! I'm an undergrad Computer Science student who received this postcard raytracer from my Pixar recruiter back in November when they visited my schoo
by flafla2 8y ago
Funny story! I'm an undergrad Computer Science student who received this postcard raytracer from my Pixar recruiter back in November when they visited my school (CMU). To try and woo my recruiter, I changed the "PIXAR" text to say "HIRE ME" and sent it back to them. I also called fork() twice before the render loop to use 4 cores (plus a spooky mmap call to share the memory).
Here's the gist of my modified code (clang-formatted with comments): https://gist.github.com/Flafla2/d2f44c9e5e5a0ff13e6071fb782daa38 https://gist.github.com/Flafla2/d2f44c9e5e5a0ff13e6071fb782d...
And here's what it renders: https://i.imgur.com/Yhqt0Le.png https://i.imgur.com/Yhqt0Le.png
I didn't end up moving forward with my offer at Pixar, but I had a ton of fun with this! Super awesome idea, Pixar sure knows how to get computer graphics programmers thinking.
If anyone is interested in diving deeper into distance field ray marching and using it in a production game engine, check out my article on the topic here:
http://flafla2.github.io/2016/10/01/raymarching.html http://flafla2.github.io/2016/10/01/raymarching.html
- ngcc_hk 8y agoTotally no idea. What is the logic behind all these? Is the word 3D model?
- m1el 8y agoThe words are defined using Signed Distance Field functions -- a function that determines the distance to object's surface. It is quite simple to write down an SDF for primitive objects like cube and sphere, cylinder, torus, then using negation and min/max you can create unions, intersections and differences of shapes defined by SDFs. Inigo Quilez has in-depth explanations and plenty of examples for these: https://iquilezles.org/www/articles/distfunctions/distfunctions.htm https://iquilezles.org/www/articles/distfunctions/distfuncti...
- userbinator 8y agoIncidentally, he also works at Pixar --- and I'm not sure if he was the one who popularised using SDFs there, because I don't remember seeing this stuff before he first put up those webpages explaining SDFs.
- Impossible 8y agoInigo Quilez works at Facebook (after Oculus story studio was shut down) and is the creator/primary developer of the VR art tool Quill (https://quill.fb.com https://quill.fb.com). He quit Pixar in 2014.