Actionscript 3 :: Position Plane In Sphere Papervision3d?
Dec 30, 2011How position plane in sphere papervision3d as3 ?
I have a problem , how position a plane in surface of sphere.
How position plane in sphere papervision3d as3 ?
I have a problem , how position a plane in surface of sphere.
I am a newbie to Papervision. I want to design a sphere with 8 holes around one of its diameters. How do I do it? How do I draw anything on a sphere in Papervision?
View 1 RepliesI have a wall of Planes at different angles and positions. I'd like to get the camera to rotate and look straight at the focused plane. I have created a dummy Plane (lookAtMe) that tweens to the Plane I click on as follows:
private function planeClicked(e:InteractiveScene3DEvent):void
{
lookAtTarget.copyTransform(this);
[Code]....
The camera centers on the looAtMe Plane but doesn't rotate so that the selected Plane is straight on.
Code:
package {
import flash.display.Sprite;
import org.papervision3d.cameras.Camera3D;
[Code].....
I've imported the correct folder in my Edit->Prefences->ActionScript 3.0 settings. I've instantiated an object and it compiles, and I'm not getting any errors but, nothing shows up on the screen.
I'm doing 3d gallery in AS3 and i have run in to huge problem. After ActionScript creates 3d sphere it doesnt go away no mater if i go forward or backwards in timeline.
View 0 RepliesI am making a splash screen for a program and I have a picture in my head of a spinning sphere with pictures on it.I've already made my sphere and mapped my design onto the sphere in illustrator, although it is not as clear as I wanted.How do i get the sphere into flash and animate it to spin continuously?
View 1 RepliesHow would you do it? Or, else, how would you create a world? I.e. what I need is to place the sphere in the way the distance form the camera to it's center is less then the sphere's radius.
View 2 Repliesi'm trying to achieve the effect of a rotating sphere given a regular 2D texture. the best thing i've seen is a tutorial on emanueleferonato.com which gives this result: emanueleferonato dot com /downloads/mapping09.swf as you can see, it works pretty well when you're moving left/right OR up/down. it fails to simulate realistic rolling when going in any diagonals (since it's a very simplistic illusion). how to render such a sphere given any point on a mercator projection and then have the sphere rotate in an arbitrary (but fixed) direction? this is a bit advanced math stuff.
btw, if anyone's interested, i figured a better displacement map than what is used in the link i showed
i started my search again and immediately bumped into this: [URL] it's library called BitmapSphere and it does exactly what i need it to! also, could admin edit this and put together the link or something? i find it highly annoying that i need 50 posts before being able to post a link
The basic concept: I want to at runtime overlay (or paste or whatever) one bitmap image asset onto another. The original image asset is a texture on a 3d sphere.Example:3D Sphere with earth texture applied to it. Put a cloud on the earth texture and have cloud move along the earth.
Caveats:Can't use any composite materials because I take a serious perf hit. Want to try working only with bitmaps to see if it is faster.I've gotten this far but don't know how to fill rectangle with jpeg file and certainly have no idea where to go from here..earthBitmap= new BitmapData( 256, 256, true); fillRect will only do a color ... I need what fills a rect with jpeg image and how to edit a bitmap on the fly.
I am trying to rotate a sphere with the mouse on the x and y axis but the sphere keeps 'roll'ing and flipping it all around.
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
[code]....
if anyone has any info on animating a point around a "sphere" with actionscript. If anyone has an actionscript equation defining this motion
View 4 Repliesi am developing an application where client can add his photos to appear on a sphere or ball or coffee cup and able to save them and give it for printing using flex. like itasveer.com site. i tried to use away3D but if the image is small it is stretched and added to sphere. i dont want it to strech instead the original image shud appear on the sphere. if it is added to cup it shud cover only the circular part it shud not add this to top and bottom.
View 1 RepliesThe effect I would like to achieve is when the plane around the sphere is clicked, the sphere rotates so that the plane is in the middle of the stage. but there always some problems when i clicked the plane the sphere seems like never rotate to it's back.[code]
View 3 RepliesI want to attach spheres to rotating sphere but I've encountered some rotation problems:
In application u can rotate mainSphere in both x and y axiss'.
If I rotate main sphere in only x axiss or only y axiss, it works correctly. But if I rotate main sphere around both x and y axiss, sphere is attacing the wrong place.
Here is the code:
ActionScript Code:
// these are the spheres containers. Sphere container class extends form object3d
var mainSphere:SphereContainer3D;
var attachingSphere:SphereContainer3D;
[Code].....
I want to create an animating sphere representing the earth but here is the catch I want the users to be able to spin it round in real time, what tools will do the trick?
View 3 Repliesfor the past two weeks I've been working on coming up with a collision detection system for my game in flash CS4. No matter what I try for some reason I just can't seem to do it, and I don't know how to fix it. This has never been an issue for me, I would even settle for basic rectangle to rectangle collision if I could, but no matter what I do I end up screwing it at all up. Somehow the collision detection either doesn't work at all, works for one side and jumps the guy through the wall on any other side or I think at one point it worked for two sides as long as I didn't hold down more than one movement key.
I've constantly scrapped what I've done over and over, right now I have no source code to present. I'm totally lost and confused, and my deadline for getting this done is today in a few hours. I really wanted to figure this out on my own but honestly I just don't see what I can do, I've got sphere to sphere collision detection working perfectly for my player and other spheres, but the walls are squares lined up to form long rectangles, and I just can't seem to get it to work. I'm dynamically loading the square-wall blocks as tiles to form a dynamically loaded map, and then I'm iterating through each individual block to determine if collision has occurred with the player. I think somehow I'm not managing the results right, or maybe I somehow need to be able to determine which direction the player hit the wall from, but I just don't know how to do it.
I've been staring at the screen for the past 3 hours trying to work something out but nothing is coming to me, example from a flash-type game or something similar I would be very grateful! (I've done this countless times in C++, C#, and java. I don't get what is going on in flash :-(((( )
I want to create a 3D cylinder, sphere, cone using Actionscript for Flash Player 10. Is there any available class? I also want to know how to paint gradient, wrap text and texture around them. It would be nice if these class have these functions. I can't use non DisplayObject in this project so PV3D is not an option
View 2 RepliesI am creating a 3D sphere gallery with ActionScript 3 and the Flash 10 3D (2.5D) APIs. I have found a method that works but is not ideal. I would like to see if there is a better method.
[Code]...
To see this in action, click here. alternate link. Notice that with the default settings, the number of items actually in the sphere are less by 13. I believe is the error introduced by my approximation in the first step.
I am not able to figure out a method for determining what the exact radius of such a sphere should be. I'm hoping to learn either a better method, the correct method, or that what I am trying to do is hard or very hard (in which case I will be happy with what I have).
I am currently building a sphere of images that I'm trying to load from a remote location using XML. I managed to find the source for the sphere and was able to figure out how load the XML into an array of image details.
My problem is that the sphere is made up of images that were loaded into the library and I'm trying to load them in dynamically, i got all the information from XML but i don't understand how to make these dynamic images the same as the ones in the library so i can instantiate the image object.
thumbsArray[0]=[new Bitmap(new Small1(thumbWidth,thumbHeight))];
Small1 = the name of one of the image in the library that makes up the sphere. if i go to the properties of this Small1 image i noticed that its class is called Small1 too. I don't understand this as iv never seen this in actionscript 2.0.
The code below is my attempt at making a image loader object to a bitmap object, that doesnt seem to work my bitmap object becomes null, and throws an error.
SYNTAX / CODE:
function getLoader(url) {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, completeHandler);
[Code]......
I'm creating a ball bouncing in 3d. My problem is that I have a square boundaries. top,bottom, front, back. I tried get the the distance ( of the sphere/radius) but went I * vx , vy , vz by 1 or -1. One of the position is - while the other two might by positive. I need pool ball physics with the boundary be a 3d sphere.
View 9 RepliesI need to know what side of a rotated box my sphere/point is colliding with and at what angle.
I could perform the 4 lines check but I think it will be too cpu consuming. I need it for fast simple physics simulations(bounces)..
I have been programming flash for a while, but I suppose I never really learned flash "correctly", and I have my shortcuts and I cut corners sometimes. I'm now trying to render a sphere.
Code:
circleraduis = 500;
camerax = 275;
cameray = 200;
for (degrees = 0; degrees < 180; degrees += 30) {
xradius = Math.cos (degrees) * (Math.PI / 180) * circleraduis;
yvalue = Math.sin (degrees) * (Math.PI / 180) * circleraduis;
[Code] .....
Im trying to figure out how to travel along a plane to a point in 3d space. It needs to feel as though travelling down a road. I have attached a swf with the desired effect. Im using the formula scale = fl/(fl + z);the problem im having is it looks fine until scale is > 1. I need the plane to stay central to the screen.
View 0 Replieshow to rotate a 2d plane in 3d? for example... i want to load a jpeg in to a movieclip, and then, using actionscript, flip the photo around so essenitally you're looking at the back of it.i've seen the Scripting 3D in Flash kirupa resource, but it's a bit advanced for what i need. i only want to flip a 2d plane 180 degrees.
View 2 Replieshow i can add text on a plane and put the plane in a 3d scene?
I have the following
Code:
[Embed(source="../lib/QuickScan.png")] private var QuickScan:Class;
private function createScene():void {
quickscan = new QuickScan();
[Code].....
I am new to working with papervision and just want to add a simple spinning sphere inside a movieclip and have it positioned on the stage where I want it. For some reason when it creates the sphere, it doesn't place it on the registration points, but puts it in the bottom right corner of the stage and is cut off.
Here is ActionScript Code:
var viewport:Viewport3D=new Viewport3D(0,0,true,true);
addChild(viewport);
var renderer:BasicRenderEngine = new BasicRenderEngine();
var scene:Scene3D = new Scene3D();
var camera:Camera3D = new Camera3D();
[Code] .....
I have a flat circular texture in a bitmap for a project I am working on. Its a texture generated with the perlin noise functions. I wish to extrude the centre of the image using displacementmapfilter so the circle appears to be a 3d sphere. There will be no animation on the sphere. I'm not getting anywhere with it though, My code is below with my broken implementation of the displacement filter.
[Code]..
I'm basically trying to emulate Photoshop's Vanishing Point tool where you can define the 4 2D points and the 3D plane is calculated from that information, in terms of the rotation of the plane relative to x y and z axes.
So if you have an image like this one:
And you define the points of the four corners, maybe like this:
It would define the 3D plane that the surface must live on relative to the x y and z axes. Researching this has led me to some tutorials on drawTriangles and Homographies, but they all seem to be focused on mapping bitmap data and I can't seem to find anything that defines a 3D plane itself.
I have a 2d plane rotated on its x axis, with 2d display objects I want to move around on the plane. Its pretty similar to a chess board [URL]..
The board is a rotated rectangle, and the pieces are just 2d display objects. Whats the easiest way to manipulate those objects so they appear to be moving on the board?
I have an array of points and I need square planes to be drawn between these points and distorted if points change their coordinates (see what I mean in the attached file).So what is the best practice I should use to create such set of planes knowing just coordinates of the points (planes vertices)?
View 4 Replies