mirror
Blitz3D Forums/Blitz3D Programming/mirror
| ||
is there any way to make some objects not to reflect? |
| ||
The only way I can think of is to do 2 renders. One with everything you dont want reflected hidden, and a second with everything you want reflected hidden. |
| ||
this will cause z-oder problems. i mean if you render the reflection-entities first, the others will always be in front of them. i wouldnt use a mirror tho... its for small things only. and if using stencil shadows it'll be very bugy. using particles will make it slow |
| ||
this will cause z-oder problems. i mean if you render the reflection-entities first, the others will always be in front of them. No they won't. When double rendering, you preserve the z-buffer with CameraClsMode camera,0,0 between renders. |
| ||
oops. didnt think about that... mirrors are no-good anyway. trust me |
| ||
A blitz mirror may be perfectly satisfactory for his needs. He doesn't give any details so it's hard to make a judgement. ;) I'm more interested to know what kind of objects dont have reflections. Maybe it's a vampire game?! :P |
| ||
Lol...no Actually I'm making a menu like itunes, All saved games will have an image and I just want those images to have a reflection, but not buttons. note: these buttons are sprites I'm uploading the image, I'll link it later...not finished yet |
| ||
Make the buttons you do not want reflected from quads rather than sprites. As they have no backface they will not reflect in the mirror. Stevie |
| ||
quads? |
| ||
Definitely render your UI stuff in a different pass. I have a good example of doing this here: http://www.gilligames.com/blitz/GG_3D_Sprites.zip The sprites are rendered after the main 3D scene, so the positioning and scaling of the sprites is also very easy to manage. Also, there isn't any warping on the sprites because the sprite camera uses orthographic projection mode, guaranteeing a perfectly flat sprite as expected. |
| ||
Here's what I mean .. The blue square is the sprite which is reflected, the red is the quad which isn't.Graphics3D 640,480,16,1 camera = CreateCamera() RotateEntity camera, 90,0,0 PositionEntity camera, 0,30,0 sprite = CreateSprite() ScaleSprite sprite, 2,2 PositionEntity sprite, -10,10,0 EntityColor sprite, 0,0,255 quad = createquad() ScaleEntity quad, 2, 2, 1 RotateEntity quad, 90,0,0 PositionEntity quad, 10,10,0 EntityColor quad, 255,0,0 plane = CreatePlane() EntityColor plane, 0,50,0 EntityAlpha plane, .5 mirror = CreateMirror() While Not KeyDown(1) RenderWorld() Flip Wend Function CreateQuad() mesh = CreateMesh() s = CreateSurface( mesh ) v0 = AddVertex( s, -1,1,0) v1 = AddVertex( s, 1, 1, 0 ) v2 = AddVertex( s, 1, -1, 0 ) v3 = AddVertex( s, -1,-1,0 ) AddTriangle s, v0, v1, v2 AddTriangle s, v2, v3, v0 Return mesh End Function |
| ||
thanks |
| ||
this was what I trying to make but its solved now :P http://www.blitzbasic.com/gallery/view_pic.php?id=1666 |