bgeo format file

   11191   18   4
User Avatar
Member
11 posts
Joined: 3月 2009
Offline
I would like to write a plug-in for maya that can import and export bgeo format!
And the plug-in can import and export geo format,but fail to bgeo.
And I don‘t know how Organization and management of bgeo format file.
help!

east
User Avatar
Member
2199 posts
Joined: 7月 2005
Online
This may help you

http://sourceforge.net/projects/houdinigpdlibra/ [sourceforge.net]
The trick is finding just the right hammer for every screw
User Avatar
Member
11 posts
Joined: 3月 2009
Offline
Thanks!
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
Ich have put the files from sourceforge into a VS2010 Solution and after some corrections they to compile and work for ascii files, but bgeo files written by this example code can not be read by houdini 11. Its not a little endian problem and a quick compare between the generated file and a houdini one shows just little differences. In the Data folder are Reference files written by houdini and GPD files written by GPD. I hope somebody has some ideas what could be wrong. Help is very much appreciated

dulo

Attachments:
GPD.zip (142.4 KB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
I made a new Version of the Solution now with more example files/projects and its working in debug and release ( old one was just configured for debug )
Tomorrow i will make a VS2008 Version and make some tests with an x64 build. I hope someone can help with the bgeo problem ..

Attachments:
GPD.zip (150.9 KB)

www.woogieworks.at
User Avatar
Member
120 posts
Joined: 2月 2008
Offline
looking forward to trying the VS 2008 version…
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
Still working on it .. got some troubles with multiple WinSDKs … something seems to be wrong with WinSDK 7.0a .. now I am going back to 5.xx ..
www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
This is a VS2005 Solution of the GPD lib and the 3 examples. Its tested in release and debug in x86 .. for me it works on ascii files but it fails to write readable binary files ..

Attachments:
GPD2005.zip (142.3 KB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
This is a VS2005 Solution of the GPD lib and the 3 examples. Its tested in release and debug in x86 .. for me it works on ascii files but it fails to write readable binary files ..

Attachments:
GPD2005.zip (142.3 KB)

www.woogieworks.at
User Avatar
Member
7722 posts
Joined: 7月 2005
Online
The original GPD library had no binary file (.bgeo) support. Perhaps it was never done/finished in the sourceforge version?
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
Well the code is there and it gives results and the files dont look too bad in the hex monitor but houdini doesnt load them. In the first versions it was a problem with the little endian preprocessor setting but now everthing compiles right and it should work .. at the moment i am just using the ascii version and i am trying to add support for volumes …
www.woogieworks.at
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
I don't remember details at the moment, but original code seems to have a small bug/issue related to legacy headers or something. Binary data has a wrong layout. We've faced it during a creation of python module for r/w bgeo files. Fix wasn't so big, I just need to find a source code which I haven't seen for a while.

The biggest problem for us was a plethora of environments we were tried to compile our extension. A long as we stayed on Linux land having 2.5 and 2.6 pythons (plus versions of gcc) all was fine. On Windows though, well…

Anyway, GPD certainly works with binary files with that minor patch.

I'll try to narrow it.
skk.
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
That would be really great !!! Help is much appreciated
www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
This is a new Version of the lib with examples as VS2005 Solution.
Fixed some uninitialized Variables fileNprim = 0; fileNpt = 0 ;
Seems like gcc can init members with zero ???!! otherwise the code could never have worked ..
Also attached some files written by example makesphere. geo file is read by houdini but bgeo is not. but if you compare the bgeo file written by GPD and the bgeo file written by houdini the differences are minor.

Attachments:
GPD.zip (143.6 KB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
Created a diff of the houdini sphere and the GPD sphere ( in Fusion with difference -> dilate -> Blur -> merge ) in my hex monitor .. doesnt seem too bad ..

Attachments:
Differences.zip (134.7 KB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
Updated diff image .. there are no differences in the first 73 bytes ..

Attachments:
DifferenceFusion0000.png (81.6 KB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
In the MakeSphere example the problem is the byte 786 .. if you delete the value 0x0d then the file works .. this is a unsigned short written from the method saveVertex by the method UTwrite .. but its quite odd because the method works properly before offset 786 and afterwards ..
www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
I dont get it .. i really start to freak out ..
the following code

unsigned short first = 9;
UTwrite(os,&first);
first ++;
UTwrite(os,&first);

results in this binary stream :

00 09 00 0d 0a

the same unsigned short smaller than 9 is written as 00 09 and if its greater than 10 its written as 00 0d 0a ???? !!!

what the hell is going on here ??
www.woogieworks.at
User Avatar
Member
383 posts
Joined: 6月 2010
Offline
This is a working GPD Solution for VS2005 for Release, Debug and x86 and x64 !!
It reads and writes binary and ascii files.
I fixed some windows errors and loads of warnings.

cheers dulo

Attachments:
GPD.zip (152.3 KB)

www.woogieworks.at
  • Quick Links