• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1437
  • Last Modified:

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

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

  • 2
1 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...
DreammonkeyAuthor Commented:
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 !
DreammonkeyAuthor Commented:
Thanks again !

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now