A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Papervision3D help!

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    57

    Papervision3D help!

    The faces are unloading too near the camera. I'm trying to make a racing game and at the bottom of the screen, the ground is unloading. How do I fix this? Please help!

  2. #2
    Databarnak atRax's Avatar
    Join Date
    Dec 2000
    Location
    Zurich, Switzerland
    Posts
    258
    Hi Patt,

    Play a bit with camera.zoom and camera.focus you will find your comfort zone with that.

    And if you want to push it a bit further you can look for the frustrum Branch useng the SVN on google code.

    cheers!
    I ask you all to concentrate really hard on the freedom of all being. Its hard not to be very angry it is impossible We have to focus this confusion frustration helplessness feeling into a creative outlet Anger can spawn such amazing creativity through Street art Free art to teach each other know each other a language our evolution Go ahead and break some dumb rules

  3. #3
    Member
    Join Date
    Oct 2004
    Posts
    57
    Alright, thank you! Now it's fixed quite well.
    Another problem though...

    I have a giant plane, and a few object above it. (I'm going to make a racing game). The objects far away from the camera is "behind" the plane, and when you drive closer, they become above the plane (like it should be always).
    How can I make sure that the plane always is underneath the other stuff?

  4. #4
    Databarnak atRax's Avatar
    Join Date
    Dec 2000
    Location
    Zurich, Switzerland
    Posts
    258
    There's no real 3D pos in this fake 3D|2.5D plane. So you have to be really precise on how you place your objects. Again if you put two planes one behind a another in a tight range you will see some flicker for sure depending on the camera. The Zoom and Focus plays again a major role on how stuff is rendered in your world. If you want more input then Ill need more Info on how your world is made cause there's plenty of factors to make a good scene work well.
    I ask you all to concentrate really hard on the freedom of all being. Its hard not to be very angry it is impossible We have to focus this confusion frustration helplessness feeling into a creative outlet Anger can spawn such amazing creativity through Street art Free art to teach each other know each other a language our evolution Go ahead and break some dumb rules

  5. #5
    Member
    Join Date
    Oct 2004
    Posts
    57
    Check out this swf. You see the stone poles? Drive towards them and watch what happens. The depths should always be over the ground, but the are not.

    Please help!

    Download: http://www.rarhost.com/download-lx4v5d.html

  6. #6
    Member
    Join Date
    Nov 2007
    Posts
    38
    Pattt, I hope you don't mind me jumping in and asking a quick question, but it's about PaperVision 3D. If you'd like me to start another thread, I will.

    I just downloaded it and viewed a tutorial over at gotoandlearn.com. I've followed the instructions precisely, but when I run the movie, all I get is a blank screen with the following output errors:

    Code:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    	at org.papervision3d.materials::BitmapMaterial/correctBitmap()
    	at org.papervision3d.materials::BitmapAssetMaterial/org.papervision3d.materials:BitmapAssetMaterial::createBitmap()
    	at org.papervision3d.materials::BitmapMaterial/set texture()
    	at org.papervision3d.materials::BitmapMaterial$iinit()
    	at org.papervision3d.materials::BitmapAssetMaterial$iinit()
    	at PaperVisionTest_fla::MainTimeline/PaperVisionTest_fla::frame1()
    Any ideas? Full code:

    Code:
    import org.papervision3d.scenes.*;
    import org.papervision3d.cameras.*;
    import org.papervision3d.objects.*;
    import org.papervision3d.materials.*;
    
    var container:Sprite = new Sprite();
    container.x = stage.stageWidth * 0.5;
    container.y = stage.stageHeight * 0.5;
    addChild(container);
    
    var scene:Scene3D = new Scene3D(container);
    var camera:Camera3D = new Camera3D();
    camera.zoom = 5;
    
    var bam:BitmapAssetMaterial = new BitmapAssetMaterial("TwentySided");
    bam.oneSide = false;
    bam.smooth = true;
    
    for (var i:uint=0; i<50; i++) {
    	var p:Plane = new Plane(bam, 50, 50, 2, 2);
    	scene.addChild(p);
    	p.x = Math.random() * 1000 - 500;
    	p.y = Math.random() * 1000 - 500;
    	p.z = Math.random() * 1000 - 500;
    	p.rotationY = Math.random() * 360;
    }
    
    this.addEventListener(Event.ENTER_FRAME, render);
    
    function render(e:Event):void {
    	camera.x += stage.mouseX - (stage.stageWidth*0.42);
    	camera.y += stage.mouseY - (stage.stageHeight*0.42);
    	scene.renderCamera(camera);
    }
    Again, sorry if this hijacks your thread! I will move to a new thread if you prefer.
    Last edited by buttbutt; 11-28-2007 at 12:35 PM.

  7. #7
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,136
    I didn't download the file but this sounds a lot like an intersecting faces problem. Don't know pv3d as I'm more the away3d type myself, but it can probably be fixed if there's a rendering filter that corrects the z-order.

  8. #8
    Member
    Join Date
    Oct 2004
    Posts
    57
    Quote Originally Posted by joshstrike
    I didn't download the file but this sounds a lot like an intersecting faces problem. Don't know pv3d as I'm more the away3d type myself, but it can probably be fixed if there's a rendering filter that corrects the z-order.
    I don't know if there is. Would Away3D solve it?
    I really need help with this!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center