Camera support for Cut-Scenes
Moderator: PPS-Leaders
Camera support for Cut-Scenes
Link to my Wiki:
https://dev.orxonox.net/wiki/FilipGospodinov
https://dev.orxonox.net/wiki/FilipGospodinov
current state
Well, since we decided to drop the tracker project for a moment I started to work on the camera stuff.
The fading out to a black screen is almost done. Even that is not very difficult there are still some fixes to do:
The fading out to a black screen is almost done. Even that is not very difficult there are still some fixes to do:
- The black screen disappears when shooting
- The spaceship is still viewable
That is really cool it works because that is a critical feature.
We will most certainly not give the player the possibility to shoot while fading, but you should fix that anyway.
My idea was earlier on, that the camera is a lot more detached from its target. This means you should program a few "modes" into which the camera can be put. I thought of following stuff:
We will most certainly not give the player the possibility to shoot while fading, but you should fix that anyway.
My idea was earlier on, that the camera is a lot more detached from its target. This means you should program a few "modes" into which the camera can be put. I thought of following stuff:
- follow target
- follow target without moving
- follow target, but move somewhere else
- circle around target
- switch target softly and instantly
- free camera mode
"I'm Commander Shepard and this is my favorite forum on the internet."
@beni: thx for the great ideas
while I was programming I realized that something has to be discussed:
In the camera.cc the camera is controlled by the glut function gluLookAt()
You can see that the camera position is relative to the ship.
There are more possibilities to realize the camera cut scenes:
while I was programming I realized that something has to be discussed:
In the camera.cc the camera is controlled by the glut function gluLookAt()
Code: Select all
void Camera::project()
{
Vector cameraPosition = this->getAbsCoor();
Vector targetPosition = this->target->getAbsCoor();
// Setting the Camera Eye, lookAt and up Vectors
gluLookAt(cameraPosition.x, cameraPosition.y, cameraPosition.z,
targetPosition.x, targetPosition.y, targetPosition.z,
this->upVector.x, this->upVector.y, this->upVector.z);
}
There are more possibilities to realize the camera cut scenes:
- to write a new class (like scripCamera).
Problem: how easy is it to switch between these classes? (with EventLayer?) - to fill in the arguments of gluLookAt() some parameters which are controlled by methods which iterate these parameters to the value given by the script.
Problem: Too difficult, because camera position is influenced by the ship - to create a variable which tells, which camera mode should be used.
in the Camera::project() method, there will be a condition which will choose to do the right thing
I can't think of a problem here.
The trick of that whole thing is, as far as I know the camera target. Since the camera consists of the camera itself and the camera target, you can probably do something with the target.
As for now we had the target attached to the ship. We can of course detach the target from the ship easily and the camera would stop moving. I guess we can do a lot of stuff by manipulating the camera target (move it, detach and attach it, turn it). Think about it.
As for now we had the target attached to the ship. We can of course detach the target from the ship easily and the camera would stop moving. I guess we can do a lot of stuff by manipulating the camera target (move it, detach and attach it, turn it). Think about it.
"I'm Commander Shepard and this is my favorite forum on the internet."
This breaks the independance of the Camera. Just be aware, that the Camera class should not really know that it is handled inside of orxonox, but rather in a 3D-scene, so making a condition inside of the Camera, means that the camera knows states, it should not know about.to create a variable which tells, which camera mode should be used.
The approach with with a Script-Driven camera seems much more elegant, and also it is the easiest to implement.
To guide the Camera you might also want to consider using the Vertical Scroller Implementation of the track, because in the track should also be able to define camera modes (possibly).
good question?!
another thing, bensch once talked about getting rid of all the glu stuff, gluPerstpective could be removed by using http://steinsoft.net/index.php?site=Pro ... rspective/ , and for the gluLook at see http://wiki.delphigl.com/index.php/gluLookAt (using matrixmode viewport). but i think there is more important work for now.
another thing, bensch once talked about getting rid of all the glu stuff, gluPerstpective could be removed by using http://steinsoft.net/index.php?site=Pro ... rspective/ , and for the gluLook at see http://wiki.delphigl.com/index.php/gluLookAt (using matrixmode viewport). but i think there is more important work for now.
The secret to creativity is knowing how to hide your sources.
Who is online
Users browsing this forum: No registered users and 3 guests