ActionScript 3.0 :: PaperVision 3D .. CPU Performance?
Jan 4, 2011
I am trying to develop a game based on papervision and flash.the very basic idea of the game is that some 3D objects are falling from the sky and you have to catch them .. At a time there can be as many as 20 of such 3D objects on the stage.Now the problem is that these 3D objects are causing too much CPU usage .. I was hoping if there was another way to do the same thing and which causes less of performance issues ...
1.I have two classes suppose A and B
2.the class A calls class B
3.class B initiates a 3D sphere whenever it is called .. the Sphere has a bitmap image material .. and it rotates along the X axis on every enter frame event
4.class A has a timer function which moves the 3D object in the Y direction and also destroys it when the object reaches a specified Y position ..here are the code snippets ...
Class A :Code:
public function onTick(e:TimerEvent)
{
if(Math.random() < spawnrate)[code]......
View 2 Replies
Similar Posts:
Mar 24, 2011
I am trying to build a portfolio application similar to the used by Whitevoid. I am using Flex 4 and Papervision3D 2. I have everything working except for one issue. When I try to load an external SWF as a material on one of the planes, I can see any native Flex or Flash components in their correct positions, but the papervision objects are not being rendered properly. It looks like the viewport is not being set in the nested swf. I have posted my code for loading the swf below.
private function loadMovie(path:String=""):void
{
loader = new Loader();
request = new URLRequest(path);
[Code]....
Below I have posted two pictures. The first is a shot of the application running by itself. The second is the application as a MovieMaterial on a Plane. You can see how the button created as a spark object in the mxml stays in the correct position, but papervision sphere (which is rotating) is in the wrong location.
View 1 Replies
Sep 12, 2011
this is what i'm trying to accomplish; With a click on a movieclip (cannon_mc)a shot is being fired (ball_mc)
The longer mouse is down, the speed of wich the ball is fired with should increase.My question to you is;
What is the most efficient way to accomplish this? With a timer or something like this;
[Code]...
View 2 Replies
Jan 11, 2011
I'm devloping some library classes for flocking/steering behaviours on large numbers of objects (2000+). I'm finding that at < 500 instances, performance is reasonable. As the numbers increase, framerate bogs down.
I've seen remarkable performance with libraries such as Flint or Box2D with ridiculous #'s of particles / objects, so it should be possible to optimize / refactor my code to be a bit better.
I'm aware of the basic optimizations, such as bitwise operations and optimized for loops. Are there any more fundamental approaches I should be considering? For example, currently each instance is a vector-based MovieClip. Would working with BitmapData be more efficient?
View 1 Replies
Nov 4, 2011
Will I take a big hit in performance using nested ViewStacks? Should I strive to handle all navigation in one ViewStack and push children manually or will the affected performance be negligible?
eg.
<viewstack>
<tabnavigator />
<tabnavigator />
<tabnavigator />
</viewstack>
View 2 Replies
Mar 19, 2012
We have a medium size Flex 3.6 application that contains around 20 different page views (managed via a single lazy ViewStack) each having multiple components. Most use custom renderers.All model data is loaded at startup and changes to model instances are communicated via binding and/or collection change events.Once the user has viewed each page at least once, all page views are instantiated and happily listen to update events.Which in effect means that each time a model instance changes, all interested views receive that event and compute derived data or trigger item-renderers.I have tested and confirmed this behaviour in a proof-of-concept application. Even when setting a list to being invisible, it still listens to collection change events and invalidates any renderer affected.What would you do?
View 1 Replies
Oct 19, 2009
I asked this question in papervision 3d forums, but nobody replied. So. I am writing a 3D application with actionscript 3 and papervision 3D. But I have stuck on one problem, I can't figure out, how to place skidmarks (decals?) on an object. The only method I can think of is drawing directly to BitmapData (texture). What would you suggest to draw a textured skidmark on ground (plane primitive)?
View 1 Replies
Jul 2, 2009
I have done globe in papervision - basically sphere + material (image of political map) over it.Now, I need to make every country on my globe interactive, what means, I need somehow create event listeners for lots (at least 15) of small areas on my globe, and if I click those areas, something will happen (say, additional info windowwill come out)I googled a lot and found a lot of things describing some realted stuff (hotspots?), but since I am quite new in flash/actionscript/papervision, could I, please, get some introductory idea how my problem might be solved?
View 1 Replies
Jul 27, 2009
i was trying to put text in papervision but am having touble.
View 4 Replies
Aug 21, 2009
Is there any development tool that has the papervision3d classes buit-it, so i can get hints when i'm writing th code as i get hints for as3 code?
View 2 Replies
Feb 12, 2009
I am new to Papervision, and am experimenting on importing animated 3ds max models into my project.I can export a model (with no animations) into Collada format, and import it using Papervision, with no problems. But when I try to import a model with animations, i get this error:[code]I am using Flash CS 4 / Papervision3D Public Beta 2.0 - Great White / 3D Studio Max 2009 (with the New Collada Plugin).
View 7 Replies
Apr 11, 2011
trying a simple papervision tutorial and swf stops rendering by mat = new MovieMaterial(rec);
[Code]...
View 2 Replies
Oct 30, 2009
how to setup Planes with papervision, then retrieve them later?I've set up the 3d scene like this:
PHP Code:
var con:Sprite = new Sprite();
con.x = this.width * 0.5;
con.y = this.height * 0.3;
holder.addChild(con);
[code]....
but none of these methods seem to work,, possibly because you can't do the same things to Planes that you can to movieclips...(?)the scene.numChildren seems to work though.
View 1 Replies
Oct 31, 2009
Has anyone seen rendering glitches with Papervision?
seee the flash movie at [URL].. which demonstrates the problem.
View 2 Replies
Apr 25, 2010
I have an SWF loading in an SWF containing a papervision scene.I've done it before yet problem is, I get an error - I'm not sure what the issue really is.[code]
View 3 Replies
Sep 14, 2010
i created a 3d model using sketchup and exported it as a DAE file.
then i try to import the model into papervision, but the model never appear.
when i use the DAE file provided in the examples, it works. only when i tried to create my own models, it doesn't work. does this have anything to do with sketchup?
View 2 Replies
Oct 22, 2010
now i need to add a health bar and countdown timer on the screen. how am i going to do it? adding a plane in the 3d scene? the health bar is always on the top right corner of the screen. is there anyway of NOT using 3d concept to implement this. i mean i could do it with a plane keep changing it's texture to show the status of the character. is there any cleaner way of doing it?
View 1 Replies
Dec 18, 2010
So I wonder if papervision 3d development alive? Any google code or ght..?
View 1 Replies
Jan 23, 2011
how to create a carousel like his with papervision. I created one but the planes just go round and round. I was wondering if it's possible for the planes to keep the same angel as the example of the link. I do not want the plane to rotate itself on the y axis but just move on the X/Z axis just going around an object in the middle.
View 1 Replies
Jul 22, 2011
there's a simple thing in papervision I can't do , I want to have a simple button on my swf like we have in flash , just a 2d square which is on screen and you can click on it and have some action
View 1 Replies
Aug 29, 2010
why I get an Error #1009("cannot access a property or method of a null object reference at at rain3D/createScene() at rain3D()"] using this simple code:
ActionScript Code:
package{
import flash.events.Event;
import org.papervision3d.view.BasicView;
[Code]....
If I try to render a single sphere I haven't problems. But when I use the "for" cycle I get the error.
View 4 Replies
Sep 6, 2010
I've used Flash and AS2 for years: I want to move over to AS3 and play with Papervision. Everyone seems to use Eclipse rather than Flash. Does anyone know where there is a SIMPLE, and I stress SIMPLE(!) tutorial to set up Eclipse for AS3 and install and get started with Papervision because so far all I can find are the most confusing and frustrating tutorials ever. I'm on the verge of giving up on this because even the set up of Eclipse seems utterly impenetrable.
View 3 Replies
May 8, 2011
I have a text3D and I want to mask it with a Plane . I usually mask my things by defining two ViewportLayers , then give every object a Layer by
myLayer1 = viewport.getChildLayer(myobject1);
myLayer2 = viewport.getChildLayer(myobject2);
and then mask it by
myLayer1.mask = myLayer2;
and it works , but when I tried to this with text3D it doesn't work at all !
View 0 Replies
Jul 22, 2011
I am having trouble getting a spaceship to fly through space in 3 dimensions. I was wondering if anyone knows of like some good example source code for 3D plane flying movement?
Or if someone could point me in the right direction for the Trigonometry equations,
View 0 Replies
Oct 13, 2011
Can I make Spiral Plane with Papervision3d using TweenMax or other tweener engine the like attached picture? Which plugin should I use if possible?
View 1 Replies
Jan 4, 2008
Do you know how we can modify alpha parameters on Plane object with the new release of Papervision (2.0 alpha)? Previously, I was doing something like that : Code: Select allplane.containers.alpha = 0.5; But containers property disappeared from Plane object in version 2.0; I browsed every property of the new Plane object and couldn't figure it out.
View 9 Replies
May 2, 2010
I'm following the tutorial "PAPERVISION3D Basics Tutorial". I'm developing on mac and i've setup the global class path in the ActionScript 3.0 settings in the preferences panel like this:
[Code]...
View 7 Replies
Jul 22, 2011
I am working on a spaceship flying simulation in PV3D. It's a simple concept, when [SPACE] is pressed, the ship moves forward. The [mouse position] controls the direction the spaceship travels. Similar to this video http:[url].... (though i do not need it to do banks and rolls or anything fancy yet, the video is just to put an image in ur head).I am using these Trig equations to calculate the X, Y, Z velocities,
velocityX = Math.sin (shipdae.localRotationY * Math.PI / 180 ) * speed;
velocityY = Math.sin(shipdae.localRotationX * Math.PI / 180 ) * -speed;
velocityZ = Math.cos(shipdae.localRotationY * Math.PI / 180 ) * speed;
View 1 Replies
Jul 9, 2008
Anybody know how to create inputfield (that actually works) inside Papervision object or material? I've tried a few tweaks but haven't found a simple solution..
View 4 Replies
Feb 20, 2009
How do you access the contents of a Material that has been added in Papervision? Tried getMaterialByName, but it isn't working... Essentially what I need to do is access the MovieClip that I added as a MovieMaterial. I need to be able to turn on and off some layers on rollover. I have no problem accessing the plane on a rollover, but can't seem to access the materials that make up said plane.
View 2 Replies