|
|
LE: accessing avatar Matrices for translation and rotation
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
LE: accessing avatar Matrices for translation and rotation // Archive: Tech Forum
Post by frootee // Aug 16, 2007, 7:25pm
|
frootee
Total Posts: 2667
|
Hi folks. A couple of us have been hacking away at methods for moving an avatar by another object. In particular, 3dv's elevator ideas. I have attached 3 images of my avatar from the LE.
When I load the avatar, I cannot see it in 3d space. Is it a viewable item? I can see the avatars of other people in the Thur. chat obviously.
I was thinking we could export the OwnerMatrix of the Body and Head, and attach them to the output Matrix of another object. But that does not seem to work.
The basic idea is when an avatar reaches a goal (an elevator platform, for example), the platform rises, carrying the avatar with it. When the elevator reaches the top, the avatar can then get off.
I thought we could treat an avatar the same way as a cube or other generic object: attach one of its in matrices to a matrix out of another object, and the avatar would be 'slaved' to the other object. But this does not seem to work.
Any other ideas?
Thanks,
Froo |
Post by tomasb // Aug 16, 2007, 10:46pm
|
tomasb
Total Posts: 261
|
avatar is implemented as a widget because you would see only your eye... offsetting eye outside avatar didn't worked too so widgets are used to block avatar on client (the same technique is used in games when 1st person sees different objects (weapon) as the others (which see avatars)).
avatar is internaly attached to view's camera (that's why there is no visible matrix input[it is hidden..]) and transmitts it through the network.
to manipulate avatar position, you need to manipulate view camera, avatar will update it's position accordingly... |
Post by frootee // Aug 17, 2007, 2:05am
|
frootee
Total Posts: 2667
|
ah cool. Now that should do it. Thank You for explaining that tomasb.
I wondered why we were having trouble!
froo
avatar is implemented as a widget because you would see only your eye... offsetting eye outside avatar didn't worked too so widgets are used to block avatar on client (the same technique is used in games when 1st person sees different objects (weapon) as the others (which see avatars)).
avatar is internaly attached to view's camera (that's why there is no visible matrix input[it is hidden..]) and transmitts it through the network.
to manipulate avatar position, you need to manipulate view camera, avatar will update it's position accordingly... |
Post by frootee // Aug 17, 2007, 2:35am
|
frootee
Total Posts: 2667
|
ok, next question:
I cannot seem to find the view camera in the LE, even when in FPN.
What is the format of its name? Do I need to create one using a script command?
Also I assume then that a view camera does have input matrices for access, so we can move it, and correspondingly, our avatar.
Thanks!
Froo
avatar is implemented as a widget because you would see only your eye... offsetting eye outside avatar didn't worked too so widgets are used to block avatar on client (the same technique is used in games when 1st person sees different objects (weapon) as the others (which see avatars)).
avatar is internaly attached to view's camera (that's why there is no visible matrix input[it is hidden..]) and transmitts it through the network.
to manipulate avatar position, you need to manipulate view camera, avatar will update it's position accordingly... |
Post by frootee // Aug 17, 2007, 3:01am
|
frootee
Total Posts: 2667
|
Ok, these three look promising. Is any one of these used to access and manipulate the camera view for the avatar?
Tools Package/Fpn navigation tool node
Tools Package/Fpn properties
Widgets Package/Update eye camera |
Post by 3dvisuals dude // Aug 17, 2007, 3:13am
|
3dvisuals dude
Total Posts: 1703
|
avatar is implemented as a widget because you would see only your eye... offsetting eye outside avatar didn't worked too so widgets are used to block avatar on client (the same technique is used in games when 1st person sees different objects (weapon) as the others (which see avatars)).
avatar is internaly attached to view's camera (that's why there is no visible matrix input[it is hidden..]) and transmitts it through the network.
to manipulate avatar position, you need to manipulate view camera, avatar will update it's position accordingly...
Thank you for your help on these things Tomas,
These questions Frootee has above for you are questions we all need answers to at this point, and the help you are providing us all with on this is very important to us all here.
Thanks again,
- 3dvisuals dude |
Post by 3dvisuals dude // Aug 17, 2007, 5:24am
|
3dvisuals dude
Total Posts: 1703
|
Thanks Tomas! :banana:
and thank you Frootee for being as obsessed with this solution as we all should be!:D |
Post by Norm // Aug 17, 2007, 5:24am
|
Norm
Total Posts: 862
|
Ok, these three look promising. Is any one of these used to access and manipulate the camera view for the avatar?
Tools Package/Fpn navigation tool node
Tools Package/Fpn properties
Widgets Package/Update eye camera
If you move up the heirarchy in LE to System, you will see D3D View object. Enter that object and you will see EyeCamera object.
That should be a good start for you hopefully :) |
Post by frootee // Aug 17, 2007, 5:27am
|
frootee
Total Posts: 2667
|
I am at work so I can't see it right now... hargh.
Does this object have an input matrix?
Could one of the folks please post a pic?
Thanks!
If you move up the heirarchy in LE to System, you will see D3D View object. Enter that object and you will see EyeCamera object.
That should be a good start for you hopefully :) |
Post by 3dvisuals dude // Aug 17, 2007, 5:28am
|
3dvisuals dude
Total Posts: 1703
|
If you move up the heirarchy in LE to System, you will see D3D View object. Enter that object and you will see EyeCamera object.
That should be a good start for you hopefully :)
Sweet!!!!:D
Thank you Norm... you and Tomas just made our day!!!!:banana:
Excellent!!!!!!!!!!
- 3dvisuals dude |
Post by 3dvisuals dude // Aug 17, 2007, 5:30am
|
3dvisuals dude
Total Posts: 1703
|
I have to drive someone somewhere first, so hopefully someone else can do this before I can for you. If not I'll do it as soon as I get back, sorry!
We're on the right path now though my friend!:D
- 3dvisuals dude |
Post by frootee // Aug 17, 2007, 5:34am
|
frootee
Total Posts: 2667
|
Thank You Norm. :banana:
Thanks 3dv.
So, it looks like maybe we can either access the view widget directly, or modify Dele's cart to move upwards, using the View with Walk widget.
Now we have some good starting points.
Froo |
Post by Délé // Aug 17, 2007, 5:37am
|
Délé
Total Posts: 1374
|
Ah...I see. Thanks Tomas and Norm. :D Now I think I know how to do it. I'll give it a go and post my results.
Frootee: It doesn't have a matrix input per say, but it does have rotation and location inputs right on the node. Should be able to just change those values through script. |
Post by frootee // Aug 17, 2007, 5:41am
|
frootee
Total Posts: 2667
|
Dude I think I'm levitating... :jumpy:
Froo |
Post by Délé // Aug 17, 2007, 5:54am
|
Délé
Total Posts: 1374
|
Bummer, another wall. :(
I changed the EyeCamera through script just fine and it works perfectly when your in the normal view mode. However, it did NOT change the avatars position in FPN mode. So the "EyeCamera" node must not be the view Tomas is referring to. Either that or there is something more to this that we're missing. |
Post by frootee // Aug 17, 2007, 6:07am
|
frootee
Total Posts: 2667
|
Dele,
Are you using the "View Widget with Walk" widget for your cart in the trigger script? Because it looks like, in your video, when you get on the cart, in FPN, the FP view moves with the cart.
What if we move the cart vertically? Does the view move upwards also? Seems like it should.
Froo |
Post by frootee // Aug 17, 2007, 6:14am
|
frootee
Total Posts: 2667
|
What kind of camera would be used for FPN? I know we have to add an Entry Point node for trueplay FPN navigation. What camera or viewpoint is used for the Entry Point node? I found these three nodes that may be useful, posted earlier. I got them using Stan's Node.Create jScript Command example, by deleting both single quotes in the first parameter, then typing a single quote, which shoed us the dropdown list, which I scrolled through.
Tools Package/Fpn navigation tool node
Tools Package/Fpn properties
Widgets Package/Update eye camera |
Post by Délé // Aug 17, 2007, 6:16am
|
Délé
Total Posts: 1374
|
I'm not accessing any view widgets or anything like that in the trigger scripts.
With the cart in my video, it's moving the view (avatar) via collision. So yes it would move the avatar upward too. The ride may be a bit bumpy though.
Still, a lot could be done if we could manipulate the avatars location and rotation. |
Post by frootee // Aug 17, 2007, 6:20am
|
frootee
Total Posts: 2667
|
And we do that by manipulating the avatar's camera (view), but we need to know the 'name' of the avatar's camera in FPN, it seems.
Froo |
Post by frootee // Aug 17, 2007, 6:29am
|
frootee
Total Posts: 2667
|
What I meant was, the avatar's view is moving (being updated) when it's on the cart, without user input from the mouse. So the physical collision with the cart is causing the avatar camera view to be updated. If we knew the node type of the avatar camera view (the view camera, whichever one that is), we could do this.
Norm, is this the view (in the System / D3DView area) which you and tomasb are referring to?
Froo |
Post by 3dvisuals dude // Aug 17, 2007, 6:40am
|
3dvisuals dude
Total Posts: 1703
|
This thread
Post #7
Image
Euler
OWNER MATRIX INPUT
:D |
Post by 3dvisuals dude // Aug 17, 2007, 6:49am
|
3dvisuals dude
Total Posts: 1703
|
Dude I think I'm levitating... :jumpy:
Froo
Gee guy... I'm perfectly calm here...
http://smilies.instinctive-hosting.com/smiles/positive/yeah.gif |
Post by Norm // Aug 17, 2007, 7:15am
|
Norm
Total Posts: 862
|
Ok here is what I am told recently by Tomas:
node.value('/space3d/.../developer1/position','cam')
where /space3d would be replaced (for me) by: /Project/Meeting Room/developer1 ... so it is path of avatar you want to access.
the input connector "cam" is hidden and used internally, but it can be accessed by hacking the code line above. The cam is actually an rdmatrix so it has things like tx and ty and tz and such. So once you script to grab the info for the cam, you have the avatar's position. Now this is actually the reverse of what you guys want but it is important. You could attach stuff to avatar with this info. But you folks want to attach avatar to stuff so ....
Up in the LE in the System area, you find the D3DView node. Inside that node you find the Eyecamera_{gobblygook} node. You enter that node and see some matrix info on the euler transform. That info is what you want to change, to change the local of the avatar. Go visit shared space and try adjusting that info and you see yourself move in space ... pretty cool :)
Hope this helps a little. |
Post by frootee // Aug 17, 2007, 7:30am
|
frootee
Total Posts: 2667
|
Thanks Norm. Man, I Totally wish I was home right now...
If we can attach an object to an avatar, we can move the avatar, and pull the object with us. The end result will probably be the same.
Thanks!
Froo |
Post by 3dvisuals dude // Aug 17, 2007, 7:31am
|
3dvisuals dude
Total Posts: 1703
|
Thanks you Norm and Tomas!!!!
You guys are GREAT!!!
I accidentally cross-posted in relation to this same topic here so I already responded to this last post of your's and Tomas's here:
http://forums1.caligari.com/truespace/showpost.php?p=44639&postcount=1
Awesome!!!
Thanks guys, this is the beginning of something wonderful... just watch!:D
- 3dvisuals dude |
Post by 3dvisuals dude // Aug 17, 2007, 7:34am
|
3dvisuals dude
Total Posts: 1703
|
Thanks Norm. Man, I Totally wish I was home right now...
If we can attach an object to an avatar, we can move the avatar, and pull the object with us. The end result will probably be the same.
Thanks!
Froo
Just fake a heart attack and bribe the ambulance driver to drive you to your computer instead....
It's gonna be worth it!!!
Hahahahaha!!!!
- 3dvisuals dude |
Post by Délé // Aug 17, 2007, 7:41am
|
Délé
Total Posts: 1374
|
Thanks for passing on the info Norm. :)
Up in the LE in the System area, you find the D3DView node. Inside that node you find the Eyecamera_{gobblygook} node. You enter that node and see some matrix info on the euler transform. That info is what you want to change, to change the local of the avatar. Go visit shared space and try adjusting that info and you see yourself move in space ... pretty cool
The EyeCamera moves the avatar when "NOT" in FPN mode. It does not work "in" FPN mode though.
I'll attach a scene to show what I mean. This scene has a "Teleport Trigger" and a "Teleport" script. The trigger is set up to set off the script when you enter it's trigger area. If you stay out of FPN mode and run the script it will move the camera view to 5, 5, 5. However if you enter FPN and go into the trigger, nothing happens. It does not move the Avatar. I tried this online just a couple of minutes ago too and it didn't work online either.
I know the trigger is working properly because I tested it with a different script and it worked. When the EyeCamera location changes, it does not seem to affect the Avatar that is in FPN mode. |
Post by 3dvisuals dude // Aug 17, 2007, 7:43am
|
3dvisuals dude
Total Posts: 1703
|
Thanks Norm. Man, I Totally wish I was home right now...
If we can attach an object to an avatar, we can move the avatar, and pull the object with us. The end result will probably be the same.
Thanks!
Froo
Remember the Pharao Test in shared space?
No problem now.... hahahaha!!!:D
- 3dvisuals dude |
Post by 3dvisuals dude // Aug 17, 2007, 7:48am
|
3dvisuals dude
Total Posts: 1703
|
Thanks for passing on the info Norm. :)
The EyeCamera moves the avatar when "NOT" in FPN mode. It does not work "in" FPN mode though.
I'll attach a scene to show what I mean. This scene has a "Teleport Trigger" and a "Teleport" script. The trigger is set up to set off the script when you enter it's trigger area. If you stay out of FPN mode and run the script it will move the camera view to 5, 5, 5. However if you enter FPN and go into the trigger, nothing happens. It does not move the Avatar. I tried this online just a couple of minutes ago too and it didn't work online either.
I know the trigger is working properly because I tested it with a different script and it worked. When the EyeCamera location changes, it does not seem to affect the Avatar that is in FPN mode.
Actually that makes perfect sense to me. (and that in itself is astonishing!)
These Avatar control routines were probably never designed to take control of the same person (ie avatar viewer) viewing the action via the Workspace camera.
Should still work fine for our objectives anyway!
- 3dvisuals dude |
Post by frootee // Aug 17, 2007, 7:49am
|
frootee
Total Posts: 2667
|
How about this Dele? Where we access the cam node for the avatar? I figure we have this available in FPN on our home PCs since trueplaces is all FPN right? Or no? Something tells me that is incorrect.
Ok here is what I am told recently by Tomas:
node.value('/space3d/.../developer1/position','cam')
where /space3d would be replaced (for me) by: /Project/Meeting Room/developer1 ... so it is path of avatar you want to access.
the input connector "cam" is hidden and used internally, but it can be accessed by hacking the code line above. The cam is actually an rdmatrix so it has things like tx and ty and tz and such. So once you script to grab the info for the cam, you have the avatar's position. Now this is actually the reverse of what you guys want but it is important. You could attach stuff to avatar with this info. But you folks want to attach avatar to stuff so ....
Up in the LE in the System area, you find the D3DView node. Inside that node you find the Eyecamera_{gobblygook} node. You enter that node and see some matrix info on the euler transform. That info is what you want to change, to change the local of the avatar. Go visit shared space and try adjusting that info and you see yourself move in space ... pretty cool :)
Hope this helps a little. |
|