RSM23DS
=======
Ragnarok RSM model viewer and RSM-3DS model converter

Intro
-----------------
RSM files are the 3D object data used in Ragnarok Online.
using the GRFEXTRACT program we can uncompress that data and
read it into our own programs.  

The goal of this app was to convert RSM files into a type readable
by 3DSMax, so I could create rendered veiws of Ragnarok.

This was my first serious VB app to tackle Direct3D, so it's 
a milestone for me :~)

This work was discontinued when I found out that 3DSMax doesn't 
seem to read texture information from 3DS files even ones it
generates itself.  The texture information is there, it just doesn't read
it into memory, or something.

Nevertheless it is a great tool for browsing through RSM files
when I want to create a scene in 3DSMax, because it loads objects
quickly and displays them textured at once.

I left in the 3DS saving capability because I learned a lot from it,
and it would be a shame to delete all that code out I worked hard at.

If you're serious about using Ragnarok models in 3DSMax, use my RSMImp 
plugin instead!

I've also included the documentation on the 3DS file format by 
Jochen Wilhelmy (digisnap@cs.tu-berlin.de.)


Based on deufeufeu's RSMView that I found on the YARE forum boards. 

http://www.project-yare.com

Mail me for questions and comments at <saintender.geo@yahoo.com>
I won't answer questions like "how does 3D work?" or "how do I use
Direct3D?" There are other places to look for that information.


Requirements
-----------------
- DirectX7 or better
- Visual Basic 6
- 450MHz CPU or better
- Direct3D compatible video card with 32MB RAM or better
- A lot of RAM would be nice :)
- Ragnarok Online installed on your harddisk
- 2.0GB free space for the extracted stuff. 


Instructions
-------------------
- If you haven't extracted the Ragnarok data yet, do so by
  running the GRFExtract program included with this package. 
  GRFextract will unpack all the goodies stored in the data.grf
  file, which includes the 3d models, world maps, textures, sprites,
  and sounds, and will take up around 1.7 to 2.1GB
- Execute RSM23DS.  Click File>Open. It will try to open the folder 

     "C:\Program Files\Gravity\RagnarokOnline\Data"

- Go to the models folder, and start looking for those models! 
- Use the "Save As" menu item to save the model in 3DS format.


* Do not remove the blank.bmp file. The program uses this when it 
  cannot find the textures for a model


Features
--------------------
- Click inside the window and drag up and down to zoom camera.
- Hold Shift while dragging to adjust the camera height.
- Hold Ctrl while dragging to adjust the camera angle.
- Click Options and play around with Wireframe and Smoothing options.

* Warning!  The 3DS format doesn't have textures! Your model
  will be plain grey and featureless!



Limitations
===========
I'm using DirectX7 because:
-  DirectDraw has been deprecated in DX8 above and 2D 
   is implemented as a plane in DX8, and pure Direct3D gives me headaches

I'm using Visual Basic because:
- They don't teach Visual C++ at school :)
- Visual C++ gives me headaches just thinking about creating dialog windows.


Known Bugs & Issues
===================
- There seems to be a problem on my Windows XP, where the textures don't seem
  do be displayed in the right colors.  I think this is because I'm using Microsoft's
  default drivers for my Inno3D GeForce2 400MX.  If you have the same problem in XP,
  upgrade your drivers, and if that doesn't work, you can try mailing me :P


Things to Do
=============
- Implement proper scaling/rotation
- Implement quaternion animation of child meshes
- Implement per-face texture coordinates viewer (and editor?)
- Free the camera
- Implement RSW and GND readers/viewers
- Go DirectX8
- Port it all to VC
- Perform a per-object, then per-face camera hit-test to speed up rendering?
- Finally make a complete free-camera RO world viewer with environment maps and yes,   
  animated transparent water. XD


Updates
=================
2/18/04
--------
- Added support for reading child meshes
- Fixed texture assignment

2/17/04 
--------
- Since I now am using a NVidia Geforce 2 MX440 64MB (yay!)
  I can now use hardware accelerated mode to render the objects.
- Transparent textures now working properly.
- Added auto detection of 3D devices. RSM23DS now uses the last detected
  available device for default rendering.
- Added file info and texture viewers
  Lots of optimizations


8/16/03
--------
- Implemented the 3DS exporter but I can't seem to get 3DSMax to
  import the textures... it must be a 3DSMax problem because Max 
  doesn't even import textures from its own 3DS files even if they 
  have the correct data structure for textures.  I don't want to 
  have to texture map each object myself...

8/15/03
-------
- I'm giving up rendering all the objects in a RSW file
  I'll prolly just leave support for viewing individual objects at a time
  from an RSW file.
  Software mode is just too damn slow, and so is VB...
- Started implementing 3DS format writer... its these damn chunks...
  Well, they can do it.. so can I....
- Changed the name to RSM23DS, for obvious reasons...

8/11/03
-------
- Finally found out how to depth buffer the damn thing properly.

8/10/03
-------
- Worked on texturing the object

8/9/03
-------
-Found out about the RSM model viewer via the board
 The app was good, but didn't go much by way of camera angles
 and seemed a bit slow.  I don't do much OpenGL and my video card
 is a Voodoo, so I don't know if its the app or its OpenGL on Voodoo.
-Tried looking for Glide documentation/SDK.  Not very helpful.
 So I decided to go Direct3D on VB. 
-Downloaded the source code, and set out to figure the RSM file format
 based on the source code.
-Initially just read in the fields to see if my data type conversion was right
-After a bit of work, got the flat shaded model to pop up on the screen
-Called it a day as it was early in the morning already :)
