Skip to content

Instantly share code, notes, and snippets.

@appgurueu
Created March 3, 2024 15:37
Show Gist options
  • Save appgurueu/e4962b622f0350a3cc90ab1192027c50 to your computer and use it in GitHub Desktop.
Save appgurueu/e4962b622f0350a3cc90ab1192027c50 to your computer and use it in GitHub Desktop.
#engine MTD discussion regarding 3d lines PR

Andrey01:

I feel 3d line rendering is worth to be closed for now. In the last time I'm leaning more and more towards to a conclusion that a more generalised API should be. Furthermore some users found some significant lacks which can't be decided with the current API. That should be "3d drawing API" called instead. Besides, I switched my efforts and time (and also a wish) for my last three PRs.

Lars:

In the last time I'm leaning more and more towards to a conclusion that a more generalised API should be.

I would agree.

That should be "3d drawing API" called instead.

I agree. I think this depends on (SS)CSM to be done well, though, so it should probably wait until we sort that out.

paradust: adding a 3d drawing api to minetest? :thonking~2:

Lars: A clientside drawing API makes sense if we want to grow up and become a real game engine (but of course depends on the extension of (SS)CSM)

paradust: ok, but that's kind of insane. Not even Godot would think about implementing a sandboxed client-side runtime loadable graphics API, and they've got an order of magnitude the manpower from what I've seen but i guess as long as it is janky it can be done 😄

Lars: It is a rather long-term goal

Andrey01: Hmm, except of drawing arbitrary primitives in 3d space, should API for creating materials and shaders applied for rendering those primitives be added also?

Lars: basically, imo, yes. but that's very long term so we shouldn't get too excited or invested yet.

paradust: custom shaders would need sandboxing WebGL does something magic, I've never looked at it

Lars: there will probably have to be compromises regarding sandboxing

Andrey01: Custom shaders is more priority feature I think

Lars: other game engines usually don't care about this issue at all. we're in this position between engine and platform so we have to care, but as we (slowly) move in an engine direction, we can communicate this clearly, and let the user choose.

Andrey01: Arbitrary primitives can be already done using entities meshes

Lars: i don't see why we can't have "trusted" CSM, for example, when we have trusted mods which you can run in singleplayer just as well.

Herowl: We can

Herowl: Can you do a 2-point attached line with an entity now? I mean, hacking sure

Lars: No, you can only attach entities to a single scene node

Herowl: But no clean way afaik

Lars: I considered a workaround of "tying" bones to other bones

Andrey01: That is true

Herowl: And lines are special as a thing that may move depending on two attachments commonly. Nothing else really needs that

Lars: So basically attacking this from the bone angle. I'm not sure how clean it would be. It has some limitations (you can't generate vertices, for example). And we would have to extend our texture options to allow repeating textures. I think we might be able to do that as a follow-up feature with gltf.

Herowl: And lines aren't just "a" primitive. Lines are used for many things...

Lars: (This is not very fleshed out, just an idea I had in mind)

Herowl: IMHO an engine-accelerated line API would be better than going for "primitives" stuff. Primitives are useful in some things, but... I mean, I see a reason to generate an arbitrary sphere of arbitrary size for example. Even thousands of nodes in size.

Andrey01: I think it could be useful to set custom meshes for 3d lines also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment