Page 1 of 1

Bitmap File

Posted: Fri Jan 25, 2013 8:56 am
by waste
Hello all,

I try to insert a simple bitmap file in my project, and i obtain a runtime error

203 at 0040408E ,

In my project there is moving text and a music,

without the bitmap file , it works . with bitmap , blank screen , music on , no text , and pop up message runtime error,

i put a screenshot aof my Project tree there :

[/url]http://img841.imageshack.us/img841/7232 ... ee.jpg[url]


Thanks,

Posted: Fri Jan 25, 2013 10:11 am
by VilleK
Hi,

You have a BitmapLoad component in the bitmap. This causes a recursion error. You just need the BitmapFromFile component. Remove the BitmapLoad component and try again.

Posted: Fri Jan 25, 2013 10:36 am
by waste
thanks , that's true !! my text came back !


but.............i can't see the bitmap displayed,

is t a question of transparency ?

sorry but i just begin to use zgameeditor ... and three tutos are too advanced , game making , but i haven't found any informations on how to display picture

Posted: Fri Jan 25, 2013 12:09 pm
by Kjell
Hi waste,
waste wrote:i can't see the bitmap displayed
You can't render a Bitmap component by itself. You need a Material that uses the Bitmap as texture and then render something ( Sprite / Mesh / Particles ) with the Material enabled.

Image
waste wrote:i haven't found any information on how to display picture
Please try following along this video tutorial. If you still have questions after that, don't hesitate to ask :wink:

K

Posted: Tue Jan 29, 2013 10:37 am
by waste
thanks a lot ! , that's ok now ,

so i have my bitmap file and a moving text , is it possible to make text

transparent ? we can see black color between two letters when the text

move on the bitmap ?

Posted: Tue Jan 29, 2013 10:41 pm
by Kjell
Hi,
waste wrote:is it possible to make text transparent ?
Certainly. First make sure the texture you're using for your font either has a alpha channel, or uses the color black as mask ( this option works best with nearest neighbor filtering ).

Image

Second, select "Alpha / OneMinusSourceAlpha" ( at least, that's usually what you want ) as blend mode for the Material you're using for your font.

Image

Let us know if you have any further questions ~

K

Posted: Wed Jan 30, 2013 10:39 am
by waste
yes i have another question !!


Image

here is my project running , i have a 3d rotating meshbox , but the bitmap is still displayed ,

the bitmap is only for the box texture, what's wrong ??

i have not fixed transparency yet , i'll do it later

thanks

Posted: Wed Jan 30, 2013 3:25 pm
by Kjell
Hi waste,
waste wrote:i have a 3d rotating meshbox , but the bitmap is still displayed, the bitmap is only for the box texture, what's wrong ??
Materials stay active until you enable another material using the UseMaterial component.

So for example, if you enable a red wireframe material at the beginning of OnRender and then render 3 different things ..

Image

.. all of them will use the red wireframe material.

Image

K