Latest topics
» BSP anti decompiling goldsrc maps
Mon May 15, 2017 8:59 pm by Admin

» yard map a1
Mon May 01, 2017 6:30 pm by Admin

» Get 6 months free pluralsight
Thu Feb 02, 2017 7:08 pm by Admin

» How a skybox can effect your map
Mon Jan 16, 2017 8:52 pm by Admin

» Setup guide for Half-life
Sat Dec 31, 2016 2:19 pm by Admin

» WIP Hammermate
Wed Nov 30, 2016 8:17 pm by Admin

» WIP dod_genesis
Sun Sep 25, 2016 12:05 pm by Admin

» [MODEL] V2 rocket
Wed Sep 07, 2016 6:22 pm by Admin

» Transparent textures issue
Tue Aug 30, 2016 4:47 pm by Admin

July 2017
MonTueWedThuFriSatSun
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Calendar Calendar


Modifing compiled bsp`s

View previous topic View next topic Go down

Modifing compiled bsp`s

Post by Admin on Sat Jan 23, 2016 1:07 pm

I`ve often wondered if its possible to add new brush based entities to compiled maps, it would be very difficult or impossible to edit the main world bsp but if each brush based model is a separate BSP could I take part of a compiled map and insert its parts like verts, clipnodes & edges into a compiled map?

http://hlbsp.sourceforge.net/index.php?content=bspdef

So this is my new side project, to see if I can insert a new aaatrigger brush in to a compiled map and document the attempt here.

Admin
Admin

Posts : 87
Join date : 2016-01-19

View user profile http://goldsrc.forumotion.co.uk

Back to top Go down

Re: Modifing compiled bsp`s

Post by Admin on Sat Jan 23, 2016 1:08 pm

After sleeping on this I was thinking that it might be possible to add non-soild faces to the main bsp, this way they would not be editable to anyone without knowledge of the inside of the Half-life bsp, at the same time it might also be possible to stop faces from being rendered but I cant think of any good uses for that.

I think the first step is to install unity and poke around in the PVS

Admin
Admin

Posts : 87
Join date : 2016-01-19

View user profile http://goldsrc.forumotion.co.uk

Back to top Go down

Re: Modifing compiled bsp`s

Post by Admin on Sat Jan 23, 2016 1:08 pm

I got a little side tracked with an old project to make a light-map importer / exporter so that you could either edit the shadows in my program or export them to a paint package, but thing that bothered me was that in half-life you can switch lights on and off so this is done either in code or most likely during compile.

So to figure out how it `s done I made two identical maps one has two lights the other just one.



I compiled and loaded the headers up only to find the number of bytes in the lightmaps are exactly the same, the difference in the number of entity chars is expected as these are just plain text that can be edited with bspedit.



weird, I don't think  lights are done in game like the torch and gunfire effects or I could just add them to any compiled map to change the lighting,  but to make sure I removed both lights with bspedit and fired up the maps in dod and as seen below there was no visible change to the lighting Sad So the lighting is done during compile.



Ok I`m running out of ideas, is the lighting only done when you give the light a name so it can be switched off?
This makes sense making a new lightmap for every light that hits a face could make the bsp very large.

so back to hammer and add a switch to one of the lights.



compile and load up the headers and I now have 294 bytes in the new map twice as many as in the other Very Happy I`ll have to look further but I guess you add both lightmaps together to get both lights and subtract the second to remove it, there must be some more info in the face to tell the engine the number of lights and perhaps a light name or ID



Admin
Admin

Posts : 87
Join date : 2016-01-19

View user profile http://goldsrc.forumotion.co.uk

Back to top Go down

Re: Modifing compiled bsp`s

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum