Topic: Blender to .mod scripts are there any working?  (Read 32526 times)

0 Members and 1 Guest are viewing this topic.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #20 on: February 19, 2010, 09:36:06 pm »
http://pyffi.sourceforge.net/

Would this be of any help?

Quote
The Python File Format Interface, briefly PyFFI, is an open source Python library for processing block structured binary files:

    * Simple: Reading, writing, and manipulating complex binary files in a Python environment is easy! Currently, PyFFI supports the NetImmerse/Gamebryo NIF and KFM formats, CryTek’s CGF format, the FaceGen EGM format, the DDS format, and the TGA format.
    * Batteries included: Many tools for files used by 3D games, such as a stripifier, tangent space calculator, 2d/3d hull algorithms, inertia calculator, as well as a general purpose file editor QSkope (using PyQt4), are included.
    * Modular: Its highly modular design makes it easy to add support for new formats, and also to extend existing functionality.


This has been used for other game files from Max to Blender.


I'll check it out, thanks.  Got a few docs printed out so time to read (yes, Bonk I still print dang near everything, saves my eyes).
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Rod ONeal

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 3592
  • Gender: Male
Re: Blender to .mod scripts are there any working?
« Reply #21 on: February 19, 2010, 09:45:32 pm »
I hadn't noticed the omission of .obj export. Still does direct X, FBX, and Collada though (.xsi as well which a lot of aps. can import too). Which is really strange because it doesn't stop people from getting stuff out of Modtool and into another 3D ap. I wonder why they dropped it? 
If Romulans aren't cowards, then why do they taste like chicken?

Offline Kreeargh

  • Retired.
  • Lt. Commander
  • *
  • Posts: 1476
  • Gender: Male
  • Life is as is worth only what you learn from it!
Re: Blender to .mod scripts are there any working?
« Reply #22 on: February 20, 2010, 12:02:20 am »
I hadn't noticed the omission of .obj export. Still does direct X, FBX, and Collada though (.xsi as well which a lot of aps. can import too). Which is really strange because it doesn't stop people from getting stuff out of Modtool and into another 3D ap. I wonder why they dropped it?
Problay a $ issue i noticed the obj format had a new tag name gw::objfile in the max 9 design demo vrs the max9 demo. A new plugin/format im guessing made by autodesk??, wasnt the obj format made by wavefront? Just a guess on my part though.

ANy how i have a $100 bill for anyone who can release a export to sfc directly from Blender plugin to keep the modeling community alive for good! Im willing to pay more $ for a import sfc to Blender plugin but the first goal is Export to .mod.  $ keeps going up more free 3d programs plugins are made for, Wings 3d is the next verision. No game moder should have to pay 1 $ to mod a game for free!   
Time for life!

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #23 on: February 20, 2010, 03:48:09 pm »
okay got blender installed, but for some reason it doesn't want to load up the python I also installed.  Could be that blender was compiled with an earlier version of python.

Printing out the 3DS import script.  Will then compare with the .mod import and export files.  Will what I can gleen from that.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kreeargh

  • Retired.
  • Lt. Commander
  • *
  • Posts: 1476
  • Gender: Male
  • Life is as is worth only what you learn from it!
Re: Blender to .mod scripts are there any working?
« Reply #24 on: February 20, 2010, 03:59:15 pm »
okay got blender installed, but for some reason it doesn't want to load up the python I also installed.  Could be that blender was compiled with an earlier version of python.

Printing out the 3DS import script.  Will then compare with the .mod import and export files.  Will what I can gleen from that.
Blender 2.5 need python 311 i belive the 2.49 version works with the 2??? python. Just FYI  ;D
Time for life!

Offline sierracharlie

  • Lt. Junior Grade
  • *
  • Posts: 36
Re: Blender to .mod scripts are there any working?
« Reply #25 on: February 20, 2010, 09:40:49 pm »
Blender 2.49 is the latest stable version. It uses Python 2.6

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #26 on: February 20, 2010, 10:10:41 pm »
oddly it says no installed python found.  Even tho I did install it.  Oh, well, I am still reading through and correlating the parts of the MOD file to the Blender internals.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kreeargh

  • Retired.
  • Lt. Commander
  • *
  • Posts: 1476
  • Gender: Male
  • Life is as is worth only what you learn from it!
Re: Blender to .mod scripts are there any working?
« Reply #27 on: February 20, 2010, 10:23:42 pm »
oddly it says no installed python found.  Even tho I did install it.  Oh, well, I am still reading through and correlating the parts of the MOD file to the Blender internals.

2.5 did the same to me but i installed 2.6 before i read further and noticed it said something about needing 3.11.
Time for life!

Offline Rod ONeal

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 3592
  • Gender: Male
Re: Blender to .mod scripts are there any working?
« Reply #28 on: February 21, 2010, 12:40:27 am »
oddly it says no installed python found.  Even tho I did install it.  Oh, well, I am still reading through and correlating the parts of the MOD file to the Blender internals.

Sorry for the basic question, but do you have python installed in the drive directory? Like  C:\python. It won't work installed in a folder like C:\program files\python.  Again, sorry if I just insulted you, but that would cause the problem you're describing.
If Romulans aren't cowards, then why do they taste like chicken?

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: Blender to .mod scripts are there any working?
« Reply #29 on: February 21, 2010, 09:36:17 am »
Yeah, it takes some futzing with blender and python versions to get it going. But It can even be done portably. (I can dig up instructions if needed)


A point I just thought of: for me, more than anything, getting blender scripts working (import and export) has more to do with porting old community content (with approval) to open formats like collada for use in our planned OSS project! :D

We can even bring the content under GPL protections? To preserve the long term efforts of the SFC art community? (beyond the length of readme permissions email address vaildity - we're into the decades here...)

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #30 on: February 21, 2010, 10:59:01 am »
Well, for the OSS project.  I would say open up the formats that are supported so that we don't have to modify the .MOD format (if needed) to add features people are looking for.  It really wouldn't be that hard to make the import functions for the game to just load a new format into the game.  Instead of trying to make import and export functions for a bunch of graphic programs.

As for my python install, well I used the installer that it came with and let it put it where it wanted.  Which is C:\Python26.

Wife distracted me from the studying last night so not much new was learned for me on the importing of .MOD.  ;D

*edit*
oooOo just looked in the blender folder and seen sdl.dll, it's an SDL program.  will have to check the source alittle in there too.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #31 on: February 22, 2010, 12:33:30 am »
Had a dah moment a minute ago. Was looking through and working out how the texture information is stored in MOD. First it saves material data, then the texture info. I was getting confused as many of the materials didn't link with a texture. It took abit of me sitting and thinking what the heck. Then it came back to me. Every texture needs a material but not all materials have a texture. Yeah, I'm not a graphics guy.
« Last Edit: February 22, 2010, 12:48:11 am by marstone »
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Rod ONeal

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 3592
  • Gender: Male
Re: Blender to .mod scripts are there any working?
« Reply #32 on: February 22, 2010, 03:29:54 am »
What model were you looking at? While it is as you say AFAIK it's not right to have materials without textures.
If Romulans aren't cowards, then why do they taste like chicken?

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #33 on: February 22, 2010, 03:58:08 am »
A stock fed ca
The smell of printer ink in the morning,
Tis the smell of programming.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #34 on: February 25, 2010, 04:51:56 pm »
FoaS or one of you other guys who are modelers.  Think it might be possible for someone to hack togeather a small MOD image and a 3DS image of the same thing.  Basicly I am looking for a very small unit, dumped in both 3DS and MOD so I can do compares of them for translating.  Thanks.  You can dump it to my email addy under my name here, I should get it.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline FoaS_XC

  • Photorps, Sammiches, woot woot.
  • Global Moderator
  • Commander
  • *
  • Posts: 4571
  • Gender: Male
    • Robinomicon
Re: Blender to .mod scripts are there any working?
« Reply #35 on: February 25, 2010, 05:39:32 pm »
Will do. I will create a single cube with a texture map as well as an illumination map. One hard point as well.
Robinomicon
"When I was 5 years old, my mom always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down “happy.” They told me I didn’t understand the assignment and I told them they didn’t understand life."

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #36 on: February 25, 2010, 10:00:31 pm »
awesome.  It is just alittle daunting using the fed CA I have right now.  it is huge and mulitiple lod's also.

That is a question, I am not sure how lod's are loaded on blender (if it even does it) so should I just have it strip the first lod out of the file and forget the rest for now???
The smell of printer ink in the morning,
Tis the smell of programming.

Offline FoaS_XC

  • Photorps, Sammiches, woot woot.
  • Global Moderator
  • Commander
  • *
  • Posts: 4571
  • Gender: Male
    • Robinomicon
Re: Blender to .mod scripts are there any working?
« Reply #37 on: February 25, 2010, 10:17:44 pm »
Well, tell you what: tell me what you want as you want it. I'll start with one material ID, then add more, start with minimal verts, then add more, etc.
Robinomicon
"When I was 5 years old, my mom always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down “happy.” They told me I didn’t understand the assignment and I told them they didn’t understand life."

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #38 on: February 25, 2010, 11:44:00 pm »
Sounds good, as basicly everything is looping the same loading code. Once I can load a set of vert, a face, surface, texture it just repeat for more. I'll let you know as I get to each new thing.  So thanks again.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #39 on: February 27, 2010, 08:12:57 pm »
meh, learning new languages.  Odd format for loading data as python (I believe) is string based and to read numbers you have to have a binary format to translate with for each part.  Learning.  can open the file and start to read a .MOD in pure python (not in blender yet).  Will work on building the reader stuff now.

Off to get my lotto ticket and wish my dad a happy b-day so taking a break.  ;D
The smell of printer ink in the morning,
Tis the smell of programming.