View previous topic :: View next topic |
Author |
Message |
ceriux

Joined: 06 Sep 2008 Posts: 968 Location: Florida, USA
|
Posted: Sun Dec 13, 2009 7:02 am Post subject: |
|
|
Downsider wrote: | ceriux wrote: | i probably dont know what im talking about , but have you tried making them sample down ? |
The main problem is that I have to store the palette somewhere and I'm not sure how exactly I should go about doing that, and when it needs to be loaded, but most importantly, when to revert to the original Quake palette. |
but the thing is the pallets are already stored into the texture when you make the wad file (if im actually right, which im pretty sure i am.) my best suggestion would be to stick to the quake bsp format and build a custom pallet for your maps and base the maps around it and only use pcx or tgas when they're absolutely needed. i dont think theres any solution to your problem because the pallet your trying to store some where im pretty sure is stored with in the texture its self.
edit: or if its possible why not just make a pallet for each map the similar to how quake has 1 pallet for the entire game. but have the pallet change upon loading your maps? if thats at all doable. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 477
|
Posted: Sun Dec 13, 2009 2:31 pm Post subject: |
|
|
No.. The idea is to:
1) When loading the texture, return the paletted data instead of thr unpaletted data. (1 byte per pixel)
2) Store the palette in miptex_t.
3) Modify GL_loadTexture to take a palette as a parameter.
4) Use GL_loadTexture instead of GL_loadTexture32.
5) Store the palette in texture_s.
6) Load the palette if it exists in GL_Bind.
Should work, but I'm pretty sure the palette has to be converted into a different format for it to be used by OpenGL, and I don't know how to convert it. |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Sun Dec 13, 2009 3:20 pm Post subject: |
|
|
Unless your OpenGL implementation supports uploading textures directly from a palleted format then you're just going to have to upsample to 32 bit I'm afraid. The documentation for any palleted format you can upload in should be sufficient to deduce conversion steps from. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 477
|
Posted: Sun Dec 13, 2009 3:23 pm Post subject: |
|
|
mh wrote: | Unless your OpenGL implementation supports uploading textures directly from a palleted format then you're just going to have to upsample to 32 bit I'm afraid. The documentation for any palleted format you can upload in should be sufficient to deduce conversion steps from. |
Format is GU_PSM_T8, it's on the PSP, and there's sufficient information on it, but I don't know about how Half-Life's palette is stored. I know how the end product should look, and the steps in the middle, but nothing about the ingredients themselves  |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Sun Dec 13, 2009 7:05 pm Post subject: |
|
|
From looking at the code in the first post is just the same as Quake's palette; 768 bytes laid out RGBRGBRGB etc with palette index 255 being translucent for some textures (depending on the name). You'll probably need to expand this to 1024 bytes with an RGBARGBARGBA layout but this should be utterly trivial to code (look at VID_SetPalette in classic GLQuake for a similar way of translating any input palette to this format and layout). _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 477
|
Posted: Sun Dec 13, 2009 7:33 pm Post subject: |
|
|
mh wrote: | From looking at the code in the first post is just the same as Quake's palette; 768 bytes laid out RGBRGBRGB etc with palette index 255 being translucent for some textures (depending on the name). You'll probably need to expand this to 1024 bytes with an RGBARGBARGBA layout but this should be utterly trivial to code (look at VID_SetPalette in classic GLQuake for a similar way of translating any input palette to this format and layout). |
Thanks, this is exactly what I neded to know  |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Mon Dec 14, 2009 2:31 am Post subject: |
|
|
Downsider wrote: | mh wrote: | Unless your OpenGL implementation supports uploading textures directly from a palleted format then you're just going to have to upsample to 32 bit I'm afraid. The documentation for any palleted format you can upload in should be sufficient to deduce conversion steps from. |
Format is GU_PSM_T8, it's on the PSP, and there's sufficient information on it, but I don't know about how Half-Life's palette is stored. I know how the end product should look, and the steps in the middle, but nothing about the ingredients themselves  |
Downsider, do you have a link to information on the PSP graphics API?
I have a PSP 1000 series now (need to order a Pandora battery, don't have that yet) ... and since I can compile for the PSP now, odds are strong that I will be writing some PSP engine tutorials. |
|
Back to top |
|
 |
Trickle
Joined: 26 Mar 2009 Posts: 44
|
Posted: Mon Dec 14, 2009 7:12 am Post subject: |
|
|
eriux, this looks awesome! I'm glad to see someone is taking advantage of the hl bsp support by making a map exclusively Quake! _________________
 |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 477
|
Posted: Mon Dec 14, 2009 10:15 pm Post subject: |
|
|
Baker wrote: | Downsider wrote: | mh wrote: | Unless your OpenGL implementation supports uploading textures directly from a palleted format then you're just going to have to upsample to 32 bit I'm afraid. The documentation for any palleted format you can upload in should be sufficient to deduce conversion steps from. |
Format is GU_PSM_T8, it's on the PSP, and there's sufficient information on it, but I don't know about how Half-Life's palette is stored. I know how the end product should look, and the steps in the middle, but nothing about the ingredients themselves  |
Downsider, do you have a link to information on the PSP graphics API?
I have a PSP 1000 series now (need to order a Pandora battery, don't have that yet) ... and since I can compile for the PSP now, odds are strong that I will be writing some PSP engine tutorials. |
Overall it's very similar to OpenGL, really. Documentation is abundant compared to other platforms that can run homebrew (Couldn't find shit when I was dabbling in Rockbox apps for the Sansa).
http://www.ghoti.nl/PSPtutorial1.php - Setting up the PSP SDK and doing some stuff few with the PSP GU.
http://www.psp-programming.com/forums/index.php?topic=724.msg7214 - First 10 or so of Nehe's OpenGL gamedev tutorials ported to the PSP.
There's a bunch of samples in the PSP SDK's folder once you install it, and the header file for the lib has a bit of documentation in it, too. |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Tue Dec 15, 2009 3:10 am Post subject: |
|
|
Downsider wrote: | Baker wrote: | Downsider wrote: | mh wrote: | Unless your OpenGL implementation supports uploading textures directly from a palleted format then you're just going to have to upsample to 32 bit I'm afraid. The documentation for any palleted format you can upload in should be sufficient to deduce conversion steps from. |
Format is GU_PSM_T8, it's on the PSP, and there's sufficient information on it, but I don't know about how Half-Life's palette is stored. I know how the end product should look, and the steps in the middle, but nothing about the ingredients themselves  |
Downsider, do you have a link to information on the PSP graphics API?
I have a PSP 1000 series now (need to order a Pandora battery, don't have that yet) ... and since I can compile for the PSP now, odds are strong that I will be writing some PSP engine tutorials. |
Overall it's very similar to OpenGL, really. Documentation is abundant compared to other platforms that can run homebrew (Couldn't find shit when I was dabbling in Rockbox apps for the Sansa).
http://www.ghoti.nl/PSPtutorial1.php - Setting up the PSP SDK and doing some stuff few with the PSP GU.
http://www.psp-programming.com/forums/index.php?topic=724.msg7214 - First 10 or so of Nehe's OpenGL gamedev tutorials ported to the PSP.
There's a bunch of samples in the PSP SDK's folder once you install it, and the header file for the lib has a bit of documentation in it, too. |
Thanks! |
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
Posted: Fri Jan 08, 2010 4:10 pm Post subject: |
|
|
Another problem with Half-Life maps is the number of makestatic entities. A solution for that, very simple but lame, is to limit the number of makestatic entities, ignoring all beyond the limit.
The basic quake beavior for quake after the limit is broken, is to crash, that is a non-nice result  |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 909
|
Posted: Fri Jan 08, 2010 4:24 pm Post subject: |
|
|
There's actually no real reason to have a limit on the number of static entities in Quake. Forget about the static entities array, just pull some more memory off the hunk, and you have a new static entity. Magic!
If you go above the efrags limit you'll need to find a way of extending that, but that's the only real challenge.
Hmmm - I feel a tutorial coming on... _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
LonePossum.
Joined: 02 Nov 2009 Posts: 38
|
Posted: Mon Feb 01, 2010 9:05 am Post subject: |
|
|
Hope theres no law against bumping oldish topics.
How does someone achieve this HLBSP on PSP (Main Reason I have been learning engine stuff)
I did this succesfully on PC Though Great Tut. |
|
Back to top |
|
 |
Team Xlink
Joined: 25 Jun 2009 Posts: 320
|
Posted: Tue Feb 02, 2010 12:07 am Post subject: |
|
|
_________________
Anonymous wrote: | if it works, it works. if it doesn't, HAHAHA! |
|
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 477
|
Posted: Tue Feb 02, 2010 2:19 am Post subject: |
|
|
Team Xlink wrote: | I am not allowed to make a specific tutorial (Along with external texture support and hud related things.) for this, there are reasons that I shouldn't say to avoid makeing people look bad. |
Hmm? How would that make me, I assume you mean me, since I wrote the HLBSP support in Solitude's engine, look bad? |
|
Back to top |
|
 |
|