Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Good Graphics in DirectDraw


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 PigHeaded   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 March 2000 - 04:25 AM

Hello, I have a problem and I''m not sure if I should ask it here or in the DirectX forum. I have a small demo program that just displays bitmaps(BMPs). This program is a DirectDraw program set for 800x600x16bit. I created my images in PhotoShop 5.0 and saved them as 24bit bitmaps. As an example I created a small sky image using a simple gradient image from blue to white. When I try to display this image in my program it "bands" the colors. If I set my program to 32bit, it works fine. The problem I have is I need good looking graphics in 16bit mode, No paint program I know of can create 16bit images. How do others create good looking art work for a 16bit game? Is there a way I can set the palette in PhotoShop for 16bit 5-5-5 colors? Thanks in advance, PigHeaded

Sponsor:

#2 Atavist   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 March 2000 - 04:36 AM

There is no 16-bit BMP format, your kinda stuck that way. But there is a 16-bit Targa format (.tga) that photoshop can work with, you would have to write your own Targa file loader though.

One person said that the games industry is "a transfer of funds from the rich to the lucky"

#3 Tha_HoodRat   Members   -  Reputation: 143

Like
Likes
Like

Posted 15 March 2000 - 02:38 PM

If I''m not mistaken d3d rm has a tga loader, review you sdk.

#4 Centum   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 March 2000 - 04:47 AM

Try to copy your bmp - image to a surface by using the GDI. The GDI converts it to 5-5-5 or wathever is used. Afterwards use blt or bltfast to bring it to the screen!

#5 PigHeaded   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 March 2000 - 06:19 AM

Thank You all for your suggestions, but nothing has worked. I have tried a TGA file Loaded, a PSD file loader, a GDI BitBlt copy, and the ddutil. but I still get the same "bars across the images when I display them. I am at a loss now. I can go back to 32 bit where everything works fine but that''s realy not an option in the long run. Could some one try to create a simple ddraw app that displays a single 640x220x16 bit bitmap. Create the bitmap using Photoshop and make it a gradient fill. And then let me know if you also get the same color bars across your screen? I''ve tried this on two different computers using different programs to display the bitmaps, but they allways turn out the same way in 16bit mode. Any more ideas?

Thanks,

PigHeaded

#6 Armitage   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 March 2000 - 06:25 AM

I''m wondering if this''ll help you? I''m not exactly sure of what you mean, but it sounds almost the same.


http://www.flipcode.com/cgi-bin/knowledge.cgi?showunit=65


A polar bear is a rectangular bear after a coordinate transform.

#7 Kylotan   Moderators   -  Reputation: 3338

Like
Likes
Like

Posted 16 March 2000 - 11:53 PM

quote:
Original post by PigHeaded

I can go back to 32 bit where everything works fine but that''s realy not an option in the long run. Could some one try to create a simple ddraw app that displays a single 640x220x16 bit bitmap. Create the bitmap using Photoshop and make it a gradient fill. And then let me know if you also get the same color bars across your screen




How about changing your display to 16bpp and viewing that gradient in Photoshop, taking out the ''middleman'' of DirectDraw? If you see the bands appearing in Photoshop when you''re in 16 bit colour, you know it''s a limitation of the colour depth of the display and not the programming. In which case, it can''t be helped. You might want to look into dithering the graphics or something like that.

#8 ZoomBoy   Members   -  Reputation: 162

Like
Likes
Like

Posted 17 March 2000 - 12:20 AM

For 16 bit conversion there''s a freeware program cslled UltraPaint. Search on the Web for "upaint1b.zip"
It says it''s a full paint program but it''s just basic.
But it does convert.

ZoomBoy
A 2D RPG with skills, weapons, and adventure.
See my character editor, Tile editor and diary at
my Web-site


#9 PigHeaded   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 March 2000 - 07:42 AM

hello again,

Armitage:

That question is exacly what my problem is. The only problem with the response is that he did not give a code example of how to fix the problem. I spent some time looking for a dithering function, but just came up with bits and pieces of very useful information that should allow me to create my own function. I just can''t see any other way around this problem. Does any one else have this problem working with a 16 bit DDraw program?

Kylotan:
I have set the display to 16bpp but Photoshop shows the image correctly, but I opened the image in MS Paint and Paint Shop Pro and the image has the bands. Now one of the problems appears to be the video card. It is a 555 card, the card I have at home is a 565 card. My home system has less banding. So I am assuming that 555 cards are part of the problem. I am currently working on a dithering function. So when I load my images I will check to see if the card is a 555 card and if it is, I will run the image through the dithering function. I have no idea why PhotoShop shows the image correctly and I can''t though.

ZoomBoy:
I looked at the site for Ultra Paint and I am in the process of downloading it now. I noticed it can create a 16 bit image. I will try to create a radiant image with the program and see how well it can display the image. Thanks for the idea.

#10 Staffan   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 March 2000 - 12:18 AM

I believe there are some articles on Gamasutra on dithering, you might wan''t to take a look at them...



"I think, therefore I am...I think"




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS