(EDIT) How to Import Mshs (Textured) into Blender/Export

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

(EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Ace_Azzameen_5 »

Originally "Blender Polygon Island/Element Select Equivalent(for MeshEx)"

To Sum up what I was taught below, in tutorial form:
Open the .msh in SWBFViewer, click file>export and then save the files as .wrl VRML97 format.
Start blender (with python installed), and import the object. (File>import> X3D & VRML97 ; browse for the file and open)

Select all the objects by pressing a or shift right-clicking all of them, and then merge them (CTRL-J; Object>Join Objects).
Next, select 'texface' for all the imported materials (textures) (Press F5, shading mode. To switch between textures use the button under the word 'Link' in "Link to Object" in "Links and Pipeline" panel. The texface button is in the "material' panel next to the Links and "Pipeline Panel")
Edit your object as desired, export as vrml97, open the exported wrl file in SWBFViewer, and save as mesh.
Note: You'll likely need to start with the texture .tgas in same directory as the .msh and then as the wrl and msh export files to make sure everything goes smoothly, yet to confirm if this is necessary.

Now to apply the edge-split so that shading works...refer to mswf in post 10.

Original Post
Hello, I've recently started modeling for SWBF2, mostly re-texturing or editing existing models.
This involves importing existing meshes, by converting them to OBJ using Mesh Tool or Meshex by RepSharpShooter. He mentions in the MeshTool 4 thread that XSI and 3DS max have methods of breaking up the imported OBJs (which appear as Collision and Model and 3rd thing in a single entity) into their component meshes by Polygon Island Select or Element Select. Is anyone here aware of a Blender equivalent or am I going to have to do a bit of additional import/export work? (The latest model I am working is too complex for me to be able to delete the undesired collision poly's manually).
Thanks
Last edited by Ace_Azzameen_5 on Fri Sep 24, 2010 10:18 pm, edited 2 times in total.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Blender Polygon Island/Element Select Equivalent(for Mes

Post by AceMastermind »

I'm not too familiar with Blender so i'll leave that to someone who is but if you want to save yourself some time separating the main geometry from collision/lowrez/shadowvolume etc then use SWBFViewer to convert the msh to wrl which strips away everything but the main geometry.

.msh > SWBFViewer > .wrl > Blender > .obj > Softimage Mod Tool > .xsi > MshEx > .msh

^This conversion pipeline is comprised of completely free software available to everyone!
The benefit of this workflow includes preserving hierarchies and nulls.
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Blender Polygon Island/Element Select Equivalent(for Mes

Post by Ace_Azzameen_5 »

Coo, Thanks, Will try.
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

Re: Blender Polygon Island/Element Select Equivalent(for Mes

Post by Jaspo »

I'm not too familiar with Blender so i'll leave that to someone who is but if you want to save yourself some time seperating the main geometry from collision/lowrez/shadowvolume etc then use SWBFViewer to convert the msh to wrl which strips away everything but the main geometry.

.msh > SWBFViewer > .wrl > Blender > .obj > Softimage Mod Tool > .xsi > MshEx > .msh
my process for editing existing models skips the softimage step, like so:

.msh > SWBFViewer (select "export") > .wrl >
Blender [join selected objects (since the swbf msh file gets imported as multiple objects for some reason), merge duplicate verticies (option in edit mode, under "vertices" in one of the menus), click "texface" for ALL imported texture materials, edit model as needed] >
.wrl (Blender export option: VRML97) > SWBFViewer (select "save as") > .msh > MshEx (if needed, or a hex editor)
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Blender Polygon Island/Element Select Equivalent(for Mes

Post by mswf »

To ad to this, you have to merge duplicates for two reasons; because the objects get separated for some reason, but also because most models have split edges, so that you won't get weird shading errors because SWBF renders all objects with smooth shading. You should consider adding an edgesplit modifier to reapply those things.
To do this, ad the modifier, called "edgesplit", decheck "from angle" and check "marked as sharp", or something along that line. Then, in edge-select mode, select the edges that need to be hardened, press "ctrl+e" and select "mark sharp".
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Ace_Azzameen_5 »

Thanks a lot everyone, this would have saved me time had I asked it earlier but in the process of doing it a the long way I learned to texture along with other bits of modelling.
I'm trying to 'finish' my map 'Azuraize' (Ace's Race) from back in 2007, but I used a lot of distance geometry as part of my map's core, so I want to make it look a bit more presentable.
Also I wanted to put a hole in an object.
I also made a model for my elevators (Action Key operated :)) so that the 4th wall wouldn't get broken by clipping objects and missing faces.

I added a tutorial to the first post and renamed the thread, It's missing the instructions for getting shading to work, though.
Also, I need to figure out how to get a lowrez attached - I could hex it but that will take some precision in what I copy into the final .msh file from the initial...
mwsf wrote:ad the modifier, called "edgesplit"
How does one 'add modifiers'? Where in the interface, what mode?
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by mswf »

Which version are you using?
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Ace_Azzameen_5 »

I believe 2.49, (that's what it says) but it could be 2.53.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Teancum »

Stickied :thumbs:
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by mswf »

Ace_Azzameen_5 wrote:I believe 2.49, (that's what it says) but it could be 2.53.
Well then, for Blender 2.49, go to this webpage. Go to the menu that's also selected in the first picture on this page. Then click on "ad modifier" in that window and "edgesplit" should be somewhere in there. For 2.5, look in the properties panel and go to the tab that has a little wrench on it, ad an "edgesplit" modifier there. Turn of the option that has something with "by angle" in it and check "marked sharp". Then, in your 3d viewport and in edit mode, select all the edges that need to be sharp (making sure you're in edit mode and edge-select mode) and press ctrl + e and select "mark sharp".
EDIT:
I just remembered that I made a picture once, to illustrate the effects of doing this right can have:
Hidden/Spoiler:
Image
User avatar
Wonderboy
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sun Jul 12, 2009 12:54 pm
Projects :: Making apples into applesauce
Games I'm Playing :: Age Of Empires II
Location: Eastern South Dakota

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Wonderboy »

Just pointing out this to save some trouble, in 2.49, under the edgesplit modifier menu, the two boxes are called "From Edge Angle" and " So I'm assuming "From Edge Angle" should be unselected and "From Marked as Sharp" should be.
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Ace_Azzameen_5 »

Upon completing these steps, though, I am left with a model without a lowrez model. Can someone refer me to the proper info, on how to add it, even if its in XSI maybe. I don't like having my new object fade-in from nothingness and experiments with Hex have not ended well..
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by DarthD.U.C.K. »

a lowrezmodel is nothing more than an object with the extension "_lowrez" under your dummyroot. but if i remember correctly objects are renamed/whatever upon converting them from blender to msh so i guess youll have to use xsi
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by Ace_Azzameen_5 »

How to say this, I am loathe to install XSI because blender is more lightweight than XSI, and XSI may take some time to learn. That might not stop in the long run.
But, DarthD.U.C.K, maybe you could take a look in Blender and tell me what the equivalent of a dummyroot would be. Maybe there is a `dummyroot`in blender. To be honest I`m not sure what a dummyroot is. I think it might be specific to the Pandemic .msh format...
Before exporting, Blender sees only a scene with various 3d objects in it. There is a central point, and the relative position from it IS preserved straight through to SWBF2 in game. I usually move the object to the scene's origin before export.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export

Post by AceMastermind »

The "dummyroot" is just the name of a null or simple geometry which acts as the master parent of the hierarchy, think of the dummyroot as a box that is used to carry around other objects, the other objects would be the children of the dummyroot.

Object hierarchies are apparently possible in Blender and can be displayed in the Outliner but if the format you are exporting from Blender to is not capable of storing hierarchies or parent-child relationships then the hierarchy is destroyed, also if SWBFViewer can't properly read hierarchies from the wrl file then objects might be left out or merged.

EDIT
It looks like an Empty Object is Blender's equivalent to a null in XSI.


EDIT2
A recent test revealed that SWBFViewer will merge multiple objects from the wrl file into a single object named Geom1 in the msh file, so it looks like lowrez geometry in a hierarchy will not work from Blender through SWBFViewer to SWBF but MshEx will support an object hierarchy and nulls as well and this is why I recommended that workflow in my first post in this topic.

Hope this helps!
Post Reply