  | | | Dir3d-l Digest, Vol 8, Issue 7 | Dir3d-l Digest, Vol 8, Issue 7 2004-01-08 - By dir3d-l-request@(protected)
Back Send Dir3d-l mailing list submissions to dir3d-l@(protected)
To subscribe or unsubscribe via the World Wide Web, visit http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l or, via email, send a message with subject or body 'help' to dir3d-l-request@(protected)
You can reach the person managing the list at dir3d-l-owner@(protected)
When replying, please edit your Subject line so it is more specific than "Re: Contents of Dir3d-l digest..."
Today's Topics:
1. Camera following (Christophe Leske) 2. Re: Camera following (Thomas Westin) 3. RE: Camera following (Christophe Leske) 4. Re: Camera following (Lucas Meijer) 5. RE: Camera following (Christophe Leske) 6. RE: Camera following (Christophe Leske) 7. Finding the landing point (Allen Partridge) 8. flash/video texture suggesti ons? (Tom?) (Kevin Moesker) 9. RE: Camera following (Colin Holgate) 10. Re: flash/video texture suggesti ons? (Tom?) (Colin Holgate) 11. Re: Camera following (Neto)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Message: 1 Date: Thu, 8 Jan 2004 14:19:10 +0100 From: "Christophe Leske" <leske@(protected)> Subject: [Dir3d-l] Camera following To: <dir3d-l@(protected)> Message-ID: <000701c3d5ea$012150d0$1db9fea9@(protected)> Content-Type: text/plain; charset="iso-8859 (See http://iso-8859.ora-code.com)-1"
I got a tricky question here:
I got a camera here that is supposed to follow a jumping object. It does not need to follow all of its movement, but should make sure that the object always stays in a rough middle of the view frustrum.
How to do that? I am almost looking for somewhat like a dampened parent-child connection between camera and object.
Thanks in advance for any help,
Christophe Leske
http://www.multimedial.de mail: info@(protected) tel. +49-(0)211 230 99 70 .:. f�rstenwall 157 .:. ::: 40215 d�sseldorf :::
-- ---- ---- ---- ---- ---- --
Message: 2 Date: Thu, 08 Jan 2004 14:51:49 +0100 From: "Thomas Westin" <thomas.westin@(protected)> Subject: Re: [Dir3d-l] Camera following To: dir3d-l@(protected) Message-ID: <fc.00802e9a007d889f3b9aca00809b235d.7d88ba@(protected)> Content-Type: text/plain; charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1
dir3d-l@(protected) writes: >How to do that? I am almost looking for somewhat like a dampened >parent-child connection between camera and object.
havok has a good script for this in their Character Controller example, there is a parent script for camera tracking.
check under Documentation at http://oldsite.havok.com/xtra/
Kind regards, Thomas
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ Game Accessibility Survey http://www.igda.org/accessibility/survey.htm Award Winning 3D Game for Blind and Sighted: www.terraformers.nu ::Developer Game Accessibility SIG www.igda.org/accessibility ::Chairperson Multimedia + Pedagogics since 1993! www.mmedu.net ::Teacher Web3D, Accessibility and Games www.pininteractive.com ::Co-founder
-- ---- ---- ---- ---- ---- --
Message: 3 Date: Thu, 8 Jan 2004 15:21:08 +0100 From: "Christophe Leske" <leske@(protected)> Subject: RE: [Dir3d-l] Camera following To: <dir3d-l@(protected)> Message-ID: <000001c3d5f2$ab1f1a10$1db9fea9@(protected)> Content-Type: text/plain; charset="iso-8859 (See http://iso-8859.ora-code.com)-1"
Thanks Thomas,
Will do.
Christophe Leske
http://www.multimedial.de mail: info@(protected) tel. +49-(0)211 230 99 70 .:. f�rstenwall 157 .:. ::: 40215 d�sseldorf :::
> -- --Original Message-- -- > From: dir3d-l-bounces@(protected) > [mailto:dir3d-l-bounces@(protected)] On Behalf Of > Thomas Westin > Sent: Thursday, January 08, 2004 2:52 PM > To: dir3d-l@(protected) > Subject: Re: [Dir3d-l] Camera following > > > dir3d-l@(protected) writes: > >How to do that? I am almost looking for somewhat like a dampened > >parent-child connection between camera and object. > > > havok has a good script for this in their Character > Controller example, there is a parent script for camera tracking. > > check under Documentation at > http://oldsite.havok.com/xtra/ > > Kind regards, > Thomas > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ > Game Accessibility Survey http://www.igda.org/accessibility/survey.htm > Award Winning 3D Game for Blind and Sighted: > www.terraformers.nu ::Developer Game > Accessibility SIG > www.igda.org/accessibility ::Chairperson Multimedia + > Pedagogics since 1993! www.mmedu.net ::Teacher Web3D, > Accessibility and Games www.pininteractive.com ::Co-founder > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > Dir3d-l mailing list > Dir3d-l@(protected) > http://nuttybar.drama.uga.edu/mailman/listinfo> /dir3d-l >
-- ---- ---- ---- ---- ---- --
Message: 4 Date: Thu, 08 Jan 2004 14:49:59 +0100 From: Lucas Meijer <lucas@(protected)> Subject: Re: [Dir3d-l] Camera following To: dir3d-l@(protected) Message-ID: <3FFD6007.4000006@(protected)> Content-Type: text/plain; charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1; format=flowed
Hey Chris,
I find this to work well most of the time:
don't link the camera to the object.
each frame/timestep:
campos�mpos+(objectpos-campos)*tFactor camera.pointAt(objectpos+vector(0,0,10))
where tFactor is the 'looseness', typical values would range from .005 to .2
Bye, Lucas
> I got a tricky question here: > > I got a camera here that is supposed to follow a jumping object. It does > not need to follow all of its movement, but should make sure that the > object always stays in a rough middle of the view frustrum. > > How to do that? I am almost looking for somewhat like a dampened > parent-child connection between camera and object. > > > Thanks in advance for any help, > > Christophe Leske > > http://www.multimedial.de > mail: info@(protected) > tel. +49-(0)211 230 99 70 > .:. f�rstenwall 157 .:. > ::: 40215 d�sseldorf ::: > > > > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > Dir3d-l mailing list > Dir3d-l@(protected) > http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l > >
-- ---- ---- ---- ---- ---- --
Message: 5 Date: Thu, 8 Jan 2004 15:57:54 +0100 From: "Christophe Leske" <leske@(protected)> Subject: RE: [Dir3d-l] Camera following To: <dir3d-l@(protected)> Message-ID: <000601c3d5f7$d09b8f80$1db9fea9@(protected)> Content-Type: text/plain; charset="iso-8859 (See http://iso-8859.ora-code.com)-1"
Thanks,
But my object jumps. Since you are pointing the camera every step, this yields to a constanly moving camera.
Christophe Leske
http://www.multimedial.de mail: info@(protected) tel. +49-(0)211 230 99 70 .:. f�rstenwall 157 .:. ::: 40215 d�sseldorf :::
> -- --Original Message-- -- > From: dir3d-l-bounces@(protected) > [mailto:dir3d-l-bounces@(protected)] On Behalf Of > Lucas Meijer > Sent: Thursday, January 08, 2004 2:50 PM > To: dir3d-l@(protected) > Subject: Re: [Dir3d-l] Camera following > > > Hey Chris, > > I find this to work well most of the time: > > don't link the camera to the object. > > each frame/timestep: > > campos�mpos+(objectpos-campos)*tFactor > camera.pointAt(objectpos+vector(0,0,10)) > > where tFactor is the 'looseness', typical values would range > from .005 to .2 > > Bye, Lucas > > > > I got a tricky question here: > > > > I got a camera here that is supposed to follow a jumping object. It > > does not need to follow all of its movement, but should > make sure that > > the object always stays in a rough middle of the view frustrum. > > > > How to do that? I am almost looking for somewhat like a dampened > > parent-child connection between camera and object. > > > > > > Thanks in advance for any help, > > > > Christophe Leske > > > > http://www.multimedial.de > > mail: info@(protected) > > tel. +49-(0)211 230 99 70 > > .:. f�rstenwall 157 .:. > > ::: 40215 d�sseldorf ::: > > > > > > > > > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > > Dir3d-l mailing list > > Dir3d-l@(protected) > > http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l > > > > > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > Dir3d-l mailing list > Dir3d-l@(protected) > http://nuttybar.drama.uga.edu/mailman/listinfo> /dir3d-l >
-- ---- ---- ---- ---- ---- --
Message: 6 Date: Thu, 8 Jan 2004 16:26:43 +0100 From: "Christophe Leske" <leske@(protected)> Subject: RE: [Dir3d-l] Camera following To: <dir3d-l@(protected)> Message-ID: <000901c3d5fb$d2c43f10$1db9fea9@(protected)> Content-Type: text/plain; charset="iso-8859 (See http://iso-8859.ora-code.com)-1"
Maybe i should rephrase my question:
I would need an interpolated pointat-function for the camera, which slowly moves from one target to the next.
I must be missing something here, i am also looking for the pointat target of the camera, but i can�t find the lingo... Maybe there isn�t even such a thing? I can�t remember..
Thanks, Christophe Leske
http://www.multimedial.de mail: info@(protected) tel. +49-(0)211 230 99 70 .:. f�rstenwall 157 .:. ::: 40215 d�sseldorf :::
-- ---- ---- ---- ---- ---- --
Message: 7 Date: Thu, 8 Jan 2004 10:31:28 -0500 From: "Allen Partridge" <partridge@(protected)> Subject: [Dir3d-l] Finding the landing point To: <dir3d-l@(protected)> Message-ID: <003e01c3d5fc$7c867f90$d1fea8c0@(protected)> Content-Type: text/plain; charset="us-ascii"
Okay - my head hurts.
Has anyone got an efficient way to find the landing point of a projectile (imagine target image at landing point of a ball arcing according to force / gravity.)?
Without running all of the frames= I'd like to know where that ball will hit. This is further complicated by the fact that it's hitting a ground that is rotated on the x, so the ground is sort of uphill as we go.
So I guess what I'm asking is ... given a constant velocity, a constant gravity and drag and a dynamic launch trajectory is there a shortcut way to find the point at which a projectile will intersect with an angled plane - rather than repeating through all of its steps.
Things that you might need to know; --
I calculate the gravitational force like this;
pInitTime is created earlier = just the start time in milliseconds when the projectile is launched. pDir is the initial launch trajectory, also passed in when launched
pTimeLapsed = ((the milliseconds - pInitTime) * 0.001) pGravity = vector(0, -(9.8/pTimeLapsed*pTimeLapsed),0) pMomentum = ((pDir*(pVelocity*pDrag))+(pGravity*0.0333)) tSpeed = pMomentum.magnitude pDir = pMomentum.getnormalized() pModel.translate(pMomentum)
I of course do some other stuff, but this is the basic motion section. Obviously I don't want to have to repeat through this to figure out where it will end up, I have plenty of stuff to draw on screen without all of that and there are potentially 40 - 50 projectiles in the virtual air at once so I need a much faster targeting solution.
Thoughts???
--al
-- ---- ---- ---- ---- ---- --
Message: 8 Date: Thu, 08 Jan 2004 15:39:28 +0000 From: "Kevin Moesker" <sendmeel2me@(protected)> Subject: [Dir3d-l] flash/video texture suggesti ons? (Tom?) To: dir3d-l@(protected) Message-ID: <BAY2-F81v5y4FypKsEg0001418d@(protected)> Content-Type: text/plain; charset=iso-8859 (See http://iso-8859.ora-code.com)-1; format=flowed
Hello thanks for your response,
I will look at your example, even while i solved the problem by making use of your tips on how to do it. Only how it was exactly implemented is what I was wondering about.
I did already understand that i cannot load a flash member as a texture. Only a bitmap can be rendered as a texture. But when i tried to make an image of the Flash member it only showed frame 1.
What i eventually did is make my director movie bigger than is actually needed. Then get the flash sprite on stage in the area that will not be seen in the embedde director in HTML. Then through imaging make a image(bitmap) of that area from the stage object instaid of the flash member itself.
member("target").image.copyPixels ((the stage).image, member("target").image.rect, rect(319,4,512,197))
And then apply it as texture.
pTexture.member=member("Target").member
It saved a whole lot of time seeing your tips in this list. I can see this would have been kinda tricky to find out on my own. ;)
Besides having an animation I call the self made functions in actionscript. The texture itself will not simply be an animation but it's more of a screen displaying unit having pre written functions in flash.
I am using this as texture for gambling machine. The upper part of a gambling machine is animated but not simply a frame animation from beginning to the end. It has the animation devided in logic parts and even layers to display digital numbers like how many points you have. So all nice functions i can call from lingo. :) Your technique to apply flash texture to the 3d world has opened a whole wide range of possible implementation.
I'm very gratefull
Thanks,
Kevin.
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
-- ---- ---- ---- ---- ---- --
Message: 9 Date: Thu, 8 Jan 2004 10:51:44 -0500 From: Colin Holgate <colin@(protected)> Subject: RE: [Dir3d-l] Camera following To: dir3d-l@(protected) Message-ID: <p06020401bc232c472ab2@[192.168.0.72]> Content-Type: text/plain; charset="iso-8859 (See http://iso-8859.ora-code.com)-1" ; format="flowed"
>I must be missing something here, i am also looking for the pointat >target of the camera, but i can�t find the lingo... >Maybe there isn�t even such a thing? I can�t remember..
At times like this I wish that guy who got me started with 3D lingo was around to help. Oh wait, that was you!
You normally would interpolate transforms (duplicate the current transform, apply the full change to the duplicate, then interpolate the actual transform part of the way towards the adjusted duplicate). If there's something in the camera transform that can't be controlled, you can work around that by having a model as the camera's parent, and do all the transforms to the model instead of the camera.
-- ---- ---- ---- ---- ---- --
Message: 10 Date: Thu, 8 Jan 2004 10:57:24 -0500 From: Colin Holgate <colin@(protected)> Subject: Re: [Dir3d-l] flash/video texture suggesti ons? (Tom?) To: dir3d-l@(protected) Message-ID: <p06020402bc232d7a72df@[192.168.0.72]> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>I did already understand that i cannot load a flash member as a >texture. Only a bitmap can be rendered as a texture. But when i >tried to make an image of the Flash member it only showed frame 1.
The way you ended up doing it is probably better, but just so you know, you could have used the Flash member's image by setting the posterframe of the member to the frame of the sprite. Then the image would have been right.
-- ---- ---- ---- ---- ---- --
Message: 11 Date: Thu, 8 Jan 2004 13:17:58 -0300 From: "Neto" <neto@(protected)> Subject: Re: [Dir3d-l] Camera following To: <dir3d-l@(protected)> Message-ID: <005301c3d602$fb3f1580$1501b2aa@(protected)> Content-Type: text/plain; charset="iso-8859 (See http://iso-8859.ora-code.com)-1"
Duplicate the camera's target model's transform and store it somewhere (I suggest a property inside the parentscript/behavior). Call it "laggedTransform" or something. Then, everyframe, you interpolate the "laggedTransform" towards the target model's transform by some factor, and have the camera point towards and follow the lagged transform.
That way you can have your character leave the screen center slightly while moving, and see the camera smoothly try to track it, instead of a dry lockon.
-- -- Original Message -- -- From: "Christophe Leske" <leske@(protected)> To: <dir3d-l@(protected)> Sent: Thursday, January 08, 2004 12:26 PM Subject: RE: [Dir3d-l] Camera following
> Maybe i should rephrase my question: > > I would need an interpolated pointat-function for the camera, which > slowly moves from one target to the next. > > I must be missing something here, i am also looking for the pointat > target of the camera, but i can�t find the lingo... > Maybe there isn�t even such a thing? I can�t remember.. > > > Thanks, > Christophe Leske > > http://www.multimedial.de > mail: info@(protected) > tel. +49-(0)211 230 99 70 > .:. f�rstenwall 157 .:. > ::: 40215 d�sseldorf ::: > > > > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > Dir3d-l mailing list > Dir3d-l@(protected) > http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l >
-- ---- ---- ---- ---- ---- --
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
End of Dir3d-l Digest, Vol 8, Issue 7 *************************************
|
|
 |