(EDIT) How to Import Mshs (Textured) into Blender/Export
Moderator: Moderators
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
(EDIT) How to Import Mshs (Textured) into Blender/Export
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
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.
- AceMastermind
- Gametoast Staff
- Posts: 3284
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: Blender Polygon Island/Element Select Equivalent(for Mes
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.
.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.
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Blender Polygon Island/Element Select Equivalent(for Mes
Coo, Thanks, Will try.
-
- Command Sergeant Major
- Posts: 282
- Joined: Sun Mar 01, 2009 4:34 am
- Projects :: AotC DoW+++Boonta Eve Classic
- xbox live or psn: No gamertag set
- Contact:
Re: Blender Polygon Island/Element Select Equivalent(for Mes
my process for editing existing models skips the softimage step, like so: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
.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)
-
- 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
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".
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".
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
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...
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
![Smile :)](./images/smilies/icon_smile.gif)
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...
How does one 'add modifiers'? Where in the interface, what mode?mwsf wrote:ad the modifier, called "edgesplit"
-
- 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
Which version are you using?
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
I believe 2.49, (that's what it says) but it could be 2.53.
- Teancum
- Jedi Admin
- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
-
- 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
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".Ace_Azzameen_5 wrote:I believe 2.49, (that's what it says) but it could be 2.53.
EDIT:
I just remembered that I made a picture once, to illustrate the effects of doing this right can have:
Hidden/Spoiler:
- Wonderboy
- Chief Warrant Officer
- Posts: 353
- Joined: Sun Jul 12, 2009 12:54 pm
- Projects :: Making apples into applesauce
- Location: Eastern South Dakota
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
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.
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
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..
- DarthD.U.C.K.
- 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
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
-
- Jedi
- Posts: 1119
- Joined: Sat Apr 23, 2005 8:52 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
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.
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.
- AceMastermind
- Gametoast Staff
- Posts: 3284
- Joined: Mon Aug 21, 2006 6:23 am
- Contact:
Re: (EDIT) How to Import Mshs (Textured) into Blender/Export
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!
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!