Relativity

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Relativity

Post by Kjell »

:idea:

One of the things that makes 3D Math allot faster / easier-to-use in engines like Unity and Virtools ( Game Maker has this for 2D ) is the ability to use Relative Matrix Space in translations / rotations etc.

For example, when you have a camera or enemy that rotates over it's Y axis and travels into the direction it's facing, you currently have to calculate the Velocity Vector using cos / sin ( or a Matrix Library when it's more then 1 Axis ), while in "those other packages" you just use the Object you want the translation to be relative to.

Unity

Code: Select all

Translate (translation : Vector3, relativeTo : Space = Space.Self) : void
Virtools

Code: Select all

void Translate(Vector Vect{ref}, Entity3D Ref = , bool KeepChildren = false)
Or in BB form
Image

K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

yuper, that Kjell is a wise man., must agree here as well. and that does look like a good way,. having a relative or not toggle or a relative to=object ,. in the transforms, in my mind,. if I nest a transform they should not confuse one another,. so i suppose that would be posible by using relativity,. E=mc^2 eh.
iterationGAMES.com
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

If I understood well, you can do translations (or maybe also other stuff? Exactly, what?) using the "orthonormal axis" of a model that in the mean time has been rotated? I mean you tell the engine to add 1 unit along the Y axis of a model that is rotated in a strange way, you will then translate your object by adding the Y vector of the model itself, right?

We could manage to get this working somehow... In fact we already have some matrices waiting to be used...
What other operations are there?
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi Francesco,

In case of the Model using itself as a reference, then yes .. but you can use other Objects as well obviously ( although in ZGE this will be difficult at the moment as we cannot communicate with Instances ). As for "other stuff" you could think of referenced scaling, orbiting, looking at etc. And just to be clear, these functions have nothing to do with parenting / Forward Kinematics.

K
Last edited by Kjell on Thu Apr 09, 2009 10:38 am, edited 1 time in total.
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Kjell wrote:Hi Francesco,

In case of the Model using itself as a reference, then yes .. but you can use other Objects as well obviously ( although in ZGE this will be difficult at the moment as we cannot communicate with Instances ). As for "other stuff" you could think of referenced scaling, orbiting, looking at etc. And just to be clear, these functions have nothing to do with parenting / Forward Kinematics.
What other operations are there?
You mean in those other packages?
No I just repeated myself and thought about what you wrote in the "other stuff" :P
Well, translation, looking at and orbiting should be "simple"...We will see what I will be able to do, maybe after my exams (about 18th of may) :P

Before I would prefer to finish some work on the textures :D
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Well,

This request wasn't exactly high priority to begin with since you can already do these kinds of things using the Matrix Library .. I just wanted to point out that it would be nice to see it build-in eventually since it does simplify the Math you use allot in 3D Games.

But for the time being I'd much rather see work being done on features that are impossible ( or outright frustrating ) to solve with the current editor / build.

K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

as always any new additions, that I can understand, I will attempt to utilize so have at 'er Kattle!

I noticed this german c++ game engine, Kjell may want to take a look at the technology he is doing some interesting stuff requiering a better GPU than I have now,. but I also noticed that the oldest demo is done in free pascal! find it here;

http://www.linderdaum.com/home/index.ph ... _old_demos

its a plane game so lots of transformation matrix stuff,. the code is copywrited however I'm sure we can use it for learning purposes, as its posted. ;) Cheers.

oh, it also has a billboarded bitmap thing in the explosion code., I think ZGE should have a billboard component, like a transform (so it could work with mesh, sprite, net), but perhaps with constraints to the various axii, or none. Since we only have one camera to worry about should be relativly simple?
iterationGAMES.com
Post Reply