Bitmap File

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
waste
Posts: 8
Joined: Fri Jan 25, 2013 8:46 am

Bitmap File

Post 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,
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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.
waste
Posts: 8
Joined: Fri Jan 25, 2013 8:46 am

Post 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
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
waste
Posts: 8
Joined: Fri Jan 25, 2013 8:46 am

Post 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 ?
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
waste
Posts: 8
Joined: Fri Jan 25, 2013 8:46 am

Post 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
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Post Reply