Page 1 of 1
(EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Thu Sep 16, 2010 8:59 pm
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
Re: Blender Polygon Island/Element Select Equivalent(for Mes
Posted: Thu Sep 16, 2010 9:51 pm
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.
Re: Blender Polygon Island/Element Select Equivalent(for Mes
Posted: Thu Sep 16, 2010 11:00 pm
by Ace_Azzameen_5
Coo, Thanks, Will try.
Re: Blender Polygon Island/Element Select Equivalent(for Mes
Posted: Fri Sep 17, 2010 12:38 am
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)
Re: Blender Polygon Island/Element Select Equivalent(for Mes
Posted: Fri Sep 17, 2010 8:08 am
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".
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Sun Sep 19, 2010 12:30 pm
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?
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Sun Sep 19, 2010 12:35 pm
by mswf
Which version are you using?
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Tue Sep 21, 2010 11:01 am
by Ace_Azzameen_5
I believe 2.49, (that's what it says) but it could be 2.53.
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Tue Sep 21, 2010 11:28 am
by Teancum
Stickied

Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Tue Sep 21, 2010 2:07 pm
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:
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Tue Sep 21, 2010 8:25 pm
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.
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Fri Sep 24, 2010 10:21 pm
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..
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Sat Sep 25, 2010 4:38 am
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
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Sun Sep 26, 2010 4:54 pm
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.
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
Posted: Sun Sep 26, 2010 5:26 pm
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!