HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Genius Needed - Something New

05-24-2003, 08:05 AM#1
ChrydGod
Well i say it is new as i haven't found any reference & help to it from anywhere.

The original idea i had was to LOCK the game camera Distance to target to a bigger value (kind of zoom out, but preserved with angle).

The major problem i found was that when you change the game camera, everything gets ruined if a player uses his mousescroll.
And of course, as mousescroll is completely UNDETECTABLE (unless using FPS key detection engine - not a very smart method for a basic problem like that).

At the moment, all i did is a damn ugly timed event every 6.61 seconds of the game resetting the distance to target of the current camera to the desired value. Setting timed event every 0.05 seconds of the game is the worst idea i had. the distance is reset like a hiccups and also the game becomes VERY laggy as you might imagine.


Then i found the cinematics Cameras in my war3mpq folder.
I converted one to MDL and thats how it looked like :

// MDLFile version Jun 6 2002 04:58:04
// Exported on Sat May 24 11:45:42 2003
Version {
FormatVersion 800,
}
Model "CameraZoomOut" {
BlendTime 150,
}
Sequences 1 {
Anim "Stand" {
Interval { 0, 60000 },
}
}
Camera "Camera02" {
Position { 203.934, 0, 116.253 },
Translation 2 {
Bezier,
0: { 0, 0, 0 },
InTan { 0, 0, 0 },
OutTan { 376.945, 0, 197.956 },
60000: { 1130.83, 0, 593.867 },
InTan { 753.889, 0, 395.911 },
OutTan { 0, 0, 0 },
}
FieldOfView 1.48353,
FarClip 6000,
NearClip 8,
Target {
Position { 0.0242439, 0, 109.396 },
}
}


ARG i hate MDL language its so... err .... confusing.

After fiddleling with it for 4 hours, i feel like giving up :

I changed it in the end to :
// MDLFile version Jun 6 2002 04:58:04
// Exported on Sat May 24 11:44:35 2003
Version {
FormatVersion 800,
}
Model "CameraZoomOut" {
BlendTime 150,
}
Sequences 1 {
Anim "Stand" {
Interval { 0, 800 },
}
}
Camera "Camera02" {
Position { 203.934, 0, 116.253 },
Translation 1 {
Bezier,
0: { 1130.83, 0, 1000 },
InTan { 0, 0, 395.911 },
OutTan { 376.945, 0, 197.956 },
}
FieldOfView 1.48353,
FarClip 8000,
NearClip 8,
Target {
Position { 203.934, 0, 116.253 },
}
}

To test, i used the trigger Camera - Play Cinematic Camera blah blah with the modded cameras

In the end, i managed to do many things like permanently put the game upside down (the units walk on the ceiling, etc) i managed to create funny cinematic effects, i managed to lock the game view permanently to a fiwed window.

BUT
I have never managed to make the camera only change the Game Camera Distance to target ONLY permanently.

If someone could help, i am sure verybody would appreciate that new tool as it has unlimitted possibilities. You could even think about making a camera turning round like a tornado or things like that.

Last but not the least :

The reason why i try to use these cinematic cameras is that they LOCK the mousescroll (they can also LOCK all other mouse movements apart from the control ones).

If we manage to find a way to use these AS WE WANT and not just randomly obtain effects, it would add another cool possibility to map making.

It seems that nobody as ever tried it for unknowned reasons. They have been sitting in our war3 MPQ's since the very beginning and nobody has exploited that ability.


LETS WAKE UP! Please help me find what all these values in the fields refer to.

Thanks & Regards
05-24-2003, 12:34 PM#2
Ari
Hmmm, I've spent a fair amount of time learning the mdl format, but I've never learned anything about cameras. I'm definitely interested in figuring it out, though. Would you mind posting a little background about how a camera works in an mdl file? At a basic level, I simply don't understand how a model can be a camera (the two concepts don't seem to have a lot to do with each other directly). Thanks a lot.
05-24-2003, 12:41 PM#3
Starcraftfreak
I don't know anything about that, sorry.
But if he is the first one to find out (in my opinion very unlikely), I wonder if all other people here are stupid (I don't think so). I also saw this trigger in the WE, but I was always too lazy to figure out.
05-24-2003, 12:57 PM#4
ChrydGod
Ari :

Actually, cameras seem to be stored in mdx format the same way model Animations are, as they are basically mathematical transformation of a 3D mesh.

In the camera case, the mesh is just the whole map.

This said i'm having trouble understanding why the values in Position { x, y, z} and Target {x, y, z} don't seem to really correspond to the camera position, nor the camera's target.

Maybe some cinematic or 3D animation expert could help there...

Again : Help, there is NO HELP, NO REFERENCE to this anywhere that i explored.


Thanks in, advance & Regards
05-24-2003, 04:52 PM#5
Guest
This might also be a good question in the cinematic section I would think... I would love to see the answer for sure.
05-24-2003, 06:31 PM#6
Guest
Im pretty sure that the camera model is only used for in we.
05-24-2003, 06:35 PM#7
ChrydGod
But i am afraid it is not really a cinematic problem but rather a mdl editing problem, as the camera timed modifications with their functions actually look similar to animations as i said.


I didn't want to post it in the modeling forum as it neither really is a model problem. It is actually a problem linked to these two subjects.

I then hope (i fear this thread might die as it doesn't seem to get much attention at the moment) a knowledged person will help me investigating the matter as my knowledge in animations, cinematics and models is still in the learning process.

Please do not let this thread die or make it sticky until one finds out as i sense a huge potential with these cinematic cameras.

What about an ultimate spell that LOCKS the ennemy camera upside down for 15 seconds ? loooool i'd love it.

It would also help the cinematic community.
Looking deeper in the only examples given by blizzard (a dozen, very similar though), it seems that you can make these cameras very complex and able to accomplish things that are not even concievable with camera triggers, even with tons of jass knowledge.

Come on, someone help me testing these camera models, all you need to do is convert them to mdl, edit the values and implement them back to test the results.

My investigations haven't revealed much consistant info, but i keep tryng. the only thing is i have no idea why some changes i make sometimes just have strange results.


Thanks & Regards
05-24-2003, 06:40 PM#8
ChrydGod
Why would the trigger exist in GUI then :

Camera - Apply cinematic camera *camera file name string* ?

And then why do you have a cinematic camera called "CameraJainaEnters.mdx" ???

I'll let you think about it and give it a try, its worth the look modifing these models as they are only a few MDL lines long and they are EVER so small to implement in a file (the existing ones are less than 1k)

Regards
05-25-2003, 12:46 AM#9
Guest
Ah, so thats what thats for. I thought it was for running the movies in the campaigns.

Anyway, I'll look into it.

What level is CameraJainaEnters.mdx used in? The one where u meet Jaina?
05-25-2003, 09:40 AM#10
ChrydGod
Where should i post that ? i had a look in the thread concerning the mdx importer/erporter and when dealing with animation issues, they seemed to know about the anim "Stand" properties, the Bezier or other animations used in mdls. That looks sooo similar to animation parts of models in mdls that i am sure someone could easily find out.

The problem is i get completely confused with the mdl format. :'(

Anyone here with more skill than me could do the whole community a favor and have a look at these cinematic cameras ?

The examples provided by blizzard are all in this folder or war3.mpq :
Objects\CinematicCameras\


Thanks & Regards
05-25-2003, 10:35 AM#11
kharma
A few basic definitions:
Bezier is to do with creating curves and rotations. The InTan and OutTan tags are the control points which define the curve. The numbers in the brackets after them are x, y, z values to determine where the points are.

The stand animation is pretty self-explanatory; it's simply the animation that plays when a unit is idle, the interval subsection defines the frames that are used for the stand animation ie. interval { 0 , 800 } means the animation lasts from frame 0 to frame 800.

I'll have a thorough play with the mdl a bit myself when I get a chance.

~kharma
05-25-2003, 12:58 PM#12
ChrydGod
Thats exactly the kind of info we need.

I'll give it a try myself as soon as i finish creating my custom UnitMetaData.slk that will enhance the Unit Editor and will be compatible with UMSWE and WE


Regards... And thank you so much & keep us updated ^^
05-25-2003, 04:13 PM#13
dataangel
A couple things. First off, I had to experiment with cameras ALOT, and one of the things that sucks about them is that all the camera functions that retrieve info (like get distance to target) only work for player1, like the selection actions. Make sure you take that wierdness into account.

What I don't understand is why you need to use the .mdl file format for cameras at all. Why not just use the ingame triggers? EDIT: OIC, missed that in yer original post. But still, check out my method below.

Also, if they haven't mouse scrolled at all, and you set distance to target to the distance to target their camera is already at, there shouldn't be any visual hiccup at all because nothing is changing. Are you sure you aren't changing the camera again elsewhere?

Next, yer incorrect. Mouse scroll is detectable! But it requires JASS, GetLocalPlayer(), and local variables. Create a local variable, set it's value to be the camera distance to target of GetLocalPlayer(), and if it isn't the value you want, then select a special unit (an invisible preplaced unit you've put on the map earlier). Then setup another trigger with the events "Player selects preplaced unit" for every player you want locked. For your action, set the camera distance to target to what it's supposed to be. This way the camera only resets when someone actually tries to mouse scroll.

Lemme know if that works out ;)
05-25-2003, 04:24 PM#14
CitizenSnips
This is very interesting what you have noticed. For a long time I've wondered what that "cinematic camera" trigger was for and now it all makes sense. A custom camera animation stored in mdl format. This has given me the idea to incorporate camera animation support into 'DeX. It already supports exporting static cameras for portrait models so assuming that it uses similar controllers to that of bone and helper animation it wouldn't be hard at all to implement.
Incase you didn't see my news post that was lost in the reset I'm working on finishing repub's exporter script and I'm getting ready to release a preliminary version as open source. I think I can implement camera animation as a launch feature perhaps. What you would do is either get gmax(this is a working feature of the script I have implemented before you dissenters tell me you can't export from gmax ;)) or 3dsmax and you could animate a camera using its animation tools, save it as an mdl and then use it in your map.

Ari: model files are really like 3d scene files, they store everything; particles, lights, cameras, geometry, materials and so forth so it doesn't really matter if you have all or one or a couple. In fact I'm going to make some MDLs that only have lights in them and nothing else. People would be able to use them as doodads in a map to add realtime light sourcing to give more realism and depth to a map if the author so requires.The name model file is somewhat misleading I suppose.
05-25-2003, 05:05 PM#15
Panto
CitizenSnips, do you have a thread regarding the progress of nevermind I'll go check.

EDIT: Here's Republicola's original thread but I haven't found one for CS's work yet.