General Category > General Anim8or Forum

WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)

<< < (13/58) > >>

cooldude234:
Yea don't worry, my plan is to include a whole Manuel built into this thing, including example projects, example code and full tutorials.

It's just a matter of getting past this ray casting bull crap :P

EDIT: PS water music, damn now I want a pair of gauntlets

cooldude234:
To continue this raycasting headache...
It turns out that the pitch of the ray, when it goes closer to the right or left issue, was actually not being casued by the projection of the ray (all of that trigonometry stuff I show), but rather is happening when I try to get the angle of the pitch.


double get_angle(float x1,float y1,float x2, float y2)
{
   double angle=0;
if (x1 - x2 != 0)
{
    angle = (atan ((y2 - y1)/(x2 - x1)))*180/PI;
}
   return(angle);   
}

that is my oh so lovely function that is used to get the angles between two points, this is working for the yaw, but it doesn't seem to be working for the pitch *sad face*

This is it in action
rayPitch =  get_angle(start_z,start_y,end_z,  end_y);

So, I got to figure out how to gather the pitch from two points.
JOY!

cooldude234:
with no luck on trying to get a pitch between two 3d vectors,
I would like to know on what kind of tools would people like to have link to anim8or.
I know that importing from anim8or is going to be in, and once I get physic I will make it output a physics simulation as well.
I also got the particle class working with billboarding (have it facing relevant to the camera, or just on a particular axis), so I may as well export particles kinda like what terranim8or ( <- what the hell, Firefox says that's spelled correctly but yet billboarding isn't ??? ) did.

So tools for sure that will be link with anim8or...
-Import from anim8or
-Export recording of scene
     -Including export of particles

and I might figure out a way to manage scenes in anim8or and the new cre8or so that you could add an object in anim8or, in a previously recorded scene, and go back into the new cre8or and rerecord everything, import it back into anim8or, and it would keep the object that you added in anim8or (in other words it would not override things that it doesn't need to, so you don't have to redo crap)

so any other ideas for tools associated between the new cre8or and anim8or?

cre8orexpert:
Hey dude, here's a tip for your scene export thing: use a timestep and finite state machine.

Explanation:

Use fsm (finite state machine) to record current game status, and use timestep to synchonize it to frames.

Also, here some Opengl tips...

-Always use the vector forms of these methods: glvertex,glColor,glTexCoord and glNormal.
-> gl(Vertex|Color|texCoord|Normal)(2|3|4)(f|i|d)v(array_of_values)

-Use display lists for materials and texture units, using glColorMaterial(face,mode) to reduce function call overload:
->glColorMaterialf(GL_FRONT,GL_AMBIENT), now glColor3f() will affect current material ambient. To enable glColorMaterial use: glEnable(GL_COLOR_MATERIAL).

-Use Vertex buffer objects for animated meshs and terrains, or use interpolation between frames (Lerp or qLerp).

-Keep non-gl code before Opengl code, it speeds Opengl rendering.

-use delta-timing for Syncronism (principally for networked games).
->//Loop beginning
time := glutGet(GLUT_ELAPSED_TIME) //or similar like GetTickCount()
delta := time - delay
delay := time

deltasec := delta/1000 //convert to seconds

playerpos.x += player_velocity.x * (0.5 * deltasec) //moves 0.5 units in x, independent of application speed.

Sleep((1000/frames_per_second)-time) //Frame limiting (obs: it don't work in my Engine)
//Opengl Code

...And that's just some tips (and tricks) to speedup your application. I've attached 2 screens of my 3d Engine.

cooldude234:
I've used display lists and the colour materials (I still haven't worked it out for everything but it is working and implemented) but there is one particular part of your statement that I don't think I will ever use, EVER.


--- Quote ---GLUT_ELAPSED_TIME
--- End quote ---
Nope, no glut here. Besides I already have the equivalent function work out.

but yea, I very much like the display list and such, it can save about 16 milliseconds on my tower for one object, which is a great deal when you are rendering thousands and thousands.

So any other ideas for tools between the new cre8or and anim8r?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version