[EDIT] There is a shop up in the Market place for custom .inc files for toribash[/edit]
Here is the first part of my POV-ray tutorial
The .inc files on toribash will be next
So this will start from scratch for people who have never used POV-ray before.
Everything in this language everything is case sensitive.
the object codes are always lowercase
EX: box, sphere, torus, cylinder, cone, etc.
The first letter in any word in your color are uppercase
EX: Blue, Red, Yellow, Green, BrightGold, etc.
attributes are lowercase
EX: pigment, finish, etc.
another thing i should note should be that words with spaces inbetween will not use spaces they will use underscore
EX: look_at, light_source, etc.
The First thing to do in any .pov file is add the include tag
---the include tag is the tag that tells the program to look for the attributes in the .inc files
#include "filname.inc"
so for this file we will be including the .inc file "colors"
so our code should look like this so far
#include "colors.inc"
The second thing you need to do for any .pov file you will be creating is create a camera
---the camera tag tells where it is located and what is looking at and at what angle.( angle does not have to be included)
camera {
location <x, y, z>
look_at <x, y, z>
}
so the one we will use for our picture will look like this
NOTE: realize that this should go right under the #include tag
The Next essential is the lighting of our scene. it does not have to be included but it adds a nice touch
---the light_source tag says the location of the light and the color of the light
light_source {
<x, y, z>
color Colorname
}
So by now you are wondering where are my shapes and objects?
and if i have my objects what are they going to sit on?
Well if there is nothing our objects can sit on, they will just float in mid air.
so i will introduce the plane
---the plane tag deals with the axis that it will infinitely extend upon. and the axis opposite it, the plane will lay on
since this is a fairly simple tag i will show you how to use it instead of giving the base code
we will make our plane extend infinitly on the y axis and lay on the point -1 on the z axis
we will also add a pigment to the plane.
NOTE: you can use the word "color" or "colour" depending on which you are familiar with
plane {y, -1
pigment{
checker color White color Red
}
}
so if we press Alt+G we can render the image and you will see a checkered plan stretching horizontally
In this part i will teach about objects including...
box
cone
sphere
cylinder
torus
we will only be using two of these in our image but i will teach about the other 3 later on.
NOTE: there are many more but i will not cover those
--the box tag asks for one corner and another corner and it will stretch one to the other
box {
<x, y, z>
<x, y, z>
}
--the sphere tag asks for the center and then the radius of your sphere
sphere {
<x, y, z>, r
}
Now before we draw our Object i must cover the #declare tag and the difference tag
--the #declare tag tells the computer that when we add an "object" tag into our document with the name provided from
--the declare tag to put in the objects within the declare tag
#declare Nameofobject =
after the equals we put our shape tags
--the difference tag says that if one object within this tag overlaps another within this tag to take the object overlapping--
--and take it away from the overlapped object making the inside transparent
Since i use these two tags together i will show you how to use these in our tutorial saving you precious time so you can
copy and paste these in.
The second part of my tutorial is on inc files for Toribash
Creds go to Nokturnal for the glossy.inc file i will refer to
First a little refresher and information to those who know or those who dont
most of us know that pressing f8 gives us a screenshot in .pov format
if we open that up we see alot of coordinates that were recorded when you took that screenshot
if we create a new .inc file it has to be in the Include folder in the POV-ray directory
or in the folder containing the .pov you will edit.
create a new file in notepad called "demo.inc"
start by adding the background into the file
since this is a .inc it uses the same language as the POV's
background {color rgb <10/255, 10/255, 10/255>}
this sets the background color to a greyish color
now we will set it so it imports the camera view from the .pov file and sets the light source
#macro Camera(xpos, ypos, zpos, lookatx, lookaty, lookatz) //takes the information and sets it to the denoted name
camera {
location <xpos, -ypos, zpos>
look_at <lookatx, -lookaty, lookatz>
}
light_source { <xpos, -ypos, 3> rgb<1,1,1> } //sets color of light source
#end
if you read my first tutorial on pov-ray you should have no trouble with this
we can work on the joints too
it also takes information from the pov file and sets attributes in that language
so if you wanted to make the joints square, you could but you have to have the correct syntax
you could also make the texture a wood grain look
etc.
press f-7 in toribash to start exporting frames to pov-ray then f-7 again to stop. then go to programfiles\toribash2.2 and click on raytrace folder then click on animation pov render your anim then download virtualdub and put your anims on it and save as a avi. file. i hope this helped you