problems exporting to .xmesh with wings3d plugin..

This is the location for all mods to collaborate. Anyone making or planning their own mod should post help requests, screen shots and news here.

Moderators: Omega, tillias, Mod Contributor

Post Reply
Wireless Caller
Merchant
Merchant
Posts: 43
Joined: Tue Mar 16, 2004 7:31 pm

problems exporting to .xmesh with wings3d plugin..

Post by Wireless Caller »

ok every time I try to export my mesh into VS, I put it into an empty directory to have it exported there, it does it but nother happens.. I look in the destination directory where the file was to be exported and there was nothing there..

can anyone tell me what the problem is here??(trying to export a space ship into vs for the first time)
Wireless Caller
Merchant
Merchant
Posts: 43
Joined: Tue Mar 16, 2004 7:31 pm

Post by Wireless Caller »

well yeah the with the old plug-in all u needed to do is add spot lights and then export it when automatticly generated a blank .xmesh and a .xunit file..

i know the newer ones isn't like that.. any clue?
FlyingAce
ISO Party Member
ISO Party Member
Posts: 398
Joined: Fri Apr 11, 2003 1:17 am
Contact:

Post by FlyingAce »

u have to have a config file in /yourexportdirectory/config/ (replace yourexportdirectory with wherever you are exporting it) there should be a sample that came with the exporter. you will have to rewrite the config file to custom tailor it to your ship.

now they use tags instead of spotlights. (tags are just right triangles) in order to generate a tag, do RMB>Vegastrike Tags> in wings and select which type you want. the point where the 90degree angle converges is where the weapon/engine/subunit will show up. and the long edge is the direction that the weapon/engine/subunit will point.

if u don't understand anything I just said, feel free to point it out. Pontiac wrote the exporter so he could tell you more.
Wireless Caller
Merchant
Merchant
Posts: 43
Joined: Tue Mar 16, 2004 7:31 pm

Post by Wireless Caller »

ok im getting error log from this:

Code: Select all

wpc_xmesh:command/3: bad return value: {'EXIT',
                                           {badarg,
                                               [{lists,
                                                    keysearch,
                                                    [unit_data,
                                                     1,
                                                     {{40,
                                                       erl_parse,
                                                       ["syntax error before: "|
...]},
                                                      "Error when trying to cons
ult CONFIG file:'c:/DBackup/addaship/esc3/config/config.txt'"}]},
                                                {e3d_xmesh,config_get_value,2},
                                                {e3d_xmesh,export,4},
                                                {wpc_xmesh,export_1,4},
                                                {wings_file,do_export,4},
                                                {wpa,export,3},
                                                {wings_plugin,command,3},
                                                {wings,do_command_1,2},
                                                {wings,do_command,3}|
                                                more]}}
and heres the config.txt file:

Code: Select all

{unit_data,
[
% unit-filename  , unit-configfilename (located in the "./config" directory) content will be copied into the unit file
 {"esc3"   , "unit.txt",
 [ 
  {"tag_m_0","weapon='Ion'   size='Light Medium'"},       % mount
  {"tag_m_1","weapon='Ion' size='Light Medium'"}, % mount
  {"tag_m_2","weapon='Ion' size='Light Medium'"}, % mount
  {"tag_m_3","weapon='Laser' size='Light'"}, % mount
  {"tag_m_4","weapon='Laser' size='Light'"}, % mount
  {"tag_m_5","weapon='FriendOrFoe' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_m_6","weapon='FriendOrFoe' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_l_0","file='supernova.bmp' size='3'"},            % light
  {"tag_l_1","file='supernova.bmp' size='3'"},            % light
  {"tag_l_2","file='supernova.bmp' size='3'"},            % light
  {"tag_c_0","file='heavy-cockpit.cpt'"}                  % cockpit
 ]}.                                                     %end of unit-config

 {"esc.blank", "esc_blank.txt", 
 [
  {"tag_m_0","weapon=''   size='Light Medium'"},       % mount
  {"tag_m_1","weapon='' size='Light Medium'"}, % mount
  {"tag_m_2","weapon='' size='Light Medium'"}, % mount
  {"tag_m_3","weapon='' size='Light'"}, % mount
  {"tag_m_4","weapon='' size='Light'"}, % mount
  {"tag_m_5","weapon='' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_m_6","weapon='' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_l_0","file='supernova.bmp' size='3'"},            % light
  {"tag_l_1","file='supernova.bmp' size='3'"},            % light
  {"tag_l_2","file='supernova.bmp' size='3'"},            % light
  {"tag_c_0","file='disabled-cockpit.cpt'"}                  % cockpit ]}                                                       %end of unit-config
% insert more (template/faction/whatever) units here

]}.

%%%% insert your mesh-data below %%%%%%%%%%%%%%%%%%%%%%%%
% http://www.joeredcloud.com/kandarwiki/index.php?VsHowtoEditMeshFiles

{mesh_data,
[
  %just an example:
  {"body",                                              % Name of the object. Don't start this with "tag_" and don't use more than 12 characters.
   "texture='esc3.jpg' sharevertex='0'",            % Options for <Mesh></Mesh>
   "<Material reflect='0' LightningOn='1' >
      <Diffuse  red='1' green='1' blue='1' alpha='1' />
      <Ambient  red='1' green='1' blue='1' alpha='1' />
      <Specular red='1' green='1' blue='1' alpha='1' />
    </Material>"}                                       % additional xmesh-data (like material,LOD,Logos)

 %and another one:
 %{"wing",
 % "texture='tex_wing.jpg' texture1='tex_wing_lightning.jpg' sharevertex='0' blend=''",
 % ""}
]}.
such a total noob at this new plug in<----------
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

Post by pontiac »

I know the syntax of the config files is not the best, but its structure is very logicaly (at least to me ;-) ).

The '.' should be a ',' :

Code: Select all

...
{"tag_c_0","file='heavy-cockpit.cpt'"}                  % cockpit
]},                                                     %end of unit-config
...
and this line (yeah it's only one)

Code: Select all

{"tag_c_0","file='disabled-cockpit.cpt'"}                  % cockpit ]}                                                       %end of unit-config
should be replaced with this two:

Code: Select all

  {"tag_c_0","file='disabled-cockpit.cpt'"}                  % cockpit
]}                                                       %end of unit-config
The complete code is here:

Code: Select all

{unit_data,
[
% unit-filename  , unit-configfilename (located in the "./config" directory) content will be copied into the unit file
{"esc3"   , "unit.txt",
[
  {"tag_m_0","weapon='Ion'   size='Light Medium'"},       % mount
  {"tag_m_1","weapon='Ion' size='Light Medium'"}, % mount
  {"tag_m_2","weapon='Ion' size='Light Medium'"}, % mount
  {"tag_m_3","weapon='Laser' size='Light'"}, % mount
  {"tag_m_4","weapon='Laser' size='Light'"}, % mount
  {"tag_m_5","weapon='FriendOrFoe' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_m_6","weapon='FriendOrFoe' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_l_0","file='supernova.bmp' size='3'"},            % light
  {"tag_l_1","file='supernova.bmp' size='3'"},            % light
  {"tag_l_2","file='supernova.bmp' size='3'"},            % light
  {"tag_c_0","file='heavy-cockpit.cpt'"}                  % cockpit
]},                                                     %end of unit-config

{"esc.blank", "esc_blank.txt",
[
  {"tag_m_0","weapon=''   size='Light Medium'"},       % mount
  {"tag_m_1","weapon='' size='Light Medium'"}, % mount
  {"tag_m_2","weapon='' size='Light Medium'"}, % mount
  {"tag_m_3","weapon='' size='Light'"}, % mount
  {"tag_m_4","weapon='' size='Light'"}, % mount
  {"tag_m_5","weapon='' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_m_6","weapon='' size='Missile-Light Missile-Medium'"}, % mount
  {"tag_l_0","file='supernova.bmp' size='3'"},            % light
  {"tag_l_1","file='supernova.bmp' size='3'"},            % light
  {"tag_l_2","file='supernova.bmp' size='3'"},            % light
  {"tag_c_0","file='disabled-cockpit.cpt'"}                  % cockpit
]}                                                       %end of unit-config
% insert more (template/faction/whatever) units here

]}.
to prevent other confusions here a list of thing you may need:

*the point '.' is only needed after completely closed pairs of brackets:

Code: Select all

{xx,yyy,[xx,yy,zz]}.
*The ',' is only needed to single entries like in the example above.

*Inside of two " there are no other "-characters allowed, use ' instead.

If you need anything else, just ask.

HTH
Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

help me!

Post by KleiZwei »

When I right click in wings3d, i don't get a vegastrike tags option...
(ive got the newest version of the export plugin and of wings3d.)

And i wish i read about these tags before I went and positioned 25 lights around my space station.... grr
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

Re: help me!

Post by pontiac »

Klei wrote:When I right click in wings3d, i don't get a vegastrike tags option...
(ive got the newest version of the export plugin and of wings3d.)
Just to get sure:
*Be sure you don't have anything selected (hit space).
*The press right mouse button. It should be the last menu point.

If it is not there, i don't know the reason.
Which version do you use exactly?
Maybe the newest version of wings don't work (the plugin API has changed,though i can't find one in the changelog; can't resolve that until i go back to my home).
If it don't work with the latest wings3d try the version 0.98.11c or 0.98.11d, available here.
And i wish i read about these tags before I went and positioned 25 lights around my space station.... grr
Yeah i know it's a bunch of work (tell me), but i haven't found a way to automatically replace the lights with tags.
But now you can also use mirror and such to easily duplicate (using combine/seperate) the tags alonga an axis. Justz be sure the tags has only 3vertices/2faces afterwards.

Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

as it turns out i had the what could have been the oldest version of the export plugin 1_2.zip somewhere somebody needs to update some links...
I had to click the link in your signature at the bottom of the message.
This isn't the end of the universe, I've been to the end of the universe and trust me, this isn't it!
pontiac
Elite
Elite
Posts: 1454
Joined: Sun Jan 12, 2003 6:24 pm
Location: Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy
Contact:

Post by pontiac »

KleiZwei wrote:as it turns out i had the what could have been the oldest version of the export plugin 1_2.zip somewhere somebody needs to update some links...
I had to click the link in your signature at the bottom of the message.
The curse of outdated forumlinks strikes back ;-)

I actually announce every new version of the plugin in the artwork forum. (current thread is here)
There you can see what features are new, report bugs and post other feedback.

Pontiac
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

Hi just trying to decipher this whole config file thing (seems like theres a lot more work to do now then before, and hey I happen to like lights damnit!).

Anyways below is my unit config for loki can someone tell me if I've done it right, and also if a cockpit is necessary... it's a space station so i just skipped it assuming no-one would be piloting it... and besides it just sits there and spins... but does have an engine mount just in case.
[code{unit_data,
[

{"loki", "loki.txt",
[
{"tag_s_3","file='turret'"}, % subunit
{"tag_s_4","file='turret'"}, % subunit
{"tag_s_5","file='turret'"}, % subunit
{"tag_s_6","size='turret'"}, % subunit
{"tag_s_7","file='turret'"}, % subunit
{"tag_s_8","file='turret'"}, % subunit
{"tag_e_1","file='engine'"}, % engine
]}, % end of unit-config

{"myunitname.blank", "unit_blank.txt",
[
{"tag_s_3","file='turret'"}, % subunit
{"tag_s_4","file='turret'"}, % subunit
{"tag_s_5","file='turret'"}, % subunit
{"tag_s_6","size='turret'"}, % subunit
{"tag_s_7","file='turret'"}, % subunit
{"tag_s_8","file='turret'"}, % subunit
{"tag_e_1","file='engine'"}, % engine
]}, % end of unit-config[/code]

so, what do ya's think?
This isn't the end of the universe, I've been to the end of the universe and trust me, this isn't it!
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

ok forget that above whats this error mean?

Code: Select all

wpc_xmesh:command/3: bad return value: {'EXIT',
                                           {badarg,
                                               [{lists,
                                                    keysearch,
                                                    [unit_data,
                                                     1,
                                                     {{37,
                                                       erl_parse,
                                                       ["syntax error before: "|
...]},
                                                      "Error when trying to cons
ult CONFIG file:'d:/steven/VS Models/UCMC Loki SS/config/config.txt'"}]},
                                                {e3d_xmesh,config_get_value,2},
                                                {e3d_xmesh,export,4},
                                                {wpc_xmesh,export_1,4},
                                                {wings_file,do_export,4},
                                                {wpa,export,3},
                                                {wings_plugin,command,3},
                                                {wings,do_command_1,2},
                                                {wings,do_command,3}|
                                                more]}}
This isn't the end of the universe, I've been to the end of the universe and trust me, this isn't it!
etheral walker
Elite
Elite
Posts: 1516
Joined: Sat May 10, 2003 5:26 pm
Location: into the depths

Post by etheral walker »

for me you missed something at the end of the file, her is one of mine:
%%%% Wings3D Vegastrike Export Config File %%%%
%
% please insert your data with ' instead of " because it will not work otherwise ;-)
% Every line started with % is an comment.

%%%% insert your tag-data below %%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Usage: ....{"tagname","options"}......
%
% tagname:
% The name you gave the tag in wings.
% Please leave the first two words (i.e "tag_mount_") in wings and in htis file
% how they are, they are precessed by the plugin.
% After the second _ you can enter whatever you want, but keep the character
% count of the whole tag-name under 12 (this is an 3ds limitation)
% If two tags have the same name in wings they will use the same options.
%
% options:
% insert the XML data here like in the unit file
% see http://www.joeredcloud.com/kandarwiki/i ... tUnitFiles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{unit_data,
[
% unit-filename unit-configfilename (located in the "./config" directory)
{"myunitname" , "unit.txt",
[
{"tag_m_4","weapon='Ion' size='Medium Heavy'"}, % mount
{"tag_m_5","weapon='Laser' size='Light Medium Heavy'"}, % mount
{"tag_m_6","weapon='Laser' size='Light Medium Heavy'"}, % mount
{"tag_m_7","weapon='Laser' size='Light Medium Heavy'"}, % mount
{"tag_m_8","weapon='Laser' size='Light Medium Heavy'"}, % mount
{"tag_l_1","file='supernova.bmp' size='6'"}, % light
{"tag_l_2","file='supernova.bmp' size='6'"}, % light
{"tag_d_9","size='10'"}, % dock
{"tag_c_0","file='heavy-cockpit.cpt'"} % cockpit
]}, %end of unit-config

{"myunitname.blank", "unit_blank.txt",
[
{"tag_m_4","size='Medium Heavy'"}, % mount
{"tag_m_5","size='Light Medium Heavy'"}, % mount
{"tag_m_6","size='Light Medium Heavy'"}, % mount
{"tag_m_7","size='Light Medium Heavy'"}, % mount
{"tag_m_8","size='Light Medium Heavy'"}, % mount
{"tag_m_1","size='Light Medium Heavy'"}, % mount
{"tag_l_1","file='supernova.bmp' size='6'"}, % light
{"tag_l_2","file='supernova.bmp' size='6'"}, % light
{"tag_d_9","size='10'"}, % dock
{"tag_c_0","file='heavy-cockpit.cpt'"} % cockpit
]} %end of unit-config

% insert template/faction/whatever units here

]}.

%%%% insert your texture-data below %%%%%%%%%%%%%%%%%%%%%%%%
% Usage: ....{"object-name","options"}....
%
% object-name:
% Don't start this with "tag_" and not more than 12 characters.
%
% options:
% insert the XML data here like in the mesh file (i.e: texture='myship.jpg')
% see http://www.joeredcloud.com/kandarwiki/i ... tMeshFiles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{mesh_data,
[
{"frelon","texture='tex_body.jpg' texture1='tex_body_lightning.jpg' sharevertex='0' blend=''"}
% ,
% {"wing","texture='tex_wing.jpg' texture1='tex_wing_lightning.jpg' sharevertex='0' blend=''"}
]}.
%%%%%%%%%%%% END OF FILE %%%%%%%%%%%%%%%%%%%%%%%%%%%%

just be sure that all the parts of your meshe are here, with their textures
I see dead polygons....
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

I'm not sure about thit config file, but I now that in every programming language and config file, the braces mst match up and the first two braces (I assume the "[code" is a typo with the forum thing) must end at the end of the file.

so add a "]}." at the end of the file to match up with the

Code: Select all

{unit_data,
[
at the beginning of the file.
As far as I can tell, it wouldn't make sense to leave the first two braces/brakets unclosed.
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

fix it.... please fix it!!! i spent the last two hours on this thing...

Code: Select all

{unit_data,
[
{"loki","unit.txt",
[
{"tag_m_1","file='turret'"},
{"tag_l_1","file='supernova.bmp', size='3'"}
}],

{"loki.blank","unit_blank.txt",
[
{"tag_m_1","file='turret'"},
{"tag_l_1","file='supernova.bmp', size='3'"}
}]

]}.

{mesh_data,
[
{"loki","texture='loki1.jpg' sharevertex='0' blend=''"}
]}.
Erlang say:

Code: Select all

wpc_xmesh:command/3: bad return value: {'EXIT',
                                           {badarg,
                                               [{lists,
                                                    keysearch,
                                                    [unit_data,
                                                     1,
                                                     {{7,
                                                       erl_parse,
                                                       ["syntax error before: "|
...]},
                                                      "Error when trying to cons
ult CONFIG file:'d:/steven/VS Models/UCMC Loki SS/config/config.txt'"}]},
                                                {e3d_xmesh,config_get_value,2},
                                                {e3d_xmesh,export,4},
                                                {wpc_xmesh,export_1,4},
                                                {wings_file,do_export,4},
                                                {wpa,export,3},
                                                {wings_plugin,command,3},
                                                {wings,do_command_1,2},
                                                {wings,do_command,3}|
                                                more]}}

just 1 note, there are actually 6 turret tags, but i've named them all the same to save myself time. perviously they were named tag_m_1, tag_m_2 and so on upto 6. If this is wrong just let me know. I've tried it both ways and nothing worked.
This isn't the end of the universe, I've been to the end of the universe and trust me, this isn't it!
FlyingAce
ISO Party Member
ISO Party Member
Posts: 398
Joined: Fri Apr 11, 2003 1:17 am
Contact:

Post by FlyingAce »

{unit_data,
[
{"loki","unit.txt",
[
{"tag_m_1","file='turret'"},
{"tag_l_1","file='supernova.bmp', size='3'"}
}], <-----replace this with ]},

{"loki.blank","unit_blank.txt",
[
{"tag_m_1","file='turret'"},
{"tag_l_1","file='supernova.bmp', size='3'"}
}] <-----replace this with ]},

]}.

{mesh_data,
[
{"loki","texture='loki1.jpg' sharevertex='0' blend=''"}
]}.
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

Ok thats all well and good now i get a new error...

Code: Select all

wpc_xmesh:command/3: bad return value: {'EXIT',
                                           {format,
                                               [{io,format,
                                                    [<0.45.0>,
                                                     "<Subunit x=\"~p\" y=\"~p\"
 z=\"~p\" ri=\"~p\" rj=\"~p\" rk=\"~p\" qi=\"~p\" qj=\"~p\" qk=\"~p\" ~s />\r\n"
,
                                                     [0.00000e+0,
                                                      1.54579,
                                                      4.26460,
                                                      0.00000e+0,
                                                      0.901001|...]]},
                                                {e3d_xmesh,
                                                    file_par_write_tags,
                                                    4},
                                                {e3d_xmesh,
                                                    objects_write2file,
                                                    6},
                                                {e3d_xmesh,export,4},
                                                {wpc_xmesh,export_1,4},
                                                {wings_file,do_export,4},
                                                {wpa,export,3},
                                                {wings_plugin,command,3}|
                                                more]}}
I think it wants me to put in the position/direction of each turret (which i certainly hope it doesn't...).
KleiZwei
Mercenary
Mercenary
Posts: 102
Joined: Wed Apr 30, 2003 5:16 pm
Location: The Restaurant at the end of the Universe

Post by KleiZwei »

Nevermind i found the problem and finnaly got it to compile right...
lol i was using mount tags (for weapons) instead of subunit tags (for turrets) so tag_m_1 should have been tag_s_1 (yeah i'm a moron but at least i don't need any more help).
Post Reply