Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Export portal file from bsp #97

Open
mfaizsyahmi opened this issue Oct 3, 2022 · 8 comments
Open

Export portal file from bsp #97

mfaizsyahmi opened this issue Oct 3, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@mfaizsyahmi
Copy link

A shot in the dark here, but related to #96.

I want to re-VIS a bsp file so that the area with info_overview_point is visible everywhere on the map. But VIS program requires a portal file, which doesn't come with maps you didn't compile yourselves.

There is a program called bsp2prt out in the wild, but it only takes in quake bsp maps. It refuses to take in goldsrc's bsp files. But this proves that it's technically possible to fish out portal data from a compiled BSP.

If #96 isn't going to be pursued, It'd be mighty helpful to finally have the goldsrc counterpart to the program, so that we can re-VIS existing maps. Perhaps to fix VIS glitches from the original VIS with modern tools.

@wootguy wootguy added the enhancement New feature or request label Oct 3, 2022
@Qwertyus3D
Copy link

@mfaizsyahmi I think it's probably possible to edit BSP in any HEX-editor and change its' header, to specify another BSP version. So this will hopefully 'demake' BSP into file, compatible with bsp2prt.

@marigi64
Copy link

This unfortunately doesn't seem to work with bsp2prt. Changing the header to version 29 results in the program not generating any prt file.

@mfaizsyahmi
Copy link
Author

@mfaizsyahmi I think it's probably possible to edit BSP in any HEX-editor and change its' header, to specify another BSP version. So this will hopefully 'demake' BSP into file, compatible with bsp2prt.

Doesn't work. I tested this route before I raised this issue.

@UnrealKaraulov
Copy link
Contributor

@mfaizsyahmi bsp2ptr is opensource tool? how to download it?

I think it needed feature because some manipulation can destroy VIS data.

@UnrealKaraulov
Copy link
Contributor

UnrealKaraulov commented Dec 30, 2022

@wootguy you don't know ? BSP file contains needed information for writing .PRT file?

@wootguy
Copy link
Owner

wootguy commented Dec 30, 2022

I don't think it does, but marking which leaves you want visible is doable. I guess there would be a leaf selection mode where selecting a face highlights all the faces in the same leaf. Then you could have a widget that lets you set the leaf to be globally visible.

I do feel like it should be possible to re-compile a bsp, starting from the BSP stage. After CSG finishes you get a set of faces which I think is similar to the final bsp but without any cuts. I couldn't get hlbsp to work with any faces I made though. I don't understand the compilation process well enough to get that working.

@UnrealKaraulov
Copy link
Contributor

UnrealKaraulov commented Dec 30, 2022

@wootguy I think PVS can be edited without problem
https://www.youtube.com/watch?v=2Lkkyb7tuos (but this old version with bugs, in latest buld VIS Debugger works without problems), if need I can add edit option and compress vis data back after editing.

But if need do full revis, vis.exe requires .prt file, i don't know file format and specs, something like

<leaf num>
<portals num>
LEAFS:
1
1
1... 
PORTALS:
<NUM VERTS> <LEAF1> <LEAF2> <xyz num verts times>

or for run vis.exe need something else?

@marigi64
Copy link

marigi64 commented Aug 1, 2023

Being able to edit Vis or recompile it would certainly come in handy. Some faces don't display in many old maps and I've been looking for a way to fix that without having to recompile the entire map.

20230801150748_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants