Author Topic: Gmax/3dsm4+ Import/Export Script  (Read 14662 times)

0 Members and 1 Guest are viewing this topic.

Offline ak-73

  • 24
Re: Gmax/3dsm4+ Import/Export Script

@Bl4ckj4ck: The claim "3dsm 4+" was based on the assumption that higher versions are fully backwards compatible. All my script have been working on higher version so far at least. If they're not or there is some other bug, I would have to know which .pof file you have been importing (so I can try myself) and I would need to see the output of the maxscript listener window at the bottom left of your screen (at least that is where it is in gmax and 3dsm 4).

@midnightjoker: again I would need to see the maxscript listener output. Or better yet upload your file and I'll investigate myself in gmax.

@Omniscaper: Yes, that's a "snag". My first goals was attempting to be able to import and re-export slightly modified models. Helper/Creator utilities are the next step. What works in any case is attaching your own geometry to imported geometry with the desired attributes and then deleting the imported geometry and renaming stuff, etc). Delete the imported meshes material first though. Otherwise you have to do it manually in maxscript in the maxscript listener window. I have to write this from memory as I am posting from university but the script defined a few custom attributes (check out the maxscript documentation for details).
These are the custom Attributes of the script:
GlobalAttributes
SubobjectAttributes
SubsystemAttributes   (<- this one is for "Special" spheres)
PathWaypointAttributes
ThrusterBankAttributes
ThrusterAttributes

You must first create an instance of an attribute that you want to you and you do it like this:
<Some Variable Name> = attributes <One of the above Attribute Names>
Example:
attribute1 = GlobalAttributes
or:
attribute2 = SubobjectAttributes
etc.

Then you select the node that shall get this attributes and type:
custAttributes.add selection[1] <The desired one of the above defined Variable Names>
Example:
custAttributes.add selection[1] attribute1

In theory that should work. Unless my memory is failing me. I'll check it out when I'm home again. :)

As for export... the prompt who quickly disappears... is that by chance an MS-DOS window? If so, that would be correct because it means the exported data gets passed to the My_BSPGen.exe for creating the BSP data (that task got outsourced out of 3dsm by me). But normally this should mean that export has been taking place. Anyway, if someone has problems with importing/exporting a .pof, they can upload their models for me and I'll check it out. As for retail models, the name should suffice, however I have been successfully importing almost all retail models and export worked on the 6 or 7 that I have tested.

fighter09.pof, cruiser03 and terransuper have all been tested successfully by me. Most under gmax, a few under 3dsm 4.

If someone has any suggestions on how to better represent imported data, I am still open to suggestions. I was example thinking of adding _" + the subsystem name to the name of specials for easier identifcation in the selection list... stuff like that.

Alex

 

Offline ak-73

  • 24
Re: Gmax/3dsm4+ Import/Export Script

I have written a small (unofficial) update: http://rapidshare.de/files/40110301/update.zip.html

This one makes two changes:

1. You don't have to remember starting the io script before loading a scene with pof model (with custom attributes) anymore. The disadvantage is that all scenes saved with the previous version of the script won't open with the new one.
2. This morning I have written a quick helper script. This will allow creating basic specials, gunpoints, waypoints, etc and assigning custom properties to subobjects and to the base object easily. You will have to rename them properly, link them properly and adjust the custom attributes accordingly though.

Alex

  

Offline Darius

  • 211
Re: Gmax/3dsm4+ Import/Export Script
Just starting out in 3dsm 2009, and managed to solve the "unknown radius" error for the base model by using your Creation Helper...thanks! I've managed to export a model, but the subobjects aren't showing up in pcs2 even though I've set turrets and non-hull details as subobjects.

 

Offline ak-73

  • 24
Re: Gmax/3dsm4+ Import/Export Script
Just starting out in 3dsm 2009, and managed to solve the "unknown radius" error for the base model by using your Creation Helper...thanks! I've managed to export a model, but the subobjects aren't showing up in pcs2 even though I've set turrets and non-hull details as subobjects.

Try to see if the subobjects re-import into max correctly please.

Alex

 

Offline ak-73

  • 24
Re: Gmax/3dsm4+ Import/Export Script

Bug-fixed version 0.9.1 is out. This one actually works. :) At least I have been able to successfully export a Myrmidon fighter and use it in FS2 and Fred2 (I finally got around to compiling and starting it as Debug). The new release includes the helper script I have published before.

Release Notes:
- a basic helper script has been added
  ATTENTION! The new inner organization renders scenes saved with the
  v0.9 version of the script incompatible.
- fixed a bug in My_BSPGen that caused BSP data size not to be written to
  .pof files, causing crashes
- fixed a bug in the script that caused the game to crash upon ship collisions
  due to non-normalized polygon normals
- fixed a bug in the script involving MPNT chunk size that caused subsequent
  chunks to not get read (leading to the visible effect of engine glows not being
  rendered)


I haven't tried it in pcs2 but if it works in-game it surely works for pcs2 also.

Download link is: http://rapidshare.de/files/40134855/fsmax_v091.zip.html.

If anybody gets to work any of this exports in-game, please post a screenshot.
:)

Still any feedback is welcome. Thanks.

Alex

 

Offline ak-73

  • 24
Re: Gmax/3dsm4+ Import/Export Script

Lol, judging from the amount of feedback, I'd say the io script is either running incredibly smooth or not at all. ;)

Alex

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Re: Gmax/3dsm4+ Import/Export Script
It is interesting.

However it's not really practical to use for me.
I don't have my own project, only I work on, but I work together with a lot of people using all kinds of 3d apps.
So the Collada support for PCS2 is actually more interesting for me. This way I don't get OBJs and have to do the setup myself, but dae files I only need to load up in PCS2 and save them, without having to do anything about them, while I still can edit them in MAX.


Your script is still interesting, but you should try to stick to the old conventions as closely as possible.
The PCS2 guys pretty much copied the old MAX plugin conventions, so I can export my old modles, made for the max plugin, with only a few changes.
A completely compatible convention would be perfect.
http://www.hard-light.net/wiki/index.php/Collada_Importer

--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Gmax/3dsm4+ Import/Export Script
I believe that's slightly outdated, I'm not sure what changes have been made by Spicious or I would update it myself.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Gmax/3dsm4+ Import/Export Script
I want to check this out in GMAX tonight.
The price is much better than MAX and I can render or model other formats in Rhino all I want to.
If I can bounce around with GMAX for texturing, and heirarchy with TS 7.6 or GMAX...
I'm finally setup for making models :D

 
Re: Gmax/3dsm4+ Import/Export Script
I don't have a great version of Max (Only Max4 licensed on a slow machine), so I ran GMax with this....
I got to say, this looks like the easiest and under $1000 legal solution yet.
You get two thumbs up and an open bar tab I ever meet ya m8!

Hmmm lets see, Rhino 4 Student license, $169, GMax - Free, the POF plugin - Free, PCS2 - Free.
If Gmax or Rhino supported Collada then I could adopt this DAE file philosophy,
but so far I havent found the converter for it.
I'm not sure if DAE open format works with the EULA for GMax either.

I ran the 2009 3DSMax trial and it bombed on every attempt to make a DAE file for me.
That is just a standard dae file, not even trying the collada converter these guys are working on so well.
I'm sure their work will bear more fruit.
Max 2009 completely crashed everytime (I let it sit for 2 hrs and it just sat there locked up killing a processor).
So I have yet to even have a real collada file.
Made obj and fbx files all day long, would not make a dae file to save its own skin.
With the price over $1000 for Max doesn't rest well with me.
Even the student license for 3dsmax was only 13 months long where Rhino for the same price on a student license is forever. As long as I am not using it for actual paid production so I am completely legal the way I like it with this route.
I model this stuff for my own entertainment, I have no use for a multitude of $500 or more solutions.

McNeel gets my admiration everytime. They actually monitor and answer questions on their forums where Autodesk up front states they do not. Autodesk and I are not on good terms with their products and support. $85K for subscriptions and they completely ignored the outstanding gripes with their last 3 implementations of AutoCAD and its verticals. For awhile they kept giving me the same support a single license user has until I blasted them for a day with phone calls and emails. Even then they tried to hide from me on programming questions saying I had to buy a developers subscription, after $85K they can pretty much take a hike with that nonsense, I'll hack their license server instead of spending the money and hours hacking their software to make it work right since their support was really non-existent. That finally got their attention. 90% of the issues we had with maintaining the same production processes we have done for the last 5 years came from me and other programmers sharing the information freely on forums outside of Autodesk, not Autodesk.
« Last Edit: August 28, 2008, 06:36:27 pm by KewlToyZ »

 

Offline DSG

  • 21
Re: Gmax/3dsm4+ Import/Export Script
Sorry, but I'm still having problems exporting models, I'm using 3DS Max 2008. Here is the information of the error:
>> MAXScript Rollout Handler Exception: -- Unknown property: "radius" in $Editable_Mesh:Frigate @ [-0.026966,12.810505,0.009341] <<
-- Error occurred in anonymous codeblock; filename: C:\Program Files\Autodesk\3ds Max 2008\scripts\fsmax_suite\POF_IO.ms; position: 55469
-- No ""get"" function for undefined

Any suggestions?

 
Re: Gmax/3dsm4+ Import/Export Script
Do all of your parts have names ?

 

Offline DSG

  • 21
Re: Gmax/3dsm4+ Import/Export Script
Well, if you refer to name the turrets and all other stuff according the name conventions( turret01, turret01-arm, $engines....), yes, I did it. But I'm confused about the firepoints, what name should I write for them, "Firepoint_01" or there is other designation?

 

Offline DSG

  • 21
Re: Gmax/3dsm4+ Import/Export Script
I dont think the error was caused by the names. If it was, then there will be some other thing wrong than "Radius", the most strange think is that I can't import too. Is there a poltergeist on my pc or there is some other explanation?

 
Re: Gmax/3dsm4+ Import/Export Script
To be honest, I abandoned gmax and went with Rhino export to 3ds, textures with lithunwrap, then convert to cob using 3D Explorer. then open the cob with PCS2. These other exporters drove me nuts.

 
Re: Gmax/3dsm4+ Import/Export Script
some on can pull a working link for the script i try to import model but for a unknown reason truspace make unusable 3ds :(