62
  Modeling
  RWX scripting - Introduction
 
Opening .rwx-models in Notepad ( with the 7-Zip -program )
 
This may not be so simple as it seems : existing rwx-models from the Alphapath or Uberpath, are all zipped files. You need to unzip them first with a zipping program. A good zipping program is 7zip : because it is freeware , and because you can also add an object password ( if you want to). Several objects of the Alphapath or Uberpath have already an object password and can't be opened in Notepad !
For more information , see tutorial page: 10. zip/unzip - object password
Now choose a simple model from the object path , consisting of only 1 flat face. As an example, we choose the model : flata10.rwx
As the model is zipped, we unzip it first :
Right-click upon the object , select "7-ZIP" and then choose "Open archive". Then you will see this in the 7zip program :
 
Here you see the unzipped file of flata.rwx . Now right-click upon flata10.rwx and choose : "Edit" . Now you see the file in Notepad.
 
The model flata10.rwx in Notepad.
File structure in Notepad
 
As you can see, for this example, the command starts with : ModelBegin , and ends with ModelEnd.
Then there is a first part that starts with ProtoBegin , and ends with : ProtoEnd
And there is a second part that starts with ClumpBegin , and ends with ClumpEnd.
 
Only for editing
 
This is an example of a very simple model (of only 1 surface and 4 vertices) and has already a lot of text lines !
If you choose a sphere object , or cylinder object or another more complicated object , then the text file can have hundreds of text lines, and appear very complex. It is obvious that nobody will start creating a model by writing all those lines with Notepad nowadays.
Notepad will only be used for editing some things to the existing model . Then we think about : modifying the existing texture of the model, scaling the model , making the model transparent, etc.
 
Examples of models in Notepad
 
In the example above, we do not know how the model has been created . The model might have been edited with Accutrans, or the model might have been created with Truespace and conversed with the program cobtorwx.
That's why we will use in these tutorials only simple models , and learn more about the structure of the text file.
We will create simple models in Wings3d , and we will export them to .rwx , and then we will open them in Notepad.
Or you can use existing models of the objectpath, which don't have an object password, en you open them in Notepad. (You will not be able to unzip the objects with an object password).
 
The advantage of Notepad
 
The existing rwx-models of the Alphapath or Uberpath can't be imported in popular 3d-programs like Wings3d and Blender.
And only with Wings3d , you can export the model into .rwx, but if you have forgotten to save the 3d-file first with the extension .wings, then you can't edit the model anymore in Wings3d (as importing .rwx is not possible).
Notepad is a possible solution : you can open the model in text-file and modify certain aspects of the model.
Another possibility is to use Accutrans, which is a 3d-file converter, but then you will have to learn that program as well.