#bevy_trenchbroom

4838 messages · Page 5 of 5 (latest)

dim warren
#

but that's just a hunch

eternal pecan
#

Yeah same with deadlock I did see some calls to that

#

Could be NOP'd if need be

dim warren
#

because that would be awesome 👀

#

also, here is CS2 running with a window height of 8 px

#

Frameratemaxxing cooltofu

eternal pecan
dim warren
#

nice, good to know

eternal pecan
#

It also loads a bunch of other DLLs before this, ones that looks like they arent needed, but id have to fiddle

dim warren
#

I think we are getting there 👀

eternal pecan
#

And yeah ive been running the window in -w 200 -h 100 lol

dim warren
#

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

eternal pecan
#

In deadlock I JUST saw pulsesystem being loaded, but not sure if it does in CS2

dim warren
#

not much help here unfortunately

#

using that option gives me 0x80000003: A breakpoint was encountered, which may be something we can patch out

dim warren
dim warren
#

I HAVE IT

#

@eternal pecan

#

AAAA

#

I think that overhead is alright

#

not perfect, but alright

eternal pecan
#

Holy shit, he has it

#

Thats really not that much

dim warren
#

I'm now preparing a separate dir with everything in it to share with you 🙂

eternal pecan
#

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

dim warren
#

look how it is with Hammer 2 open

#

almost no difference!

eternal pecan
#

Beautiful

dim warren
#

do you have time to try it out?

#

uncompressed size

#

compressed size

eternal pecan
#

Ill be able to soon here, just making some food

dim warren
#

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

eternal pecan
#

It works!

#

-h 0 -w 0 doesnt work though, needs to be at least 1

dim warren
dim warren
#

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

eternal pecan
#

Damn thats tiny

dim warren
#

just need to download a shady zip file and open an untrested .exe I wrote

#

but we're friends right?

sweet wyvern
#

lol well I'm not on windows

dim warren
#

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

sweet wyvern
dim warren
sweet wyvern
#

and 50% of the time it's because of wayland

plush zinc
dim warren
#

Download the zip I linked above

#

then run the command I typed

plush zinc
#

yeep

plush zinc
dim warren
#

but it should also run in cmd

plush zinc
#

ok gonna try bash lol

#

yup it works

#

nice

dim warren
#

heck yeah

plush zinc
dim warren
#

can you click on the little hammer in the upper left?

plush zinc
#

very cool very cool

dim warren
#

perfect

#

that's all, thanks heart_lime

#

oh wait

plush zinc
#

you're awesome jan :)

dim warren
#

is your task manager also showing about 500 MB RAM usage?

#

Hope it's not more for you for some reason

dim warren
#

thx!

plush zinc
#

i have 128gb so 0.5gb is a drop in the ocean lmao

dim warren
plush zinc
#

yep

dim warren
#

WHAT

#

Are you an LLM

plush zinc
#

no

dim warren
#

holy shit

#

that must be enough to run at least TWO rust-analyzers

#

wow

plush zinc
#

lol

#

it does mean i can basically leave every app open at the same time

#

which is useful cus im adhd as fuck

dim warren
#

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"

dim warren
#

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

plush zinc
dim warren
#

hmm little luck in just replacing that for some reason

small dove
dim warren
#

but I may have missed it if it was called different

dim warren
#

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

plush zinc
gloomy fable
#

oh wow nice

#

yknow we could always send an email to gabe

gloomy fable
gloomy fable
gloomy fable
dim warren
gloomy fable
#

wow that whole conversation is fascinating

#

great job

#

I'm in awe

dim warren
#

It’s working quite well now

gloomy fable
#

so you have a modified exec now?

#

you recompiled it in ghidra?

dim warren
gloomy fable
#

oh!

dim warren
#

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

gloomy fable
#

wow cool

#

and the -addons foo flag?

dim warren
gloomy fable
#

oh!

dim warren
#

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

dim warren
# gloomy fable oh!

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

gloomy fable
#

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

dim warren
#

Hehe

gloomy fable
#

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"?

dim warren
gloomy fable
#

this is a lie right

dim warren
gloomy fable
#

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

dim warren
gloomy fable
#

amazing

dim warren
#

Great, right? cooltofu

gloomy fable
#

that's intuitive

#

what the fk lmao

#

why mangle

#

mangolian detected

dim warren
gloomy fable
#

prefixing is dead

dim warren
#

Long live prefixing

dim warren
#

I'm not much into Rust DLLs for obvious reasons haha

halcyon frigate
#

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

dim warren
#

Sorry, I kinda lost track, my bad. What’s the end goal here?

#

Call Rust code from the Source tools?

halcyon frigate
#

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

dim warren
#

Ahh haha

#

I see

halcyon frigate
#

Sorry if that was totally unhelpful

dim warren
halcyon frigate
halcyon frigate
dim warren
#

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

halcyon frigate
#

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

dim warren
#

Too many bad experiences, it simply does not work with my brain

halcyon frigate
#

Fair ahaha, I’m also waiting for the rewrite, everyone agrees that it’s a mess

dim warren
#

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

halcyon frigate
dim warren
#

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

tidal galleon
#

What's the tldr on what you are trying to do?

dim warren
#

(and whatever other Source 2 tools I can rope in)

tidal galleon
#

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

dim warren
#

They want to get rid of Hammer ASAP

tidal galleon
#

Oh, interesting

dim warren
#

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

tidal galleon
#

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.

dim warren
#

once that is ready, I'd love to tinker with integrating that with Bevy too

tidal galleon
#

Thats really awesome, is that editor public yet?

dim warren
#

the mesh-based stuff is partially public, but there's a biiig branch with more features in development

#

mostly by one person, laylad

tidal galleon
#

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

dim warren
#

@tidal galleon here's their progress

tidal galleon
#

Nice

dim warren
#

but if Laylad continues at their current pace, this is looking very promising

tidal galleon
#

Hell yeah

#

Then its just a matter of using their map serialization format, or hooking in an adapter

dim warren
dim warren
#

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)
eternal pecan
#

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)

dim warren
#

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

alpine glen
#

you're looking at writing component data into gltf files?

dim warren
#

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

dim warren
#

since then we don't even need any Bevy library at all

#

and can just leverage Skein

alpine glen
#

if you can write it skein can read it. Its not tied to blender in that way at all.

dim warren
#

Heck, could even load it back INTO Blender to further customize it

alpine glen
#

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

dim warren
#

I suppose this will migrate to custom extensions

alpine glen
#

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

dim warren
#

heck yeah

#

exciting stuff!

alpine glen
#

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

dim warren
dim warren
alpine glen
#

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

alpine glen
dim warren
#

we can go Hammer -> glTF + metadata -> Skeinified glTF -> Blender -> Bake -> back to glTF -> Bevy

#

and almost everything in that pipeline can be automated

alpine glen
#

yep, and that's viable

dim warren
#

fuck yeah

alpine glen
#

how soon are you looking at doing this?

dim warren
#

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

alpine glen
#

haha well I'm going to do the skein release that supports extensions hopefully right after the rc drops

dim warren
#

cool cool cool

alpine glen
#

I assume being 0.18+ is fine for you?

dim warren
alpine glen
#

that's the only bevy version that will support the extensions data

dim warren
#

I don't anticipate many breaking changes from 0.17 -> 0.18 anyways

#

if I didn't miss anything major

alpine glen
#

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

dim warren
#

Heh, then it would certainly be neat if I wrote this for the extension handling

#

great timing!

alpine glen
#

the format you have to care about is a Vec of {type_path: value} objects

dim warren
#

any length restrictions?

#

I know Blender has those come up in weird places

alpine glen
#

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

halcyon frigate
alpine glen
halcyon frigate
#

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

tidal galleon
#

I dont know if its any good but the guy building Fyrox has the lightmap crate

halcyon frigate
#

bevy_trenchbroom has lightmap support which will probably map relatively well to S2 lightmaps

dim warren
dim warren
#

@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

alpine glen
dim warren
#

I'm just wondering whether that data is recoverable from FBX

dim warren
#

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

alpine glen
#

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)

alpine glen
#

so its unclear if this is a dependable route

dim warren
#

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

alpine glen
#

lots of "alternative fbx importer/exporter"s exist, but from what I remember only that new one is Good

dim warren
#

Glad the industry is moving on

alpine glen
#

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?

dim warren
#

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

alpine glen
#

sounds like you're going to need to do some fbx mangling on your side regardless? How are lods stored? probably separate entities right?

alpine glen
#

so the workflow here all seems to be:

  1. do model/prefab building in blender
  2. export in some way to a source2-importable format
  3. source2 does some stuff to the data
  4. source2 exports gltf
#

is that right?

dim warren
#

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

dim warren
dim warren
# alpine glen so the workflow here all seems to be: 1. do model/prefab building in blender 2...

So, to append this, for the entities the flow is:

  • declare prefabs in Bevy (e.g. the prefab Enemy requires authoring the components Damage, Weapon, Health, etc.) and reflect them. This can be done entirely through #[derive]s.
  • export the reflected data as a .fgd file, which is what Hammer can read as entity definitions for PointClasses and SolidClasses
  • 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
alpine glen
#

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
alpine glen
#

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

dim warren
dim warren
#

we could also directly convert glTF to .vmdl

#

that's just more effort on my part

alpine glen
#

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)
dim warren
#

(since I'd need to code it)

dim warren
alpine glen
#

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

dim warren
alpine glen
#

yeah, exporting twice from blender would work but be awkward

#

if you got fbx into hammer, how would you get gltf out?

alpine glen
#

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

dim warren
# alpine glen *if* you got fbx into hammer, how would you get gltf out?

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

dim warren
alpine glen
#

do you know what happens to the fbx once its vmdl'd? does it retain custom properties?

dim warren
#

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

alpine glen
#

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

alpine glen
#

I think that sounds reasonable but the devil is in if fbx can even support this

dim warren
#

if there is such a button, it can even export both glTF and FBX

alpine glen
#

and that's making a few assumptions about how it would even be handled across the applications

dim warren
#

yep

#

worst case though, I can still just read all the data from the glTF exported by Blender

alpine glen
#

then trigger them all

dim warren
alpine glen
#

so if you want fbx+gltf, set up the fbx+gltf collection exporters on the things you want to prefab/export, then trigger them

dim warren
alpine glen
#

I already put an "export all collection exporters from all scenes" button in skein

dim warren
#

I thought it would necessarily be "click here and then click there again twice per model"

alpine glen
#

yes tbh, but also that seems desired

dim warren
#

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

alpine glen
#

so if you export gltf for example, you often want to configure that

dim warren
#

and then hide away all the Skeinification of the output data inside the compilation step

dim warren
alpine glen
#

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

alpine glen
#

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"

dim warren
#

does this also allow mass-exporting glTFs?

alpine glen
#

yes, that's the purpose generally

dim warren
#

neat

alpine glen
#

the exporters are configured on collections

dim warren
#

is it one glTF per scene? per top-level collection?

alpine glen
#

they are "collection exporters"

dim warren
alpine glen
#

any collection can get one

dim warren
#

but it's "an exporter for an object collection"

alpine glen
#

haha yeah. I mean, its also a collection of export options meant to export collections

#

🙃

dim warren
#

it's a collection exporter collection

#

I see now

#

we used the word "collection" too much

#

it lost all meaning in my head

#

haha

alpine glen
#

the collection of collection exporter collections is a valid sentence

dim warren
#

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

alpine glen
#

ok that's actually sweet and means less work for me haha

dim warren
#

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

alpine glen
#

its a matter of viewpoint! haha. fbx is only required because hammer is supporting deprecated tech 😆

alpine glen
#

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

dim warren
#

that would also be neat

#

ah maaan

#

I wish I could just use glTFs directly in Hammer

alpine glen
#

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

dim warren
dim warren
alpine glen
#

there is no solution in that thread 😅

dim warren
alpine glen
#

which one?

dim warren
#

but I put like 30 seconds of thought into this

alpine glen
#

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

dim warren
alpine glen
#

right, so, welcome to the rabbit hole

dim warren
#

lol I see

#

looks like people just throw in their unique IDs in their own extensions

#

makes sense as a bandaid

alpine glen
#

works in specific cases yeah

dim warren
#

that's a good sign that this is complicated haha

#

this is also an excellent point

alpine glen
#

yeah that's the speciifc case I mentioned earlier

dim warren
dim warren
#

ooooh

#

okay my bad

#

(I never use library assets so I forgot that they are based on different Blend files)

alpine glen
#

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

dim warren
#

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

urban zealot
# dim warren Oh, related to the earlier discussion: <@329762623304499202> would it be plausib...

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

alpine glen
#

@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 😅

dim warren
dim warren
#

so they are somewhere haha

gloomy fable
#

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

dim warren
gloomy fable
#

nit is to prefil this with untitled_project

#

yes!

dim warren
gloomy fable
#

ezpz 🍋 GrabbyHand squezy

dim warren
#

the hammer symbol on the upper left brings you to the level editor

gloomy fable
#

i have my map

dim warren
#

F9 compiles it

#

there's some jank regarding baked light rn

gloomy fable
#

oh no

#

i forgot where my f9 is

dim warren
#

it's very possible you'll get an error while building

gloomy fable
#

perfection

dim warren
#

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

gloomy fable
#

aw dang

#

ok no that's awesome

#

this is really cool

dim warren
gloomy fable
#

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

dim warren
gloomy fable
#

cargo install rat

#

rat race

dim warren
gloomy fable
#

lmao

#

i think that's "remote access trojan"

#

this is very cool

dim warren
#

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"

dim warren
#

Update, I'm a silly sausage and the polygon tool stuff is already on sbox main

covert heron
#

@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

urban zealot
urban zealot
covert heron
#

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

urban zealot
#

Send them after you're done

covert heron
#

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

urban zealot
#

Sure thing

covert heron
#

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

cyan sapphire
#

Hey everyone, excuse my ignorance but to do pathfinding / navmesh stuff can I use rerecast and vleue_navigator with this?

dim warren
#

(though I personally use landmass instead of vleue_nav)

dim warren
#

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

urban zealot
# dim warren <@329762623304499202> any idea why this may be happening?

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?

dim warren
dim warren
#

I can't reproduce it on demand, so I'll just wait

dim warren
#

hmm, bevy_render doesn't generally like PostUpdate to do stuff

urban zealot
plush zinc
#

interesting, thats a good lead thanks

urban zealot
#

Before I commit, I should run it by y'all for thoughts or in case I missed something @dim warren @plush zinc

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

urban zealot
# plush zinc or is it not going through there and because gltf

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

plush zinc
#

i see

urban zealot
#

oh just remembered that gltf images defines their own samplers so that is not part of the problem

plush zinc
#

no idea then

dim warren
#

@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

urban zealot
#

I'm just about to go to sleep, I'll debug tomorrow!

dim warren
urban zealot
#

I thought I fixed an origin brush issue just like this too, but I guess there's something else

dim warren
urban zealot
#

The two are generated a bit differently, this was part of the problem with the previously mentioned bug

dim warren
#

aah I see

vivid basin
#

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 💜 )

urban zealot
urban zealot
#

Also, in the future make sure to ping me, as I don't get notifications here

vivid basin
#

ty, thats helpful!

vivid basin
#

@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

dim warren
vivid basin
#

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. ![ferris_think](https://cdn.discordapp.com/emojis/855197842388942888.webp?size=128 "ferris_think")  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);
}
```⁩
dim warren
urban zealot
#

Jan's code is the workaround

urban zealot
dim warren
#

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?

dim warren
#

so it should be easy to replace ahoy with that

urban zealot
dim warren
urban zealot
dim warren
#

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

urban zealot
#

It should definitely be fixed before a week

dim warren
#

aww no worries

#

thanks, that would be cool 🙂

#

but really, don't stress too much

#

we can certainly manage with cuboids too broovy

vivid basin
vivid basin
#

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)

dim warren
#

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

dim warren
digital heath
#

Move-and-slide is pretty much the only new thing on the current main branch, other than some small documentation PRs

vivid basin
dim warren
#

though it needs to be updated to 0.18

urban zealot
#

@dim warren Fixed the collider issue, update your branch to latest ⁨main⁩ and you should be golden

dim warren
#

Will check out later 🙂

#

That was fast!

urban zealot
#

It was a pretty small dumb mistake for a case I didn't test

urban zealot
vivid basin
#

i could definitely make use of that, even without io impld

vivid basin
#

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

urban zealot
vivid basin
urban zealot
urban zealot
#

Not doing that could cause it to mess up

vivid basin
vivid basin
#

@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 sad_cowboy

urban zealot
#

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 thonk
I'd have to make dynamic classes possible though, which sounds hard considering our reliance on the type registry

vivid basin
#

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.

vivid basin
urban zealot
vivid basin
#

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

dim warren
#

@urban zealot there’s no way to tell BTB to not look for material files that I know don’t exist, right?

urban zealot
# dim warren <@329762623304499202> there’s no way to tell BTB to not look for material files ...

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

urban zealot
# urban zealot This also gives me the idea to make it so you can automatically create a class f...

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

GitHub

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...

urban zealot
vivid basin
urban zealot
dim warren
#

(I consider them the unofficial SME-Assets hehe)

feral prairie
#

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

urban zealot
# dim warren <@329762623304499202> there’s no way to tell BTB to not look for material files ...

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

dim warren
dim warren
#

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

urban zealot
urban zealot
dim warren
#

@urban zealot do you happen to be online? 🙂

dim warren
vivid basin
#

@dim warren curious to know if youve tried compiled lighting bsps on web release/if they work

dim warren
#

Not sure

vivid basin
#

cool ill check it out.

#

i guess the alternative is building irradiance volumes but idk what that TB->Blender workflow looks like

urban zealot
urban zealot
urban zealot
dim warren
#

for the avian <-> trenchbroom integration crate

urban zealot
dim warren
urban zealot
#

@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

urban zealot
#

@vivid basin If you're still planning to use BSPs, I've updated the manual with worldspawn keys to make lighting look better at the end of "How to use BSPs"
It won't update on docs.rs until the next release so you'll have to read it on github :)

vivid basin
#

appreciated!

pallid fox
#

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.

vivid basin
#

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

pallid fox
#

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

vivid basin
dim warren
vivid basin
# pallid fox i think the core of the issue is that i didn't have the levels pre-loaded, so wh...

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

GitHub

Contribute to bevjam7/feverish development by creating an account on GitHub.

vivid basin
#

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,
}
urban zealot
#

I'd also add "scale": scale and its respective field

urban zealot
vivid basin
#

oh yeah maybe it just allows malformed input lol

#

failed successfully sungl

fathom gulch
#

whats the difference between using ericw-tools and trenchbroom?

dim warren
#

It’s a bit like using VS Code vs using rustc/cargo 🙂

fathom gulch
#

ooh

covert heron
#

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

fathom gulch
dim warren
fathom gulch
#

for like the textures

dim warren
#

That’s more for Quake modding

dim warren
fathom gulch
#

oh

#

thx

#

how do I reload this?

#

so TB sees my new textures

#

do I need to run it again and restart?

dim warren
#

One reloads entities, the other textures

fathom gulch
#

waittt

#

it is rooted in /src

#

moving the textures to /src/assets/textures worked

#

cool

dim warren
fathom gulch
#

yeah

dim warren
#

That’s when it tells TB where to find stuff 🙂

fathom gulch
#

my editor cds to whatever file is open

#

so I usually cargo run inside /src

dim warren
#

You'll probably wanna cd .. then broovy

fathom gulch
#

yeah

halcyon frigate
#

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

fathom gulch
#

okayy so plugging bevy trenchbroom into avian with AvianPhysicsBackend.. but my collider keeps latching onto all the seams between objects

dim warren
narrow obsidian
#

Is there a workflow for handcrafting colliders instead of auto generating convex / trimesh?

vivid basin
covert heron
#

@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.

covert heron
#

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

dim warren
#

Just need to make sure the threads are split at entity boundaries

covert heron
#

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

covert heron
#

"normal" buffered I/O takes about 900 ms

urban zealot
# halcyon frigate Hey Noxmore, I’ve been working on my fork of bevy_trenchbroom for a while now be...

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?

urban zealot
urban zealot
covert heron
#

Also, I assumed you're not using any parts from quake-util other than qmap, is that correct?

#

(well, besides the error module)

halcyon frigate
# urban zealot Sorry for late reply, please ping me in the future so I get notified! I'm not su...

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.

urban zealot
# halcyon frigate Noted! I try not to ping the crate authors in ecosystem channels because it gets...

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

urban zealot
halcyon frigate
halcyon frigate
#

Eventually I want to spawn all the lights as bevy light entities but for now they’re just constant lit

halcyon frigate
urban zealot
halcyon frigate
#

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

urban zealot
halcyon frigate
#

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

covert heron
#

@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

https://crates.io/crates/quake-map/0.6.1

#

(there's a lint for exports that reference non-exported items, but that's in nightly only)

urban zealot
#

If it's a patch version update I don't need to do anything for the end user, as I only select 0.6 :)

covert heron
#

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

urban zealot
covert heron
#

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

fathom gulch
#

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

urban zealot
fathom gulch
#

oh

#

cool

dry portal
#

@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

dry portal
#

I am surprised if this is just hitting me
this explains it too: it only happens if build without bsp (like i do) and with a rotated object + that has an origin + convex_collider

covert heron
#

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

dry portal
#

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

halcyon frigate
vivid basin
#

wait is that nuke

small dove
halcyon frigate
urban zealot
#

:O that's so sick!!

halcyon frigate
urban zealot
halcyon frigate
#

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

urban zealot
halcyon frigate
#

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

tidal jackal
#

It's been a while since I lurked in here. Have all the channels moved around now? 🤔

dim warren
#

@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

willow wedge
#

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?

willow wedge
#

i figured it out