5 ms·
For anyone looking for a great starter codebase that you can poke around in to learn the fundamentals of CG, check out Scotty3D [0], the base code for CMU's com
by flafla2 8y ago
For anyone looking for a great starter codebase that you can poke around in to learn the fundamentals of CG, check out Scotty3D [0], the base code for CMU's computer graphics class 15-462/662 (I am a TA for this class). It is a supplemental codebase to the lecture slides [1], which are all available online. The idea is that Scotty3D is a full 3D modeling suite akin to Blender or Maya, but all of the actual functionality is stripped out, waiting to be implemented by students.
It includes code for 3D model loading, linear algebra, basic (OpenGL) rendering, and UX, and provides stubs for you to implement:
- local geometry operations (ex: edge split,
vertex/edge/face bevel, vertex/edge/face delete, etc)
- global geometry operations (ex: upsampling via catmull
clark subdivision, downsampling using quadric error, etc)
- a path tracer that supports Diffuse/Mirror/Glass
materials with Fresnel reflections and environment
lighting (ex: you can render the cornell box)
- an animation suite that implements skinning, spline
interpolation, and basic simulation (wave sims)
There's a lot of documentation in the wiki [2] to help you get started. A great resource, even if you can't take the class yourself!
[0] https://github.com/cmu462/Scotty3D https://github.com/cmu462/Scotty3D
[1] http://15462.courses.cs.cmu.edu/fall2018/lectures http://15462.courses.cs.cmu.edu/fall2018/lectures
[2] https://github.com/cmu462/Scotty3D/wiki https://github.com/cmu462/Scotty3D/wiki
- robko 8y agoAh, the good old OpenGL fixed function pipeline, deprecated for over 11 years now. For something a bit more modern, I'd recommend [0], but one might argue that old OpenGL is easier to learn since you don't have to setup your own shaders. [0] https://learnopengl.com/Introduction https://learnopengl.com/Introduction
- flafla2 8y agoTo clarify, the point of Scotty3D is not to teach OpenGL -- the students do not write any OpenGL, DirectX, Vulkan, etc in the class. The OpenGL that is there is simply used to render the 3D models and the UI, so updating that code is pretty low priority. One of my longer-term goals as a TA for the class is to update Scotty3D to Vulkan or modern OpenGL. EDIT: I wanted to expand on this point, as this is actually an important part of the philosophy of the design of the course. As the OP argues as well, it more important to learn the fundamentals of CG theory (eg rasterization, the rendering equation, solving ODEs/PDEs) than the specifics of any particular implementation (OGL, DX, etc). After taking 462, many students (including myself!) take the class 15-466 Computer Game Programing [0], which goes deep into more modern OpenGL implementations (admittedly, it's OGL 3.3, but it still covers shaders/VBOs/other important concepts that translate to modern APIs). [0] http://graphics.cs.cmu.edu/courses/15-466-f18/ http://graphics.cs.cmu.edu/courses/15-466-f18/
- pfranz 8y agoI wanted to support what you're saying. I've worked in visual effects for over a decade now. While I've dabbled with OpenGL, I think the only practical application I've had was taking a stab at writing a PyOpenGL widget for viewing Alembic models in a custom PySide asset browser for a studio. This was when Alembic was much less mature and it never ended up getting used. However, I have done a lot of dealing with color spaces, debugging/optimizing scanline and ray casting renderers, computing/storing surface normals, projection and other space transforms, and simulations. I've written toy versions of a lot of those things, but mostly was debugging back box systems written by others or troubleshooting assets generated or consumed by one of these tools. Even if you're talking about game engines, there's still a whole lot more to learn. This game engine book [1] has one chapter about the rendering engine and 16 more about other topics. Each chapter in there is at least one hefty book to get a good working knowledge of the topic. It's great you have a resource where people can learn and experiment with these other things without having to learn to write all the code around it. [1] https://www.gameenginebook.com/toc.html https://www.gameenginebook.com/toc.html
- pjmlp 8y ago> Even if you're talking about game engines, there's still a whole lot more to learn. This game engine book [1] has one chapter about the rendering engine and 16 more about other topics. Each chapter in there is at least one hefty book to get a good working knowledge of the topic. Which is why when people without game industry experience start discussing 3D APIs adoption, they loose on how little the APIs actually influence the whole engine codebase.
- ryandrake 8y agoThere's something charming and engaging about the "legacy" fixed function pipeline that we've lost with our increasing focus on lower and lower level APIs. The ability to have a 10 line hello-world program that draws a colored triangle on the screen is magical, and encouraging to beginners, and that experience can't be replaced by the massive boilerplate and "copy-paste-this-stuff-dont-worry-about-what-it-does-yet" you need to do in order to do graphics the more modern way. With Apple working to eliminate all traces of OpenGL with Metal, and Microsoft already having abandoned it close to two decades ago, I feel it's close to the end of the road for fixed function OpenGL. It was a wonderful part of graphics development history that, sadly, future beginners will likely not be able to experience.
- gugagore 8y agoI hope it's not too off-topic, but I feel this sort of thing has happened before with developing GUI programs in Visual Basic, drawing to the screen with turtle graphics, (or instead whatever routines BASIC tended to have). Curious if others share the sentiment with other examples too.
- AnIdiotOnTheNet 8y agoOh yeah, totally. Maybe I'm looking at it with rose-colored glasses because I was younger, but the way I remember it personal computing used to be about enabling users. At some point there was this huge attitude shift towards being condescending toward users and treating them like cattle. So now, instead of trying to bridge the gap between computer "user" and computer "programmer", we forcibly drive a giant wedge between them.
- zozbot123 8y agoThe underlying issue is that many novice users don't see the problem with being condescended to, even when this severely inconveniences the more "developer-like" power users we used to enable. That "wedge" is just what the Eternal September of personal computing looks like.
- 8y ago
- deleted 8y ago[deleted]
- bartvbl 8y agoI wrote a small booklet on modern OpenGL for the class I'm TA'ing: https://github.com/bartvbl/A-Hitchhikers-Guide-to-OpenGL https://github.com/bartvbl/A-Hitchhikers-Guide-to-OpenGL
- hacker_9 8y agoThat's actually a really smart idea, nice way to learn some of these concepts. Cheers for the link.
- nyjah 8y agoSomething as simple as the comment "//based on https://wiki.libsdl.org/SDL_CreateWindow" https://wiki.libsdl.org/SDL_CreateWindow" can save your academic career from ruin. The students have to have citations to the docs if they went to help on a certain line of code. I wonder if that is normal these days.
- wlesieutre 8y agoI don’t see that text in the parent comment or in either of the three linked pages. Where are you referring to?
- vidarh 8y agoIt's on http://graphics.cs.cmu.edu/courses/15-466-f18/ http://graphics.cs.cmu.edu/courses/15-466-f18/ linked in the response further down, in the "Don't steal" section.
- vidarh 8y agoI went to university ~'94, and we were certainly told in no uncertain terms that we were expected to cite anything we copied, code not an exception. I don't think it means if you call SDL_CreateWindow, if that's what you mean with "on a certain line of code", but if you were to for example implement a window creation function by copying the contents of SDL_CreateWindow and adapting it. EDIT: Citing everything is extra important when working on projects for courses, because even when its overzealous in terms of what is legal the point of doing the work is to show that you understand the concepts properly, and then its important for whomever going through your code to be able to tell which bits you actually worked on.
- deleted 8y ago[deleted]
- tobmlt 8y agoThanks for bringing this to my attention! I've been very interested in the work the "Geometry Collective" is putting out there (discrete exterior calculus and related applications). Nice to see a course covering these fundamentals too. Coming from a different side of the computational world, I might just build a subdivision program from these bones to get thoroughly immersed.