menu dalam blender
DESCRIPTION
pengenalan blenderTRANSCRIPT
![Page 1: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/1.jpg)
English Wikibooks has installed Flagged Revisions, which shows a stable version to anonymous users where possible.
You can choose to see newer versions if there are any; login to see the newest version all the time. Give feedback at Help talk:Article validation
Blender 3D: Noob to Pro/Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/Creating Pop-Up MenusFrom Wikibooks, the open-content textbooks collection
< Blender 3D: Noob to Pro | Advanced Tutorials | Advanced Game Engine/Game Creating Techniques(GUI) There are no reviewed revisions of this page, so it may not have been checked for quality.Jump to: navigation, searchNext Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/Creating Moving MenusPrevious Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)
Contents
[hide] 1 Introduction 2 Making An Easy Title Menu
o 2.1 Making the Menu o 2.2 Setting Up The Actions
3 Author's Starting Menu Example
4 A Main Menu
[edit] Introduction
In this tutorial, we will be making a Title Screen and a Main Menu Screen to come from that Title Screen. While most people hardly pay attention to these areas on a real video game, they do make the game seem much better to play, and gives the player a certain choice of what they can do before they play the game. Before beginning this, make sure you familiarize yourself with several logic sensors and actuators, such as "Scene" and "Property", as they will heavily be relied upon. It is also best if you have several Pictures ready to use for your game or are ready for additional functions with certain programs (a
![Page 2: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/2.jpg)
Word Processor Program and Image Editing Program [that has a transparency setting] can help move along your game.)
(Reader's note: I found GIMP (gimp.org) to be the best free image editing software. It has a transparency setting.)
[edit] Making An Easy Title Menu
The Title Screen will be very simple -- it will be the "press Enter to continue" kind. This will give way to a more interactive kind of Main Menu, which you can either use the arrow keys, "HotKeys", or the mouse pointer. This tutorial will not be the most visually pleasing, but then again, you can always add whatever graphics you would like to. Again, it would be wise to also have handy a Word-Processing Program, a Paint Program, and hopefully your keyboard has a "Print Screen" button somewhere (usually next the the F12)
If you have never used different scenes before, your about to get a crash course. Also, Blender hotkeys and actions will not be explained with (A-key) or (numpad-6), it is assumed you have already learned at least how to perform basic Blender services.
[edit] Making the Menu
First, start up Blender and delete everything in the scene. Then, move to top orthographic view.
The first thing you should do is add a new scene. In the Information view panel at the top, click the SCE: drop-down menu and click on ADD NEW. Label this new scene something like "Main Menu". Now go back to your original scene and name it something like "Title Menu". These names will be important when it comes to changing the scenes around. So, on your "Title Menu" Scene, begin by adding a Camera. Move this Camera in the Z direction about a point, just to get it above the grid. Now, set the camera view to Orthographic. Now switch to Camera View. Add a plane that is scaled to cover the entire
![Page 3: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/3.jpg)
surface of the Camera's view-bounds. Move that plane just a little bit in the -Z direction. Then, add another plane, but scale this plane to be a thin rectangle about 2/3rds down the Y-length of the Camera, centered in X-direction.
(Image Shown with Materials for visual purposes, DON'T ADD MATERIALS)
Now this next step isn't necessary, but if you want a good-looking game you will probably need this step.
Let's add some UV textures. Open a Word Processing program and type in something that would be appropriate for your game, like "Press Any Key to Continue". Now, highlight the text and copy it, or you can hit "Print Screen" button, then open a good photo-editing program like Photoshop, GIMP, or Microsoft Photo Editor; something that preferably supports Transparency. Either way, open some image-editing program and paste the text. What I do is add lots of extra space and add additional text that I will use in the main menu too, such as "New Game", "Continue", "Story Mode", ect. so it is all in one Image for multiple UV textures. If your editor supports it, set the background color to transparent. If not, set it to black so it will register as 0 on the alpha channel in Blender. Save the image (as a ".gif" if you want to save transparency). Now, in Blender, split the 3D screen into 2 screens, and change one screen over to UV face select. Select your small rectangle, and switch to Edit Mode and Unwrap the face in the 3D window, then open your saved image in the UV face window. Scale your face in the UV window so it holds only the "Press Any Key to Continue" graphic. If you wish, also add a starting Image on the larger rectangle.
[edit] Setting Up The Actions
Now this step is necessary. Select the large background rectangle, in the the Buttons Window at the bottom switch it to the Logic Tab. This will be very simple. Add one Sensor, one Actuator, and one Controller. Make the sensor a Keyboard Sensor, depress the "True Pulse" button, and in the key area depress the "All Keys" button. Make the Controller an "AND" controller. Make the Actuator a Scene Actuator. Select the Drop-Down box and make it "Set Scene" wit "SCE:Main Menu". Before you test the game,
![Page 4: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/4.jpg)
make sure to save and add a Camera to the "Main Menu" Scene. Otherwise the game WILL crash.
If you want the option of returning to this scene, instead of one Actuator make two. Make both of them Scene, but make one "Suspend Scene" with "SCE:Title Menu" and make the other Actuator "Add Overlay Scene" with "SCE:Main Menu". Also, that means in the Main Menu Scene later you'll have to add some key to hit or some action to "Remove Scene" "SCE:Main Menu" and "Resume Scene" "SCE:Title Menu".
[edit] Author's Starting Menu Example
The following contains actual in-progress work by the original Author of this page. The work and ideas are heavily copyrighted and it is highly encouraged (begged) that you do not rip this content off--the author has submitted this work generously to help less advanced users more efficiently.
The following is my work on a game I am making, and I hope it helps you too.
![Page 6: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/6.jpg)
This will get you to the next menu, which will be on the next section.
[edit] A Main Menu
This menu will be more difficult,using a mouse-python function to use and make the mouse appear when you play your game and a maze of sensors and actuators entangled.
Here is the first thing you need: a python script to make the Mouse show ---
*This code is attributed to the author of the chapter "Blender Game Engine/A Simple Mouse Pointer" and this is not my own code.
import rasterizer as r
r.showMouse(1)
Put this in the text editor, and save the text as something simple like "Mouse". Now, on your Main Menu scene, select the camera and add 1 sensor, 2 controllers, 1 actuator, and 1 property. Name the property "Switch" "Int" Type, and set it to 0. Set up your logic as follows:
A change will need to be made in order to make yours work. The python controller should be Script:Mouse, not Script:showpointer. If you can't see the connections:
Connect the Sensor to the 2 controllers Connect the AND controller to the actuator Leave the Python controller open-ended
If you play the game, you will see the mouse then! Now, back to the Menu, there are multiple kinds of Menus you can make when it comes to Menus popping up. The one I believe works best is a 3-layered button. To explain what this means, I'll run you through the steps of making one. Let's start with the layers themselves. (For this to work best, make the background of any images you use have transparency, so you can make invisible-yet-clickable faces.) Create a rectangle facing the camera where you want your first menu option to be. Copy the object until you have 3 rectangles, and make each one very slightly in front of the last. Now, Select the back rectangle, and on this one apply the UV face of the option's words. The second rectangle is the UV face for a graphic outline
![Page 7: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/7.jpg)
around the words if the option is selected in the game. It's not necessary but then again, it helps the player with selecting options and it looks nice. The top rectangle will be the selectable one--make the UV face applied only over a completely transparent area. Now, for the logic.
Text-Rectangle:-No Logic Needed
Outline-Rectangle:-Give it a Property named "Selected", Int Type, starting at 0.-Make a Property Sensor, True Pulse, "Selected" Property is Equal to 1, Connected to an AND controller, Connected to a Visibility Actuator at "Visible"-Make a Property Sensor, True Pulse, "Selected" Property is Equal to 0, Connected to an AND controller, Connected to a Visibility Actuator at "Invisible"-Make a Property Actuator, "Selected" Property is Assigned Amount 1 -Make a Property Actuator, "Selected" Property is Assigned Amount 0 -Create AND Controller and connect both Mouse Sensors. Make this AND Controller connect to the Outline-Rectangle's Property Actuator "Selected" Assign=1.
Transparent-Rectangle:-2 Mouse sensors: "Mouse Over" and "Left Button". Set them to "True Pulse".
(Click Image to Enlarge)
Now here is the trickier part to explain. To make things a little more simple, name that last Outline-Rectangle's AND controller connected to the 2 mouse sensors. Select all 3 layers, and duplicate them 3 times. Make each one (in camera view) below the last, making sure to keep them parallel on the Z axis. Now, to make only one selected at a time, take the named controller of the first, and connect it to the Outline-Rectangle's Property Actuator "Selected" Assign=0 of second and third button. Do the same from the second button to the first and third one, and same with the third to the first and second. It should look like the picture:
![Page 8: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/8.jpg)
Click Image to Enlarge
This logic arraignment should yield (when the game is played) options in which if you click one it will light up, and if you click another, that one will go down and the other will light up.
Now this looks nice asthetically, but the use of it is now all you have to do is make some Scene Actuators. Add 2 more actuators to each of the Transparent Planes. Use the same method as you did with the Properties, but instead of "Property Assign 1/0" make 1 AND controller, 1 Scene Overlay and 1 Scene Remove for each transparent button. Now make 3 additional Scenes, and either make an entirely new menu for each, or to be easier just make colored rectangles on the scene, different colors for each scene -- either way, make sure that, if the scenes overlay, the additional scene won't cover up the buttons of the Main Menu Scene. So, now connect the 2 Mouse Sensors to the corresponding AND Controller, and connect that to the Corresponding "Overlay Scene" Actuator and 2 Opposing "Remove Scene" Actuators. Do this with the other 2 Transparent Rectangles. Make sure your new scenes also have cameras and that they are scaled properly.
Click Image to Enlarge
You can use this technique to make Menus and Sub-Menus Galore! It's fairly simple to make multiple sublevels of this and get back to the original scene with this method.
![Page 9: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/9.jpg)
I hope this helped you make your menus work well.
Next Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/Creating Moving MenusPrevious Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)
Main Author: Jeremy Buller
Retrieved from "http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Advanced_Game_Engine/Game_Creating_Techniques(GUI)/Creating_Pop-Up_Menus"Subject: Blender
Views
Module Discussion Edit this page History
Personal tools
Log in / create account
Navigation
Main Page Help Cookbook Wikijunior Browse Featured Books Recent changes Donations Random book
Search
Community
![Page 10: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/10.jpg)
Bulletin Board Community portal Reading room Help cleanup Policy discussions and votes Contact us
Create a book
Add wiki page Collections help
Toolbox
Search this book What links here Related changes Special pages Printable version Permanent link PDF version
This page was last modified on 19 October 2008, at 02:07. All text is available under the terms of the GNU Free Documentation License (see
Copyrights for details).Wikibooks® is a registered trademark of the Wikimedia Foundation, Inc.
Privacy policy About Wikibooks Disclaimers
English Wikibooks has installed Flagged Revisions, which shows a stable version to anonymous users where possible.
You can choose to see newer versions if there are any; login to see the newest version all the time. Give feedback at Help talk:Article validation
![Page 11: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/11.jpg)
Blender 3D: Noob to Pro/Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/Creating Moving MenusFrom Wikibooks, the open-content textbooks collection
< Blender 3D: Noob to Pro | Advanced Tutorials | Advanced Game Engine/Game Creating Techniques(GUI) There are no reviewed revisions of this page, so it may not have been checked for quality.Jump to: navigation, searchNext Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/The "5-Layer" ButtonPrevious Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/Creating Pop-Up Menus
[edit] Introduction
In this section, you are going to learn a variety of ways to make menus with motions. These menus can be used in more ways than the simple pop-Up menus, such as in-game if you need to select something you can use this to bring up a menu smoothly. In this section there is heavy use of Properties, "Property" Logic Blocks, and especially IPO usage. When you do it once, it will be very much easier to do it again.
[edit] Making Moving Selectors
To kick this tutorial off, let's just do a simple icon that will be next to the selected menu item. There will be 6 possible menu items, which can be controlled with both the arrow keys and the mouse. Let's begin by booting up Blender, and deleting everything--then adding a camera.
![Page 12: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/12.jpg)
Set this camera to orthographic. Now I like making things look nice, but here are the basics of what you will need for this tutorial:-Make 6 Planes, all different objects, and put them in a vertical list.-Make a circle next to the first plane. This will act as the Selector.
So after you've made you objects, it should look similar to this:
For me, I made mine look more like this, a little more detailed:
![Page 13: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/13.jpg)
So now that we have our menu set up, it's time to set up the properties that will tell the selector how to move. Select the selector that will be moving and give it a property name "Selection". Make it "Int" type, and start it out at "1". To get this selector to move the way we want it, we have to set up it's movements. Make sure you are on frame 1, and put the cursor on the first menu item, then Insert Keyframe for "Loc". Next, move to frame 2, and put the cursor on the second menu item, then insert "Loc" Keyframe, and continue in this fashion for all your menu items. To get this applied in the Game Engine, in the logic bricks, add an "Always" Sensor (True Pulse Enabled), connected to an "AND" connector, and connected to a "IPO" Actuator, set to "Property" with Prop:Selection. Now we can do 3 things with this selector to have it move like a selector in a video game:
Up/Down Arrow KeysTo make the up and down arrow keys work properly, Select the Selector and add four sensors, controllers, and actuators. Make two sensors keyboard, with one set to "Uparrow" and one set to "Downarrow" (do not activate pulse triggering). Make the other two sensors Property Sensors, with True Pulse. For the first, make it "Equal", Prop:Selection, Value:0. For the other, make it "Equal", Prop:Selection, Value:7. For the Actuators, make all four "Property" sensors. For two of them, make them "Add", Prop:Selection, and make the first "Value:-1" and the second "Value:1". The other two should be "Assign", Prop:Selection, with the first at "Value:1" and the next as "Value:6". Now connect them as follows:Click To Enlarge Image
"Keyboard:Uparrow"--"AND"--"Prop:Selection/Add/Value:-1""Keyboard:Downarrow"--"AND"--"Prop:Selection/Add/Value:1""Prop:Selection/Equal/7"--"AND"--"Prop:Selection/Assign/Value:1""Prop:Selection/Equal/0"--"AND"--"Prop:Selection/Assign/Value:6"
Now you can play your game, and the arrow keys should work just fine!
![Page 14: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/14.jpg)
HotKeysIf you don't know what a HotKey, it's a way to access menu items or action by pressing a specified letter, instead of just clicking or arrow keys. This method will require a different step when you make your UV text textures, as you will need to somehow change one letter (either the color or possibly underline) to let people know that that is a HotKey action.
The HotKey system is easy to set up right alongside the IPO/Selection property. In each menu item, highlight or make special one unique letter in each menu item. Then, with the selector selected, set up 6 keyboard logic sensors, each one for a different letter. Add 6 controllers, and 6 actuators as well. Make all the actuators "Property", "Assign, Prop:Selection, starting with Value:1 progressing to Value:6"
Mouse SelectionOur final selection method we can add is the mouse scroll over. Set up the Mouse Sensor to Scroll Over for all 6 invisible selection planes. Then, make the AND Controllers and connect to your original set of "Set Property" Actuators. that matches the Object's IPO property number. It's fairly simple.
Make the SelectionThe final thing to do is, once the selections are set up, make another 8 sensors, 7 controllers, 6 and actuators. Now make the 7th one a keyboard sensor for the ENTER key, as most people usually think they can start a game by pressing ENTER. The 8th Sensor is for another Mouse Sensor for "Left Click" so that if any of them is highlighted and you Left-Click the mouse, then it will be equivilent to pressing the ENTER key. That may be confusing as, unless you set up the dozen extra sensors, controllers, and actuators, you don't need to scroll over the selection to pick it, so that 8th sensor is your choice whether you want to add it. Connect the 7th and 8th sensor to the 7th controller. If you have the 8th sensor, make it an OR controller; otherwise, make the controller AND. As for the first 6 sensors, they should be Property Sensors for "Prop:Selection" "Value:[1-6]". Connect each to their own seperate controller. Now connect the 7th controller to all 6 Actuators, and the first 6 controllers connect to their own Actuator alongside the 7th. The Actuators can be whatever you want them to: whatever the selection causes to happen when you select the item selection.
[edit] Make the Menu Move
So we created a selection-based moving icon on a menu, but what might happen if you select that item and need a sub-menu in-game? You can't very well pause the game everytime (unless it's a pause menu). This is where making the menu itself move comes in very handy. In this section, you will make an object clickable, and once clicked it will give out a submenu, which in itself will be able to give out a submenu.
The IPOS
![Page 15: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/15.jpg)
Next Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/The "5-Layer" ButtonPrevious Page: Advanced Tutorials/Advanced Game Engine/Game Creating Techniques(GUI)/Creating Pop-Up Menus
Main Author: Jeremy Buller
Retrieved from "http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Advanced_Game_Engine/Game_Creating_Techniques(GUI)/Creating_Moving_Menus"Subject: Blender
Views
Module Discussion Edit this page History
Personal tools
Log in / create account
Navigation
Main Page Help Cookbook Wikijunior Browse Featured Books Recent changes Donations Random book
Search
Community
Bulletin Board
![Page 16: Menu dalam blender](https://reader034.vdocument.in/reader034/viewer/2022042702/55cf9c55550346d033a97597/html5/thumbnails/16.jpg)
Community portal Reading room Help cleanup Policy discussions and votes Contact us
Create a book
Add wiki page Collections help
Toolbox
Search this book What links here Related changes Special pages Printable version Permanent link PDF version
This page was last modified on 29 August 2008, at 06:27. All text is available under the terms of the GNU Free Documentation License (see
Copyrights for details).Wikibooks® is a registered trademark of the Wikimedia Foundation, Inc.
Privacy policy About Wikibooks Disclaimers