#bevy_trenchbroom
4838 messages · Page 5 of 5 (latest)
to that exact DLL?
because that would be awesome 👀
also, here is CS2 running with a window height of 8 px
Frameratemaxxing 
nice, good to know
It also loads a bunch of other DLLs before this, ones that looks like they arent needed, but id have to fiddle
I think we are getting there 👀
And yeah ive been running the window in -w 200 -h 100 lol
-w 8 -h 8 for me haha
update: I can delete every DLL in game/csgo/* except client.dll
so that's probably the only thing that is important, as you said
In deadlock I JUST saw pulsesystem being loaded, but not sure if it does in CS2
not much help here unfortunately
using that option gives me 0x80000003: A breakpoint was encountered, which may be something we can patch out
oh hey look at this https://github.com/a2x/cs2-dumper#
I HAVE IT
@eternal pecan
AAAA
I think that overhead is alright
not perfect, but alright
I'm now preparing a separate dir with everything in it to share with you 🙂
COnsidering standard happer takes up 300~
I had to dip earlier to go work on a vehicle, amazing you made so much progress
And id love to see it once you are ready
that overhead up there is with no specific tool open
look how it is with Hammer 2 open
almost no difference!
Beautiful
okay, preparing a zip now
do you have time to try it out?
uncompressed size
compressed size
Ill be able to soon here, just making some food
start it with
[...]\s2\game\bin\win64\s2_tools.exe -tools -game core -addon foo -h 1 -w 1 -x 0 -y 0
windows will warn you about s2_tools.exe being some random exe
I'll open source it, sec
huh, interesting, guess it used the last valid value for me 🙂 Updated
yay!!!!!
Here's the source: https://github.com/janhohenheim/bs2
Bevy <-> Source 2 Tools integration. Contribute to janhohenheim/bs2 development by creating an account on GitHub.
it's smol
I was able to snag bs2 hehe
@sweet wyvern I made a prequel to bs13
@plush zinc you on Windows?
@digital heath you?
need some testers
Damn thats tiny
lol
mind testing it for me too if you're on Windows?
just need to download a shady zip file and open an untrested .exe I wrote
but we're friends right?

lol well I'm not on windows
aight, then no need haha
it should work on Linux, but it's kinda broken, at least for me
there's some heavy screen flicker for me and some others
this sentence is a summary of my Linux experience
me whenever someone tells me "oh Jan you should give gaming on Linux another try it's really easy"
and 50% of the time it's because of wayland
yeep
perfect! Mind testing it?
Download the zip I linked above
then run the command I typed
yeep
in bash, powershell, or cmd?
I'm running powershell
but it should also run in cmd
heck yeah
can you click on the little hammer in the upper left?
you're awesome jan :)
is your task manager also showing about 500 MB RAM usage?
Hope it's not more for you for some reason
i have 128gb so 0.5gb is a drop in the ocean lmao
RAM?!?!??!?!?!~
yep
no
lol
it does mean i can basically leave every app open at the same time
which is useful cus im adhd as fuck
we'll need to recreate something like this little UI here, I believe
at least the options for "create addon", "select addon" and "delete addon"
I did some ugly workarounds to completely hide that ugly useless window we have to keep around
It now behaves like a regular app. Also gave it a neat icon, though we probably should design one ourselves because of licenses
also @plush zinc as promised I started playing music with my recordings
is it possible to replace the splash screen too?
looks like it's here
hmm little luck in just replacing that for some reason
There might be an identical image inside their vpks that they read instead, it wouldn't be the first time they have duplication like that
that's what I thought, but I couldn't find it
but I may have missed it if it was called different
done
the trick was using the weird resolution of 558x348
as you can see I also fixed the missing icons and added some more tools to the menu bar
YOOOOO
WOAH
I saw THE RAT
amazing
Hehehehe
Nope, wasn’t needed!
oh!
Turns out I could point it to a "game" called core which I believe is exactly what we needed
Looks like this is what Valve made as a minimal executable when they were porting DotA 2 to S2
The rest is a big Windows API soup I threw together to get even that minimal app away graphically
It’s baked into my custom executable now
oh!
That is what you would change if you work on multiple games
Well, that’s not how Valve designed it for
But their model is literally "copy paste the entire thing for every project"
Let’s not do that lol
We can make all our bevy games "addons" for the "game" named core
in theory this should support setting their path to your bevy project, but I had no luck with that
So I'm thinking I should write a CLI to sync your assets dir
Something like bs2 upload that brings your assets into S2, then you do your level design, press F9 to compile, then run bs2 download to get the compiled stuff into your assets
Then on top there can be a simple bs2 sync that runs as a file watcher and automatically calls those other commands in the background
Or something like that
Ah, idk if you read that part, but this stuff here doesn’t call cs2.exe, but my own executable that loads and runs the engine2.dll
yeah! that makes sense. So you made your own. Very cool!
I think i just starred it
hmm
it would be a really big push to make a cdylib in rust that could act as the Source 2 runtime integration
for bevy
and now I see Rin's problem
Hehe
I wonder if you could somehow wrap everything to use rdylibs
idk. dynamic linking stuff has always gone over my head. to be clear, I've spent max 100 hours writing C, and it was mainly only in our red team CTF club in college. so yeah unfortunately all I think I know is that header files define the api
whcih is a problem for rust because where header
oh wait it must generate headers
extern "Rust"?
FYI starting the tools runs a client.dll, you can inject all your own stuff in there
this is a lie right
You can define C headers and then generate Rust bindings with bindgen
rust obviously does not mangle names for rust dylibs
if you were to say though, like, I do not care that the ABI breaks between versions, I just want to dynamically link to a rust library in rust
that is funny. so you'd have to no_mangle everything
It mangles everything that is not annotated with #[no_mangle]
amazing
Great, right? 
So you can have whatever dependency trees you want
prefixing is dead
Long live prefixing
Maybe there’s another really smart reason, idk
I'm not much into Rust DLLs for obvious reasons haha
Maybe you could use bevy_mod_scripting's dynamic function infra to make it so there’s only a single entry point that accesses the bms function registry and marshals the args/return value
You’d need some extra stuff but if you're binding via cpp or c# you could use templates/generics/reflection to handle the other side and if you’re using rust you can use something like crabi
With C you could have a macro with _Generic to handle the marshalling
Sorry, I kinda lost track, my bad. What’s the end goal here?
Call Rust code from the Source tools?
I don’t know 😅 I didn’t read the whole chat yet, I was just addressing the need to annotate everything you want to call with no_mangle
Sorry if that was totally unhelpful
No no, I like learning stuff like that 
I was assuming that’s what this was for, yeah
The other reason is generics, methods, trait impls, and just generally having any kind of function other than monomorphic free functions in the root module 😅 Since that’s all that elf/dll/etc support
Oh another thought: the map compilation step could be wrapped or injected with our own calls to automatically move the compiled maps into your assets
Aaaah makes sense, thanks
I mean, if you’re doing that then you could wrap the map compiler in an AssetProcessor 🙃 Which would be conceptually cool but probably overkill
Oh no I'm not touching Bevy's asset processing ever again until it’s rewritten
Too many bad experiences, it simply does not work with my brain
Fair ahaha, I’m also waiting for the rewrite, everyone agrees that it’s a mess
A random script is my asset processing
Good thing I don’t want to ship on web
Or Android
So raw std::fs calls are fine
Well, outside of jams; for there web is best
Lmao the music 😅
I received an obscure link: https://github.com/theKlaxon/robotrepair-sdk
Apparently this person made their own minimal client.dll
It almost certainly won’t work out of the box, as it targets an incredibly outdated Source 2 version
But I bet most of the API surface is still the same
What's the tldr on what you are trying to do?
Use Source 2 Hammer for Bevy level design
(and whatever other Source 2 tools I can rope in)
Ah, not sure how all that works. I know the guys working on the s&box engine use Source 2, hammer and all that. They just open sourced it actually.
Not sure how useful that all is, but maybe another thing to look at if you're stuck somewhere
I already spoke with them 🙂
They want to get rid of Hammer ASAP
Oh, interesting
and switch to their in-house mesh-based editor
that is in production
it's looking good, but from what I've tested, it's still very limited in functionality
which makes sense of course, hammer has decades of incremental features
But we are very welcome to use their editor for our stuff if we want
it's MIT
my current progress is that I've successfully found a way to isolate the newest Source 2 Tools build, which is shipped with CS2
I can also get my own meshes and textures in
and create my own FGDs
now I need to read the compiled map in Bevy, which is looking promising so far
That's sick. Yeah I was thinking, there's not a whole lot of reasons why we couldn't have a good engine agnostic editor for idtech, source and unreal-like games.
I completely agree
Seriously, the in-development stuff I've seen from sbox is looking very sweet
once that is ready, I'd love to tinker with integrating that with Bevy too
Thats really awesome, is that editor public yet?
the mesh-based stuff is partially public, but there's a biiig branch with more features in development
mostly by one person, laylad
Gotcha
Was impressed the last time I looked into the engine too but all they had custom editor wise was some terrain stuff, which is also pretty nice
Nice
yeah it's imo not quite there yet for level design
but if Laylad continues at their current pace, this is looking very promising
Hell yeah
Then its just a matter of using their map serialization format, or hooking in an adapter
bingo, which should totally be doable given that it's all open sourced
Turns out the geometry exported by Hammer can be easily turned into a glTF + a list of pointclasses + a list of solidclasses with a reference to the node inside the glTF that they are attached to 👀
- S2V can export glTFs from compiled maps (open the VPK, rightclick on the vmap_c, "decompile & export", change file type to glTF)
- the entities are inside
default_ents.vents_c(KV3 encoded)
That sounds like it simplifies things a lot. Plus then I dont see why you couldnt use it for a commercial game if you couldnt tell how it was made since you wouldnt have to include any official VPKs and valve owned geometry data (maybe lightmaps)
yeah visdata and lightmaps
I think we can pull a Skein and postprocess the entity data into the glTF
hold up
this could literally just be loaded by Skein at runtime
@alpine glen you may be very out of the loop here, but I need to ping you
hullo hi
you're looking at writing component data into gltf files?
The TL;DR of this is that I can charm Source 2 Hammer into giving me a glTF of the level and a list of entities / components, as well as the glTF node names (guaranteed to be unique in this case) they are associated with
they may not be associated with anything, so in Blender terms, they may be empties
I'm thinking so
since then we don't even need any Bevy library at all
and can just leverage Skein
if you can write it skein can read it. Its not tied to blender in that way at all.
Heck, could even load it back INTO Blender to further customize it
blender is just the most common use case, so that's how I talk about it.
its really a gltf+component data gltf extension at the end of the day
Do you have a page where you describe the exact format you expect?
I suppose this will migrate to custom extensions
yes, quite literally working on that right now. The PR was merged and I have the skein implementation already, so just making a followup PR
if you're going to target it, we can talk about whether it should become BEVY_components as a formalized "more people are relying on this" statement
I'm going to add lightmaps to skein, but I'm (literally right now) rewriting the hooks upstream to receive all the gltf data, so multiple extensions is reasonable
I have no opinions on that; SKEIN and BEVY both make sense to me as a prefix
oh wow then we don't even need Hammer's baked lighting
bevy reserved BEVY, so really this is me saying is now the right time to move towards saying this is the bevy components extension or not
yeah, Relationships and Lightmaps both needed the extension approach IMO
we can go Hammer -> glTF + metadata -> Skeinified glTF -> Blender -> Bake -> back to glTF -> Bevy
and almost everything in that pipeline can be automated
yep, and that's viable
fuck yeah
how soon are you looking at doing this?
not sure how much time I have under the week, but next weekend for sure
well, not to hurry you
whenever you have it ready 🙂
it certainly can wait
haha well I'm going to do the skein release that supports extensions hopefully right after the rc drops
cool cool cool
I assume being 0.18+ is fine for you?
go for it!
sure thing
that's the only bevy version that will support the extensions data
I don't anticipate many breaking changes from 0.17 -> 0.18 anyways
if I didn't miss anything major
older versions could get stuffed into extras if you really want to backport
my goal is to introduce the extensions handling, and let everyone migrate over in their own time
so new projects can use extensions, and old projects will still work
Heh, then it would certainly be neat if I wrote this for the extension handling
great timing!
the format you have to care about is a Vec of {type_path: value} objects
makes sense 🙂
any length restrictions?
I know Blender has those come up in weird places
I hash the data when storing it in blender, so no
the internal blendfile storage is slightly different than the gltf data
and I did that intentionally so that this would be possible and other consumers can just focus on writing the right Reflection data for the components
I think I’m a little out of the loop, what’s the blender baking step for?
In this conversation it was related to lightmap baking (and some light probes and such)
Ahhh, ok fair. It would be really nice if we could extract that from S2 hammer, S2 has stuff for animated lightmaps (afaik it’s basically the same system from all the way back in Q1) which would be tough to do in Blender. Def possible with light groups, just more of a pain. Plus it’s got those lovely parallax cubemaps, I imagine the runtime side of those wouldn’t be too terrible to implement in Bevy so long as we can hijack their tools to generate them
I dont know if its any good but the guy building Fyrox has the lightmap crate
bevy_trenchbroom has lightmap support which will probably map relatively well to S2 lightmaps
Oh really? That would be neat. If you want, I can send some lightmap data for you to take a look at
@alpine glen weird question: could Blender-authored Skein data be included in exported FBX?
I could still later automatically convert the fbx to a glTF and write the extension data properly
currently no. Bevy doesn't support it and the format is deprecated anyway.
I'm just wondering whether that data is recoverable from FBX
I‘m not asking to import it in Bevy, just whether the data can be included somewhere in the FBX
Reason is that Hammer likes importing either obj or fbx, but I can convert things exported from Hammer to glTF
And if the Skein data is not lost in this process, that would be neat for the pipeline
Otherwise you'd need to export two files per model: an FBX for hammer, and a glTF for Bevy
I'm doing some research atm. There seems to be lots of issues with custom metadata in fbx getting lost across different software (maya/houdini/blender/etc)
Eek
so its unclear if this is a dependable route
Thanks for checking
Exporting two files is probably not too bad then, since the FBX is basically only needed for in-editor previews
Although, Hammer AFAIK also allows you to generate LODs on import
Which would be neat
lots of "alternative fbx importer/exporter"s exist, but from what I remember only that new one is Good
FBX is such a mess
Glad the industry is moving on
the blender fbx importer has use_custom_props (boolean, (optional)) – Custom Properties, Import user properties as custom properties
as a boolean
at least on the import operator function
I don't currently have access to an fbx file with this kind of data, but maybe I can export something from blender to create it
There's open questions around where those properties are attached and how they get imported.
Are you the one writing the user data into the fbx in this scenario?
or is it something you can get me an example of some like, json data or whatnot for some relatively simple but representative model/scene?
depends!
While the level geometry is composed in Hammer, I can see the following ways of exporting models from Blender:
- Export them as glTFs with Skein data, and as FBX. Import the FBX into Source 2 to have previews. At runtime, spawn the glTFs instead.
- Export them as FBX with Skein data. Import the FBX into Source 2, generate LODs and whatnot, export as glTF, use that in the game (assuming the Skein data survives the process)
- Export them as FBX with Skein data. Import the FBX into Source 2, generate LODs and whatnot, export as glTF, then run a script that takes the Skein data from the original FBX and injects them into the glTF
- Export them as glTFs with Skein data, and as FBX. Import the FBX into Source 2, generate LODs and whatnot, export as glTF, then run a script to copy the Skein data from the original glTF into the exported glTF
option one is of course the simplest, at the cost of requiring the user to export their stuff twice
and you don't get to profit from their model editor
which has goodies like an animation graph editor who's output I believe we could import into Bevy
option 3 seems good from a user perspective, as you need to run a script anyways to get the Hammer output into a Bevy-compatible format
Ah and to be explicit, all of this is for models / prefabs you want in the scene
sounds like you're going to need to do some fbx mangling on your side regardless? How are lods stored? probably separate entities right?
no idea yet
so the workflow here all seems to be:
- do model/prefab building in blender
- export in some way to a source2-importable format
- source2 does some stuff to the data
- source2 exports gltf
is that right?
yes, that's one half of the story
the other half is entities in the .map sense
sec
Entities can be of different classes. Here I first create a PointClass, which is an entity that exists at a specific point
you can see in the lower right that it has a bunch of predefined key-values
this is what you would typically use as a prefab
it can have a 3D model, but here it does not
the orange cube is just a placeholder basically
imagine if that was instead e.g. a player model
then in the video I create some geometry, namely the big gray cube
and I create an entity that is a SolidClass, that is an entity that is associated with some arbitrary level geometry
again, it has pre-defined key-values
these two concepts would be what a level designer deals with on a daily basis
Generating the definitions required to have this working from Bevy is fairly easy. We can use reflection to collect things that reflect PointClass and SolidClass and export them. I'll leave the details and edge cases out because bevy_trenchbroom already has all the code needed for this.
After we export the level as a glTF, we can simply convert these PointClass and SolidClass thingies into Skein-compatible component definitions
Now all of this works fine, but it would be nice to be able to author some stuff inside those prefabs. For a good example, I once needed to have a lid on a trash container set up with Avian joints. In Blender + Skein, I can create e.g. an empty called TrashContainer, then give it two children, Body and Lid, then also an additional child empty for where the joint should be located, give it all the information necessary to build the joint, then do that at runtime
A level designer doesn't need to care about any of this though
they can just place that trash container somewhere in the level and it will Just Work if the Skein data on it stays intact through the pipeline
@alpine glen I don't think I'm terribly good at bringing to paper what my thoughts are here, so I hope you can more or less decipher it
In Hammer, the trash container would be a PointClass
So, to append this, for the entities the flow is:
- declare prefabs in Bevy (e.g. the prefab
Enemyrequires authoring the componentsDamage,Weapon,Health, etc.) and reflect them. This can be done entirely through#[derive]s. - export the reflected data as a
.fgdfile, which is what Hammer can read as entity definitions forPointClasses andSolidClasses - In hammer, author your stuff, use entities for prefabs
- export the map as glTF
- convert the entity definitions into Skein-approved component definitions and write that into the glTF
- load it into Bevy as normal Skein glTFs
yeah ok so:
- bevy-first, for defining classes, etc.
- hammer reads these from the exported file after the bevy app runs.
- exported map/level gltf format from hammer is one file?
- prefabs are different files? which are placed regardless of what kind of data they contain in the level
- Desire is to have Component data inside of those prefabs, but also more scattered in the map gltf
does that sound right?
and the issue with the prefabs showing up in the ui is that hammer doesn't know about anything other than fbx/obj?
so if you used gltf, that would be fine for bevy, but not show up in the UI in your level, which is annoying but works
yep exactly!
level glTF is one file, and each prefab is one file.
technically it only knows .vmdl, but they have an importer for FBX/OBJ -> VMDL inside the UI
we could also directly convert glTF to .vmdl
that's just more effort on my part
yeah so two things are absolutely certain:
- if you can write the component format into the map/level gltf, skein will insert those components into the scene when loading.
- prefabs that are gltf will retain their data and the same will happen (they are also technically scenes)
(since I'd need to code it)
💯
neat thing about using their FBX/OBJ import is that it's not a one-step-and-done process. It remembers where the FBX is from, and if the file changes, it recreates the VMDL
also certain: if you write to the level gltf and wanted to bake lightmaps by importing that gltf to blender, baking, and re-exporting, We would be able to make sure the component data persisted through that process
so from a non-coding artist perspective, you just export a normal FBX and it magically updates in the editor
yeah, exporting twice from blender would work but be awkward
if you got fbx into hammer, how would you get gltf out?
oh its vmdl and the fbx is just a transport format hmm
I mean that's probably the "correct" solution. Use the gltf as source of truth and convert to vmdl. but I get why you want to shortcut that
right now, by compiling the map into an archive full of valve-specific formats that can be decompiled into a bunch of files, one of which being a glTF for the model.
BUT compiling the map calls a CLI, which I can wrap with my own code. So we can in theory swipe that process entirely behind the scenes by replacing the CLI with a custom executable that calls the original CLI and then calls the decompiler and whatever other tools we need on the result
Yeah I really wish that the Source 2 tools had native support for glTF, then the solution would be trivial
do you know what happens to the fbx once its vmdl'd? does it retain custom properties?
I don't know about that yet, no
I would not bet on it being preserved
There is also a wildcard option
all of this goes through libfbxsdk.dll
in theory one could also replace that DLL with one that converts a glTF to an FBX and then calls the original DLL
ok. Then on my end next steps are to figure out if blender can even support exporting that data. worst case scenario I can see a "export to trenchbroom/source2/hammer-compatible fbx" button that takes the component data and stuffs it onto a custom property field, then exports the fbx
yeah that makes sense
I think that sounds reasonable but the devil is in if fbx can even support this
if there is such a button, it can even export both glTF and FBX
and that's making a few assumptions about how it would even be handled across the applications
yep
worst case though, I can still just read all the data from the glTF exported by Blender
yeah you can actually set up collection exporters
then trigger them all
oh neat!
so if you want fbx+gltf, set up the fbx+gltf collection exporters on the things you want to prefab/export, then trigger them
that sounds extremely user friendly for this use-case
I already put an "export all collection exporters from all scenes" button in skein
I thought it would necessarily be "click here and then click there again twice per model"
yes tbh, but also that seems desired
what do you mean by that? I have trouble parsing that sentence
if it's as easy as "press a single button and you get both", then it may really be easiest to just not export anything fancy at all into the FBX
so if you export gltf for example, you often want to configure that
and then hide away all the Skeinification of the output data inside the compilation step
oh yep that makes sense
include tangents, for example, or vertex color data, etc
but you don't need vertex colors on everything, just the things you're doing custom materials for or whatnot, etc
Fair
so in the simple case all the exports are the same (if they were all the default cube or whatnot) but anything more than that and you probably want to configure
we could have an operator that sets up the exporters for a given collection though
but yeah like all this:
apply modifiers, tangents, extra properties, etc
and skein has this button, which triggers everything everywhere
or you can click one of the exports individually, which is faster, etc
"workflow options"
lovely!
does this also allow mass-exporting glTFs?
yes, that's the purpose generally
neat
the exporters are configured on collections
is it one glTF per scene? per top-level collection?
they are "collection exporters"
ah answered it
any collection can get one
heh, I read that as "a collection of export options", that's why I asked
but it's "an exporter for an object collection"
haha yeah. I mean, its also a collection of export options meant to export collections
🙃
it's a collection exporter collection
I see now
we used the word "collection" too much
it lost all meaning in my head
haha
the collection of collection exporter collections is a valid sentence
alright, bottom line is that this means I probably don't need any metadata at all inside the FBX
since I can export all collections twice: once glTF and once FBX
ok that's actually sweet and means less work for me haha
Run the FBX through the pipeline, which will spit out a glTF in the end. Then just copy over the original glTF-exported data
Only downside I see here is that I only export it as glTF from Blender to get the Skein data
which mayyy be a bit wasteful
its a matter of viewpoint! haha. fbx is only required because hammer is supporting deprecated tech 😆
lol absolutely true
two exports is not optimal, but also seems relatively fine
We could also export just the skein data if that's better I think
like as a { "blenderName": "componentData" } .json file
https://bevyskein.dev/docs/migration-tools for example
name-based associations are wonky in advanced use cases, and only unique per-object type
the specific case I know will generate multiple of the same name is using library assets
For this reason Hammer adds an incremental ID to literally everything that can be inside a level
if you have time to spare: https://github.com/KhronosGroup/glTF/issues/2337
that looks like a sensible solution
there is no solution in that thread 😅
I was looking at the proposal
which one?
Option 5 in the OP
but I put like 30 seconds of thought into this
if you have a single gltf file you can give a unique id to every object yes
this is trivially defeated by shift+d duplicating the default cube
I would have expected the DCC to generate a new UUID for that
right, so, welcome to the rabbit hole
lol I see
looks like people just throw in their unique IDs in their own extensions
makes sense as a bandaid
works in specific cases yeah
I see
that's a good sign that this is complicated haha
this is also an excellent point
yeah that's the speciifc case I mentioned earlier
I was moreso thinking about importing the same object twice from a different blend file
this one
ooooh
okay my bad
(I never use library assets so I forgot that they are based on different Blend files)
I don't suggest library assets to people because most people aren't blender experts and don't understand the data model
its supported by skein, but hella confusing if you don't understand what Object data and Object Data are, alongside overrides, etc
can confirm, I was very confused when I tried to get into library assets and had to give up
Oh, related to the earlier discussion: @urban zealot would it be plausible to extract the code for the point_class and friends macros, as well as the code that writes FGDs from them into an own crate?
since all of that should work the exact same for S2
QuakeClass is currently tied up with a bunch of Bevy supertraits QuakeClass: Component + Reflect + GetTypeRegistration
And is coupled with the spawning API fn class_spawn(view: &mut QuakeClassSpawnView) -> anyhow::Result<()>;
Perhaps this could be fixed by moving all the engine-generic code into a new FgdClass, then QuakeClass: FgdClass, but we'd need to think about how macros should work. I'd rather not require separate macros to implement QuakeClass and FgdClass
We should either generalize the attributes in QuakeClassInfo or add all ones after Quake. Things like base(...), model(...), etc. are currently specifically defined as struct fields based on what TrenchBroom can read.
The rest should be pretty easy to pull out
@dim warren I was able to export and re-import fbx with custom properties from blender, but I haven't found any fbx viewer that shows the data so I have no idea how its being packed in the file 😅
so in other words, it would be simpler to copy-paste the parts I need and adapt them?
thanks for checking 🙂
so they are somewhere haha
Unfortunately yeah
i think u can sign it
lol windows auto uploads it to virus total ok
this is nice, though I wonder if steam ever provides this info. nonetheless impressed
yeah I'll do that
did you manage to install it?
thx, will do right away
ezpz 🍋
squezy
nice nice nice
the hammer symbol on the upper left brings you to the level editor
i have my map
beautiful
F9 compiles it
there's some jank regarding baked light rn
it's very possible you'll get an error while building
nice!
now what I still need to implement is a wrapper around the CLI that is being executed there, that will afterwards decompile the stuff to glTF and yeet it over to your assets/
then you can load it as a regular old Skein glTF

what I was expecting to happen was that I would have a bevy project with this ready to go
and that my full compile would trigger a run in engine
but that's prolly too much
though replacing cs2 with a bevy window
it's certainly possible by creating our own client.dll

thanks :>
I hope I can polish it to a degree where I can just hand it to a non-programming artist
and tell them "google CS2 mapping tutorial and do that"
Update, I'm a silly sausage and the polygon tool stuff is already on sbox main
@urban zealot I started playing around with qbsp (the crate, not the compile tool) and I found some maps that it chokes on
seems to be related to 0 width by 0 height textures
Perhaps not the best name in hindsight
Dang, thought I fixed that! What map format?
I think it's BSP29, but I have to check
okay, the last one I checked is BSP2, I'll see if any are BSP29
Send them after you're done
ah, whipped up a quick & dirty shell script to go through a bunch of files; some are v29 some are BSP2. @urban zealot mind if I DM the list? Some of the maps aren't mine, and I'm wary of distributing files without their correspoinding READMEs
Sure thing
while older versions of qbsp (the compile tool this time!) write skip textures as 0x0 textures and newer versions don't write the skip texture, qbsp still writes "null" texture mip offsets a value of -1
Quake/Hexen 2 Map compiling tools - branch of http://disenchant.net/utils - ericwa/ericw-tools
Hey everyone, excuse my ignorance but to do pathfinding / navmesh stuff can I use rerecast and vleue_navigator with this?
yep 🙂
(though I personally use landmass instead of vleue_nav)
@urban zealot any idea why this may be happening?
looks like brush textures do... something... after a while of play
all prop textures are looking correct
this is after updating BTB from 0.10 to 0.12
and Bevy from 0.17 to 0.18 in general
so it may be a rendering bug upstream
just weird how only the brush textures are affected
The only thing I can think of is that some edge case has appeared in ConfigPlugin::set_image_samplers, since I believe that's the only place we modify materials after the fact, and only on map geometry
It's the only thing that ConfigPlugin does at the moment, so try disabling it from TrenchBroomPlugins and see if that fixes it
Also, that's not Niri I spot, is it?
that is indeed niri 😄
Alright I disabled it, will see how it works now
I can't reproduce it on demand, so I'll just wait
@plush zinc this seems to mayyyybe fix it
for the record, disabling that plugin disabled this PostUpdate system: https://github.com/Noxmore/bevy_trenchbroom/blob/47eb9608c540bfef2d6ad04654ed4de220a4eb48/src/config/set_sampler.rs#L12
hmm, bevy_render doesn't generally like PostUpdate to do stuff
I do remember that now, looks like this was my reasoning
// This is in PostUpdate to happen after SpawnScene. If set before, hot-reloading fails.
I'll look a bit more into this tomorrow (it is very late for me)
interesting, thats a good lead thanks
Edit: A more complete version of this message is now in the PR
Before I commit, I should run it by y'all for thoughts or in case I missed something @dim warren @plush zinc
cant you just use AssetServer::load_with_settings(path, ImageLoaderSettings { sampler, ..default() });
@urban zealot
or is it not going through there and because gltf
wait this aint gltf this is trenchbroom
Correct, I forgot to put this in my original message but another solution is to pass through asset settings when loading GenericMaterial since BTB isn't itself loading images. This was the first thing I tried last time this came up and things just don't line up nicely for it on the bevy_materialize side
i see
oh just remembered that gltf images defines their own samplers so that is not part of the problem
no idea then
@urban zealot I ran into a bug and could use some help
this is the setup
the floor is a regular brush, the wall is a solid class
it's got an origin over there
this works as expected and produces a well-behaved rigid body, presumably a cuboid
but if I cut out an edge like this:
then ingame, the collider is generated at the wrong place
this here is absolute bleeding edge: main BTB patched to use avian 0.6.0-dev
but it's got me a bit stumped
here's the repro
I'm just about to go to sleep, I'll debug tomorrow!
thanks a bunch, and sleep well 
I thought I fixed an origin brush issue just like this too, but I guess there's something else
weird how it works for cuboids but not polyhedra
The two are generated a bit differently, this was part of the problem with the previously mentioned bug
aah I see
is there a recommended way to get the dimensions of a solid class? I see I can get the mesh but not sure where to go from there (compute_aabb could work (?) but seems wrong)
(also this crate is incredibly good, thank you for such detailed documentation 💜 )
If by dimensions you mean an AABB, there isn't any special more optimized way of doing it with BTB
Each solid entity will have its meshes as children, each one having an Aabb component, best way is probably to just combine all of them
Thank you! I'm so glad it's helpful!
Also, in the future make sure to ping me, as I don't get notifications here
ty, thats helpful!
@urban zealot one more question - with the origin material, is there some step or group I need to apply for that to work? the docs say "it will set the transformation origin of the entity to which it belongs to the center of the brush". it doesnt appear grouping or adding inside does anything, but could be doing something else wrong
oh, i had to add it to the brush specifically, duh. sorry for the ping hehe
Note that doing this with solid brushes that are non-cuboids is currently bugged, see my messages above
hm okay one more weird thing. whenever i add observers to a class, the program crashes with
```
scene contains the unregistered type bevy_ecs::observer::distributed_storage::Observer. consider reflecting it with #[derive(Reflect)] and registering the type using app.register_type::<T>()
Either of these will crash, and resolve if I remove the .observe.  the error message isn't helping point me in the right direction
```rs
fn initialize(view: &mut QuakeClassSpawnView) -> bevy_trenchbroom::anyhow::Result<()> {
view.world
.commands()
.entity(view.entity)
.observe(Self::on_interact_door);
Ok(())
}
fn on_add_hook(mut world: DeferredWorld, hook: HookContext) {
world
.commands()
.entity(hook.entity)
.observe(Self::on_interact_door);
}
```
```rust
fn on_add_hook(mut world: DeferredWorld, hook: HookContext) {
if world.is_scene_world() {
return;
}
// ...
}
That's adding the observer in the Scene created from the map, and Bevy can't spawn non-reflected types like observers from scenes, I don't remember why
Jan's code is the workaround
I'm reproducing this bug in the project you sent me, but the same map works fine on main in the physics_avian example, I wonder if its something to do with Avian 0.6
I tried switching to main in the repro project, but bevy_ahoy requires Avian 0.6. I'm curious, what are you using from it?
the whole move and slide algorithm at the heart of the KCC 😄
so it's impossible to divorce ahoy from it
but you could replace it with a flycam for debugging
@digital heath did something change in 0.6 with convex hulls?
@urban zealot flycam should even be upstream now
so it should be easy to replace ahoy with that
Right! I tried to get that working before, didn't know you had to enable it via a feature
I'm recreating it on main now, but it's already late for me because I spent all day adding BSPX FACENORMALS support and other qbsp refactors, this bug will last longer still
no problem, I'll just keep it in mind for the jam 🙂
Oh, I didn't even know there was a jam, is this a blocking issue for you?
jam starts in a week
I think it should be alright? ish?
it means that stuff like windows giving off light don't have colliders
but a simple workaround there is to just add an invisible cuboid on top
Oh thank goodness, I thought it was like ongoing and this was blocking progress for you
It should definitely be fixed before a week
aww no worries
thanks, that would be cool 🙂
but really, don't stress too much
we can certainly manage with cuboids too 
oh huh got it, thanks both 🙏
am i correct in thinking Target and Targetable are part of the base class and should be on every entity? (I see target/targetname in the entity and trying to set up a relationship between them, but can't seem to query anything)
Depends 
IIRC it's not like that in Quake or Source (or Radiant stuff)
but a case could be made
where something that doesn't support triggers just noops
proper target stuff needs m:n relations unfortunately
Not that I'm aware of
Move-and-slide is pretty much the only new thing on the current main branch, other than some small documentation PRs
hmm right. i suppose i can get away with defining my own relation since it seems like those components also dont exist in my map even when i define them.
I can recommend https://github.com/EvergreenNest/evergreen_relations
though it needs to be updated to 0.18
@dim warren Fixed the collider issue, update your branch to latest main and you should be golden
Thanks a bunch!
Will check out later 🙂
That was fast!
It was a pretty small dumb mistake for a case I didn't test
Oh right, TrenchBroom now shows those properties on every entity. Not sure how I feel about that
I probably should automatically put the components on entities which define those properties then, even if entity IO isn't implemented in BTB yet
i could definitely make use of that, even without io impld
hmm, a little weird that the outer corner smooths but the inner does not seeing as its the same angle difference, unless im hovering right on the boundary of when smoothing happens.
oh maybe because the right corner is a single brush and the left corner is 3, so perhaps this is just a mapping thing
Is this is a .map using the normal smooth scene hook, or a .bsp using FACENORMALS (and/or the scene hook)?
.map using the normal smooth scene hook
```rs
TrenchBroomPlugins(
TrenchBroomConfig::new("bevy_trench_template")
.linear_filtering()
.default_solid_scene_hooks(|| {
SceneHooks::new()
.smooth_by_default_angle()
.convex_collider()
}),
)
If I recall correctly, it should work if the brushes are in the same entity, but I also threw that together somewhat quickly, I might do some testing to see if I can reproduce this
In other news, automatic global target property application is in the latest main !
Actually, are the faces between the brushes culled? (as in set to no material)
Not doing that could cause it to mess up
oh thats probably it. the face goes a little behind the chamfered piece
thanks, that was quick 
@dim warren is this the only way to get models showing up in trenchbroom? I was hoping I could just like have a generic point entity model and select the file in editor instead of listing every model but idk if thats a limitation of trenchbroom there 
There unfortunately isn't a model selector in TrenchBroom, but you can make it use a model at the path specified by a specific field
I'm busy right now, but it's in the TrenchBroom docs and somewhere in BTB as well I think
This also gives me the idea to make it so you can automatically create a class for every prop, so they're easily selectable in TB but you don't have tons of boilerplate 
I'd have to make dynamic classes possible though, which sounds hard considering our reliance on the type registry
cool, will take a look ty! im really curious about more extensibility in the editor so I'll read some more of their docs in general. would love to write a little model viewer app or something a la hammer one day but no idea what extensibility they support if any.
more of a materialize thing in general, but i managed to get an exporter profile for Material Maker working that exports layers correctly and generates a toml file, if that is useful to anyone browsing this in the future https://tangled.org/strings/did:plc:ohzemhwlwhlfanfmbl5is2n5/3mdubvuuk6v22
Exports in a flat structure. Warning: Use Control(Cmd)+w on the export node, and set default metallic and roughness to 0 if you have issues.
That's really cool! How do you use it in Material Maker? (Searching around isn't showing me anything)
it's really undocumented lol. i should probs make a little post to go along with this. If you right click > edit export targets you can then load the mme from a file, and itll then be available in the export menu
one annoying thing is that if the channels in material maker are unspecified, they default to 1.0, which is an issue for when i combine the roughness/metallic images at the end, so sometimes some weird workarounds are required
@urban zealot there’s no way to tell BTB to not look for material files that I know don’t exist, right?
I sure would like there to be. I know there's API for reading whole folders for assets, maybe we could build a cache of the files that exist in the materials folder?
Just looked, AssetReader::is_directory(&Path) exists. It returns a Result<bool, AssetReaderError>, so it also works as an is_file(...) and exists(...) function
I think this might be new, I've definitely looked at this code before when making my AssetServer::exists(...) extension. I can't find the wasm implementation of AssetReader, so I don't know if it's any more efficient than our current function
I'm also not sure about hot-reloading, but if we can get a message every time a file is added or removed it'd easy to rebuild the cache
I wish there was a more Bevy way of doing this, I wonder if fallback assets is something that should be implemented in Bevy itself
I've thought of a more reasonable way of doing this: template classes
You'd have a single Prop component, then through a trait or something, tell it to look through your models folder. For each glb/gltf file you find, you specialize a quake class to appear in TrenchBroom. These would all produce a Prop component when loading, but each specialization can have different names, defaults, etc.
This idea also has to search through assets. At this point, we would probably store the structure of the entire assets folder in memory. I wonder how performent that would be for big projects
Edit: issue has been created for this
The problem I'm looking to solve There are currently 2 ways to add external props into your maps: Have a single (or a few) prop class(s), and give it something like model(model_path), which mak...
We could also stick it into the bevy_materialize repo if you want, seems like a pretty useful resource
could be nice! i can draft up a PR with the docs if that sounds good.
Sure thing, I don't have a strong opinion on where you put it, maybe root or tools
Cc @feral prairie
(I consider them the unofficial SME-Assets hehe)
Hot reloading does listen for file adds and removes on desktop. On Wasm we don't since I don't think there's a common protocol for listening for server changes? idk
Here's the Wasm asset reader. We don't support reading directories (I guess since an "index" is uncommon on servers)
Maybe you could make your own wrapper AssetReader, which reads a "manifest file" that you load yourself?
But we don't currently have tooling for that so you'll need to build that manifest yourself
Just realized something, if you're not using toml materialize files at all, you should be able to set the material extensions in TrenchBroomConfig to an empty vector, and that would make it not try to use them at all
If you are though, based on andriy's response, the only thing I can think of for web is to support making a cache of the assets folder at compile time from build.rs, which sounds like boilerplate I would not like to have, but it would work
issue is that I have of things that
- have a png but no toml
- have no png but a toml
- have both a png and a toml
even an API for allowing the user to hard-code that list would be quite good for my loading times
I generate a lot of the material stuff anyways with a bake script
so I can just extend that script to also provide that hardcoded list
Actually, it looks like we can do filesystem operations in proc macros, so building a compile-time manifest should be super easy, and for the user only be a single line of code :)
I have asset manifests working, is it easy for you to switch to the asset-manifest branch to test the speed increase? The speedup seems marginal on my end, but if I recall correctly it'll be quite different with itch.io
(Add .asset_manifest(manifest!("assets")) to TrenchBroomConfig to use)
@urban zealot do you happen to be online? 🙂
if so: mind releasing an RC? https://github.com/Noxmore/bevy_trenchbroom/pull/143
@dim warren curious to know if youve tried compiled lighting bsps on web release/if they work
Uuuuuh been a long time. I think so?
Not sure
cool ill check it out.
i guess the alternative is building irradiance volumes but idk what that TB->Blender workflow looks like
BSP lighting only works on webgpu, but irradiance volumes are forced off for all wasm builds (when I tested changing the Bevy constant they work on webgpu, so I'm not sure why)
If you compile with (I think) -lightgrid it generates irradiance volumes. Unfortunately they are directionless, but I've added a little hack that makes the downward faces slightly darker, and it looks fine enough in most cases
To make sure, are you asking me to merge this then publish an RC on crates.io?
yep exactly 🙂
for the avian <-> trenchbroom integration crate
I can do that, is there a reason you need it on crates.io?
ah, would just be neat to have it there for patching reasons, given that I use it across... 4? crates or so
@vivid basin You should look at this section in the manual if you haven't as it has my recommended compiler settings
I should really update it for things like bounce lighting, as the default settings make your map look like it was truely in the era of Quake 1
Introduction
Done
appreciated!
what would be a good practice for switching levels? or are there any repos that implement this that would be a good example?
i have something that i threw together a few months ago but it ended up not being entirely functional. ideally i'm thinking something that behaves similarly to certain older survival horror games, e.g. you interact with a door and get put in a location that corresponds with that door on another map.
you have two problems to solve generally. one is linking the doors, the other is loading. from a high level, you likely want to preload your levels and store a handle to each one. Because the doors are presumably in different scenes, I would personally name each door with a string so it can be targeted, and also allow to specify the target destination string of the door along with the scene handle. So flow is like:
- App loads and preloads levels
- First level is loaded
- Player interacts with named door
- App state moves to a transition state
- The current scene is despawned
- The new scene specified by the door is spawned
- The player is spawned/moved to the transform at the door target specified in the new scene
im going to be doing basically this with trigger loading states in my game
hm, okay. it sounds like im on the right track then and it's just some sort of bug with that that i need to find
i think the core of the issue is that i didn't have the levels pre-loaded, so when it'd try to go between levels it would fail due to not finding the associated door
ty for the response
in both cases you're going to need to wait for the scene to spawn before you interact with it. you can add an observer to your scene root with the input On<SceneInstanceReady> and then do your door logic there
Thanks a lot 🙂
also btw i just ended up implementing this lol. https://github.com/bevjam7/feverish/blob/main/src/gameplay/mod.rs#L45 messy jam code but may be useful in some way. I define the door player target as a separate point entity to have more flexibility & because its easier to query for the transform
if anyone was wondering how to set models dynamically with a generic prop entity:
#[point_class(base(Transform, Visibility), model({path: model}))]
#[derive(Default)]
// #[component(on_add=Self::on_add_hook)]
pub(crate) struct Prop {
#[class(default = "models/model/model.gltf", must_set)]
model: String,
}
path needs to be in quotes, TrenchBroom uses this json-like language for configuration model({ "path": model })
I'd also add "scale": scale and its respective field
Ohh, I read it as "I was wondering", my bad, I had no idea you didn't need quotes there!
whats the difference between using ericw-tools and trenchbroom?
TrenchBroom helps you author .map files
Ericw-tools is a compiler that takes .map files and turns them into .bsp files that have a lot of goodies like baked lighting
It’s a bit like using VS Code vs using rustc/cargo 🙂
ooh
I'm breaking off theqmap module from quake-util as its own crate, since it's an odd duck (it's the only Quake text format I intend to support).
Initially I intended to re-export the new crate through qmap, but the error types complicate this
wait how do I make wad files?
Why do you want a wad? It’s not really used in bevy_trenchbroom
for like the textures
That’s more for Quake modding
You put them into assets/textures
oh
thx
how do I reload this?
so TB sees my new textures
do I need to run it again and restart?
F5 and F6
One reloads entities, the other textures
waittt
it is rooted in /src
moving the textures to /src/assets/textures worked
cool
No, it’s rooted wherever you run the game from
yeah
That’s when it tells TB where to find stuff 🙂
You'll probably wanna cd .. then 
Hey Noxmore, I’ve been working on my fork of bevy_trenchbroom for a while now because the main branch doesn’t fit my usecase in seismon (I basically need the bsp as a dumb asset instead of having all the entity hook stuff, in particular needing each model as a separate mesh), and I was wondering: what do you think splitting bevy_trenchbroom into two separate crates, one that just handles the "dumb asset" side of things and have all the magic in bevy_trenchbroom, which would wrap the dumb asset crate. I feel like I wouldn’t be the only person who’d find that useful, btb is quite opinionated. I’d be happy to put a PR up to do the initial split, although I don’t know precisely when I’d have time to do so. I also can’t promise to be the long-term maintainer, so if you don’t want to split it into two crates then I’ll just keep my fork as a fork
okayy so plugging bevy trenchbroom into avian with AvianPhysicsBackend.. but my collider keeps latching onto all the seams between objects
any way I can stop this from happening?
search for "ghost collisions" on this Discord
Is there a workflow for handcrafting colliders instead of auto generating convex / trimesh?
i think if you make brushes func_default they will not generate colliders and you can use the no material/tb clip brush
@urban zealot @dim warren FYI I've split off map parsing from the quake-util crate: https://crates.io/crates/quake-map
Bit of background, but I wanted to split the crate for a while now, and I was experimenting with some optimization possibilities. I only manged a speedup of +1/8th to +1/10th (hard to get accurate numbers with macrobenching) but it's better than nothing. Anyways the API is mostly the same, just the import paths will need updating.
Neat! 😄
funnily enough, this all started by trying to see if I could get a speedup from using asynchronous IO (io_uring under Linux) without even touching the parser. That was proving unfruitful, so I thought maybe optimizing the parser to get the parsing performance in line with file reading performance might help, but I realized I couldn't get the speedups to have significant impacts
seems SSDs are too performant to get much out of asynchronous IO anyways
The map parts don’t really depend on each other, right? Could you multithread the parsing?
Just need to make sure the threads are split at entity boundaries
hmm, maybe, I would need to make the map an iterator over entities instead of a Vec. But I'm not sure there's much to be gained from that, as (I think) the lion's share of brushes are likely to be under the world (worldspawn) entity
it's like 10-20 ms to "slurp" a 50 MB file, and ~700 ms to parse the slurped file. Trying the asynchronous I/O approach (reading while parsing) takes 1 second
"normal" buffered I/O takes about 900 ms
Sorry for late reply, please ping me in the future so I get notified!
I'm not sure quite what you mean by a dumb asset, can you go more into what you are and aren't using? I am generally onboard with splitting BTB up.
For "needing each model as a separate mesh", meshes are already split by model. Do you mean you want the different textures to be in the same mesh, or meshes to be split by vis?
If you want to use non-convex or trimesh, you could define specific collider point entities, you could probably even add half-decent visuals to them with models.
Sweet! I'll update to it shortly
Also, I assumed you're not using any parts from quake-util other than qmap, is that correct?
(well, besides the error module)
Yep
Noted! I try not to ping the crate authors in ecosystem channels because it gets so busy and I’m sure you get a lot of notifications already, if it’s important enough I’ll message again 😅 So what I mean about the separated models is that all the models are their own Scene sub-asset, addressable and loadable individually. By dumb asset I mean that there’s no entity-loading system, and it doesn’t emit a scene or do any spawning. It just returns an asset which has all the models as separate scene assets along with the entity map, then I handle spawning manually in my game code. Less useful for others but I’m not even converting to Bevy’s coordinate system, instead having a Transform in the returned asset which can by cloned and applied to entities when spawning to convert to Bevy coords. In my case it’s because I want most things to be in Quake coords so I parent everything ultimately to a worldspawn root entity and apply the transform just to that.
Interesting, so instead of one large Scene for the bsp you have a separate Scene for each model?
For dumb assets, it sounds like you're describing qbsp::BspData, but the sentence "it doesn’t emit a scene or do any spawning. It just returns an asset which has all the models as separate scene assets" seems to contradict itself, so I probably just don't know what you're trying to get at
If you aren't planning to support loading .map files, you could also roll your own implementation between the qbsp crate and Bevy to bypass BTB's opinionated approach
BTB does include irradiance volume integration and lighting animation though, which is a decent chunk of code to copy
Slightly unrelated, how are you lighting dynamic objects without light grids at the moment? I remember looking into it and decided that Bevy couldn't apply a fixed light level to a model (from the lightmap just below it)
Yeah that last sentence is basically the crux of it. It might be nice just to extract some of that to a utility crate, that’d probably be enough for my usecase
It’s kinda jank but I have a 1x1 lightmap applied to the models that has a constant colour. I’ve got my own AssetLoader for meshes anyway because I’ve got to load .mdl files, so it was pretty easy to do. It’s the only way I could figure out to make the models be lit correctly without using unlit which bypasses exposure settings etc
Eventually I want to spawn all the lights as bevy light entities but for now they’re just constant lit
I know that bevy supports ambient lighting but I couldn’t get it to work without washing the models out
But not per-entity ambient lighting, right?
No, but I just have them all flat-lit anyway. I think there’s a way to configure lightmap influence per-entity so I was also thinking about looking into using that to do hl1-style lighting based on the colour at their base, for now I’m fine just using a dummy lightmap to emulate global ambient light though
Just had a look over the code. Considering how wrapped up it is with both Bevy and BTB, it'd probably be simpler and easier overall for you to just take it and modify it for your own use
I’m already using bevy, so that’s not a problem, but yeah maybe it’s better just to have it be my own separate thing
@urban zealot I'm continuing the tradition of following an update to a crate that has come after a long period of no updates with an update after a very short period of time. "Oops." I was reviewing the docs after they finally built on docs.rs and noticed I never exported the Quake2SurfaceExtension structure. There's a few other changes, but they're largely concerned with writing map files
(there's a lint for exports that reference non-exported items, but that's in nightly only)
Yeah I've been there. All these versions of qbsp are me desperately trying to hotfix in production
If it's a patch version update I don't need to do anything for the end user, as I only select 0.6 :)
it's actually two updates, 0.5.0 -> 0.6.0 and 0.6.0 -> 0.6.1
the last change was just tightening up some documentation/requirements
Ah, then I will update real quick, thanks for letting me know :)
Quake2SurfaceExtension has an is_zeroed method to determine whether or not the Quake II surface info can be omitted or not when writing a map. For some reason the method is public, and for some very strange reason I decided it was implementation-defined (apparently so I could change the behavior on whim later on) whether the return value would true or false if the integer fields are 0 and the floating-point surface_value was NaN. No idea what I was thinking. So I removed the confusing bit of documentation around that and I continue to treat NaN as non-zero
got this weird error when moving over to windows pc
error: `std::any::TypeId::of` is not yet stable as a const fn
--> C:\Users\$USER\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\bevy_trenchbroom-0.12.0\src\class\mod.rs:231:13
|
231 | type_id: TypeId::of::<T>(),
| ^^^^^^^^^^^^^^^^^
error: could not compile `bevy_trenchbroom` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
using git so the exact same stuff worked fine on linux
Do a rustup update, your rustc is just old
@urban zealot I am surprised if this is just hitting me: but I have issues with brushes that have an origin - they are created without their collider when using convex_collider and assigning a rotation to the geometry. It’s not an issue when using trimesh_collider
@urban zealot I think i found the issue: https://github.com/Noxmore/bevy_trenchbroom/pull/156
I am surprised if this is just hitting me
this explains it too: it only happens if build withoutbsp(like i do) and with a rotated object + that has an origin +convex_collider
By origin do you mean the brush entity has an origin keyvalue?
conventionally you'd use a brush with a texture named "origin" tied to the same entity you want to override the origin for
its all in the PR - turns out my fix was redundant because it got fixed on main and in the 0.13rc (now 0.13 release) already
Me and @small dove have been working on Source engine loading in Bevy, I know we’ve chatted about it before here so I thought it might be interesting for you folks https://github.com/kristoff3r/bevy_vbsp
Oh my god yes.
wait is that nuke
yes it is
Yep! The one on the left is mvm_rottenburg from TF2
:O that's so sick!!
I’m currently working on visdata and when I’ve got a design that I’m happy with I want to backport it to bevy_trenchbroom
Oh damn, you want BTB to be able to load source maps?
Oh that's not what I meant, although that would be cool!
I mean that whatever design I come up with for handling the vistree will presumably also work in btb, so the work can be ported across
Loading source maps would be cool but it's a lot of work and doesn't really benefit the project I'm working on
Oh yeah, that would be cool! Yeah, I don't think the logistics really line up, bevy_trenchbroom being so centered around, well, TrenchBroom
Yeah for sure, I don't think it makes sense. I might use qbsp in my own Source bsp scene loader crate so that it can also load Q1/2/3 and HL1 bsps but I'm not even really planning on that
It's been a while since I lurked in here. Have all the channels moved around now? 🤔
@urban zealot I'm finally getting around to updating btb to 0.13, and I'm using bevy_trenchbroom = { version = "0.13", features = ["avian_f32"] }
but it my character is now falling through the floor :/
I have
TrenchBroomPlugins(
TrenchBroomConfig::new("bevy_ahoy").default_solid_scene_hooks(|| {
SceneHooks::new()
.convex_collider()
.smooth_by_default_angle()
}),
),
which is the exact same as I had in 0.12
only change is that I removed the explicit TrenchBroomPhysicsPlugin since it's added by BTB internally now
OOOH it's because it uses Avian 0.5
and I used a fork before that was updated to 0.6
yep if I point to main everything works now
mystery solved
when i add a material to my assets and run my project once with the client feature it doesn't load that material into trenchbroom
and it is giving the info that bevy trenchbroom config has been written
i have my material in assets/room.toml
room being the name of the material for now
is this not where it is supposed to be?
i figured it out
