Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 12th Aug 2003 22:46
Dont worry.. this will hopfully be my last bsp topic for a while

But as I still havnt managed to think up anything, I thought I would give this its own topic so any bsp kings out there (someone said raven knew alot about bsps?) could possiably help me.
From what I can make out, a bsp can take two types of entity; Point Entitys and Brush Entitys. Thanks to Guy's dll I have point entitys sussed no worrys. Brush entitys are things like doors, buttons, trigger-areas and they illude me =_=

As I am under the impression that bsp geometry is static, i am *assuming* that what engines like half-life do is hunt down these brush entitys, identify them for what they are (door, button, etc) and insert their own object right there. This is what I was intending to do, and I am pretty confident that if I had the means I could write all the code to do that (apart from texturing them.. onto that in a minute) - my problem is that although I can find the brush entitys using Guy's entity dll, I have no information telling me its place in the world, its angle and its width and height. If i had that info, i could at least replace the entitys with cubes and size the cube accordingly (which would be fine.. unless i started wanting funny shaped doors and buttons -_-). How can i gain this information?
Now lets presume I got that information - the only other thing I would need would be its texture information so I could texture it how it looks in the editor. I again am *assuming* when i say that I think darkbasic pro probably loads all needed textures from the .wad file into memory when it loads the bsp? So all I effectivly need is a pointer to the right texture in memory (thats all ehh.. lol)

Can anyone clue me in on this? is it even possiable? It would kinda suck if i could never have any doors or buttons, and im desperate to get trigger-area information so I can get down to writing a meaty trigger engine within game

Btw, i'll just sneak this in at the bottom of the post - as most of the bsp compilers are all full of licenses and royaltys blah blah.. I was thinking of writing my own for all db users to use for free (yes i know, I am insane and it may (read: will probably) never happen =_= but before you bite at me, yes I do have experiance with c/c++ ) and on my travels I came across this:
http://www.cg.tuwien.ac.at/~msh/bsplib/
seems to be some sort of c library to help with the compiling of bsps etc. I havnt really looked at it yet, I dunno how deep it goes into bsp compiling (vis data and radiosity etc) but it may be worth a look if any of you out there feel like giving it go
p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 13th Aug 2003 21:16
i am a step closer to my goal.. but only a tiny step. I took another look at my entity dump of a map:

model :: *1
renderamt :: 255
rendermode :: 4
rendercolor :: 0 0 0
classname :: func_wall

Thats entity information for the brush-type entity func_wall. For some reason i had never thought twice about the model entry.. but i spotted it today and then started trolling through some c++ forums to find out what on earth it was. It would appear that inside the bsp data is some sort of stack of model data for brush type entitys, the number after the model entry appears to be an index for that stack so you know which model that entity is. My main hope is that this model data contains not only x/y/z and rotation data, but also maybe texture data - perhaps im being too hopful Now i need to find a way to access all this.. it is quickly becoming clear that i will need to write a dll to handle this rather than do it all from within dbp... although i have a small fear when it comes to actually rendering these entitys as dbp renders the whole bsp itself.. if i then tried to render the brush entitys after i may get some very very strange z-ordering errors.. also lack of access to portal information is probably going to force me to render all these entitys no matter wether they are visable or not :/ but meh, this is all guess work. I beg again that if anyone knows about these formats and how to handle all of this, please speak up T_T

(it feels like im keeping a 'sephs travels through bsps' diary )

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.

Login to post a reply

Server time is: 2026-07-23 00:55:06
Your offset time is: 2026-07-23 00:55:06