Jump to content


Photo

Hacking the MScope: Volume 1


  • Please log in to reply
27 replies to this topic

#1 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 02 January 2008 - 05:21 AM

In the root folder of every movie you create in Moviestorm is a file called movie.mscope. This is a plain text file, structured in XML, and it stores virtually all of the important info about your movie... characters, sets, activities on the timeline, etc.

If you're new to XML, there's a decent primer here. If you plan to really get into the nitty-gritty of Moviestorm, a basic familiarity with XML will prove invaluable.

I'm going to show you a handful of very simple examples of how you can edit your movie.mscope file to get things to happen that you can't accomplish within Moviestorm itself. I do not know how useful you will find them, they are only examples. I cannot guarantee that Moviestorm will respond in a friendly manner to changes you may make; I can only tell you (and show you) that I've made these modifications I describe below and suffered no ill effects.

DISCLAIMER 1: I am not employed by Short Fuze, I am not a Moviestorm developer. I will do my best to help you if you want to venture into this territory, but I may have very limited time to do so.

DISCLAIMER 2: While Short Fuze has given us the ability to do these things by choosing an open architecture for these files, and while they do not explicitly forbid doing these things, Short Fuze does NOT officially provide support for these activities. Even simple hacking is, essentially, venturing out on a limb by yourself; be of this mindset before you proceed. If you are not comfortable with this, it would be best to not engage in this kind of activity.

DISCLAIMER 3: I cannot stress this enough. ALWAYS, ALWAYS, ALWAYS back up (make an extra copy of) any Moviestorm files you tinker with. This makes it easy to get back to your original movie should something not go as planned.

Disclaimers aside, here we go! I'm assuming at this point that you know how to basically navigate an XML hierarchy.

Check out the following short film for a demonstration of what I'll be covering below: http://www.moviestor...eServlet?id=414
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#2 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 02 January 2008 - 05:24 AM

1) Tilted Wall
Walls are defined in movie.mscope under:


<movie>

  <scenes>

    <scene>

      <set>

        <scenery>

          <wall>

Under each wall, a left and right point are defined. Each wall is thought of as a line from the left point to the right.


            <left>

              <pt>0.0 -8.0 0.0</pt>

              <walls>

                <wall reference="../../.."/>

              </walls>

            </left>

            <right>

              <pt>0.0 0.0 0.0</pt>

              <walls>

                <wall reference="../../.."/>

              </walls>

            </right>

Note the "pt" defined under left and right, each. This is a set of space-separated X,Y,Z values... a coordinate in 3d space. The first two values correspond to a location on the Moviestorm set grid. The third value, which is currently unused by the Moviestorm interface, is the Z value... the elevation off the ground. By changing this value on one or both the left and right points, you can alter the elevation of one or both ends of the wall. In the demo video, I show you what one looks like if just one of the coordinates is raised. Something like this:


            <left>

              <pt>0.0 -8.0 0.0</pt>

            </left>

            <right>

              <pt>0.0 0.0 2.0</pt>

            </right>

Note that the Z value of the right point is now set to 2.0 instead of 0.0. This means the right point will be elevated the equivalent of 2 units (one unit = 1 square on the grid).

- Best I can tell, characters still respect the boundary of a wall, even when it is elevated.
- Note that the bottom "face" of a wall is not rendered by the engine. Keep this in mind for cosmetic reasons (not that the normal edge faces of walls are anything you'd want to see anyway, but at least they're there.)
- I have not yet experimented with negative Z values, but theoretically this could cause a wall to sink into the ground.
- Z values do not appear to need to be integers (whole numbers). One could set a wall's value to 1.5, for example.
- I do not know the upper limit of the Z value.
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#3 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 02 January 2008 - 05:27 AM

2) Thicker Wall
Further down under a wall definition, there is a thickness property.


            <left>

              <pt>0.0 -8.0 0.0</pt>

            </left>

            <right>

              <pt>0.0 0.0 0.0</pt>

            </right>

            ...

             <thickness>0.1</thickness>

Wall thickness is set to 0.1 for all walls created by Moviestorm at the time of this writing. One can change this thickness value to values other than 0.1 to adjust the thickness of a particular wall.

In the demo video, I've set a wall thickness to 0.5.

- I've not tried a zero or below zero value for thickness; probably best to stay away from that, seems likely to cause a crash.
- The fraction (0.1) appears to be in terms of the standard unit of measurement used elsewhere in Moviestorm: one grid square.
- I do not know the upper limit of the thickness value.
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#4 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 02 January 2008 - 05:27 AM

3) Higher Wall / Higher Ceiling
Further down under a wall definition, there is a height property.


            <left>

              <pt>0.0 -8.0 0.0</pt>

            </left>

            <right>

              <pt>0.0 0.0 0.0</pt>

            </right>

            ...

             <height>3.0</height>

Wall height is set to 3.0 for all walls created by Moviestorm at the time of this writing. One can change this height value to values other than 3 to adjust the height of a particular wall.

In the demo video, I've set a wall height to 5.0.

- Height values do not appear to need to be integers (whole numbers). One could set a wall's height to 3.5, for example. Keep in mind the texture mapping rule discussed here.
- When you place a door / window on a heightened wall, it breaks the wall height above it (if it's anything other than 3.0).

In that same section of the video, a ceiling height is also set to 5.0.

Ceiling height can only be given a value for an entire set, not on an individual tile basis. The default value is 3.0 (same default height as walls).


<movie>

  <scenes>

    <scene>

      <set>

        <scenery>

          <ceiling>

            <width>50</width>

            <depth>50</depth>

            <height>3.0</height>

      </ceiling>


- Props which attach to ceiling remain at 3.0 height, you can't move them up to other ceiling heights.
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#5 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 02 January 2008 - 05:28 AM

What else can you discover? Post your findings in this thread!

Here are some things I've also discovered, which were less exciting results:
- Doors / Windows have a Z-coordinate, but it elevates surrounding wall on a slope to its new height. Weird effect.
- Doors / Windows have a width value... this merely creates blank space around the portal, it does not widen it.
- I tried redefining the floor and ceiling grids to be 75x75 instead of 50x50. While the changes did take, the graphics engine would not successfully render a set that large. The 50x50 set size appears to be there for very good reason.
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#6 saument

saument

    Director

  • Pioneers
  • 114 posts

Posted 02 January 2008 - 06:10 AM

Thanks for this thread!
=================================
Stephen Aument
Jeslync Pictures

#7 johnnie

johnnie

    Master Director

  • Pioneers
  • 860 posts

Posted 02 January 2008 - 12:10 PM

Great thread! Thanks Phil tongue.gif
Johnnie Ingram
Co-Author, Machinima For Dummies

QUOTE (The Overcast @ July 23 2006)

#8 davidwww

davidwww

    Master Director

  • Pioneers
  • 1881 posts

Posted 03 January 2008 - 12:55 AM

What a excellent and helpful thread Overman, I had a quick look at the movie.mscope file and theres too many lines of stuff for my poor old eyes to look through, maybe some one who can program could give it a graphical interface so then you can just select the thing you want to change without digging through long lines of information.

Regards
Davidwww

Moviestorm still Number One

#9 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 03 January 2008 - 01:07 AM

(davidwww)
What a excellent and helpful thread Overman, I had a quick look at the movie.mscope file and theres too many lines of stuff for my poor old eyes to look through, maybe some one who can program could give it a graphical interface so then you can just select the thing you want to change without digging through long lines of information.


David, something which might be worth trying: Make a copy of the movie.mscope file, then rename it and give it an xml extension (movie.mscope.xml, for example). Once you've done that, you should be able to double-click it to open it in your web browser. In the browser, the file will be "exploded" by default (i.e. all tree branches open), but you can click on the little minus and plus signs to the left of branches to expand and contract different sections of the file. This can be very helpful in getting a feel for the overall structure, one piece at a time. It can be a little more manageable to read in that way.
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#10 johnnie

johnnie

    Master Director

  • Pioneers
  • 860 posts

Posted 03 January 2008 - 11:27 AM

You could also grab a dedicated XML editor, which will give you the same "overview" feel of the file. I use iXEdit when I'm working with Moviestorm's XML files. You all know me well enough by now to guess that it's ... yup ... free and open-source tongue.gif
Johnnie Ingram
Co-Author, Machinima For Dummies

QUOTE (The Overcast @ July 23 2006)

#11 davidwww

davidwww

    Master Director

  • Pioneers
  • 1881 posts

Posted 03 January 2008 - 02:29 PM

The biggest thing stopping me learning to use the movie.mscope.xml is time and the lack of it, thats another reason why I haven't done much with the modders workshop, I had started to pick up on how to change minor things in the old version and then it was removed and when it came back with all that authoring stuff you have to go through just to do something minor was a big jump to learn and I only manage a few hours a day on the computer, and with checking the forums, doing surveys, checking emails and trying to make a movie I find it hard to get it all done, maybe I need a time management program (but that will take up too much time to down load damn!), so maybe I will leave it up to you clever chaps and your wonderful talents, and wait until some one invents a time altering device.

Regards
David

Moviestorm still Number One

#12 AngriBuddhist

AngriBuddhist

    Master Director

  • Pioneers
  • 2074 posts

Posted 28 January 2008 - 11:59 PM

Overman,

Since you're mucking about in the MScope, I have a couple of questions for you.

Do you think that it would be possible (regardless of how useful) to locate a camera in the MScope, copy it's info, and then paste it back into the MScope with a different name to have two identical cameras?

How about copying the camera from one movies' MScope and pasting it into another movies' MScope?

I know that you can "save a scene in a different location" giving you a duplicate set and camera yet refining SXF shots would be much easier if a camera could be copied to an existing set.

#13 saument

saument

    Director

  • Pioneers
  • 114 posts

Posted 29 January 2008 - 12:22 AM

(AngriBuddhist)
Do you think that it would be possible (regardless of how useful) to locate a camera in the MScope, copy it's info, and then paste it back into the MScope with a different name to have two identical cameras?

How about copying the camera from one movies' MScope and pasting it into another movies' MScope?


I'm not Overman, but I can answer, so forgive the interloping. smile.gif

This is totally doable. You would have to copy both the cameraman element from the scene and the associated keyframe elements from the scene's schedule, changing their subject reference attributes to match the new cameraman.

If you haven't looked at the mscope file, I'm sure that last paragraph sounds like gibberish. Take a look at the file and see if it makes sense. If necessary I could probably post a short tutorial.

Stephen
=================================
Stephen Aument
Jeslync Pictures

#14 AngriBuddhist

AngriBuddhist

    Master Director

  • Pioneers
  • 2074 posts

Posted 29 January 2008 - 12:35 AM

saument,

I'm only addressing the big O-Man as I don't know who else is working at this level in MS. Thanks for the reply.

I have looked at the MScope. I've even (although not very impressive) changed the height of a wall. As you say, that paragraph is Egyption to me. If I haven't placed a (new) camera in the (new) set do I still need to "change their subject reference attributes to match the new cameraman"?

I'm 99% sure that that question is idiotic and am hoping that it will impress upon you my need for a short tutorial. I'd be grateful for your help.

#15 saument

saument

    Director

  • Pioneers
  • 114 posts

Posted 29 January 2008 - 12:48 AM

(AngriBuddhist)
If I haven't placed a (new) camera in the (new) set do I still need to "change their subject reference attributes to match the new cameraman"?


Depends. Let me give you an example of what I'm talking about.

Here's a keyframe element from the schedule in one of my scenes:

        <keyframe>

          <keyframe class="mscope.things.TargetShot">

            <targetOffset>-19.759571 2.4789026 1.1</targetOffset>

            <distance>0.0</distance>

            <pan>-0.21049051</pan>

            <tilt>-0.05724633</tilt>

            <bearing>0.0</bearing>

            <elevation>0.0</elevation>

            <keyFOV>0.5009095</keyFOV>

            <keyTransform>0.9779285 0.20859735 0.011954494 -19.759571 -0.20893961 0.9763266 0.055952247 2.4789026 0.0 -0.05721507 0.9983619 1.1 0.0 0.0 0.0 1.0</keyTransform>

            <lineSide>1</lineSide>

            <distanceToFocalPoint>3.0</distanceToFocalPoint>

            <focalRange>1024.0</focalRange>

          </keyframe>

          <pathInfo>

            <linear>true</linear>

            <tension>0.0</tension>

            <continuity>0.0</continuity>

            <bias>0.0</bias>

          </pathInfo>

          <startTime>6.611311015081405</startTime>

          <duration>0.0</duration>

          <subject class="cameraman" reference="../../../cameras/cameraman[4]"/>

        </keyframe>

That second to last line that starts "
Edit: But if you added a fifth camera and copied this keyframe for it you would make the reference read "../../../cameras/cameraman[5]".

Hope that helps.

Stephen
=================================
Stephen Aument
Jeslync Pictures

#16 AngriBuddhist

AngriBuddhist

    Master Director

  • Pioneers
  • 2074 posts

Posted 29 January 2008 - 01:23 AM

So, let's say that the camera that I would like to copy is .

When pasting it into a scene that has no cameras I could leave it as "cameraman[4]". Alternately, if the scene already has cameramen 1-4 I would then change the new, pasted, cameraman to "cameraman[5]".

If that's correct it seems to be rather simple. Question though, beyond it showing me exactly where in the MScope that I should paste, is there any reason to add the new cameraman (in MS) prior to editing the MScope?



#17 Overman

Overman

    Master Director

  • Pioneers
  • 562 posts

Posted 29 January 2008 - 03:01 AM

Yeah, what saument said. smile.gif

(He's right on)
Phil "Overman" Rice
Zarathustra Studios - http://z-studios.com
You can connect with us On Twitter, On Facebook, On YouTube, and On Vimeo.

#18 saument

saument

    Director

  • Pioneers
  • 114 posts

Posted 29 January 2008 - 06:57 AM

(AngriBuddhist)
So, let's say that the camera that I would like to copy is .

When pasting it into a scene that has no cameras I could leave it as "cameraman[4]".


If there are no existing cameras you would remove the "[4]" bit. Then it would be "cameraman", which implies "cameraman[1]". (Haven't tested it with cameras, but I think the 1st item in a list has to be referenced without the "[1]". So, "cameraman" instead of "cameraman[1]")

(AngriBuddhist)
Alternately, if the scene already has cameramen 1-4 I would then change the new, pasted, cameraman to cameraman[5]".


Exactly.

(AngriBuddhist)
Question though, beyond it showing me exactly where in the MScope that I should paste, is there any reason to add the new cameraman (in MS) prior to editing the MScope?


I don't think so. I mean, I could probably come up with a scenario in which it would help, but beyond making sure the rest of the XML structure is in place and showing you where to paste it, I think you're fine.

Stephen
=================================
Stephen Aument
Jeslync Pictures

#19 AngriBuddhist

AngriBuddhist

    Master Director

  • Pioneers
  • 2074 posts

Posted 29 January 2008 - 07:03 AM

Thanks saument!!!

I've been building a test set for this and am now off to play. Well, after I post elsewhere about another problem. :roll:

#20 AngriBuddhist

AngriBuddhist

    Master Director

  • Pioneers
  • 2074 posts

Posted 31 January 2008 - 02:06 AM

It works. Thanks for your help. A few things to anyone trying this-

If your camera path contains multiple keyframes these might apply-

1. It might be due to placing a camera, doing something else, and then returning to your camera but MS could write multiple "" paths in your MScope. I found, copied, and pasted what I initially found but when I viewed it, the the first camera keyframe was missing. Searching again, I found an earlier "" path quite a ways up in the MScope. I'd assume that it would be possible for there to be many pieces of one camera path. As the second portion of the camera's "" path (which I created back to back in MS) contained many camera movement's, I'd say that doing all of a camera's adjustments without interruption would probably keep all the "" paths in one portion of the MScope.

2. After the final "" in the formula, MS can/will also write "". After my initial MScope edit, MS reported an error and would not load my movie. I could have done something else wrong but I know that I did not copy/paste the "". When copying/pasting all of the info from "" to "" as well as the "" the movie loads and the camera works fine. Regardless if this is mandatory for this technique to work, it definately doesn't hurt.

As mentioned everywhere on this site, never alter an existing MS file without first saving a backup copy of it. It took me a few tries to get this right and without a backup, the 6+ hours I spent on set building could have been wasted.


  • Please log in to reply


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users