Welcome, Guest. Please login or register.

Author Topic: WritePixelArray VS Warp3d textures ?  (Read 5008 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kas1eTopic starter

WritePixelArray VS Warp3d textures ?
« on: March 05, 2005, 06:33:48 AM »
Hi 2 all. I want to draw part of my picture as texture.  But i want to do it as 1:1, without any intropalation/etc.I tryed to disable all warp3d states (dithering,gouraud,etc), but in any case i do not have 1:1 color scheme. Here is a 2 screenshoots.

1. It is original picture, and WritePixelArray do it good (but too slow of course).

2. It is the same picture, but draw as texture (fast, but ugly).


Well, i want to draw this pict as texture, but in original format (as WritePixelArray). It is possible i hope ? If yes, plz, explain me what states i must be enable/disable.


Thanks all for advance answers.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: WritePixelArray VS Warp3d textures ?
« Reply #1 on: March 05, 2005, 07:49:03 PM »
I guess you are using a voodoo 3000 (or similar)? If this is the case, you are out of luck for true colour textures. They will be converted to 16-bits per pixel by the fastest means possible.

Score 1 to the Permedia2 which renders 32-bit textures perfectly well on 15/16/32-bit targets.
int p; // A
 

Offline kas1eTopic starter

Re: WritePixelArray VS Warp3d textures ?
« Reply #2 on: March 07, 2005, 01:23:12 PM »
Yes, here is voodoo3 3000.. So, only way is creating 16bit picts and using W3D_A4R4G4B4 in W3D_AllocTexObj fucntion ?
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: WritePixelArray VS Warp3d textures ?
« Reply #3 on: March 07, 2005, 06:50:30 PM »
You could try hinting to the driver to use "nicer" texture quality. However, I don't know if the voodoo3000 actually supports 32-bit texel data at all.
int p; // A
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: WritePixelArray VS Warp3d textures ?
« Reply #4 on: March 07, 2005, 07:14:55 PM »
Quote

Karlos wrote:
You could try hinting to the driver to use "nicer" texture quality. However, I don't know if the voodoo3000 actually supports 32-bit texel data at all.


I thought the reason why 3DFx died was because the Voodoo range of cards suffered from terrible 3D image quality, when compared with the nVidia and ATI cards.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: WritePixelArray VS Warp3d textures ?
« Reply #5 on: March 07, 2005, 07:23:09 PM »
The later cards definately support 32-bit rendering, both for target surfaces and for texel data.

I think the voodoo3000 might have been the last of the 16-bit only chips.

The last generation voodoos to appear were both surprisingly powerful rasterizers, had decent render quality as well as some features not seen elsewhere at that time. They also supported multiple GPU rendering. However, nobody really wanted to spend a fortune on a 6-GPU card by then when it was clear that existing CPUs couldn't keep them fed fast enough. By this point NVidia and ATI were making T&L hardware that simply removed that existing bottleneck, giving much better overall performance.
int p; // A
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: WritePixelArray VS Warp3d textures ?
« Reply #6 on: March 07, 2005, 07:58:20 PM »
[ You must login or register to view this Off-Topic! ]
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: WritePixelArray VS Warp3d textures ?
« Reply #7 on: March 07, 2005, 08:28:58 PM »
@Cymric

WritePixelArray() is a function provided by CyberGraphX (IIRC, it isn't provided by the OS) that takes a pointer to some chunky pixel data (in a typical ARGB32, RGB24 or 256-colour "CLUT") format and writes it to a RastPort.

The hardware pixel format of the underlying BitMap is understandably device specific, so WritePixelArray() does conversion of the data where needed. Unfortunately (as I discovered a long time ago) this function (as well as BlitBitMap between different pixel formats) are rather slow.

What kas1e is trying to do instead is to take his 32-bit source data and use it as a warp3d texture map instead.

The reason for this is that 3D hardware can generally take colour conversion in its stride, mapping a 32-bit source texture to a polygon on any supported 15/16 bit screen, dithering it, processing transparancy, shading it (in a variety of ways), scaling it, filtering all with total hardware acceleration that leaves the equivalent OS/CyberGraphX/P96 routines (where they even exist) eating dust.

Unfortunately, it seems the voodoo3000 only wants to use 16-bit texel data, so kas1e's 32-bit source data is being pre-converted by the driver.
int p; // A
 

Offline kas1eTopic starter

Re: WritePixelArray VS Warp3d textures ?
« Reply #8 on: March 08, 2005, 08:10:53 AM »
to Karlos
i tryed use W3D_HINT, and played with all params, but here is no any good result. Maybe do you know some software for convert 32bit pict to 16bit for A4R4G4B4 ?
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: WritePixelArray VS Warp3d textures ?
« Reply #9 on: March 08, 2005, 10:20:47 AM »
Quote

kas1e wrote:
to Karlos
i tryed use W3D_HINT, and played with all params, but here is no any good result. Maybe do you know some software for convert 32bit pict to 16bit for A4R4G4B4 ?


Photoshop is pretty good at that.

Offline Rogue

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 566
    • Show only replies by Rogue
    • http://www.hyperion-entertainment.com
Re: WritePixelArray VS Warp3d textures ?
« Reply #10 on: March 08, 2005, 10:47:58 AM »
Quote

kas1e wrote:
Yes, here is voodoo3 3000.. So, only way is creating 16bit picts and using W3D_A4R4G4B4 in W3D_AllocTexObj fucntion ?


The Voodoo 3 does not support anything but 16 bit render targets and 16 bit textures. Only the Voodoo 4/5 can actually do 32 bits.

The only additional quality improvement you could do is to enable dithering (or change the graphics card, but that is probably not what you would want to hear :-) )
Look out, I\'ve got a gun
 

Offline kas1eTopic starter

Re: WritePixelArray VS Warp3d textures ?
« Reply #11 on: March 08, 2005, 10:48:38 AM »
well, how i can exactly do it ?:) i trying to found any mode for 4bit per pixel, but only 8bite minimum is here. And if i saved any pict as tiff, png, etc, in any case i have 8bit per pixel.
 

Offline EntilZha

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 131
    • Show only replies by EntilZha
    • http://www.hyperion-entertainment.com
Re: WritePixelArray VS Warp3d textures ?
« Reply #12 on: March 08, 2005, 11:00:16 AM »
@ kas1e

If you don't need the alpha channel, you can us W3D_R5G6B5. Still not as good as 24 bit, but definitely better than 4 bit per color.

Only the Voodoo 4/5 has support for 32 bit textures, and only the OS4 Warp3D driver will support it (sorry).
- Thomas
Avatar by Karlos
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: WritePixelArray VS Warp3d textures ?
« Reply #13 on: March 08, 2005, 11:33:27 AM »
You should all bow to the superiority of the Permedia2

/ducks
int p; // A
 

Offline kas1eTopic starter

Re: WritePixelArray VS Warp3d textures ?
« Reply #14 on: March 08, 2005, 02:59:34 PM »
Alpha channel need it for me.. Actually, my problem is it:
i want to do alpha fade/out with 24bit picture. If i can't
to do it directly on voodoo3, maybe here is way like:

1. creating 'black screen as textures'
2. draw picture by WritePixelArray.
3. draw black screen with alpha 0, and change alpha in loop
   to 1. and we have alpha fade out.

but what about alpha fade in ? i mean it must be like this:

user run programm, and watch black screen. And 24bit picture fade in. Some delay, and picture fade out.

any idea ?:)