3d snapshot
Blitz3D Forums/Blitz3D Programming/3d snapshot
| ||
I was wondering if there is a way to make a snapshot of a 3D scene and project it to the background, so it can be used as a scenery backdrop. My reason for asking: I want to render objects in the distance once every say 20 frames, and then use the image as a backdrop. Then just render closeup objects every frame. I don't want to see a blue sky in the distance when there should be a mountain there. |
| ||
Just render the scene in to an image buffer and use it as a background, or render to backbuffer... copy to texture and use a textured sprite on a background. |
| ||
It'll have to be the latter -- render as normal, grab from back buffer to either an image or texture buffer, then display either as an image or a textured sprite... |
| ||
Don't believe you can render to a image or texture buffer... |
| ||
Thanks for the help. |
| ||
Ross C: My bad... RenderWorld always renders to backbuffer. |
| ||
I copied the screen to an imagebuffer. Now how do I turn that imagebuffer into a sprite, so I can use it as a backdrop. gfxBlank=CreateImage (1024,768) CopyRect 0,0,1024,768,0,0,FrontBuffer(),ImageBuffer(gfxBlank) The screen is now in the ImageBuffer, but I can't use it. If I use the following. CopyRect 0,0,1024,768,0,0,ImageBuffer(gfxBlank),FrontBuffer() It is overwritten by the BackBuffer on the next frame. So it needs to be made into a sprite, so it stays on the screen in the background. |
| ||
Simplest : 1. Disable clear screen on render via CameraClsMode * START LOOP 2. Draw your image at the background 3. Call Render 4. Flip screen * END OF LOOP |
| ||
Thanks MagicalTux, that worked. |