We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

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

on
Medium Priority
1,503 Views
I've been working on my own terrain generator, you can check it at:
http://www.jazz-band.be/dMonkeyFlash/Terrain3D/

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);
mam.interactive=true;
mam.smooth=true;
mam.animated=true;

// this is whayt matters for this question the rest can be checked at Q_24122261
``````
Comment
Watch Question

## View Solution Only

Commented:
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...

Not the solution you were looking for? Getting a personalized solution is easy.

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 .

Commented:
Thanks again !
##### Thanks for using Experts Exchange.

• View three pieces of content (articles, solutions, posts, and videos)
• Ask the experts questions (counted toward content limit)
• Customize your dashboard and profile