434 points · by pjmlp · 3y ago · 209 comments
I'm not sure rendering it entitles you to slap your own copyright notice on it while disrespecting the CC-BY. Further, the interface shown is just plain ImGui. That'd be as if I made an image viewer using off-the-shelf parts, displayed some other artist's work in it, then pretended I own the copyright to what my software now displays.
Obviously I don't. The very purpose of this software and image viewers alike is to display other people's work. What Meta owns is software, not the output it may produce.
These corporations are way too eager to slap their copyright notices on everything. It's definitely not a harmless mistake when those same corporations own literal armies of lawyers who protect their employer's "interests" while not necessarily understanding processes happening in other parts of the company.
In general anyhow. In this case it's luckily just Goliath vs. Goliath and not some poor indie developer getting shafted and robbed of credit.
[1] https://developer.nvidia.com/orca/amazon-lumberyard-bistro
TM != Copyright, but still interesting.
[1] https://en.wikipedia.org/wiki/Bridgeman_Art_Library_v._Corel....
[2] https://en.wikipedia.org/wiki/National_Portrait_Gallery_and_...
But, most engineers/PMs/etc don't have a good understanding of copyright law – it wouldn't surprise me if the authors of that blog post just slapped "Copyright Meta" on it by default because they are used to doing that, and aren't thinking at all about technical legal questions of copyrightability. Furthermore, it isn't really their job to think about those questions – that's what companies employ lawyers for – and I imagine the lawyers likely think that asserting copyright over the uncopyrightable has minimal negative consequences, whereas failing to make that assertion can work against them if it ever becomes the basis of a lawsuit, so better just tell the employees to slap a copyright notice on everything.
I once contributed (on my employer's time) to a FAANG open source project (I'll avoid saying which project or FAANG because I don't want to publicly embarrass anybody). I added a brand new file which I'd written from scratch; I copied the copyright/license notice from one of the existing files to the new one, but I changed it from "Copyright [FAANG]" to "Copyright [MyEmployer]". The FAANG employee who ran the open source project objected to that – "why did you change the copyright, everything in this project is copyright by [FAANG]"– the project didn't have a CLA, by the way. I told them they were wrong about the law, and if they didn't believe me, ask their own lawyers – and maybe they did talk to them, because they dropped the objection and ended up merging it, complete with my employer's copyright notice. So even FAANG engineers can fail to grasp the basics of copyright law.
Here is a better explanation from your Wikipedia link:
> Bridgeman Art Library v. Corel Corp. [...] which ruled that exact photographic copies of public domain images could not be protected by copyright in the United States because the copies lack originality.
I guess this means that this sample will use OpenGL rather than Metal on macOS? They claim there's a Metal backend, but how would one enable that for the "Tiny" sample? By manually adding a third parallel implementation with "#elif USE_METAL_BACKEND" everywhere?
[1] https://github.com/facebook/igl/blob/main/samples/desktop/Ti...
Graphics people need to face the fact that writing optimised cross platform renderers is not something that can be solved by divide/conquer into layers in this bottom up way anymore, instead you need to architect the data flow of the renderer and implement platform specific/optimal approaches for each sub part of that, which are so specific that this sort of wrapper would not help. This isn't exactly far removed from the pyramids -> gothic cathedral comparison.
Is that right? I have been thinking that wgpu is the best choice available for intermediate cross platform graphics one level below something like Skia and one level above Vulkan, OpenGL, DirectX, and Metal.
Please quote the text that made you believe this. It's a very negative take.
If you use something like SDL, you'll probably be able to minimize the platform-specific stuff.
But tbf also, I'm just skimming the code base. Maybe they'll publish some better docs later that explain/justify these things.
I only read the announcement by the time I submitted it, it is quite clunky.
And on the other hand, you get abstractions for the stuff that really is similar, like command buffers, camera control etc.
I think the API is well designed, and nails flexibility together with performance, at the cost of requiring to have, at least, expert knowledge in one library. After that I would get chatgpt to convert my shaders to metal, Vulkan, etc.
Thr shaders are backend specific but rest is mostly generic?
https://github.com/floooh/sokol
It doesn't support vulkan though, but if that's important to you you're probably much better off just using vulkan directly since it's supported on all the major platforms.
There are other tools you could use out there with IGL, but Sokol's solution streamlines the whole process.
https://github.com/gfx-rs/wgpu
It is written in Rust
...technically, Vulkan on Windows is also only supported via 3rd-parties (the GPU vendors), so the situation isn't actually all that different. The "Vulkan driver" is just bundled with the application on Mac instead of installed separately.
that said, it's not like this scales linearly so that 1,000 triangles is 385,000 lines of code. there's a lot of plumbing to setup the pipeline for your application's specific use case.
again, if your use case does not require the flexibility, look elsewhere.
Sorry but this is simply par for the course for any of the above.
You can certainly wrap a lot of that stuff, but you need to make assumptions, and the person that uses likely is writing demanding app, and they want full control over literally everything - but they also would like to cut time to port to Linux by half (say).
https://github.com/ocornut/imgui/wiki/Software-using-dear-im...
This seems like another intermediate decoupling layer?
This (IGL) is more a layer sitting on top between your app and the system provides API since pretty much every system has a different blessed API these days: Browser:WebGL/WebGPU, Windows:DirectX/Vulkan, Mac:Metal, Linux/Android:Vulkan, Consoles: Proprietary APIs like NVN/GNM/AGC/DX12 with a lot of extensions.
Just about every major cross platform 3D graphics app/engine has a layer like IGL, this just seems to be an attempt to make Meta's a standard.
Owie
(the whole point of more modern 3D APIs, which move most of the expensive "abstraction-layer translation work" into the initialization phase is to "cut through" all those layers in the frame loop though)
That said, all of this is relatively mundane, at the end of the day. I'm curious to try it out and see how the ergonomics/performance is. It honestly doesn't look too bad and it's kind of a good sign that a large amount of the triangle example is just windowing, because the actual rendering is relatively simple and succinct for a modern graphics API. I'd like to have an adapter for SDL2/3 and support for Wayland on Linux but otherwise it looks promising. Compared to other abstraction layers (like bgfx) it appears a bit more forward-thinking in some superficial regards at the very least. (Seeing a command queue abstraction in hello world makes me hopeful, anyways.)
260 LoC Vulkan / IGL / SFML example: https://github.com/eXpl0it3r/SFML-IGL
The main benefit of DirectX 11 is that it's a lot simpler for the developer. But when you are creating an abstraction layer for multiple APIs, you are not the target audience for a simple to use graphics API.
IIRC Doom Eternal only supports Vulkan (on PC) and that didn't really cause problems. In fact, the game's performance was superb.
We almost had it, with Vulkan. But Apple just had to Think Different.[1] If it were not for Apple, we would not need this intermediate graphics layer. It wasn't a win for Apple; the Mac-only game market is tiny.
Also about OpenGL extension spaghetti making it literaly a bunch of mini-APIs that were only portable in name and basic features?
The iOS game market is huge by the way.
OpenGL has the advantage of being an open standard. Did Meta need custom behavior? If so, OpenGL already has a well-defined extension mechanism.
Meta produced this library not for the benefit of general public. They produced it to make their own development easier and faster, and internally they are unlikely to benefit from OpenGL's ubiquity or backwards compatibility. Then they released the library for the benefit of general public. This is very nice, thanks! But we are not the main target audience.
Since they are honestly open source, they have been inspected a lot, and, if they included any data siphoning, that would be long known, and long since deleted.
I don't share your skepticism.
I've been playing with wgpu-rs, bgfx, and a couple others in the past and they work pretty well for the most part. At this point I think I'd still rather choose just Vulkan for a new project though.
It does seem like kind of a mess. Unlike WebGPU, though, it doesn't sound like Meta's thing is much of an improvement.
Also, there are those who argue that starting new projects in C++ in 2023 is almost always wrong. How about checking out the new C++ library? Do you think your preferred language X would be better than C++ in this situation?
Metal started with a programming model that looks a lot like what a hypothetical "D3D11 next" could have looked like (basically D3D11 minus the warts, and plus PSOs, command queues and render passes, but keeping the traditional and straightforward slot-based resource binding model).
Later versions then gradually added optional lower-level, more explicit features which allow more control over resource management and accessing specific GPU features with less API overhead, but may also be less convenient to use (and it's not actually just "Apple GPUs", Metal supports Apple devices with Intel, AMD and NVIDIA(?) GPUs just fine - since there were Mac laptops which shipped with those GPUs).
Apple also maintains higher level libraries like MetalKit and SceneKit.
Because of this 'layered approach', a Metal application can just start with the higher level API features to get something running quickly, and then gradually switch to more recent and more explicit Metal features only when needed or desired.
One could also simply say that the Metal team applied common sense, "taste" and a balanced approach to their API design, instead of just mechanically collecting hardware feature requirements from all GPU vendors and trying to cram those into a common low-level API at all cost.
DJTEK: The wording of this could be applied to virtually any library out there its so vague. The key features section is like a mixtape of the worlds graphic library descriptions greatest hits. Lol
edit: it's already like 2 gb
Does anyone have any recommendations for an intermediate graphics library that uses Python and supports compiling your code to a WebGL target?
I'm interested in exploring SDF functions in a parametric CAD context, but coming from a Mechanical Engineering background. Not having to learn a new programming language for a side curiosity would be ideal.
Pick up Rust and Bevy. It should be pretty easy to mock up what you want, and you can dip into wgpu when you need extra fine control over the GPU.
Just based on the screenshot, I am not sure that I would even bother to dig too deeply into the library.
Adding any PBR materials as samples would have been the wrong choice, since those are not hardware or graphics api dependent, and are always for the implementor to implment by themselves.
You don't want a graphics api to look nice at this abstraction level.
You get access to device resources, shader API etc.
Once you get triangles in, it's up to you to make it nice using the shaders you write - materials and GI model of your choice.
That "bistro" image is all PBR materials, represented in glTF. It's supposed to look the same for all standards-compliant glTF renderers, and it pretty much does. I posted the same scene in another renderer above. It's a brightly sunlit scene with no environment shaders, so it looks rather blah. glTF and Vulkan can do more than that, but this is all the test example asked for.
This screenshot is far from current AAA games, but there is no way to render such a scene in a game made for 2000 hardware.
https://youtu.be/j-Iykz0gb7Q (video uploaded 2006)
https://www.jmeiners.com/pre-rendered-backgrounds/img/ff7.jp...
and the image in the article about Meta's library:
https://www.khronos.org/assets/uploads/blogs/2023-july-blog-...
I guess, to make a poor analogy, your comment is sort of like looking at a still frame of a poorly shot movie and complaining that the codec is shit.
The picture looks like they didn't have automatic tonemapping, the rendering equivalent of auto exposure control. So the picture is too dim. I brought it into a photo editor, saw that the top third of the intensity space was empty, used "Levels", and it looked much better.
That's a standard glTF test scene, called "bistro". Here's the same scene, rendered with Rend3/WGPU.[1] Here's the source code for that example.[2] Rend3 is a level above WGPU; it deals with memory management and synchronization, so you just create objects, materials, transforms, and textures, then let the renderer do its thing. Rust handles the object management via RAII - delete the object, and it drops out of the scene.
Looking at Meta's examples, there are too many platform-specific #ifdef lines. More than you need with WGPU. Probably because WGPU is usually used with something like Winit, which abstracts over different window systems.
We'll have to wait for user reports about performance. Meta didn't show any video. Here's a test video of mine using Rend3/WGPU on a town scene comparable to the "bistro" demo.[3] This is a speed run, to test dynamic texture loading and unloading while rendering. The WGPU people are still working through lock conflicts in that area. The idea with Vulkan land is that you should be able to load content while rendering is in progress. For that to be useful, all the layers above Vulkan also have to have their locking problems hammered out. Most open source game engines don't do that yet. Unreal Engine and Unity do, which is why you pay for them for your AAA title.
[1] https://raw.githubusercontent.com/BVE-Reborn/rend3/trunk/exa...
[2] https://github.com/BVE-Reborn/rend3/blob/trunk/examples/scen...
This just feels like sour grapes about the fact that WGPU excluded Khronos when it was developed, so Khronos wants their own, with maybe a bit of promotion-driven development on Meta's part.
this is made for people building rendering engines on top of. if you are the software engineer with the knowledge necessary to do that, the screenshot is probably not going to influence you, because you understand what this is for. if you aren't, why should they be marketing to you with eye candy?
At least it is not a teapot.
Well good news, it's not a 3d engine at all! It's a nice common API to cover all the existing graphics APIs.
Go watch nvidia’s demo of their lighting and scene modification/remastering tool.
Sadly, that's not the case. For game consoles, neither Xbox nor PlayStation support Vulkan. iOS and macOS have their own Metal API (because of course they got to have their own thing).
So, with just a Vulkan backend, you can only target Windows, Linux, Android, and Nintendo Switch natively. Translation layers like MoltenVK may help though.
It's still unclear whether the next iteration of the Switch will continue to support Vulkan.
Unless you were to switch to a homegrown solution that would make use of this
Also, TIL the Meta Quest 2 is running Android 12L??
- Metal 2+
- OpenGL 2.x (requires GL_ARB_framebuffer_object)
- OpenGL 3.1+
- OpenGL ES 2.0+
- Vulkan 1.1 (requires VK_KHR_buffer_device_address and VK_EXT_descriptor_indexing)
- WebGL 2.0“It supports various graphics APIs, such as OpenGL®, OpenGL ES™, WebGL™, and Vulkan®”
Seems strange that’s missing from one and showing in the other.