Creating a Solar System with Element Heirarchy

We've been hassling the programming department for ages about getting element hierarchy happening in VastPark. You can imagine my surprise when I was told that it was up and running.

Basically what it allows user to do is to nest an element inside another, making it a child of that element, so that when the parent moves the child moves with it. After a quick overview I got to work creating a Solar System.

The first thing I do in nearly all my parks is layout the elements. I wanted to make the solar system semi to scale, so every 10,000km in real world scale is equal to 1m in VastPark units.
The Sun being the center of our Solar System was the first to go in. I inserted a sphere at position 0,0,0 with a size of 139m, and named it Sun. For this example I only put in the first four planets from the Sun, so I added in four more spheres for the planets, another one for Earth's moon, named and position them all accordingly.

Grey Spheres are cool and all but they would look better with some textures on them, luckily the interweb is full of appropriate images for planets. Do a Google image search and you're bound to find the image you need. Jump into the IMML editor and in the Material Group of each sphere add in a new tag for a texture. The IMML editor has an Auto Complete function so all you have to do is use a < and then add Texture and then Source, paste in your image URL and close the tag.
It should look like the code below, with your image URL pasted in between the "".

  1. <Texture Source=" "/>

Jump back into Design view and you will see the image apply to the sphere.
The only other thing we need to add into the scene is a "dummy" for each planet. This will act as the "Parent" to each planet and will help the planets orbit around the sun. Insert 4 boxes at 0,0,0 and give them a meaningful name like "Earth Dummy".

The scene was now setup the way I wanted, everything needed for getting the planets to orbit the sun could be done in the IMML editor. To nest an element inside another all you need to do is cut the code for the element you want to make the "child" and paste it before the closing tag of the element you want to be the "parent". I nested each planet inside its "dummy" and nested the moon inside the earth.

With the element hierarchy all figured out all I had to do was create two timelines for each planet, one for its "dummy" to control its orbit, the other to control the planets rotation on its axis. I'm not going to go into detail here about how to create timelines. If you need help creating timelines there is a tutorial on them here.

solar system

That's about all there is to it, if you want to have a closer look at the park you can download it from the showcase. I tried to make the orbit's semi to scale also, so if you find it a bit slow you might want to crank up the orbit speeds in the respective timelines. I'll be looking to improve this further so keep an eye out for updates in the future.

Posted by Shep on 11/20 at 08:22 PM in Creative Users • (0) Comments

Comments