[tut]Creating MSH without XSI!

Started by RepComm, January 11, 2013, 05:56:59 PM

Previous topic - Next topic
January 11, 2013, 05:56:59 PM Last Edit: December 12, 2013, 09:37:14 PM by -ChristmasCommando-
Re-written 12/12/13

This tutorial will explain how to create 3d models and use them as STATIC (not animated) MESHES (models) for use in the game "Star Wars: The Battle Front"
--
Tools you need:
1. Modelling program that exports *.OBJ files;
Google Sketchup 7                      *.OBJ Export Plugin
2. Program to convert *.Obj to *.WRL (VRML2.0)
Wings 3D
3. And *.WRL to *.MSH Application:
SWBFViewer
--
Step 1; Create a 3d model in the OBJ exporting application (if using sketchup, just draw a square and use expand tool to make a full cube)
Step 2; Texture/Paint the model (if using Sketchup, click the Paint Bucket icon, and add some texture to the sides of the cube)
Step 3; Export as an Wavefront OBJ model (if using Sketchup, click "PLUGINS" -> "OBJ Exporter". Click Browse and save the model somewhere you can find it (Desktop for instance)
Step 4; Open exported model into WRL exporting Application (Wings3d, Import -> Wavefront *.OBJ) And export it as a VRML 2.0 *.WRL file to where-ever you put the OBJ one.
Step 5; Open up SWBF Viewer (BFViewer.exe), and you can say no to both option that popup initially. Now drag the *.WRL you just exported onto the programs window, and see it appear!.
You can now Save the file (File ->Save As "MODELNAME.MSH"
--
But wait, it's all white, where's the texture!
Do not worry my good fellow, you can fix this easily!
[spoiler=Step 6]
Open the *.WRL file in Notepad or some text editor, CTRL + F to find "ImageTexture," and 'Find'.
Now you should see something like this ImageTexture {
  url "C:/Users/____/____/TEXTURENAME.png"}

Change that to
ImageTexture {
  url "TEXTURENAME.TGA"}
Now Save *Not Save As*

-- You have just fixed a serious bug, now to change the texture so that SWBF can read it!
Click Next spoiler[/spoiler][spoiler=Step 7]So you need to change the format of the texture to *.TGA (Targa Image)? Alrighto, open up the texture you typed in the WRL file in GIMP or something that can save as 32 or 64bit (only use 64bit if you are using transparency) TGA files, and if you have the option, turn RLE compression OFF! (SWBF doesn't like it), and save it as TEXTURENAME.TGA.

Next spoiler![/spoiler][spoiler=Step 8]Right, now to optimize the texture for SWBF (if it isn't already).
The thing with textures is that the size has to be a square number (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024) in pixels. So per se you had a 423 x 511 texture, you would need to scale it to something close so you don't distort it too much (in this case, 512 x 512). Remember, this will not change the texture projection on the 3d model what-so-ever, but rather stretches the image to fit no matter what size, but if it isn't sqaure, SWBF renders the model BLACK or WHITE. If the texture is a square number, you may now save it with same settings as the previous step.[/spoiler]
CONGRATULATIONS, You've won!
No but really, if the model isn't showing up right by now, just read over the tutorial closer and you'll get it!
[spoiler=TIPS]
If the model is too big or too small, you may use the scale option in the modelling program you used (every program has one).

UV mapping (accurate multi-texturing) is for more advanced modellers, and you can use UV Mapper Classic to re-do the textures on *.OBJ models. -UV Map is a 2d plain that mimics the 3d model it goes to. So you can save a UV map as a texture file (*.BMP or whatever) and paint over the triangles and they'll appear on the model if the texture is saved![/spoiler]

Happy modelling!
-RC-.

edit by tirpider: tagged title (you already had it tagged. Just added fancy brackets like the rest of the tags though.

All I know about it: OBJ can be imported to free XSI Mod Tool, but cannot be exported from it.
Before ZETools was released, I am usualy have to convert msh to obj, by meshtool, each time, if I was need to import some model, in to XSI Mod Tool.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

January 11, 2013, 07:19:22 PM #2 Last Edit: March 11, 2013, 06:22:56 PM by -RepublicCommando-
Quote from: Sereja on January 11, 2013, 06:52:03 PM
All I know about it: OBJ can be imported to free XSI Mod Tool, but cannot be exported from it.
Before ZETools was released, I am usualy have to convert msh to obj, by meshtool, each time, if I was need to import some model, in to XSI Mod Tool.
Yeah, Wings3D doesn't export some types of files, and doesn't import other O.o...
A bit retarded... But there are ways around it^^

Nice.

I love that you are doing this, RC.
Keep up the good work.

That's great! I have a decent knowledge of Sketchup so I hope to make some models when I find the time...

Awesome!  I'm XSI illiterate (I try and try and it never works right for me :( ) so I wanted to learn an easier (which it will be once I figure out sketchup :) ) way to make models.
Thanks!  8)
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

March 13, 2013, 09:40:46 AM #6 Last Edit: June 09, 2013, 11:39:33 PM by -RepublicCommando-
XD, Me too, I am able to understand a little bit about XSI, but if you can't even export the model, I think it just takes too much time, sketchup is very fast, but you can also access the technical side of the program too, like Ruby Console (it's built in), you can view the model information, lots of boring stuff :P
-------------------------
By the way, I noticed that Snake was using Cinema4D to create OBJ models, you can make a model in almost any program, export as a WaveFront OBJ, and do the rest of the steps dealing with Wings3D and MSH Viewer, and it should do well too.

March 13, 2013, 02:09:22 PM #7 Last Edit: March 13, 2013, 02:27:16 PM by Snake
How do you install the obj exporter to sketchup? & I can't find the plugin button..

--EDIT

Nvm, I just put it in the plugins section of the files on the C drive
=AaTc= Forever

SALLY....

-Retired Modder

I rewrote the topic, mostly because I can spell the word Browse now :slap:
But this should kick in your intuitive a tad more..

By the way, if you are really looking forward to modelling in general (if you are going to start with SWBF, that is), I HIGHLY recommend you just learn XSI or some real program. This is just a simple hack'n'hash way of getting it to work.

-- Wings3d does not like high polygon models (Sketchup's cylinders really kill the poly and UV count..) exporting as VRML/WRL, so if you can convert models to WRL any other way, it's probably better.