Graphics.RunningWithASimpleScene - lordmundi/wikidoctest GitHub Wiki

Running with a Simple Scene

« Running with multiple clients and a manager | EDGE User’s Guide | Running the benchmarks »

Simple directions

  1. Run using the "run_blank_graphics" script

What's really going on

When you run with the standard scripts, you see the default scene and configuration that we have set up in the "cev.cfg" file. This includes the earth, moon, ISS, some other models, and certain plugins and scripts.

If you want to start with a blank canvas and only add in what you need, you can run using the "run_blank_graphics" script instead which will give you an almost empty scene (there is just a rectangle and a few spheres in the scene). This run script will utilitze the "blank.cfg" file as its starting point. From here, you can add in the Earth, Moon, or whatever else you need in your scene. This can be important if you don't want extra models affecting the performance of your graphics.

To add things into your scene, you will want to use your USERDATA directory. See this page to understand how USERDATA directories work.

For example, if you want a blank scene but you want to add in the earth you could do the following:

  1. Copy the userdata template directory for your project, i.e., "cp -a userdata userdata.earth_only_test"

  2. Edit userdata.earth_only_test and add the following to the POSTLOAD block near the top (normally this would be filenames, but these particular files are already defined by these strings in edge_settings.cfg, so we just use the variable names):

    "${PLANET2_GENERIC_CFG}" "${PLANET2_EARTH_CFG}"

  3. Run "./run_blank_graphics"

  4. Go to Edit→Nodes and click "All". Find the node "PLANET2" and make sure the box is checked for "Node Visible". This is the node for the earth itself.

  5. Your camera is by default near the center of the scene, which is in the center of the Earth. To get outside the Earth, edit the node "MainCam" and put all of the Y, Z, Pitch, Yaw, and Roll fields to 0.0. Then set X to 1000000000 to get the camera outside the Earth. You can now save this state if you want to use it later.

  6. Want stars? Simple, just add in the stars config like we did for the planet stuff. It is defined as "${STARS_CONFIG_FILE}". NOTE: You will likely have to look away from the Earth to be able to see stars since their visibility in the scene depends on the overall brightness of the scene.

« Running with multiple clients and a manager | EDGE User’s Guide | Running the benchmarks »