RWX scripting (Notepad++) (2) - examples
6. Making a model brighter or darker
While building with the objects of the alphapath or uberpath, you will have noticed that some objects have darker textures than the others, even if you apply the same texture on them. Also the prim objects have dark textures, and we can brighten them up.
For this example we are going to edit the model : w2crv_1000i.zip
We create a new folder and copy the file to this folder , and we go this new folder.
We right-click upon w2crv_1000i.zip and choose "unzip here" or "extract here".
We see the file w2crv_1000i.rwx and rename it into b2crv_1000i.rwx (="bright")
Right-click upon file b2crv_1000i.rwx , and choose "edit with Notepad++".
In the rwx-script : Ambient and Diffuse have values between 0 and 1.0 .
Low values for the commands Ambient and Diffuse make the model darker.
That's why we will modify the values.
Ambient 1.0
Diffuse 1.0
Now we save rwx-file. Then right-click upon file b2crv_1000i.rwx
Choose 7-zip , and "Add to Archive", and you have zipped file b2crv_1000i.zip
Finally open the FTP-program and upload the zipped -file to the object path.
Another thing that plays a role are the rwx -commands "color" and "surface". The command "color" defines the color of the polygon, with 1 1 1 as default value (=white). The values range between 0 and 1. Any lower value will make the object darker.
And the command "surface" defines ambient , diffuse and specular lighting properties in 1 command, so here we also use the values 1 1 1 , otherwise the values of ambient and diffuse will not work.
Color 1 1 1
Surface 1 1 1

These are the initial values of ambient and difuse for the prim objects. The rwx script for this model is 51 lines. At the bottom of the script, all the quads have tag 200. This means that the prim object can also be used as a picture object .

For the model b2crv_1000i we modified the values of ambient and diffuse to make the model brighter.
On this picture, i added the b2crv_1000i.rwx model to show the difference. As you can see, the prim-object in the middle has a texture that is a lot brighter. But its the same texture.