Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 1:30 pm
All times are UTC + 0
VXL File Format
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
shiny
Guest




PostPosted: Fri Aug 08, 2008 1:27 pm    Post subject:  VXL File Format Reply with quote  Mark this post and the followings unread

I am writing a program to read the VXL file format. I have used several resources so far; The VXL documentation available here http://xhp.xwis.net/documents/VXL_Format.txt, the source code for the excellent OS Voxel Tools (the program this board is dedicated to) and the source code from the XCC Mixer and related tools (http://xhp.xwis.net/).

I can successfully read the headers & tailers, but the voxel data itself is causing me some trouble. I just keep ending up with scrambled data. The thing that is confusing me the most is the span_start and span_end arrays. I understand these to be byte offsets into the span_data, but if I take the first span in span_data, I end up with a voxel_count (from the top & tail of the span), the skip count, and the voxel data itself. But if I add up the 3 bytes for the skip count & voxel counts then add on 2 * the voxel count, the result does not equal span_end - span_start for that span. Am I misunderstanding some part of the format?

If I just ignore the start_span & end_span values then I appear to be able to read a set of packed spans (top & tail voxel counts match, skip count looks sane), but when I try to display them it's not right.

I noticed in this http://www.ppmsite.com/forum/viewtopic.php?t=14594 thread ViPr said that they had some more up-to-date documentation for the VXL format, so if someone round here has a copy of that I'd really appreciate a copy.

Back to top
shiny
Guest




PostPosted: Fri Aug 08, 2008 4:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, I've fixed it. I took a more detailed look at the pascal code in OS Voxel Tools. I just use the start_span offset to seek to the start of each span, then I read the voxels for the span from there. This works properly.

Thanks to Banshee & anyone else who's worked on the OS Voxel Tools - wouldn't have got very far without the loading code for reference.

I now have a C++ class for reading VXL files. I'm happy to post it if anyone wants it for anything (BSD licensed).

Back to top
NewGuy
Missile Trooper


Joined: 24 Feb 2008

PostPosted: Fri Aug 08, 2008 5:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Are you planning to create a new tool for the community?

_________________
Please, read the signature rules of the forum.

Back to top
View user's profile Send private message
shiny
Guest




PostPosted: Fri Aug 08, 2008 5:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, probably not a modding tool as that seems well covered when it comes to SHP/VXL/HVA. A couple of friends & I are reimplementing Red Alert 2 (and Yuri), using more up-to-date & portable libraries (SDL/OpenGL) and using TCP/IP or UDP/IP instead of god-awful IPX. Whether this will materialise is another question entirely, it's more something to keep me busy for now. RA2 was a fantastic LAN game, but now-a-days it's just such a pain to get it set up, especially as it refuses to run networked in WINE.

Back to top
Dny
Energy Commando


Joined: 28 May 2008

PostPosted: Fri Aug 08, 2008 8:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

These are just great news

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Fri Aug 08, 2008 8:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

shiny wrote:
Well, probably not a modding tool as that seems well covered when it comes to SHP/VXL/HVA. A couple of friends & I are reimplementing Red Alert 2 (and Yuri), using more up-to-date & portable libraries (SDL/OpenGL) and using TCP/IP or UDP/IP instead of god-awful IPX. Whether this will materialise is another question entirely, it's more something to keep me busy for now. RA2 was a fantastic LAN game, but now-a-days it's just such a pain to get it set up, especially as it refuses to run networked in WINE.

I suggest chatting with PaD or DCoder for that RA2/YR stuff... I dunno if they are doing the same thing as you guys do, but it seems you have a certain coding knowledge Smile

Back to top
View user's profile Send private message Send e-mail Skype Account
NewGuy
Missile Trooper


Joined: 24 Feb 2008

PostPosted: Fri Aug 08, 2008 8:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

shiny wrote:
Well, probably not a modding tool as that seems well covered when it comes to SHP/VXL/HVA. A couple of friends & I are reimplementing Red Alert 2 (and Yuri), using more up-to-date & portable libraries (SDL/OpenGL) and using TCP/IP or UDP/IP instead of god-awful IPX. Whether this will materialise is another question entirely, it's more something to keep me busy for now. RA2 was a fantastic LAN game, but now-a-days it's just such a pain to get it set up, especially as it refuses to run networked in WINE.

very intresting info here, I hope you keep us updated with that OpgenGL stuff.

Back to top
View user's profile Send private message
dbsboy
Civilian


Joined: 05 Dec 2008

PostPosted: Fri Dec 05, 2008 9:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

shiny wrote:

I now have a C++ class for reading VXL files. I'm happy to post it if anyone wants it for anything (BSD licensed).


Shiny,
I've been trying to use Flash to read in VXL files. May I take a look and learn from your c++ class?

Back to top
View user's profile Send private message
shiny
Civilian


Joined: 11 Aug 2008
Location: The internet

PostPosted: Mon Dec 29, 2008 7:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

dbsboy; Yes, no problem. I'll find it tomorrow and post it.

_________________
If at first you don't succeed, get a bigger hammer.

Back to top
View user's profile Send private message
shiny
Civilian


Joined: 11 Aug 2008
Location: The internet

PostPosted: Tue Dec 30, 2008 4:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here it is, I think all the required files are in there. GPL2 licensed.



vxlreader.tar.gz
 Description:
C++ VXL reader and peripheries.

Download
 Filename:  vxlreader.tar.gz
 Filesize:  22.46 KB
 Downloaded:  774 Time(s)


_________________
If at first you don't succeed, get a bigger hammer.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Tue Dec 30, 2008 5:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just wondering, why GPL2 instead of the BSD liscense you said in a post above?

Back to top
View user's profile Send private message Visit poster's website Skype Account
shiny
Civilian


Joined: 11 Aug 2008
Location: The internet

PostPosted: Tue Dec 30, 2008 6:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

In incorporates some code and algorithms from Voxel Selection Editor, and the GPL meets the requirements for crediting the authors. Also it was the license that I happened to have the header etc. lying around ;p, and I like to make sure the license on any code I release is clear. I can re-license to BSD if you like, after all it's mostly just ported from Voxel Selection Editor's pascal code.

_________________
If at first you don't succeed, get a bigger hammer.

Back to top
View user's profile Send private message
dbsboy
Civilian


Joined: 05 Dec 2008

PostPosted: Thu Feb 12, 2009 3:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thank you shiny! I will post some stuff when I get something done with this too.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1670s ][ Queries: 13 (0.0109s) ][ Debug on ]