Toribash
Original Post
toribash .inc and POV-ray Tutorial
[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

camera {
location <5, 5, -0.5>
look_at 0
angle 45
}

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.

#declare Bun = difference {
sphere {
<0, 0, 0>, 1
}
box {
<-1, -0.5, -1>
<1, 0.5, 1>
}
pigment { Gold }
}

#declare Burger = sphere {
<0, 0, 0>, 1
scale <1, .5, 1>
pigment { Brown }
}

so now we have just said that upon entering the object tags these objects will be displayed

so here is the object tag

object { Bun }
object { Burger }

here is the finished code.

#include "colors.inc"

camera {
location <5, 5, -0.5>
look_at 0
angle 45
}
light_source {
<1, 2, 1>
color White
}
plane {y, -1
pigment{
checker color White color Red
}
}

#declare Bun = difference {
sphere {
<0, 0, 0>,1
}
box {
<-1, -0.5, -1>
<1, 0.5, 1>
}
pigment { Gold }
}
#declare Burger = sphere {
<0, 0, 0>,1
scale <1, .5, 1>
pigment { Brown }
}

object { Bun }
object { Burger }

feel free to add in Note tags where ever you like by this "// this is a note" but without the
quotation marks around it

this is just a quick image i did for the sake of this tutorial...

the image of this is at the bottom
Attached Images
new.jpg (38.8 KB, 82 views)
Attached Files
new.jpg_thumb (21.1 KB, 18 views)
.inc files for POV-ray Tutorial part 2
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.



#macro Joint(xpos,ypos,zpos,Radius)
sphere { <xpos, -ypos, zpos>, Radius
pigment { color rgb <10/255, 235/255, 10/255> }
finish {
reflection 0.5
diffuse .1
specular 1
diffuse .1
}
}
#end

the blood

#macro Blood (xpos, ypos, zpos, Radius)
threshold 0.1 //the largness of the blobs of blood
sphere {<xpos, -ypos, zpos>, Radius*3, 0.1
pigment { color rgb <0, 0, 1 > } //you can put textures here with the texture tag
finish {
ambient .1
diffuse .1
specular 1
roughness .001
metallic
reflection { .75 metallic }
}
}
#end

i really dont know to much about the other parts and that will soon come out in future versions of this..

i hope this helped a wee bit...
Re: POV-ray Tutorial
Wow,NICE!


(USE THE MODIFY BUTTEN)
EDIT: Nice work no hard feeling's just i see a trip post here.
Chuck Norris is in fact the most deadliest weapon on this planet, But then there's EmpreamKick
Re: POV-ray Tutorial
I put these together. It breaks it up quite nicely anyway...

its a good tutorial non-the-less. keep up the good work.
I has a flavour
Re: POV-ray Tutorial
thanks

well here is another image i did
of a paper weight..
woot

hope you guys like it...
Attached Images
lightsource1.jpg (41.9 KB, 53 views)
Attached Files
lightsource1.jpg_thumb (21.3 KB, 12 views)
Re: POV-ray Tutorial
nice tutorial man *Adds one carma point*
Attached Images
owned2.GIF (121.4 KB, 67 views)
Attached Files
owned2.GIF_thumb (21.5 KB, 8 views)

[Evil] is recruiting!

<DesiTwist> terty plays tb with the ghost turned off, uke turned off and uses that mouse with the ball in it
Re: POV-ray Tutorial
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

[Evil] is recruiting!

<DesiTwist> terty plays tb with the ghost turned off, uke turned off and uses that mouse with the ball in it
Re: POV-ray Tutorial
SKELETONMAN:

ok you want to make a shiny video...

hmm...

so press CTRL + F7 to start recording your frames
and once you are done they will be saved in animation.pov

depending on how many frames you have the file should be anywhere from 10kbs to 10MBs

if you open it in POV-ray
there should be about 100 thousand lines and climbing of data coming from each frame...

and you said you wanted to make it shiny correct?

so at the top of your animation you are going to type in

#include "glossy.inc"

or
#include "glossylighting.inc"

this should make shiny frames

so now you have hundereds upon hundereds of frames exported to the raytrace directory of the TORIBASH folder where your animation.pov file is...

so you need to put those BMP files into a video or into an animation

i suggest using Virtualdub for an .avi file or your video
you can get this at www.sourceforge.net just search virtual dub

or GIMP or Macromedia Fireworks for animated GIF files
you can also get GIMP from sourceforge..
but you have to buy Fireworks

I hope this helped you out skeletonman