1 model rendered 2 times?
Blitz3D Forums/Blitz3D Programming/1 model rendered 2 times?
| ||
Is there a way to have only one model open and then render it twice in two different spots? render and then flipMESH render |
| ||
FlipMESH render? Dunno about that; try this:Graphics3D 640,480,0,2 SetBuffer BackBuffer() cam=CreateCamera() CameraClsMode cam,0,1 box=CreateCube() base=90 While Not KeyDown(1) base=base+1 : If base>360 Then base=base-360 x#=0+Cos(base) PositionEntity box,x,0,5 RenderWorld PositionEntity box,x,4,5 RenderWorld Flip Cls Wend |
| ||
I meant FlipMesh, render. Thanks for the code |
| ||
Remember and set the cameraclsmode back to default after the last render, to clear the screen. Then set it afterwards back toCameraClsMode cam,0,1 So it becomes: Graphics3D 640,480,0,2 SetBuffer BackBuffer() cam=CreateCamera() box=CreateCube() base=90 While Not KeyDown(1) base=base+1 : If base>360 Then base=base-360 x#=0+Cos(base) PositionEntity box,x,0,5 CameraClsMode cam,1,1 RenderWorld PositionEntity box,x,4,5 CameraClsMode cam,0,1 RenderWorld Flip Cls Wend |
| ||
Isn't Blitz Programmer a moderator that works for Blitz??? Should he not know this??? You create two cameras and you can viewport them or render them both (rear view mirror effect) but it does tend to make your code slower if you have a lot of polys on screen... RZ |
| ||
it does tend to make your code slower if you have a lot of polys on screen How about if you reduce the viewport? Does that not get you any speed back? Hang on, why am I asking you instead of just trying it out? :D |
| ||
You know that is a good question... IMO (without trying it out) no. I say why: ((keep in mind this is theoretical and I expect someone with Empirical Knowledge to pundit firmly)) You are still rendering the TRIs... The second set of tris might be smaller BUT they are still TRI. RZ |
| ||
Isn't Blitz Programmer a moderator that works for Blitz??? Should he not know this??? Only if Puki is! |
| ||
I don't think reducing the viewport affects the speed at all. AFAIK the only way to do this, is to 'cheat' and copy the mesh or use 2 cameras. |