Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quake bsp map loader #21476

Closed
mcharytoniuk opened this issue Mar 17, 2021 · 6 comments
Closed

quake bsp map loader #21476

mcharytoniuk opened this issue Mar 17, 2021 · 6 comments

Comments

@mcharytoniuk
Copy link
Contributor

Hello,

I am writing here, because I am not sure how to approach the issue with BSP loader otherwise. I have it already coded and open sourced (here: https://github.com/distantmagic/personalidol/tree/master/packages/quakemaps ) and I would love to integrate with THREE.js, but the issue is .map files do contain a lot of game-specific data and each map entity can contain its own properties, that are not only related to the scenery, but also in-game triggers, metadata, etc:

Screenshot from 2021-03-17 11-41-36

It is easy to just extract geometry itself, but I think that without all the entities metadata that surrounds it (which is really a game domain logic), those maps won't be really usable in practice (unless they are used just for presentation and not to actually implement a game around them).

Also, most quake map entities can be merged into one bigger geometry, but some entities can have triggers / controllers attached, so the result of the loading would be a series of meshes and not the single mesh.

The question is, is it worth to just extract one big merged geometry and drop all the metadata and map domain logic or is there a place in THREE.js to store this data somewhere?

Related issues:

Best wishes

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 17, 2021

Have you considered to store the metadata in userData? This property is intended for custom data and exists in geometry, material and 3D objects. Depending on what your loader returns (scene, geometry), you might want to add metadata to the respective nodes.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 17, 2021

BTW: I would prefer to continue the discussion about new loaders in #5524.

@mcharytoniuk
Copy link
Contributor Author

@Mugen87 Ok, but I feel like userData is not really the place. I wanted to elaborate on that, but since this issue is closed, I think, I'll just publish that in the external project and use THREE.js as an underlying framework, because this kind of maps require some kind of more consideration.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 17, 2021

That makes absolutely sense. three.js as a pure rendering engine does not provide the API for representing context-sensitive metadata of certain 3D formats. For example in VRML, a lot of logic like events or routes was dropped in order to focus on the raw asset data (geometry, materials etc.). If you have to intention to write a loader with 100% support of a specific format, your solution seems more appropriate.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 17, 2021

And feel free to discuss such topics in the three.js forum. At GitHub, we want to focus on bugs and feature requests only.

@mcharytoniuk
Copy link
Contributor Author

@Mugen87 Thanks! I opened a thread here: https://discourse.threejs.org/t/quake-bsp-map-loader/24526

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

No branches or pull requests

2 participants