Page 4 of 5
Posted: Wed Mar 07, 2012 5:33 am
by DonKarnage
so is there a comprehensive idiots guide to making ships designed in Blender work with allegiance?
I could do an untextured ship model (paper sketches help a lot with this) but I have no idea how to define emitters and export something that is usable.
Most of what I did with blender was making pre-rendered ship sprites for Stellar Frontier, so I never had the issue of what to export it as, since it was just a PNG filmstrip
Posted: Wed Mar 07, 2012 7:34 am
by Your_Persona
I just had a breakthrough in the whole tool chain thing.
I've only figured it out so far to include lights, the mesh, and the texture. Needs to spend some more time to get the hardpoints and garages in it.
But I wanted to post my progress.
using a slightly fixed version of MDLC.exe call it like:
Mdlc.exe [inputfile.mdl] [outputfile]
where [inputfile.mdl] is a text based MDL file with something like the following structure:
Code: Select all
use "model";
use "effect";
frame = ModifiableNumber(75);
// LightsGeo(ArrayOfLights);
// where a Light is : (Color(R,G,B),Vector(x,y,z),period,phase,rampup,hold,rampdown)
lights = LightsGeo(...);
// TextureGeo( Geo , Image)
// where Geo is any of : MeshGeo(),LODGeo(),GroupGeo(),
// TransformGeo(),MaterialGeo(),TextureGeo(),Matrix(),
// BlendGeo(),ImportXFile(),ImportMDL()
// and where Image is any of:
// ImportImage(),ImportImageFromFile(),ImportImage3D(),
// ImportImageLR(),FrameImage(),GaugeImage(),GaugeImageRect,
// GroupImage(),SwitchImage(),GeoImage(),GeoImage2D(),
// ClipImage(),PickImage(),UndectectableImage(),ColorImage(),
// ExtentImage(),StringImage(),MDLFileImage(),TextFileImage()
object = TextureGeo(...);
Here is a link to a working example.
acs01.mdl
This file can replace acs01.mdl in your artwork, or you can convert it to be a binary MDL file using Mdlc.exe**
For this to work with MDLC.exe you will have to add the following line of code to efapp.cpp on ln 295 (LightsFactory::Apply()) just before the while loop
Or wait for a new build of MDLC that includes that bug fix.
Posted: Wed Mar 07, 2012 9:03 am
by madpeople
Blender is a good idea. People should be able to get their models into it easily - solves the "which format to support?" problem by shifting that responsibility to blender.
Stick with .x (it is a text format (yes, I know it can do binary too) which is handy to poke around when things don't work).
We should aim to get the tools working with the .x files blender produces.
@YP the .x files that came from MS in the art source work fine with MS tools, we need to get newer .x files working (the DX SDK has some in (or used to), better yet make some basic models - tea pots and cubes XD) in blender and export them to .x files to test with.
Imago wrote:QUOTE (Imago @ Mar 7 2012, 05:09 AM) you had a dx7 linked version of the artbuild tools i made a while back using VC6 and the Makefiles.
I know I had a different 'newer / special build' version of mdlc once, but it didn't come (directly) from you and I didn't know how it was different (or who made it). I think we should start from scratch, it'll probably result in a cleaner result and may well be easier anyway.
My tool chain was more than just the mdlc, there was a bat file with quite a few steps in involved too to get it to work.
Posted: Wed Mar 07, 2012 4:01 pm
by raingriffin
About formats, probably the most common inter-app format (being similar to raw files) is the .obj format, which is quite crude. Collada's dae are usually supported, but there are a few different versions living side by side (2.4,2.5). 3ds is a common point of most professional packages, like maya, 3dsmax and more specialized tools like, say zbrush.
There are more formats becoming quite common too, but i'd stick with some older standard for retro-compatibility in case someone wanted to convert some model he made or coming from another source.
Personally i've never worked with .x so i can't tell how well supported it is.
Blender is a good idea because it's open source and already includes import/export plugins for most formats around (some of them have quirks tho, but the community is VERY active and you can usually find alternatives) so people can get and use it as a mid-step in the production pipeline.
I wish alleg's engine supported multi-channel textures/materials, alpha (i managed to get transparency in the in-base menu model template but not in game) and dynamic lighting but making export tools to mdl, thus simplifying the production process (F**K milkshape) would already be a breakthrough and totally gets a +1 on all whole line.
A small note: once i tried rigging the joints/bones in blender and export them in 3ds and obj to import them in milkshape. It never worked out, i never got to understand if the problem was about how i set up the rigs or with the exporting method, or if the joints had some peculiar attribute that never went through.
Cheers Rain
Posted: Thu Mar 08, 2012 3:59 am
by Adaven
DonKarnage wrote:QUOTE (DonKarnage @ Mar 7 2012, 01:33 AM) so is there a comprehensive idiots guide to making ships designed in Blender work with allegiance?
No, creating one is more or less the point of this thread.
Posted: Thu Mar 08, 2012 8:42 am
by Your_Persona
Your_Persona wrote:QUOTE (Your_Persona @ Mar 7 2012, 12:34 AM) ...
Needs to spend some more time to get the hardpoints and garages in it.
But I wanted to post my progress.
Made some more progress.
I've done round trip conversions on acs05.mdl (IC SY) and fig20.mdl (biosFig). Took the binary MDL that the game uses, and converted it to a text mdl. Then took that text MDL and opened it up in MDLEdit. It worked. Then ran the text MDL back through MDLC to recompile a binary mdl. Then opened that binary MDL in MDLEdit. Still worked.
Here is a link to a
zip of the files
acs05.mdl : is a text mdl that I generated
acs05text.mdl : is the binary output after compiling the text mdl with MDLC.
fig20.mdl : is a text mdl that I generated
fig20text.mdl : is the binary output after compiling the text mdl with MDLC.
The other files in the zip are just textures and CVH's just included for completeness.
Allegiance should be able to run with either the text MDL or binary MDL. Or just test with MDLEdit.
** for the text mdl files to work with Allegiance/MDLC/MDLEdit the following bug fixes are required:
Add the following line of code before the WHILE loop in efapp.cpp in FrameDataFactory:Apply (~ln 345) , and LightsFactory:Apply (~ln 296)
I think writing an exporter for Blender to text MDL is the way to go. Anyone know phython?
Posted: Thu Mar 08, 2012 12:08 pm
by KGJV
god, once again the forum geniuses derailled a good topic. sigh.
and it's pretty useless now.
I'm soooo tired of this.
Posted: Fri Mar 09, 2012 1:07 am
by Adaven
KGJV wrote:QUOTE (KGJV @ Mar 8 2012, 08:08 AM) god, once again the forum geniuses derailled a good topic. sigh.
and it's pretty useless now.
I'm soooo tired of this.
Sorry for getting the cart before the horse.
Looking back at the wiki, I found an article by Imago on
using the MS tools to generate hitboxes. I'm hoping this is still fairly correct? Also, would this fall more under the Rigging/Meta-data phase or Optimization? I'm leaning towards the former.
Posted: Fri Mar 09, 2012 1:25 am
by Adaven
I wish that I had the time coordinate this, I really do. However, I'm pretty sure I don't, and it would be awful for me to take the reins only to have it languish further. What I can do is keep poking at the wiki, consolidating the knowledge that we do have. Between that and further discussions here, we may even get something resembling a plan or outline of what a standard workflow could look like.
Posted: Fri Mar 09, 2012 4:54 pm
by Your_Persona
I've started working on a blender export script to mdl. It's working for basic meshes as of last night.