Firstly, start either notepad, your favourite editor, or the vlight gui app.


NOTEPAD: (win directory)\notepad.exe -> Very basic text editor
VLIGHT GUI: \vl\bin\VLightGUI.exe -> Less basic, but made by the vlight dudes.

These are just suggestions.
Now, to get started....
In this editor program, you should start off with some comments and such.
/* <-- This is used to start a multi-line comment. Multi-Line means that it will/can take more than one line worth of comments.
*/ <-- This ends the multi-line comment.

EXAMPLE:

/* This is my comment. I enjoy comments
Because there are no guidelines governing them.
Ain't that a load of bs?
*/


// <-- This is a single line comment.

Example:

//This is a comment
//This is another comment
//Ain't this really cool?!


To "officially" start your image, you'll need to specify which version of Virtalight you are using. This is done by using the Version command.
Example:

Version: 1.2


Cameras!

Cameras are probably the most important part of Virtualight. Without a camera, how can you view your scene? Without cameras, how will you live?! It's a terrible truth, you need a camera.

Let's skip the rubbish, and get into how to make one.

Firstly, VL uses standard cartesian coordinates, that means that it uses 3 axises; X Y and Z. The camera sits in a place on these axises, points somewhere on these axises and has an UP value on these axises.


Syntax:
Camera [ (x1,y1,z1), (x2,y2,z2), (x3,y3,z3) FieldOfView n]
Now, for the clever explaination.
X1, Y1, and Z1 are where it rests in the world.
X2, Y2, and Z2 are where the camera is pointing at.
X3, Y3, and Z3 define the axis that is pointing up. (I'll go into this a bit more)

"UP AXIS"

All right. You remember algebra I from highschool? Well... it's something like that. When you look at a piece of graph paper, X is from left to right, and Y is top to bottom. Z is always confusing. It can either be depth or height, pending on how you learned it.... VirtuaLight can allow for this. For the "up" axis value, you may have (0,1,0) if you want the Y axis to be up and down, or (0,0,1) for the Z axis being up and down... in my examples, we always use Z as being up and down.
Field Of View:

FOV, or Field of View, is defined as an angle. This angle is how much you can see as an angle. When you look infront of you, you don't see everything from the sky above your head to the ground beneath your feet, which is 180 degrees infront of you, from top to bottom. This smaller number is the field of view. You can see about 60 degrees at a time. Otherwise, God (or whomever) gave you a neck to pivot your head up and down... well the same applies to a camera, however you can define how far up and down you may see through the camera....

EXAMPLE CAMERA:

Camera [ (1.5,0.10,1.5), (1.5,1.5,1.5), (0,0,1) FieldOfView 60]

Here, the camera lies on 1.5, 0.10 on your piece of graph paper, and is 1.5 units up from the tabletop. (referring to the classroom example.)


Now! For basic lighting!

Since this is just a basic tutorial, I will only tell you how to make basic lights. PointLights are probably the best lights. I still use them and I am a "master." All right, a bad joke in the making... but on with the light! Pointlights are made like this: The syntax: PointLight [ (X1, Y1, Z1) Intensity 'R,G,B']

X1, Y1, and Z1 are where the light is on the axises.
R, G, and B are the red, green and blue values, between 0 and 1 that define what colour the light is.
Glow can be added after intensity, also between 0 and 1 that determine if you can 'see' the light or not...


That's almost all, for our first tutorial. This should give you an idea of what you're doing, but I'll leave you with an example of a VL file to ponder about. (using the stuff you just learned... you should be able to render it.)


Version: 1.2
Camera [ (0,-2,0), (0,0,0), (0,0,1) FieldOfView 60 Format (640,480) ]
PointLight [ (0,0,0) Intensity '.5,0,0' Glow 0.5 ]



RENDERING!!!

THE MOST important thing to worry about. I suggest, for the beginner, that you use the VLIGHTGUI for rendering, but otherwise...

-a level : Adaptive Antialiasing (1 <= level <= 10)
-A level : Super-adaptive Antialiasing (1 <= level <= 10)
-C name : Impose a specific file name for VPM and VIC data cache
-d : Display rendering statistics
-f : Display image in framebuffer
-g size : Primary grid size for Monte Carlo irradiance computation
-h mode : Enable hidden line (1/2) or experim. scanline (3) rendering mode
-k frame : Start animation from specified frame number
-l type : Load photon map .VPM (1) | irradiance cache .VIC (2) if existing
-L : Write a log file per rendering session
-m : Mute mode (no verbose)
-n : Do not generate image file (forced to framebuffer)
-o name : Output image(s) to filename (no file extension)
-O mode : Enable OpenGL rendering mode (1=point / 2=line / 3=polygons)
-r x y : Image resolution in pixels (x=width y=height)
-s type : Save photon maps in .VPM (1) | irradiance cache in .VIC (2) file
-S name : Impose a specific VS shader file instead of the original
-u quality : Fast Undersampling rendering mode (1 <= quality <= 10)
-x xa xb : Render from column xa to column xb
-y ya yb : Render from line ya to line yb
-z z_depth : Dump Z-channel to disk (8,16,24,32=Targa / 64=Floating point)

Techincally, you can do all this in the VLIGHT gui without having to worry about command line params, but I like doing it this way equally as well.
Allow me to explain each of these....

-a level, Antialiasing smooths your edges. So they aren't jagged like if you were rendering with MS PAINT
-A level, This is like above, just more accurate, slower, and looks really cool.
-C name, You shouldn't worry about this...
-d, well... in case you dont know, this just writes down alot of stuff about what you're rendering into the window.
-f, this opens a new window that shows your pic as it's being rendered. Really cool. :)
-g size, You shouldn't worry about this, but if you are doing irradiance, you should use this tool for the prim. grid size...
-h mode, this changes how the pic is rendered. Scanline doesnt do reflections, and hidden line only shows wireframe...
-k n, Well, when animating, you start rendering from the frame n
-L, like statistics, but written to a file.
-n, this means that no .tga file is produced, ONLY shown in the window. ("FrameBuffer window")
-o name, specify the name of the .tga file, but with no extension. (i.e. -o untitled)
-O mode, THE COOLEST TOOL; when rending, if you use this renderer, you will see the colours and positions of the objects, it's quick and allows for good previews... :)
-r x y, sets the size of your targa file. It should be something common, like 640 480 or 800 600.
-x and -y are for partial rendering, if you dont want to render the whole picture.
-z, I advise you not to mess with this! Images created (esp. the 64-bit) will be hard to view in most cases and are BIG in size.
-u quality, THIS is alot like a quick-n-dirty -a, because it's very fast and looks pretty good. Perfect for test renders


That's pretty much it. If you want a good tool for viewing .tga files and converting them, there is always GIMP or buy Photoshop or curel Draw. There are alot of applications that will do this for you. Don't specificly get a conversion tool for TGA to JPG, but get an image editor so that you can adjust your brightness and contrast, just incase you spend 5 hours rendering a pic and don't like the outcome... and make sure it supports alot of file formats, like BMP (Bitmap), JPG (JPEG), TGA (Targa) and others. The best free solution is gimp, but there are many out there.



I hope this helps you understand the VERY basics of virtalight. You are ready to move on!
1
Hosted by www.Geocities.ws