• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

New SOD Exporter for 3DS Max =ALL VERSIONS=

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Can you load the model in storm? Try animating a point helper rather than the strobe light itself. For example, your hierarchy might look like:

Code:
geometry
-mesh_01
-mesh_02 (animated)
-pivot_01 (animated)
--mesh_03
--emitter_01
--strobe_01

lights
-strobe_02
-emitter_02
-pivot_03 (animated)
--strobe_03
--emitter_03

In the above:
  • mesh_02 has animation directly applied to the mesh. That is, keyframes are defined for this mesh.
  • mesh_03, emitter_01, and strobe_01 do not have keyframes (not directly animated), but are attached to pivot_01, which is animated. Everything that is attached to pivot_01 will move, rotate and scale along with pivot_01.
  • same idea with everything that is attached to the lights node. However, until I resolve this problem, animation should not be applied to a single strobe or emitter directly. To animate strobe_03 and emitter_03, animation keframes must be defined for pivot_03, not strobe_03 or emitter_03.
  • strobe_02 and emitter_02 are not animated

This is a silly mistake on my part that has to do with how I process the node names during export. Unfortunately, I'm away from my modding machine at the moment and can't provide a quick fix.

Note: you can view animations in storm3d without having to load up the game.
 

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,560
Age
48
What about the Command nodes and simple texture based animations with no mesh movement?
 

Terradyhne

Petty Officer 1st Class
Joined
19 Jan 2011
Messages
253
Hello MrVulcan thanx for your script and i tested it in Max 8 and the xport itself works but there is a problem with the material settings and the lightmaps on A2 Sods. the auto welding feature is really not usefull, the model looks like a flatshaded one, in Stormviewer.
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Starfox: the texture animations are done in the same way as in the 3dsmax5 SOD exporter. To add texture animation to a mesh, attach a "c_anim_ID" node to the mesh. You can specify a time offset by appending "_offset" to the command node. Ex:

c_anim_tex4x4
c_anim_tex6x6_0.5

Terradyhne: Thanks for giving this a try. I'm not sure what you mean by flat-shaded. Do you mean that the model is not affected by lighting? Or are the polies not being smoothed properly? Autowelding is only done for texture vertices (the vertices you see when viewing the UV Unwrap, which should not affect the final appearance). The model vertices are not welded.

Are you using smoothing groups in the model? Not having any smoothing groups will cause each poly to have a hard edge with its neighbours (ie, it'll look flat shaded). If you can post a screenshot of the problem, that would be ideal :)
 

Blade

Cadet Junior
Joined
22 Jan 2012
Messages
59
Age
37
great work i will enjoy using this now (still cant get animated nodes to work but thats not important
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Blade: Great :) Thanks. If you want, we can try to figure out why the nodes are not animating on your end. I can take a look at the model to see if its anything with the way the animations are set up.

Sorry for lack of updates. I will fix the issue with animated sprites and emitters as soon as I can, and maybe tweak a few things with lighting settings/materials to better match the pluggin output. Also, some people have expressed an interest in a gmax version of the script (which does not support writing to a file). I'll see if a workaround exists. If anyone is interested in an importer, I might put that together as well. For now, I think the milkshape importer can do the job ok.
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Exporter updated to Version 1.2. Changes in this version:

• Allow multiple emitters with the same name (e_ename_01, e_ename_02... etc)
• Sprites and emitters can be animated directly without point helpers
• Added rudimentary error handling to the script

There are no changes to the documentation, except for version revision history.

View attachment SOD_Exporter_V1.2.zip

Blade: I think node and emitter animations should work ok on your end now. It works in stock A2, and I doubt that FleetOps disables this. Let me know when you get a chance to try it again :)
 

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,560
Age
48
Verty nice work man. I especially like the documentation as its almost a mini tutorial:thumbsup:
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
I was able to get a hold of a student version of 3dsMax2012, for free! Was very much surprised that this was possible, thanks to autodesk. The first thing after figuring out how to use the new material editor was to give the SOD export script a try. Appears to work just fine :) I will be giving this a more thorough test while using the exporter (as it stands, I have about 200 models to re-export to fix some materials problems, yay)

Also, added are some advanced features that I needed for my modding. Most of the models I'm working on use 2-4 distinct texture files, plus 2-3 damage textures, and 2-4 lightmap textures... However, the vast majority of stuff is using the same lighting materials (no ambient, full diffuse, and small amount of specular reflection). Do I really need to have a unique material for each texture? Probably not. To give you an example, Future Tense models right now use on average 6 different textures, and there are a few hundred models overall. This results in over 1000 materials! It would be silly not to condense this down to just 4-5 materials, with no loss of model quality. So, how does this work?

When assigning a material to a model, you were probably told a long time ago to make sure the material name is unique. The reason for this is that upon loading a new SOD, Armada saves the material settings. When you load another model that shares the same material name, the game just looks up the saved material properties. Co avoid conflicts, you would normally just have unique names. Stock Armada 1 has 24 materials, but even those can be condensed down to around 6. Most of the materials are in fact defined in a SOD that is unsurprisingly called "materials.SOD" :p This SOD is the first to load in Armada.

You don't have to use Material.SOD to define your materials, but if you have a large number of models, you can try to keep track of what material names you use, and then re-use them on future models. For example, instead of naming a material "heavyCruiserRomulan5b", you can just name it "romulanHull", and reuse for all Romulan ships.

If you have more than one texture requiring the use of the same material on a single model, instead of "romulanHull", you can name the materials "romulanHull_01", "romulanHull_02", etc... The exporter will condense the materials under the single name of "romulanHull". Note that the numbering MUST start at _01.

Ok, off I go, and attached is the revised exporter :)

View attachment SOD_Exporter_V1.3.zip
 

Blade

Cadet Junior
Joined
22 Jan 2012
Messages
59
Age
37
ok ive animated a sod and its giving me an export error any ideas how to find out what the error is?
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Unfortunately, generating useful error messages is not trivial in maxscript, or I just haven't found a way to do this properly.

For now, can you send me the model that you are trying to export, and I'll step through the script to see where it breaks. My addy is tpankov (at) yahoo (dot) (ca)
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
I got the file. Seems like the error is caused by having only one animation keyframe defined for some objects. For example, you have only one keyframe defined for the sprites at time=0. I will fix this issue, but for now, try deleting the initial keyframe for objects that are not animated (ie, have only one keyframe).

Thanks for reporting this :)
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Ok, now that I got real life out of the way for a couple of hours, I prepped up the exporter scripts for another update. I'm attaching it here as usual, but I would also want to submit this to the downloads. Problem is, I think the button is hiding from me ;) Someone please let me know how to submit files to the downloads section.

Thanks to everyone that waited patiently and provided feedback.

Mr.V

View attachment SOD_Exporter_V1.4.zip
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,139
Age
34
Ok, now that I got real life out of the way for a couple of hours, I prepped up the exporter scripts for another update. I'm attaching it here as usual, but I would also want to submit this to the downloads. Problem is, I think the button is hiding from me ;) Someone please let me know how to submit files to the downloads section.

Thanks to everyone that waited patiently and provided feedback.

Mr.V

View attachment 8012

There is no button - we have a group of members managing the download section. If you'd like to see something there, just send it to files(@)msfc.com.au. Then someone will pick it up and upload it. (You don't have to do that in this case, since it's already here. Generally, people will see it earlier if it's sent to the files email account.)
 

Blade

Cadet Junior
Joined
22 Jan 2012
Messages
59
Age
37
ok i may be being a bit dumb but how do u make textures ignore black sections (like beam textures)
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Ah, you have to set it to use additive blending (makes the whole thing seem half-transparent mind you).

If you want to apply this effect to a mesh, make a node (point helper) with "c_tm_additive" as its name, and attach to the mesh.
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Almost a year after the original release, I find enough bugs in the A2 version of the script to warrant an update. Apologies to all the A2 modders that may have encountered bugs with the way self-illumination worked or not worked for you.

Changes V1.5:
- Fixed a bug in handling of smoothing/lighting groups. Was missing a chunk of code here. Oops
- Added an extra check on texture face continuity to eliminate dark patches on A2 models.
- Corrected an error in the documentation on smoothing/lighting material command node.
- Updated a few sections in the documentation for clarity

I think this time it really is ready for addition to the downloads section, so I'm not going to attach it here, but just send it for the downlaods. Thanks to everyone that has helped with bug tracking for this thing :thumbsup:
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
33
The exporter is now officially available for download, just in time for Christmas! Get it here!
 

pepperman

Crewman 3rd Class
Joined
10 Dec 2011
Messages
119
Mr. Vulcan,

Maybe it is me but I am encountering errors when use the 1.5 version of the A2 export script. Version 1.4 worked but when I tried 1.5 I got an error.

Pepperman
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
I apologize that there isn't any feedback on the errors aside from "Export Error". If I do decide to release a 1.6 version, it will have helpful error logs.

I replied to your PM that the only way for me to figure out what's going on is to try to exporting process myself with your model and see what happens. Meanwhile, I advise against using the 1.4 script to create A2 models as I had messed up the lighting materials quite badly when you have multiple textures sharing the same material (ie, especially applicable if you have damage effects).... complicated explanation required.

Thanks for your patience, will have the errors resolved asap.
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
I had inadvertently introduced a bug into version 1.5.. my bad. An update is on its way V1.5.1

In my defense, the A2 format is a little messy in comparison to A1, so all the bugs have been concentrated there :p. I think now it should work as intended.

Thanks for reporting this, Pepperman :thumbsup:
 

Blade

Cadet Junior
Joined
22 Jan 2012
Messages
59
Age
37
ok i seam to have an issue exporting a model into a2 format (saves as 0 bytes) im running 3dmax 2013 can you think of anything i may be doing wrong?
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Hi blade

There could be a number of things that will cause an empty export, but usually something to do with materials. I think the easiest way to figure out what's going on is for you to send me the model in 2012 format, and I'll have a look. I'll try my best to get back to you asap.
 

Blade

Cadet Junior
Joined
22 Jan 2012
Messages
59
Age
37
good news is that i got 3dmax 2012 again and now it works so it could be an issue with 2013 version
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Sorry for the late reply, Blade.

I'm glad you got it working. However, I think the problem you were having has to do with either the way materials were set up, or the animation keyframe format.

From what I can tell, you probably exported the model into 3ds format from milkshape, added the hierarchy and animation, and tried to export from 3dsmax. Normally, this should work ok, and I think it is ok on your model too.

As for the keyframe format, I strongly advise against using the "Set Keys" function (big key button). This sets all keys for the current controller (position, rotation, scale, and so on), even if the values are not changing. In your model, you have the position, rotation and scale keys for ALL objects, including hardpoints. There isn't an obvious way for the exporter script to figure out which keys are significant, and which are just placeholders, so everything gets exported.

This means that the exported model will have 44 active animation channels, and only 4 objects that actually need to be animated (4 doors). While the model will work, it will surely slow things down. You really need just the position keyframes in your model.

To avoid the problem in the future, try to use the "auto key" function. If you want, I can provide a tutorial on how to use this function. The autokey function sets only the significant keys (ei, values that are changing). In addition to making the animation channels smaller (faster), having fewer keys makes it much easier to work in the curves editor.

For the current model, you can do the following:

1. select all objects that are not animated,
2. then select the keyframes (in the timeline at the bottom of the screen). Keyframes should become highlighted with white colour.
3 .press delete.
4. next, open the maxscript listener by going to "MAXScript" menu --> "MAXScript Listener".
5. next, select ONE of the animated objects
6. paste this into the white portion at the and of whatever text is already there. (there may also be a red portion, don't paste there)

reduceKeys $.transform.controller 0.5 1

7. press enter
8. Verify that the keys became optimized (no longer rainbow colour, but just red, or green, or blue.). If not, make sure that the text you pasted is at the very end of the stuff in the Listener. You can ctrl+A, and delete the stuff in the white window to be sure.
9. repeat for all animated objects from step 5

Since the model you attached exported OK I can't be sure what was causing the issue in 2013. To my knowledge, 2013 should be backward compatible with the older scripts. In any event, if you have similar issues, be sure to post the model and I'll look at it as soon as I can.

Mr.V
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Yeah... tutorials. lol I have a bucketload of stuff I got to write down and make it look pretty. :sweat:
 

MrVulcan

Crewman 2nd Class
Joined
17 Aug 2011
Messages
142
Oops, I posted, then went to edit, then got distracted, then came back and was told that the edit limit has expired.. so here's the rest of what I wanted to say :p

I will eventually make a modelling tutorial for 3dsMax, in addition to the stuff I have in the exporter documentation.

In fact, I want to package all of my tools/docs into one modding guide. This is so far off though that it's not even on my todo list yet.. lol

[Ideal future=on]
Tutorials:

  • Modding basics, tips and tricks
  • Modelling in 3dsMax
  • Advanced modding concepts, the really cool stuff
    - In-depth sprite/texture animations
    - In-depth SOD animations
    - How to use lighting and material properties
    - How to create damage effects and proper usage of the hierarchy
    - Composite effects using multiple ODFs for map effects
    - Custom explosion effects using SODs
    - AI tips and tricks, behavior parameters and build locations​
  • Misc
    - Light maps / glows
    - GUI editing tips. Resolution-specific GUI
    - Team colours
    - yard animations
    - Physics tips (mostly A1 for now)​
Tools:
  • Armada Debugger (A1, A2, FleetOps)
  • SOD Exporters
  • ODF Creation / management excel scripts
[Ideal future=off]

Maybe that's not so far off.. some of that has already been written. Only thing stopping me from posting that stuff is aversion of incompletion. Should I just post articles? Might help in actually getting this stuff finished.
 
Top