Opened 9 years ago

Last modified 7 years ago

#3301 closed task

[PATCH] Cinematic camera — at Version 7

Reported by: Vladislav Belov Owned by: Vladislav Belov
Priority: Should Have Milestone: Alpha 20
Component: Core engine Keywords: patch
Cc: Patch:

Description (last modified by Vladislav Belov)

Cinematic camera needs for cutscenes, game videos, etc. There is some cinematic camera realization, but it's uncompleted and can't be used in map.

After modification camera paths have next structure (in map.xml):

<Paths>
  <Path name="test" timescale="1" orientation="target" mode="ease_inout" style="default">
    <Node time="0">
      <Position x="485.029" y="25.8692" z="866.186"/>
      <Target x="0" y="0" z="0"/>
    </Node>
    <!-- other nodes -->
  </Path>
</Paths>

Mode & style are params for the camera moving near nodes. And from the map trigger we can add a path to the playlist by name.

The draft of patch I will attach later. And Atlas Paths editing after trompetin17 AtlasUI merging.

Example of cutscene with cinematic camera: http://www.youtube.com/watch?v=xkLrpkow7XU.

Change History (19)

by Vladislav Belov, 9 years ago

Attachment: camera_path_visual.jpg added

by Vladislav Belov, 9 years ago

Attachment: Cinema_Demo_map.zip added

by Vladislav Belov, 9 years ago

Test version (0.5) of cinematic camera

by Vladislav Belov, 9 years ago

comment:1 by elexis, 9 years ago

Can't compile it, since the class CCinemaManager is defined in CinemaManager.h and CinemaTrack.h. Perhaps the latter is supposed to be removed?

by Vladislav Belov, 9 years ago

comment:2 by elexis, 9 years ago

Keywords: patch added
Summary: [WIP] Cinematic camera[PATCH] Cinematic camera

Thanks, that compiles.

Actually I'm surprised of how good that looks, especially with that 16:9 format.

Should we have some skyline (new ticket), as the black background looks a bit unnatural? Also we should make sure that the low-res textures aren't in view for too long (in that case the gate looks a bit ugly).

Linking a video of that cutscene here would also help promoting the patch I guess.

With regards to the code:

  • --i; instead of i--; (NUSpline.cpp )
  • --m_GrowthCount (CinemaPath.cpp)
  • trailing whitespace in an empty line in CXMLReader::ReadPaths
  • some unused variables (don't know if you will use them later)
  • The patch could be split into smaller parts (maybe not needed if leper reviews it ;) ). For example the cleanup of existing code could be done in an individual commit. Also I saw that you moved some code. Might be easier to review if the code is not be moved but edited in place. Make sure to ask leper before you follow these proposals.

Good job!

comment:3 by elexis, 9 years ago

To undo the patch, make sure to remove the newly added files:

rm source/graphics/CinemaManager.cpp
rm source/graphics/CinemaManager.h
rm source/graphics/CinemaPath.cpp
rm source/graphics/CinemaPath.h
rm source/simulation2/components/CCmpCinemaManager.cpp
rm source/simulation2/components/ICmpCinemaManager.cpp
rm source/simulation2/components/ICmpCinemaManager.h

comment:4 by Yves, 9 years ago

I had a look at this patch today because I'm working on a kind of a benchmark mode. It's quite cool and works well, good work!

Some feedback:

  • I get some OpenAL errors when I try to set more than two nodes in a path with the same position but different rotation.
  • It would be nice to use this for random maps too (define camera paths from code).
  • Adding OnCinemaPathEnded as a Trigger event would be useful (I think that was the idea, but I'll mention it anyway).
  • There's some deprecated SpiderMonkey code. Use JS::ObjectValue(*obj) instead of OBJECT_TO_JSVAL(obj) and JS::Value instead of jsval for new code. In some version they will drop support for the old API.

comment:5 by Stan, 9 years ago

Milestone: BacklogAlpha 20

As discussed on IRC Vlad is still working on it, so I'm pushing this to A20

by Vladislav Belov, 9 years ago

comment:6 by Vladislav Belov, 9 years ago

Description: modified (diff)

comment:7 by Vladislav Belov, 9 years ago

Description: modified (diff)

by Vladislav Belov, 9 years ago

Small fixes, draw target spline, few renamings

by Vladislav Belov, 8 years ago

OpenAL error fix, debug_printf fix, target without position fix

by Vladislav Belov, 8 years ago

Attachment: Cinema_Demo_2.zip added

Test map for target path and event CinemaPathEnded

by Vladislav Belov, 8 years ago

Small fixes, trigger event for CinemaPathEnded

by Vladislav Belov, 8 years ago

Indetation fix, deprecated js fix

by Vladislav Belov, 8 years ago

Disable mouse input, small fixes

Note: See TracTickets for help on using tickets.