papervision best way to add 2d images to 3d plane

Posted on 2009-02-08
Last Modified: 2013-12-26
I've been working on my own terrain generator, you can check it at:

I want to add 2d images (movieclips) (the buildings + trees) to the 3d planes (the ground tiles)(also movieclips).
I'm using script below, adding all the assets to a MovieClip and then using this movieclip as MovieMaterial => Plane ;

!!! trouble is when the child is bigger then the Plane it erases other planes behind it... !!!

I want to keep the buildings 2d but I want papervision to scale them so they look OK...

ideas are welcome

PS: I'm convinced my method is not the best practice:

tile=new earth(); // the ground tile , = mc pulled out of the library

var tree:trees = new trees(); //the trees, = mc pulled out of the library


var build:Towers1 = new Towers1(); // a building pulled out of the library


mam=new MovieMaterial(tile);




// this is whayt matters for this question the rest can be checked at Q_24122261

Open in new window

Question by:Dreammonkey
    LVL 9

    Accepted Solution

    It might be cos I'm being a bit stupid, but I'm not entirely sure what the problem is (would help to see an example of it breaking...) but my initial thoughts are:

    Does making the material transparent help? Was just thinking that it might be filling the extra area as it expands, and just gives the impression of blanking anything behind it.

    mam=new MovieMaterial(tile, true);

    Could you mask the planes to stop it extending?

    Keep the trees etc in a separate plane.

    I'd guess the first one will solve it, but if not then a (non) working demo would really help...
    LVL 8

    Author Comment

    Hi Chris,

    thanks for that quick response, you're right about the tranceparancy thing, I should 've checked the source ...

    Thing is :  there is still a bug :
    surf to the url I posted , don't mingle with the settings in the options.
    just hit generate, you'll see that underneath the 'Castle' the earth has been removed, I'm not sure why this is...

    You'll notice the lighthouses at the bottom, they're generated in the same manner as the castle,
    could there be a way to make them look better, that is, react 3d-ish to the scrolling?

    I know I'm not being pretty generous on code-terms, the project is rather dear to me...
    If you like, I'm on messenger deemonkeyjazz at hot .

    BIG Thanks anyway, your answer was correct !
    LVL 8

    Author Closing Comment

    Thanks again !

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
    Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
    The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now