Planes with 3D Sprites

Blitz3D Forums/Blitz3D Programming/Planes with 3D Sprites

HappyCat(Posted 2004) [#1]
I'm quite new to this 3D lark (though I have plenty of 2D experience) and I'm using Syntax Error's Sprite Control routines to create what is basically a 2D shooter with nice alpha and blending.

Things have been going well - I have the gameplay basically done and I'm now moving on to making it look nice.

Anyway, I'm wondering if it's possible to use a Plane as an infinite scrolling background. I've tried, but I can't get anything to show - basically, I don't think I'm understanding Plane's correctly.


IPete2(Posted 2004) [#2]
Hiya HappyCat - you're not in Cheshire are you???!

Anyways, createplane does indeed create an infinite plane, so texture it and use positiontexture x,y to scroll it - see if that helps.

If you want a sky you may have to flip the plane over so you can see the texture from underneath! - great for skies actually... just make sure you really scale the texture up big style!

IPete2.


HappyCat(Posted 2004) [#3]
Aha! Got it! I had a closer look at how Syntax Error was setting up the camera and positioning sprites and I got it sussed. Cool :-)


Strider Centaur(Posted 2004) [#4]
Um, how do you flip a plane as I get a error when I try that?

Regardless if you want a REALY big sky effect that follows you everywhere, use a cube or a sphere, flip it, and make sure it stays centered on you cammers, also sent the entity mode for that cube/sphere to not use the Zbuffer so it always gets drawn behind everything else.


VIP3R(Posted 2004) [#5]

Um, how do you flip a plane as I get a error when I try that?


Have you tried 'RotateEntity plane,0,0,180' ?


HappyCat(Posted 2004) [#6]
Oh, and I meant to say - not in Cheshire I'm afraid - Aberdeen in fact.


HappyCat(Posted 2004) [#7]
Got it all working lovely except the texture is vertically mirrored and I can't seem to flip the plane - it just doesn't display. I can live with it, just wondering if there's a way to flip the plane as RotateEntity plane,0,0,180 just makes it vanish (presumably because I'm then looking at the untextured side).


Ion-Storm(Posted 2004) [#8]
flip normals!


VIP3R(Posted 2004) [#9]

Anyway, I'm wondering if it's possible to use a Plane as an infinite scrolling background...
I can live with it, just wondering if there's a way to flip the plane as RotateEntity plane,0,0,180 just makes it vanish


Sorry for the confusion, RotateEntity plane,0,0,180 is what you would use to flip the plane for use as a sky (as Strider Centaur asked). You also have to position the plane higher on the y axis... PositionEntity plane,0,40,0 once this is done you will have a visible plane above you.

If you want to use it as a scrolling background try this:
RotateEntity plane,-90,0,0 ; <-- this flips the plane 90 degrees to the ground
PositionEntity plane,0,0,10 ; <-- this moves the plane away from the camera
What you now should have is the plane in background and a small gap between the plane and the camera.
If you don't see the plane, it's inverted and needs to be rotated by another 180 degrees, that's why I've used -90 (90 would be inverted).

BTW, IPete2 was having a little joke... "Smiling like a Cheshire cat" it's an old saying ;)


IPete2(Posted 2004) [#10]
VIP3R,

It's a good job there are some fast thinking folk here - like you.

Thanks for clearing up the plane thing for Strider, I had explained it quite badly in my post.

And yes cause I live in Cheshire and I was having a joke about the Alice in Wonderland ref. lol - which is of Cheshire origin.

IPete2.


HappyCat(Posted 2004) [#11]
Chesire cat - should have realised :-)

I've now got planes working as lovely parallax backgrounds. Yum ... and thanks for the help guys.


Zethrax(Posted 2004) [#12]
Another plane tip - if you want a cloud layer, etc, using a top and bottom plane it works best if you do 'ScaleEntity bottom_plane, 1.0, -1.0, 1.0, True' so that the top and bottom textures match up.