Console #118 - Interview with Connor of rend3 - a 3D renderer library written in pure rust
Featuring jiraCLI, Resoto, and Audio Sharing.
If you or someone you know is interested in sponsoring the newsletter, please reach out at osh@codesee.io
🏗️ Projects
jiraCLI
Feature-rich interactive Jira command line that will help you avoid Jira UI.
language: Go, stars: 1815, issues: 20, last commit: August 14, 2022
repo: github.com/ankitpokhrel/jira-cli
Resoto
Write code that reacts to changes in your cloud infrastructure. Resoto helps you search infrastructure, generate reports, and automate tasks. Works with AWS, DigitalOcean, Google Cloud, and more.
language: Python, stars: 1025, issues: 31, last commit: August 12, 2022
repo: github.com/someengineering/resoto
site: resoto.com
Audio sharing
Audio Sharing lets you share the audio stream of your computer to other devices by simply scanning a QR code.
language: Rust, stars: 10, issues: 6, last commit: July 31, 2022
repo: gitlab.gnome.org/World/AudioSharing
flathub: flathub.org/apps/details/de.haeckerfelix.AudioSharing
rend3
Easy to use, customizable, efficient 3D renderer library built on wgpu.
language: Rust, stars: 524, issues: 35, last commit: July 20, 2022
repo: github.com/BVE-Reborn/rend3
site: rend3.rs
🎤 Interview With Connor of rend3
Hey Connor! Thanks for joining us! Let us start with your background. Where have you worked in the past, where are you from, how did you learn to program, and what languages or frameworks do you like?
I am a self-taught systems programmer building programs for fun. I like Graphics, High-Performance Software, and Transportation (i.e. Trains). I’ve been programming in some form since about 10 or 11 when I picked up Scratch as part of a school programming initiative.
What is your favorite software tool?
There are so many useful tools, but I’d have to choose VSCode. It is by far the most flexible IDE situation out there with its very large extension set. Also for any kind of graphics work, RenderDoc and PIX are invaluable to figure out what crap you ended up doing.
If you could dictate that everyone in the world should read one book, what would it be?
That would require me to actually read books… I keep trying to get myself to read. I’ve been reading John Green’s The Anthropocene Reviewed for the last year, though I’ve loved what I’ve read of it so far.
What are you currently learning?
The general soft skills of life. How do I be a good developer in my day job, contribute to open source, get my personal responsibilities done, and still have time to give the love and attention my partner, and our pets deserve. People much wiser than me have said that on your deathbed, you’re always going to wish you spent more time with family and friends, not that you spent more time working.
What have you been listening to lately?
As a teenager I was very much a pretentious metalhead and I think I have bounced back aggressively the other direction. While I still love my metal - I’m a particular fan of symphonic metal such as Nightwish, Amaranthe, Epica, Kamelot - I’ve been listening to a lot of mainstream pop of late. That being said, there isn’t a lot of music I don’t enjoy listening to in some form.
How do you separate good project ideas from bad ones?
I think the biggest determining factor is how well it can actually be executed and if it actually solves a concrete problem. I have a lot of ideas that would be decent solutions, but either are too abstract or include way too wide of a scope to actually be useful.
Why was rend3 started?
My “primary” project is a train simulator called BVE-Reborn and as part of that project I wrote a renderer using wgpu. I thought it would be useful to have such a renderer outside of the context of the game, so I spun it off, trying to make it fully gpu-driven. As a result of this fateful decision, I haven’t worked on my game in a year or two and spend all of my time working on rend3, wgpu, and related projects.
Where did the name for rend3 come from?
It’s technically the third renderer I’d written. First was for the original train simulator OpenBVE (even though it never actually got merged), Second was for BVE-Reborn, and the third is rend3.
Combine that with it being a 3D renderer, and being a short and easily-typable name, and I kept with it.
Who, or what was the biggest inspiration for rend3?
For a while, I made BVE-Reborn in Unity and Rust for the sole purpose of having an off-the-shelf renderer. Bringing in a whole game engine just for the renderer is a lot of baggage, so after I had a decent design in pure rust, I wanted to provide that same level of rendering power to people who didn’t want to use an engine.
Are there any overarching goals of rend3 that drive design or implementation?
My elevator pitch goals are “easy to use”, “customizable”, and “efficient” and I think that summarizes things pretty well. On the one hand, I want users to be able to pick it up and do 3D work very quickly, on the other hand I want it to be efficient and easy to customize. Any game or 3D software that actually wants to ship is going to need to make customizations in the renderer, so facilitating that is very important to rend3’s long term success.
What trade-offs have been made in rend3 as a consequence of these goals?
I have intentionally decided not to support any of the so called “downlevel” backends and to only support devices that can support WebGPU. This means I don’t have to hold myself to the old WebGL limits and can use newer things like compute shaders and storage buffers all the time, which opens up possibilities for tricks I can pull out of my sleeve.
What is the most challenging problem that’s been solved in rend3, so far?
In abstract terms, the hardest problem to solve has been customization. In the scheme of things, writing a renderer to serve a single application isn’t the hardest thing in the world, but writing a renderer that can serve a wide variety of applications is really difficult. Renderers cover a lot of ground, so API design is both extremely important, and covers a lot of functionality.
In more concrete terms, one of the difficult technical problems was allowing users to create their own custom material. I gave a talk about the design of the material system in the 3rd part of my talk at the rust graphics meetup (timestamped link to yt) but the tl;dw is that we have a lot of similar problems that ECSs (Entity Component Systems) do, so took a lot of the ideas from archetypical ECSs and applied them in ways that could be easily accessed by the GPU.
Are there any competitors or projects similar to rend3? If so, what were they lacking that made you consider building something new?
Competitor is an awfully strong word to use for the relationship rend3 has to other libraries. The developers of all the libraries are quite friendly with each other and constantly share ideas.
My direct influence was looking at kiss3d which was made to be extremely simple to use, not terribly extensible, not focused on performance, and based on OpenGL. I wanted to make a version for wgpu that was fast and customizable.
The other similar library in the space is rafx which takes a more holistic approach to rendering by also offering an asset pipeline and the graphics abstraction being fully in-house. I haven’t used it that much to compare, but the author Aclysma knows their stuff and their implementation of GPU techniques is a lot more mature.
rend3 can also be said to be “in competition” with the renderer built into bevy-engine as an alternative with similar goals but not attached to the engine. While we end up doing certain things differently, in part because of their support for WebGL2, we share a ton of ideas and I am quite active in the bevy renderer-development community.
What was the most surprising thing you learned while working on rend3?
How many rewrites it sometimes takes to settle on a good API. As an extension of this, you really should get good at rewriting things without stopping the world as you’re going to need to do it a lot.
What is your typical approach to debugging issues filed in the rend3 repo?
One of the biggest things I’ve learned being a maintainer of open source libraries is that it’s perfectly okay to not immediately jump and try to reproduce every issue you get. With a little guidance, most people who report issues are going to be able to get you a majority of the information you need to either fully understand the problem or at least be able to further the investigation.
Similarly, it’s perfectly okay to say “I don’t know what the problem is and I don’t have time to look into it right now”. There are going to be a lot of issues that come up with systems that you do not have access to or have some situation that is going to be disproportionately difficult to fix. Don’t think you need to drop everything and try to fix it, just be upfront that you don’t have the resources to look into it, stick a help wanted tag on the issue, and be willing to provide information if people need help in investigating on their own. Open source is a community through and through, the burden for fixing issues is at least partially shared with everyone.
What is the release process like for rend3?
It’s fairly simple, once I’m fairly happy with the state of the library, I can publish everything using cargo-release.
Is rend3 intended to eventually be monetized if it isn’t monetized already? If so, how?
Any source of monetization is going to be through GitHub sponsors. I never want to require people to pay for the library, I don’t particularly have the time or motivation to do any kind of contract work, so having a GitHub sponsors is the ideal situation for people who want to support both me and the library financially without causing undue stress on myself.
How do you balance your work on open-source with your day job and other responsibilities?
Punchy answer is that I don’t. I spend way more time focusing on either my day job or various open source projects than I should and it often comes with a dereliction of spending time with my partner and pets and other responsibilities. This is a part of my life that I am very aware of, and I’m trying to figure out a way to properly rebalance my life.
Do you think any of your projects do more harm than good?
No. I would kill such a project if I thought it did. People would be able to fork and maintain it, but I’m having no such part of it.
What is the best way for a new developer to contribute to rend3?
Hop on the matrix (or discord) and lets chat about whatever feature or thing you’re interested in implementing! I try to keep a good chunk of the roadmap public in issues, but sometimes some future plans haven’t left my head yet, so we should make sure things are aligned.
If you plan to continue developing rend3, where do you see the project heading next?
Oh yes! Now that rend3 has moved completely to wgpu’s native wgsl shaders, I can have a much more powerful shader generation system then I had before. With this new found power, I’m sitting down and really evaluating how to make it so that rend3 can be easily extended. This is definitely the thing I think rend3 is currently the weakest on.
What motivates you to continue contributing to rend3?
It’s one part stubbornness, one part desire to see something like rend3 exist in the world.
Are there any other projects besides rend3 that you’re working on?
My other main project is I’m a co-maintainer of wgpu, the library that rend3 uses for interacting with the GPU. Both projects are constantly influencing each other for the better, so I’m very happy I ended up in this position (though it is a lot of work).
Do you have any other project ideas that you haven’t started?
I have more ideas than I would ever have time to implement. I won’t say anything about any of them though as I definitely have a couple I want to get to first 😉
Where do you see open-source heading next?
I am but a small pawn in a large game… :)
Do you have any suggestions for someone trying to make their first contribution to an open-source project?
Honestly, if the project is worth contributing to, just look at their contribution guidelines, chat a bit in a chatroom, and just go for it! Open source projects are almost always strapped for people, so the more help they can get the merrier. Especially when you're first getting started it’s very easy to be intimidated and think that you’re “not good enough” or whatever, but remember all of us open source developers started the exact same way you did now.
Want to join the conversation about one of the projects featured this week? Drop a comment, or see what others are saying!
Interested in sponsoring the newsletter, or know of any cool projects or interesting developers you want us to interview? Reach out at osh@codesee.io or mention us @ConsoleWeekly!