This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras  (Read 3639 times)

Meiya Stormsinger

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 9
    • View Profile
[TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras
« on: April 02, 2016, 02:41:56 pm »
Hello everyone.

As the title of the thread states, this is a tutorial for custom cinematics for World of Warcraft 3.3.5.

Without further ado here we go...


Part I. Getting started...


You need to download a bunch of programs if you don't already have them...


* MyDbcEditor (viewtopic.php?f=59&t=782)
* Microsoft Visual Studio (https://www.visualstudio.com/en-us/down ... io-vs.aspx)
* MPQ Editor (http://www.hiveworkshop.com/forums/tool ... bit-249562)


Once you have all the programs you need collect a bunch of files... The files you'll need are:


*CinematicCamera.dbc
*CinematicSequences.dbc




Any camera skin file as they are all the same (E.g. FlyByDwarf00.skin) these can be found in Common-2.mpq / Cameras.




Then you need to C++ program that generates the .m2 file which can be downloaded from Stoneharry's Github: https://github.com/stoneharry/Misc-WoW- ... camera.cpp



Part II. Editing the DBC's.


Open up CinematicCamera.dbc, it should look something like this:




Now insert a new line and give it your own ID.





Now change the name to what you want to name your .m2 file later, I've chosen Test.mdx...


Then you need to go ingame and get the coords for where you want the camera to end because the camera will use these coords as the "root coords".


You can read about the different columns here: https://wowdev.wiki/DB/CinematicCamera




Once you've set up the CinematicCamera.dbc you need to open up CinematicSequences.dbc


Read about the different columns here: https://wowdev.wiki/DB/CinematicSequences


You only need to insert a row where you specify a sequence ID and bind it to your cinematic ID, my cinematic ID was 300 and I've set the sequence ID to 200.






Part III. Visual Studio...


Open up Microsoft Visual Studio and create a new Win32 Console Application.

[imghttp://puu.sh/o3e9h/62f876e3f6.png[/img]


You can remove the information that is generated in the file except for #include "stdafx.h"




Then open up the camera.cpp from Stoneharry's github and put the information in the project.


Now for the actual editing of the vectors... This is the tricky part.


AnimationLength = The length of course...


TimeStamp = When the camera triggers based on the AnimationLength...


Position = DBC file coords +/- Vector (E.g. if set to 3920 in DBC and you do -5 in the vector it will do 3920 - 5...)
( Example: fake9.stamp = 0000; fake9.data.d[0] = 0.00f; fake9.data.d[1] = 150.00f; fake9.data.d[2] = 14.00f); )

The structure of the vectors are: TimeStamp; X; Y; Z...




Target = DBC file Z +/- Vector (E.g. if set to 10 in dbc and you do -5 it will look down, and +5 makes it look up...)


For easy calculation I have done "RootX" - "NewX" = "OffsetX" (E.g. DbcX = 3920, NewX = 3940 then OffsetX = 3920-3940 = -20...)
This only applies to the position vectors, the target is a bit more complex then that and you will need to mess around with this to get it to work.


This is a very basic way to calculate the coords and it's a very complex system so you will need to do a lot of trial and error to get it the way you want...


You also need to set up where you want the .m2 file to generate to, (E.g. FILE* f = fopen("C:\Users\Kenny\Desktop\Kenny\World of Warcraft - 3.3.5a\Data\Patch-U.MPQ\Cameras\Test.m2", "w+");)


This generates it straight into my patch folder and then I can just call it in-game without restarting the game (I have an unpacked MPQ folder...)


Once you have entered all your vectors and what-not it's time to compile the program.


Note: If you get an error saying something about _CRT_SECURE_NO_WARNINGS then go into Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessors -> Preprocessor Definitions and add the line _CRT_SECURE_NO_WARNINGS...







Should look something like this when compiled:




Once that's done, go into the Release folder and run the console program, in my case it's C:UsersKennyDocumentsVisual Studio 2013ProjectsConsoleApplication5ReleaseConsoleApplication5.exe...


This will now generate the .m2 file to whereever you specified in the C++ file...




Part IIII. Getting your camera ingame...


As I meantioned I have an unpacked mpq folder meaning I don't need to shut down the game, open the mpq file and put in the new files... You can easily do this by creating a new folder in your en##/Data folder and naming it Patch-#.MPQ.


So when you have created your MPQ you create a folder inside it named Camera, here you place the .m2 file and .skin file...
Then go back to the root of the mpq and create another folder named DBFilesClient and in here you put the CinematicCamera.dbc and CinematicSequences.dbc...


Then go ingame and write .debug play cinematic #CinematicSequenceID




??
profit




Part V. FAQ
Do I need to use target vectors at all or can I comment them out? - You do not need to use these, you can comment them all out but if you are doing a camera that starts higher up than the DBC Z you will need to set the target Z to a negative value to make the camera look down, else it will look straight ahead.


My camera is looking straight up into the sky / straight down in the ground. - Make sure that the first timestamp is set to 0000, else the camera won't know which coords to load (E.g. if you set the first one to 5000 it will look straight up into the sky until after the 5 seconds have passed and it loads the target.)


I'm getting a WoWError when trying to play my cinematic. - Make sure you have the .m2 and .skin files set up correctly, and that the dbc's are set up correctly. The skin file needs to be named *filename*00.skin. Also make sure that you set the name of the file to *filename*.mdx in the CinematicCamera.dbc.




Part VI. Credits
Schlumpf for creating the C++ program to generate the .m2
Stoneharry for helping me setting up my first camera.
Myself for creating the guide.
« Last Edit: April 02, 2016, 03:50:23 pm by Admin »

hyakkimaru

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 128
    • View Profile
    • http://mc-revolution.fr
Re: [TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras
« Reply #1 on: April 02, 2016, 03:42:28 pm »
Thanks for your tutorial, but you should upload your imgs aways from OwnedCore, because, if you're not connected to OC, you can't see images ^^
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Meiya Stormsinger

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 9
    • View Profile
Re: [TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras
« Reply #2 on: April 02, 2016, 03:51:17 pm »
Quote from: "hyakkimaru"
Thanks for your tutorial, but you should upload your imgs aways from OwnedCore, because, if you're not connected to OC, you can't see images ^^

Yeah, for some reason OC changed it when I made the post, at first it was Puush... Fixed now.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras
« Reply #3 on: April 02, 2016, 04:00:20 pm »
Note that this works for wotlk and nothing else as cata changed cameras and bc had a different format for animations. If it is required I can adapt it to work with cata+ or legion+. Note that legion+ will require db2 edits instead.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Uthil

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 283
    • View Profile
Re: [TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras
« Reply #4 on: April 03, 2016, 09:40:39 am »
Nice tutorial and nice clarification about game versions schlumpf.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Like my project and you like to support me, you can do it here!

dumass

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TUTORIAL:3D Modelling] [WotLk] Custom Cinematic Cameras
« Reply #5 on: July 02, 2017, 11:29:52 pm »
I am trying to figure this out but I can't get it how to calculate the position coordinates because ingame the camera will be in the wrong positon.

My root (DBC) coordinates: 7167,44; 1499; 718,6

The coordinate where I want the camera to be : 7331,704; 1075,864; 396,506

What I set to the position vectors: fake9.stamp = 0000; fake9.data.d[0] = 164.264f; fake9.data.d[1] = -423.136f; fake9.data.d[2] = -322.094f;

It is very annoying.... can somebody help me please how did I calculated wrong ?