Intro
In the following two videos I show you how to use Booleans to build a small machine part and add textures to achieve a degree of realism.
Videos
Intro
In the following two videos I show you how to use Booleans to build a small machine part and add textures to achieve a degree of realism.
Videos
Into
I’ve been working on a number of Collada Jiglib projects so I thought I’d put a few videos (and some code) out there so people can use the Collada format in PV3D or Away3d. In the tutorials:
Video1: I start with Cinema4D create a die export it as a Collada file.
Video2: I show you how to bring it into Away3d and show how to hook it up and control it in Jiglib.
Video3: I show you how to bring the Collada file into PV3D, controlling it in PV3D is very similar to that of Away3d and I’ll be doing a ton of other videos on building PV3D games in the further. Enjoy!
Demo
The demo is similar to the one created by Yagiz Gurgul on Active Tuts but I’ve upgraded it to Flash 10 and I am using a Collada file for the Dice as opposed to the standard square primitives that Yagiz used. In addition, I’ve moved it over to Flash Builder design view which gives me a ton of components and faster design, but does slow the 3D a little.
Videos
Collada and Jiglib – Building Cinema4D Dice
Collada and Jiglib – Controlling in Away3d
Collada and Jiglib – Loading into PV3D
Stub Code for Controlling in Away3d (Complete Code Below)
Here is the stub code for bringing in the Collada file and controlling it in Away3d.
private function createmyDice():void {
//model1 = Collada.parse(Charmesh, {scaling:10, material:material, mouseEnabled:false});
collada = new Collada();
collada.scaling = 1.4;
//var carSkin:ObjectContainer3D = ObjectContainer3D(event.loader.handle);
model1 = collada.parseGeometry(MyDie) as ObjectContainer3D;
model1.materialLibrary.getMaterial(“ID3″).material = material4;
model1.materialLibrary.getMaterial(“ID8″).material = material2;
model1.materialLibrary.getMaterial(“ID13″).material = material3;
model1.materialLibrary.getMaterial(“ID18″).material = material1;
model1.materialLibrary.getMaterial(“ID23″).material = material5;
model1.materialLibrary.getMaterial(“ID28″).material = material6;
dieBody= new JBox(new Away3dMesh(model1), 28, 28, 28);
physics.addBody(dieBody);
//model1.mouseEnabled = true;
scene.addChild(model1);
myDices.push(dieBody);
}
Stub Code for Importing into PV3D
Here is the stub code for bring the Collada file into PV3D. Controlling it is very similar to Away3d and you will be covering this in more detail in upcoming videos.
public function initCube() : void
{
// autoplay, name, loop animation
myCubeIs = new DAE(false,null,true);
myCubeIs.addEventListener( FileLoadEvent.LOAD_COMPLETE ,onmyLoad );
myCubeIs.load( ‘die.dae’ );
myCubeIs.addFileSearchPath(“assets/tex”);
myCubeIs.scale = 10;
myCubeIs.z = 300;
myCubeIs.x = -100;
myCubeIs.y = 300;
myCubeIs.rotationY = -90;
}
Full Source
To see the complete source for the Away3d version click the link below:
Intro
We are moving along with assignment 2 of chapter 2 of Professional Papervisoin3D. And in the first video below you learned how to build the standard Papervision3D class presented in Chapter 2. And in the next three videos you learned how to use BasicView to build an interactive cube with dynamic textures. Dynamic means that you can change the textures while the program is running just by clicking on them.
PV3D Class
The Papervision3D Class PV3D Book
BasicView Interactive Cube Part 1
Building an Interactive Cube Part 1
BasicView Interactive Cube Part 2
To see the code for the interactive cube Part 1 click the link below:
Intro Optimizing 3D Web Games
In this video tutorial set your learn the tricks to optimizing 3D Games for the web.
Videos 1 and 2
Tips for Optimizing 3D Web Games Part 1
Tips for Optimizing 3D Web Games Part 2
Optimization Notes
Tips for Building 3D Games for the Web
3Games – qball (chapter 12), footBall, bowling buddies
elegantly simple and highly addictive
Video 2: Image Tricks
Optimize your images (the designer developer war)
— Photoshop export for the web!
Avoid Transparency
Mip map your images (2, 4, 8, 16, …1024
Reduce Viewport size (1/3rd + 2/3rd rule)
Count Vertices!!!
Combine low polygon with good sound!!!
This gives a real feel effect.
Transparency-transparency is real CPU killer in PV3D. So in the pool game, get rid of your transparent bounding box material and add a line3D outline instead. It’s not as cool but it’s faster. You’ll have to do a little reprogramming of the PV3D plugin and create a line3D bounding box class to accomplish this.
Movie Clip Animation-Movie clips are expensive items on your CPU-they carry a lot of overhead. You can use a frame ripper instead, which cycles individual bitmaps, or just use a single graphic.
Mipmap all your Graphics and Filters-you’ve already done this for the pool game, but keep this in mind as you create other games in the future.
Use Solid Colors When Possible-whenever possible exchange your texture colors with a solid color. In the case of the pool game, you can dump all your ball textures for solid colors. However, this may save some resources, but it’s guaranteed to make your game look ugly. Use this option sparingly.
Reduce Vertices Number-reducing vertices can make a big difference. For example, if your balls are 8×8 and you reduce them to 8×6 you’ve saved 16 vertices per ball or a total of 160 vertices for 10 balls. It adds up, so whenever possible bring your vertex count down.
Drop the Bullet Imprint-adding more bitmap material slows your processor; dropping the bullet imprint will save some CPU resources.
Drop the Spring Camera-the spring camera requires a few extra iterations and substituting in a Camera3D in this case will make little difference on how your game looks and performs.
Remove tracer filters, line blur, and panel drop shadows-removing drop shadow from your panel will not change much, but removing the line trace blur filter will since you’re generating it every time you shoot.
Remove the tracer line or replace it with a recycling particle or bitmap. The problem with line material in PV3D is that it accumulates in memory and even if you remove it properly, it still waits around for garbage collection. If you really need a tracer, use a recycling particle that doesn’t need to be removed from memory; another option is to use a bitmap.
Drop the Skybox and add a simple background image. Skyboxes are beautiful but can add a serous lug to your game-especially if they are being moved often.
Turn off scroll policies-in Flex, make sure that all scroll policies are turned off. Scroll bars require resources and turning them off saves on CPU resources.
Keep stage quality low (stage.quality=”low”)-setting stage quality to a higher level will cause anti-aliasing to kick in, requiring a x2, or x4 iteration of every frame which is a significant processor hit. In most cases, keeping stage quality low doesn’t make a difference in appearance.
Assignment 2
Here’s the class assignment for chapter 2 of Professional Papervision3D. You’ve got some reading to do, and few videos to watch.
Assignment Video
Assignment # 2: Chapter 2 Professional Papervision3D
Watch the following videos
Chapter 2: 3D Language (PV3D Book)
(http://www.youtube.com/watch?v=wTFAmNX–u0)
Chapter 2: Getting the Classes (PV3D Book)
(http://www.youtube.com/watch?v=wituFlcqGfE)
Series on CS4 and PV3D
http://professionalpapervision.wordpress.com/2009/08/15/flash-cs4-course-for-papervision3d/
Read the following sections in chapter 2.
Display Object3D
Using Flash or Flex
Special note below !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
Big change no longer using pv3Canvas.rawChildren.addChild(viewport) in Flex But using in Flash Builder using mySprite.addChild(viewport); <s:SpriteVisualElement id=”mySprite” /> |
Building Classes
Watch Getting Started with Classes 1 & 2
http://professionalpapervision.wordpress.com/2009/08/15/flash-cs4-course-for-papervision3d/
Intro Jiglib Soccer Field
In these two videos I demonstrate how to hack Jiglib to create a soccer field in PV3d. This goes along with Chapter 2, and now that you are a hacker. It’s time to charge on with the rest of the chapter.
Videos
Flash Jiglib Soccer Field Part 1
Flash Jiglib Soccer Field Part 2
Notes (Summary)
Click the link below to see all notes and code for this video.
Intro: Hacking Papervision3D
In this seven part video series you learn to hack PV3D using the powerful error checking in Flash Builder. You’ll learn to remove the Number3D and Number2D classes form PV3D and use the native classes in the Flash Player.
Hacking Videos Removing Number3D
Chapter 2: Hacking Papervision3D Part 1
Chapter 2: Hacking Papervision3D Part 2
Chapter 2: Hacking Papervision3D Part 3
Chapter 2: Hacking Papervision3D Part 4
Chapter 2: Hacking Papervision3D Part 5
Chapter 2: Hacking Papervision3D Part 6
Hacking Videos Remove Number3D
Chapter 2: Hacking Papervision3D Part 7
In the class notes, you’ll find many of the Number3D math methods that are explained in the video. Understanding how these functions work will be essential for the rest of the book.
Click the link below to read the class notes:
Intro
In this post, you learn how to work with the Unreal Engine and how many of its design concepts can be used to enhance the present version of Papervison3D. As part of chapter 2 assignment, you create a laundry list of desired features for PV3D using Unreal as a model.
Videos
PV3D Wish List
The derived PV3D wish list is given below:
Part 1
Concepts…Gizmo’s, Pixel Bender Dynamic Lighting,
Content Browser with drag and drop properties
Part 2 and 3
Terrain and Object modeler in side of PV3D
(a vertex is a vertex)
Terrain Gizmo
Blend mode painting
Part 4
“Efficient” Skydomes/Skyboxes
with texture translation and partial dome
and drag and drop image properties
Part 5
Transporters are super fun and easy
but you need a graphical programming
interface to go along with all the fun.
You will address bringing Unreal Engine resources in PV3D in a later chapter. Click the link below to see the Unreal Assignment class notes.
Intro
In fulfillment of your first assignment, you learn how to put Away3d into Flash Builder (as a Flex Project) and then enhance its interactivity using design view. The five part video series, source, and lecture notes are listed below:
Videos
Away3d into Flash Builder Part 1
Away3d into Flash Builder Part 2
Away3d into Flash Builder Part 3
Away3d into Flash Builder Part 4
Modifying Away3d Mesh Interactivity
Source
http://lv3d.googlecode.com/files/Away3DInter.zip
Click Link Below to See Class Notes:
Intro
Now that the book, Flash Builder Premium, and Flash CS5 is about out…let’s start our lessons.
Assignment Chapter 2 #1: get the following down loads
http://tortoisesvn.tigris.org/ (tortoise for windows)
http://papervision3d.googlecode.com/svn/trunk/ (use fp10 version)
Will be updating a moving on with an enhanced (data-driven) version!!!
Will use Flash Builder’s (once called Flex) Data Wizard.
http://away3d.com/downloads (download Away3dLite)
www.adobe.com (Flash Builder Premium and CS5 Flash)
http://www.udk.com/udkdownload
(get Unreal Engine 3 and Physics Accelerator Package)
kshunter.wordpress.com (take a look…data visualization)