Porting Voxlap

Miscellaneous projects by the Build and Shoot community.
222 posts Page 12 of 15
GreaseMonkey
Coder
Coder
Posts: 733
Joined: Tue Oct 30, 2012 11:07 pm


Iceball's assets are CC-BY-SA so you can take them as long as they stay under the same licence (unless of course you get an exemption from the asset authors, but is there really any need to do that?). This shouldn't place any restrictions on the engine licence.

...they're also PMFs, not KV6s, which are fairly different. If you want to throw in a PMF renderer, then go ahead, otherwise you'll want to either make KV6 versions of the PMFs, or hunt down the source KV6s for the PMFs that were definitely fed through tools/kv62pmf.py.

In December I'll probably end up doing a farm stay again. Might see if I can get the sound of either someone cracking a whip, or an actual .22 hunting rifle firing. I'll probably have my camera :)
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


CC-BY-SA is awesome by me. Is pmf2kv6 feasible?
GreaseMonkey
Coder
Coder
Posts: 733
Joined: Tue Oct 30, 2012 11:07 pm


Sonarpulse wrote:
CC-BY-SA is awesome by me. Is pmf2kv6 feasible?
It's about as feasible as poly2vox, really, which does exist so it should be doable.

This documentation might help. Note, I have managed to generate .kv6 files before using a visibility of 0x3F (all faces visible) and that "unknown" value I think was 0, but Your Mileage May Vary.
You'll also want to do a hollowness test of some sort, and of course you will want to make sure the visibility isn't 0x3F, but something properly calculated ;)
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


GreaseMonkey wrote:
poly2vox
I know about several programs and algorithms doing that, so it's nothing new. ;)
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


Hmm, is the PMF documentation in the iceball docs? Also, I take it that PMF is a polygonal format then?
https://github.com/iamgreaser/buldthens ... at_pmf.txt

OK. So with KV6, what is are the offset lookup tables for? Ken uses the same concept for the frame buffer, but that get's re-sized. KV6 is size is static rectangular prism I assume.

PMF, hmm, what's going on here? Seems like bones in stuff. Then again KV6s are used animation, so maybe I am missing something there.
GreaseMonkey
Coder
Coder
Posts: 733
Joined: Tue Oct 30, 2012 11:07 pm


Sonarpulse wrote:
Hmm, is the PMF documentation in the iceball docs? Also, I take it that PMF is a polygonal format then?
https://github.com/iamgreaser/buldthens ... at_pmf.txt

OK. So with KV6, what is are the offset lookup tables for? Ken uses the same concept for the frame buffer, but that get's re-sized. KV6 is size is static rectangular prism I assume.

PMF, hmm, what's going on here? Seems like bones in stuff. Then again KV6s are used animation, so maybe I am missing something there.
KV6s are 3d arrays of cubes with some special encoding to make sure they don't take shitloads of space and are also fast to render. The non-exposed inside blocks are not explicitly stored in the file.

xoffset and xyoffset give lengths for each X/Y coord (Z being the going-down coordinate) or something like that. I suggest you look at a kv6 in a hex editor (say cp.kv6) and it should make more sense.
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


OK, looked a bit more around. In case you all haven't noticed, Slab6 has been in the repo for a while. Once the initial port is done I will probably split Voxlap5.cpp up into some more manageable parts. This will allow rebasing Slab6 on voxlap, and would also be a good time to whip up a command line tool to convert between formats.
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


OK, knocked off another function's gcc inline asm too. Only 5 more to go!
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


We need a list of those functions that have been ported, so we can work on those that don't work, instead of having to start looking at an individual function only to realise that it already works...
Especially a list of the voxlib.txt functions that work completely would be VERY useful... Green_Happy3
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


No offence, but I think I already mentioned some. Functions with names like hrendzsse (but no that one in particular) need to be converted to gcc inline asm on the "conservative" branch.

After that it remember it's more of a debugging process, as I don't know exactly where the various mistakes are.
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


Ok... but do we at least have an overview over which voxlib.txt functions work, and which don't? Else, I'll have to go with the brute force method. Green_Spade
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


  1. I am sure those rendering functions' asm doesn't work, so fixing it is priority number one, it is a tedious but mechanical process.
  2. I also know the C in updatereflects is causing problems with BOTH msvc and mingw--it's just straight up broken code. Checkout out the commit called "second C alternative for 'updatereflects' now in use" on no_asm, the specific "swapping" of C for asm in this commit causes the white KV6s that appear when doing a C compile.
  3. Now it makes sense to do what you I think it is you want, unit test each function with msvc, (and the original code?) and then see what tests fail when we do msvc+C-equivalents, gcc+C-equivalents, or gcc+inline-assembly.
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


Actually I wanted to isolate each (voxlib.txt) function and their sub-functions, and do some black box testing on them via a separate program. Now that I know that the rendering-related are top-priority, I'll focus on them from now on. Green_Wink1
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


yeah, that black box testing is basically unit testing. We can sure do that once conservative runs kinda normally. Thanks for focusing on the rendering functions.
Cajun Style
Deuced Up
Posts: 145
Joined: Fri Dec 07, 2012 11:04 am


I'm going to continue my asm learning efforts. I'm learning AT&T and Intel at the same time. Hope I'll be able to help out in time.
For unit testing it might be very handy to know what each function is supposed to do exactly. Blue_Embarrassed
222 posts Page 12 of 15
Return to “Noteworthy Picks”

Who is online

Users browsing this forum: No registered users and 1 guest