View previous topic :: View next topic |
Author |
Message |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Tue May 23, 2006 6:55 pm Post subject: |
|
|
Uploaded revised bugfix version.
Also adds damage level tweaks for forte scale blaster and demicannon. See original post for download links. _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Wed Nov 22, 2006 1:25 am Post subject: Oh yeah? |
|
|
FrikaC wrote: | Quake Matt wrote: | One thing I would like to see is matrix maths, for rotations and other transformations. I'd suggest quaternions, too, but I can't get my head round them! |
Now lets not get crazy here. |
LH wrote that very kind of code to dpmod a good ol' while back, and should definitely be included in mathlib. What the code does is store orientation using matrices, and rotation using axisangle (aka rodrigues vector among other names). What it's lacking is a matrix->euler conversion function, to actually show off the cool maths going on behind the screen. I've recently been working on expanding the use of this code, and making it available for more general use (it has a very specific use in dpmod, which isn't even finished). I've done tests to prove it works, and plan to use it for some cool physics stuff and whatnot, and would be glad to incorporate it into mathlib.
I need help though, I need an Arc cosine function, which in turn requires both an Arc sine and a Logarithm function, as far as I understand. I also need help with the matrix->euler conversion, as I have no idea what I'm actually doing. _________________ Look out for Twigboy |
|
Back to top |
|
 |
FrikaC Site Admin

Joined: 08 Oct 2004 Posts: 947
|
Posted: Wed Nov 22, 2006 5:20 am Post subject: Re: Oh yeah? |
|
|
Urre wrote: | I have no idea what I'm actually doing. |
Neither do I. |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Fri Nov 24, 2006 2:36 am Post subject: |
|
|
LH implemented arc cos among others as a builtin to DP, so now I got stuff going on. Does obviously unfortunately not work in regular quake
Still hunting for some matrix->euler magic though...
EDIT: found code in dpmod which did this, so the matrix stuff is working now. If anyone cares I can post it here, just make some noise. Otherwise I'll just keep and use it for myself until I have a mod to show it off in. Note that it's DP only, unless you don't care about a function which finds the angle between two vectors. If you can live without that it should work in any quake engine. _________________ Look out for Twigboy |
|
Back to top |
|
 |
Preach
Joined: 25 Nov 2004 Posts: 122
|
Posted: Fri Nov 24, 2006 9:11 am Post subject: |
|
|
Urre wrote: | LH implemented arc cos among others as a builtin to DP, so now I got stuff going on. Does obviously unfortunately not work in regular quake
Still hunting for some matrix->euler magic though...
EDIT: found code in dpmod which did this, so the matrix stuff is working now. If anyone cares I can post it here, just make some noise. Otherwise I'll just keep and use it for myself until I have a mod to show it off in. Note that it's DP only, unless you don't care about a function which finds the angle between two vectors. If you can live without that it should work in any quake engine. |
Arccos is basically available in quake once you have the sqrt function, and if you have sqrt as a builtin it's only two builtin calls.:
Code: | float arccos(float r) =
{
local vector t;
t_x = r;
t_y = sqrt(1 - r * r);
return vectoyaw(t);
}
|
I hope I've got the components the right way round in this one, you may have to switch the x and y components about or multiply by -1 on one of the components. Arctan is even easier, as it doesn't need the sqrt function, just set the adjacent compontent of t to 1 and the opposite to r. |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Fri Nov 24, 2006 12:07 pm Post subject: |
|
|
That's cool Preach! If that works it'd work just fine in any quake engine.
Just realised mathlib.qc (with trigonometry) is something that should've been available when qc was popular, to prove the strengths of qc. _________________ Look out for Twigboy |
|
Back to top |
|
 |
Wazat
Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA
|
Posted: Fri Oct 03, 2008 6:51 am Post subject: |
|
|
Does anyone know of a working link to Dr. Shadowborg's mod? I'd like to try it. _________________ When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work. |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
|
Back to top |
|
 |
|