1 registered members (Akow),
1,361
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Take away the dancing to a camera
[Re: jumpu]
#398316
03/31/12 08:22
03/31/12 08:22
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
Hi Jumpu, the main problem is that when you transform the movement to an angle vector, it is so small that the vector transforming maths sightly fails and each step gives you a shimmy orientation. You can retrieve a bit further point into the spline to avoid this problem. ------------------------------------ Aupa Jumpu, El problema reside en que el vector de desplazamiento es tan pequeño que al transformarlo en un vector angular, los cáculos que realiza no son lo suficientemente precisos y resultan en ese zigzagueo que comentas. Puedes evitarlo utilizando un punto más alejado dentro del spline en vez de utilizar la posición anterior. algo así:
action camera_path()
{
// create a dummy path entity
//me = ent_create(NULL,nullvector,NULL);
path_set(me,"path_000");
var dist = 0;
var vLastPos[3];
var vDir[3];
while(1)
{
// place the camera on the path
dist += 5*time_step;
path_spline(me,camera.x,dist);
// let the camera look ahead
path_spline(me,vLastPos,maxv(dist-1,0)); // 1 o más...
vec_diff(vDir,camera.x,vLastPos);
vec_to_angle(camera.pan,vDir);
//vec_set(vLastPos,camera.x);
wait(1);
}
}
Salud!
|
|
|
Re: Take away the dancing to a camera
[Re: txesmi]
#398319
03/31/12 09:43
03/31/12 09:43
|
Joined: Nov 2009
Posts: 22 spain
jumpu
OP
Newbie
|
OP
Newbie
Joined: Nov 2009
Posts: 22
spain
|
Hello Txesmi that joy back in touch with you. The recommendation to give me, not solve the problem, as the flicker persists. En tu correo personal te envio unos links, del programa en el que tengo el problema, y otro de un salvapantallas netamente gallego, que creo me quedo bastante bien, (dame tu opinion, ¡si quieres!). Hecho tanto de menos "partidabierta" que el volver a conectar contigo me recuerda aquellos tiempos en los que cuando tenias un problema tenias a quien preguntar y te entendia. (los que hablan en ingles, no me entienden, o yo no se esplicarme en ingles). Un abrazo.
Last edited by jumpu; 03/31/12 10:14.
|
|
|
Re: Take away the dancing to a camera
[Re: jumpu]
#398324
03/31/12 11:04
03/31/12 11:04
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
The pleasure is mine ok, I see the problem. The unit subtratcted to the distance is also too small to solve the problem. I changed it to 10 and it works good. Some other problems appear at the beginning but they are very easy to solve, just start with a bigger distance value, 10 or so... ------------------------------ Acabo de ver los proyectos que me has mandado. Me has dejado impresionado. ¡Enhorabuena! He echado de menos alguna sombrica en el del orrio, pero bueno, estupendos ambos. La taberna está muy lograda. La solución del problema está en aumentar la distancia restada a la posición de la cámara. Resulta que restar solamente uno a la variable 'distance' también es muy poco para que los cálculos de transformación sean lo suficientemente contínuos. La solución está en restar algo cercano a 10. Al aumentar la resta, aparecen nuevos problemas al inicio del movimiento, que se solucionan perfectamente al aumentar el valor inicial de la variable 'distance' también a 10. Estos nuevos cálculos quizás te hagan modificar ligeramente los paths para que los giros de la cámara sean contínuos. La verdad que google translate lo hace fatal y no se puede confiar en que lo que te devuelve como traducción sea inglés de verdad. Es más un apoyo que un traductor al hecho. Bueno, encantado de poder ayudarte, Salud! EDITED ups, selfsolved is the best!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|