Place an entity in image

Posted By: djfeeler

Place an entity in image - 08/06/12 19:10

Hello !

I would like to know how to load an entity in an image laugh

Thanks in advance djfeeler.
Posted By: MasterQ32

Re: Place an entity in image - 08/06/12 19:34

you have to render the entity to a texture

which version do you have and how fast should this be (aka can you save it as a bitmap and load it later)?
Posted By: djfeeler

Re: Place an entity in image - 08/06/12 20:41

thanks for your response. I have the version pro.
Posted By: MasterQ32

Re: Place an entity in image - 08/07/12 06:30

okay
you can create a view which only shows this model, no other things (just create it far enough away from the level and give it a short clipping range)
create a new bitmap, assign this bitmap about 3 frames to the view render target and then convert the format to a better format than render target:
Code:
BMAP *render = bmap_createblack(256,256,24);
viewEnt.pos_x = 0;
viewEnt.pos_y = 0;
viewEnt.size_x = bmap_width(render);
viewEnt.size_y = bmap_height(render);
viewEnt.bmap = render;
wait(3); //Let the image render
viewEnt.bmap = NULL;
bmap_to_format(render, 888); // COnvert it back to 24 bit image


© 2024 lite-C Forums