Irrlicht3D.de
http://www.irrlicht3d.de/forum/

Camera controlled by a new Animator
http://www.irrlicht3d.de/forum/viewtopic.php?f=25&t=787
Seite 1 von 2

Autor:  Scrappi [ 21.09.2008, 13:09 ]
Betreff des Beitrags:  Camera controlled by a new Animator

17.CameraAnimator


The idea of this animator cames from the example 'Demo'.
Unzip the new example '17.CameraAnimator' to the directory 'examples'.
Compile project 'example' and run program. Enjoy this new demo.

Press [ESC] to exit.

After you have seen the first pass then press [H] to get a list of keys:
[A]utoreverse (repeat must be off)
[D]irection (forward/backward)
[H]elp (on/off)
[M]otion (on/off)
[R]epeat (on/off)
[T]angents (on/off)
[W]aypoints (on/off)
[X] Restart
[1-4] Decrease speed (at next node)
[-5-] Normalize speed (at next node)
[6-9] Increase speed (at next node)

Press [W] to see the way!


The new animator supports the following features:
- Unlimited waypoints (connected using bezier curves).
- The radius of the curves can be defined by two tangents and their auxiliary range.
- Fill a list of points showing the way between the waypoints. Press [W] in demo.
- Fill a list of waypoints and their tangents. Press [T] in demo.
- Calculation of length of the full way or a part of way.
- The way can be joined to a endless loop. Set repeat=true.
- Moving between a start and end waypoint. Set repeat=false, autoreverse=true
- Every waypoint can have its own speed and camera mode.
- A master speed is used to speed up or down movement.
- Changing direction while moving.
- Start/stop moving at any time.
- Different camera modes (if a camera has been attached to the animator):
+ looking to a fixed point (at the begin of the demo)
+ looking to a (moving) scene node (at the end of the demo - look at the prism)
+ looking ahead in moving direction (in the middle of the demo)


Attention:
The view of camera will be unpredictable if the movement is straight to the top/bottom.
To avoid this effect use a vector of e.g. (0.1, 1.0, 0.0).


Some examples of usage:
- Moving your camera through a demo scene while preparing for a new game.
This camera may look to some of your 3d-modells while flying by.
- Moving vehicles if they are following a fixed way.
- Moving a lift/elevator.


New event receiver:
This example uses a main class (useful for examples) and a new event receiver class.
The class XExampleEventReceiver simply stores the pressed key codes while the class
XUserCodeEventReceiver is able to translate key codes into user defined codes (s32).
I think this is the correct way if key codes may be changed by user. In this case you
have to change the translation table only. Note that this class is not tested yet.
Maybe I will design a advanced class to translate groups of key codes.
e.g. "ctrl+C, X" to activate a command (ctrl+c) and then choosing the command by
pressing the next key seen in games using a large amount of keys.
Note that every event receiver class is a event distributor too. Insert other event
receiver into your main event receiver if you want. Unhandled events are distributed
to the event receiver stored in the internal list.


Dateianhang:
Dateikommentar: (source code)
17.CameraAnimator.zip [35.58 KiB]
900-mal heruntergeladen

Autor:  thephoenix [ 21.09.2008, 17:08 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Sieht von der Beschreibung her echt gut aus!

Habs hier unter Linux allerdings nicht zum laufen bekommen (kompilieren ließ es sich nach 1-2 Änderungen). Werde mirs in ner Woche, wenn ich wieder da bin, nochmal ansehen.

EDIT: Funzt jetzt, lag an der kaputten SVN-Version, die ich hatte.
EDIT2: Kleiner Patch wird nachgeliefert.

Autor:  frodenius [ 24.09.2008, 15:16 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

dies ist die deutsche community, wäre nett wenn es eine übersetzung gäbe.

Autor:  Scrappi [ 26.09.2008, 13:50 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

frodenius hat geschrieben:
dies ist die deutsche community, wäre nett wenn es eine übersetzung gäbe.

LOL

Autor:  frodenius [ 26.09.2008, 18:02 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

[ot]
…… community ist ein eingedeutschter begriff. (du willst ja nicht ernsthaft gemeinschaft sagen, oder?)
[/ot]

Autor:  Roman [ 27.09.2008, 12:40 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Foren-Gemeinschaft, na und? :) :(
Am Wort selbst hätte ich nichts auszusetzten, in die Headline passt es aber wirklich nicht.

Autor:  FreetimeCoder [ 28.09.2008, 19:47 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Ist das jetzt einen Streit darüber, welche Worte deutsch sind und welche nicht, oder geht es hier um die Extension?

Also im Falle des letzeren: Sieht gut aus! Allerdings stürzt es bei mir ab, kurz nachdem die Kamera über die Zinnen der Burg schaut. "Animator.exe hat einen Fehler festgestellt und muss beendet werden" :(

MfG
FTC

Autor:  Scrappi [ 01.10.2008, 15:25 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Ich habe es mit CodeBlocks auf W2000 kompiliert (ohne Direct3D) und bei mir funzt es.
Dateianhang:
17.CameraAnimator.zip

Autor:  Scrappi [ 05.10.2008, 11:06 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Ich bin ein wenig enttäuscht von diesem Forum.

Gibt es hier keine Programmierer, die mein Demo zum Laufen bringen?

So umfangreich ist es doch gar nicht ...

Autor:  thephoenix [ 05.10.2008, 17:31 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Huh, hab sie ja zum Laufen bekommen, war nur etwas Arbeit erforderlich :p

Und hab die Sourcen auch nicht mehr, sonst hätte es in der Zwischenzeit einen Linux-Patch gegeben.

Wenn du einen brauchst, kann ichs nochma machen.

Autor:  FreetimeCoder [ 08.10.2008, 08:12 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Also ich hab deine exe jetzt auch ausprobiert, mit dem selben Ergebnis. Stürzt an der selben Stelle ab.
Den Source hatte ich unter XP mit Code::Blocks und gcc kompiliert aber auch der Debugger zeigt nichts an.

Ich habe leider im Moment kaum Zeit und kann deshalb nicht intensiver auf Fehlersuche gehen.

MfG

Autor:  Scrappi [ 18.10.2008, 15:58 ]
Betreff des Beitrags:  Re: Camera controlled by a new Animator

Ich habe es nun mit der Version 1.4.2 ausprobiert (nur OpenGL).

Bei mir funzt es immer noch. Kein Absturz!

Seite 1 von 2 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/