IBMMyHouse
IBMMyHouse.mp4
Description
A scene is built up with Conditionals activated by TimeSensors in a chain connected together so that they go one after
the other and the last is connected back to the first to form a continual loop.
See IBMTimeSensorChain for more detail.
The scene is built using different BIFS commands stored in Conditionals and there are various animations as
it is created to give a drawing effect in places.
So the intent is to build a scene that is created dynamically where some shapes appear as if they are drawn
in. A Replace Scene command adds all the TimeSensors, Conditionals etc that we will use to create the scene;
it also includes a white background. The scene will repeatedly be created and deleted.
So to build the scene, and then delete it, the TimeSensor chain activates conditionals which do the following:
- First we insert a group to which all the shapes etc. will be added. At the end we will delete
this group so we can repeat the scene creation over and over again.
- First we add some grass. Grow a filled Curve2D shape to look like a thin line (thin rectangle) across
the screen and then grow it downwards.
- Next add some sky. A rectangular Curve2D shape is added with a PixelTexture producing a gradient.
The transparency on the Material2D is interpolated to fade the sky in.
See IBMTextureGradientsSpinning for more
information about using textures to create gradient effects.
- Next we create a house shape (no roof) with 5 windows and a door in its own group.
The house outline is drawn by interpolating a non-filled Curve2D shape, then the windows and doors are
added by the interpolator as discrete changes. At this point the house is just an outline, formed from a
single Curve2D using moveTos and LineTos. The sky and grass can be seen through.
- So next we change the Material2D, of the Curve2D which forms the house, to filled so it is no longer an
outline. The fill color is the default Material2D emissiveColor of light gray (0.8 0.8 0.8).
- Then we add a brick texture from a jpg image using an ImageTexture.
- Now we 'fill in' the door shape adding a small circle for a door knob. We add this door shape behind the
hole we left for the door by inserting the shape at BEGIN of the house group.
- We use a similar procedure for the windows as the door but with a bigger rectangular shape behind the
whole house which will show through all the windows. It would show through the door too but we put this
again at the beginning of the group so its now behind the door as well so the door shape still
shows.
- Draw the outline of a roof shape by interpolating an unfilled Curve2D shape.
- Now fill the roof; color will be black as thats the emissiveColor we have set.
- Texture the roof so it looks like shingles or roof tiles. Like the bricks texture we use an image with an
ImageTexture.
- Add a path from the front door which will grow towards the bottom of the scene; this is a filled Curve2D
shape whose points are interpolated.
- Now for the last few items we are just going to add some more complex shapes which have been created by
converting WMF (Windows Meta File) clipart into MPEG-4 XMT-A using XmtBatch. The XMT-A has been lightly
edited and copied here to create some DEFs for the items we will use. The first of these is for tulip
flowers. We add the tulip shapes in pairs making 5 pairs in total. Each tulip uses the DEF Tulip shape
and is scaled and positioned along the sides of the path. Some scaling is negative to flip them
horizontally to create a bit of variety; some are also scaled differently on the X versus Y axis to
change them too.
- Add a mail box.
- Add a girl jumping.
- And add a dog.
- Finally add some text for a title to the scene. The text font is set to "Brush Script" and "SANS" so if
the Brush Script font, as is shown in the screen capture below, is not installed on the machine where the
content is played, a SANS serif font will be used instead.
- Lastly we delete the group node in which we created the scene so we can start over.
Screenshot
Snapshot taken once the complete scene has been created.
Back to main index