Author Topic: Stuff to make a HD tremulous  (Read 187935 times)

jm82792

  • Posts: 630
  • Turrets: +9/-34
Re: Stuff to make a HD tremulous
« Reply #300 on: February 04, 2011, 05:32:11 am »
Specular?
Trem has no specular shading capacity right?
If so that's great.

But....
WE NEED SMOOTH SHADING!
Really everything right now renders solid :(

Nux

  • Posts: 1778
  • Turrets: +258/-69
Re: Stuff to make a HD tremulous
« Reply #301 on: February 04, 2011, 10:14:21 am »
Yes the ZIP compression for the PK3s basically does nothing to an already compressed file format like JPEG or PNG.

This really depends on how well the file was compressed originally which in turn depends on the compression method and the target file. In the case of ZIP we don't have to worry about losing information- if you compress lossily over and over you will eventually end up with nothing -but generally once something has been compressed to something without any pattern left you will most likely increase the size of the file when you try to compress it again.

Also note that as ever, a trade-off is happening when you compress. You don't get something for nothing. If you encode something a lot, it'll take longer to read and if you don't it'll take up more space in memory. This is where you decide which thing is more of a problem for you.

cron

  • Donators
  • *
  • Posts: 197
  • Turrets: +22/-22
    • GrangerHub
Re: Stuff to make a HD tremulous
« Reply #302 on: February 04, 2011, 04:25:51 pm »
TGA supports RLE compression, but is not truly lossless
Oh, how so?

And what does an 8bit pcx achieve that an 8bit png wouldn't? i'm a little surprised to see pcx mentioned at all thesedays.

Since you were too lazy to visit the OA forums, here's a post in it's entirety about this:



Shaders cannot do that.

I think I found something which _seems_ to accomplish what I was looking for, but I lack the knowledge how shaders really work, so please check if it's a viable solution. Basically what this method is about is that, after a blendFunc GL_DST_COLOR GL_SRC_ALPHA step another blendFunc filter will "mask" the second texture according to the first greyscale alpha texture. I've tried it with two transparent textures, and the results seem to be the same.

First example is the metafloor_wall_14_specular texture (OA doesn't use it yet, but you can find it in q3dm16).

The separated pcx solution is a little bit darker, according to the heppler reference, it's due to the additional blendFunc. The shader definitions used (left the transparent TGA, right the two PCX):
Code: [Select]
textures/base_wall/metalfloor_wall_14_specular {
qer_editorimage textures/base_wall/metalfloor_wall_14
{
map $lightmap
rgbgen identity
}
{
map textures/base_wall/metalfloor_wall_14_specular
rgbGen identity
blendFunc GL_DST_COLOR GL_SRC_ALPHA
}
}
Code: [Select]
textures/base_wall/metalfloor_wall_14_specular {
qer_editorimage textures/base_wall/metalfloor_wall_14
{
map $lightmap
rgbgen identity
}
{
map textures/base_wall/metalfloor_wall_14_specular-alpha.jpg
rgbGen identity
blendFunc GL_DST_COLOR GL_SRC_ALPHA
}
{
map textures/base_wall/metalfloor_wall_14_specular-color.pcx
rgbGen identity
blendFunc filter
}
}

Filesizes (512x512px):
metalfloor_wall_14_specular.tga: 1.0 MB
metalfloor_wall_14_specular-alpha: 248.7 kB (8bit PCX) or 194.9 kB (grayscale JPG)
metalfloor_wall_14_specular-color: 259.5 kB (8bit PCX)
Sum: 1024 kB vs. 508.2 kB

The another example is the cybergrate2 shader, which you can find on the railgun platform of oa_ctf4ish. It's trickier than the previous, because only the metal grid was transparent, the electricity effect wasn't, but due to the method both had to be made transparent. The result:

The PCX solution is a bit ugly on the edges, but don't worry about that. Shaders used (left original, right new):
Code: [Select]
textures/base_floor/cybergrate2
{
surfaceparm metalsteps
cull none
{
map textures/sfx/portal_sfx_ring_electric.tga
tcmod scroll 1 -1
blendfunc add
}
{
map textures/base_floor/cybergrate2.tga
blendFunc blend
rgbGen identity
}
{
map $lightmap
blendFunc filter
rgbGen identity
}
}
Code: [Select]
textures/base_floor/cybergrate2
{
surfaceparm metalsteps
cull none
{
map textures/sfx/portal_sfx_ring_electric-alpha.pcx
tcmod scroll 1 -1
blendFunc GL_DST_ONE_MINUS_COLOR GL_SRC_ALPHA
}
{
map textures/sfx/portal_sfx_ring_electric-color.pcx
tcmod scroll 1 -1
blendFunc filter
}
{
map textures/base_floor/cybergrate2-alpha-mono.pcx
rgbGen identity
blendFunc GL_DST_ONE_MINUS_COLOR GL_SRC_ALPHA
}
{
map textures/base_floor/cybergrate2-color.pcx
rgbGen identity
blendFunc filter
}
{
map $lightmap
blendFunc filter
rgbGen identity
}
}

Filesizes (256x256px):
cybergrate2.tga: 132 kB
cybergrate2-alpha: 5.1 kB (8bit PCX) or 3.6 kB (1bit PCX)
cybergrate2-color: 35.7 kB (8bit PCX)
Sum: 132 kB vs. 40.8 kB

Here's a test package so you can try this at home: http://udionline.hu/fajlok/z_pcx-experiment.pk3

The filesize compression is more than 50% in both cases, but of course the shader steps require more computing. Is it worth to deal with this method?

Nux

  • Posts: 1778
  • Turrets: +258/-69
Re: Stuff to make a HD tremulous
« Reply #303 on: February 04, 2011, 05:29:15 pm »
Seems like a nice attempt, though sadly- as you know -there are key differences between the textures (i.e. the darkening in the former comparison and the light edges in the latter).

But you say yourself about the processing time trade-off. Aren't I justified in saying that file size really isn't as much of an issue as processing time with todays computers?

EDIT:

WE NEED SMOOTH SHADING!
Really everything right now renders solid :(

Textures are UV mapped so inherently look solid. I think that's what you're seeing. What little shading effect there is seems to be smooth.
« Last Edit: February 04, 2011, 05:32:32 pm by Nux »

Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: Stuff to make a HD tremulous
« Reply #304 on: February 04, 2011, 05:40:59 pm »
TGA supports RLE compression, but is not truly lossless
Oh, how so?

And what does an 8bit pcx achieve that an 8bit png wouldn't? i'm a little surprised to see pcx mentioned at all thesedays.

Since you were too lazy to visit the OA forums, here's a post in it's entirety about this:

*snip*
I visited the forums and saw just that post, at no point did it explain to me how TGAs are lossy or why you'd use PCX instead of PNG, maybe another poster explained that elsewhere but i assumed your copy-paste would have contained that salient piece of information had it been readily available.

I don't know the first thing about 3d texturing, well aside from what you told me in irc, apologies if i'm missing something obvious here.
my knees by my face and my ass is being hammered

cron

  • Donators
  • *
  • Posts: 197
  • Turrets: +22/-22
    • GrangerHub
Re: Stuff to make a HD tremulous
« Reply #305 on: February 04, 2011, 07:29:13 pm »
I was wrong, targas compressed with RLE compression claim to be loseless. However, I guess undesirable antialiasing can occur in TGAs with a lower color depths (lower than 24-bit?)

Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: Stuff to make a HD tremulous
« Reply #306 on: February 04, 2011, 07:46:58 pm »
I was wrong, targas compressed with RLE compression claim to be loseless. However, I guess undesirable antialiasing can occur in TGAs with a lower color depths (lower than 24-bit?)
Undesirable anti-aliasing? do you have a fondness for jaggies? So, back to the question, what's this guy's love of PCX all about? Is PCX treated in some special way by ioq3? Is there a good reason that the guy's storing 151 shades of grey as an indexed PCX rather than a greyscale PNG(of course i'm just assuming ioq3 supports PNGs here, i don't know)?

At least hurry up and post the explanation that i was too lazy to read.
my knees by my face and my ass is being hammered

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Stuff to make a HD tremulous
« Reply #307 on: February 05, 2011, 12:52:10 am »
The separated PCX method results in additional shader stages which can cause lower performance. Normally it wouldn't be an issue but these are typical shaders that don't necessarily need to be complex.

Anything after two stages requires a second draw pass.

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: Stuff to make a HD tremulous
« Reply #308 on: February 05, 2011, 07:21:54 am »
Remember that ioquake3 decompresses all textures and either uploads them  to the GPU either in uncompressed RGBA8 form or it recompresses them in DXT1 format. So your graphics card memory limits the overall size of the textures, no matter how you compress them in the pk3.

@tremulant: I guess cron meant to say Colour banding.


Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: Stuff to make a HD tremulous
« Reply #309 on: February 05, 2011, 11:07:17 am »
@tremulant: I guess cron meant to say Colour banding.
Yes, i assumed that was probably what he was getting at.

There still seems to an awful lot of confused excitement around here, vs actual clue about what makes sense.
my knees by my face and my ass is being hammered

Pazuzu

  • Posts: 987
  • Turrets: +50/-12
Re: Stuff to make a HD tremulous
« Reply #310 on: February 06, 2011, 05:19:12 pm »
http://tremhd.unvanquished.net/forum/index.php?topic=18.0
Got any suggestions for Friend Basi 2.0? :basilisk:
UPDATE: Working on model sheets for the Pazilisk, photos when I'm done.
Rough pencil sketch, uncolored:
« Last Edit: February 06, 2011, 08:10:15 pm by Pazuzu »

ok, can you give me the tool thingy app that can code?

KillerWhale

  • Spam Killer
  • *
  • Posts: 469
  • Turrets: +63/-26
Re: Stuff to make a HD tremulous
« Reply #311 on: February 06, 2011, 09:55:26 pm »
http://tremhd.unvanquished.net/forum/index.php?topic=18.0
Got any suggestions for Friend Basi 2.0? :basilisk:
UPDATE: Working on model sheets for the Pazilisk, photos when I'm done.
Rough pencil sketch, uncolored:

Use a better image host. imgur/photobucket/tinypic/anything besides the site you just used. Also, that's not how the img tag works.

Pazuzu

  • Posts: 987
  • Turrets: +50/-12
Re: Stuff to make a HD tremulous
« Reply #312 on: February 06, 2011, 10:06:07 pm »
It's how thumbnails work, though. Should I just post the whole thing instead of thumbnailing it?

ok, can you give me the tool thingy app that can code?

KillerWhale

  • Spam Killer
  • *
  • Posts: 469
  • Turrets: +63/-26
Re: Stuff to make a HD tremulous
« Reply #313 on: February 07, 2011, 03:49:09 am »
Nevermind, I misread.

Regardless, thumbnail/full image isn't working for me.

Pazuzu

  • Posts: 987
  • Turrets: +50/-12
Re: Stuff to make a HD tremulous
« Reply #314 on: February 07, 2011, 04:11:48 am »
Thumbnail now links to the same image, rehosted on my Dropbox:

UPDATE: Here's a slightly more detailed version. This time it's thumbnailed with the img tag, and hosted completely on Dropbox:

So after this 3D view gets finalized, I'll do front, side (with and without legs), and maybe top sketches based on it, then import all that into Blender and start modeling.
« Last Edit: February 07, 2011, 04:24:00 am by Pazuzu »

ok, can you give me the tool thingy app that can code?

cron

  • Donators
  • *
  • Posts: 197
  • Turrets: +22/-22
    • GrangerHub
Re: Stuff to make a HD tremulous
« Reply #315 on: February 07, 2011, 04:13:50 am »
For everything else, the IMG tag can be used like:
Code: [Select]
[img width=640]http://some.png[/img]
For what it's worth, I think it should appear that the basi's legs/claws could stab through human legs and feet to grab them (in addition to grabbing them with their mouth?), ie, looking and acting like they are heavy and sharp.


Pazuzu

  • Posts: 987
  • Turrets: +50/-12
Re: Stuff to make a HD tremulous
« Reply #316 on: February 07, 2011, 04:21:26 am »
For everything else, the IMG tag can be used like:
Code: [Select]
[img width=640]http://some.png[/img]
For what it's worth, I think it should appear that the basi's legs/claws could stab through human legs and feet to grab them (in addition to grabbing them with their mouth?), ie, looking and acting like they are heavy and sharp.


Yeah, I figured that out while you were writing this. And thanks for that idea, I might animate the grab that way. Still, the basi is supposed to be a stealthy creature, with a small profile, and I think those spindly legs work well with that.

ok, can you give me the tool thingy app that can code?

jm82792

  • Posts: 630
  • Turrets: +9/-34
Re: Stuff to make a HD tremulous
« Reply #317 on: February 07, 2011, 06:06:10 am »
I'm poor at modeling.....
But I can animate  ;D

ULTRA Random ViruS

  • Posts: 924
  • Turrets: +4/-101
    • ZdrytchX's reference website
Re: Stuff to make a HD tremulous
« Reply #318 on: April 15, 2012, 01:03:28 pm »
i know this is a very old topic, but i remembered, does anyone have the link to download the textures? I could use it if i were to make a trem promo to try to keep trem from dying. Since last year, tremulous has lost about 30 servers on the masterlist, and about 20 players at any time average. [these are my estimations btw]

Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: Stuff to make a HD tremulous
« Reply #319 on: April 20, 2012, 09:34:49 am »
i know this is a very old topic, but i remembered, does anyone have the link to download the textures? I could use it if i were to make a trem promo to try to keep trem from dying. Since last year, tremulous has lost about 30 servers on the masterlist, and about 20 players at any time average. [these are my estimations btw]
Which textures and how are textures going to stop trem dying?
my knees by my face and my ass is being hammered

Qrntz

  • Posts: 847
  • Turrets: +204/-12
Re: Stuff to make a HD tremulous
« Reply #320 on: April 21, 2012, 01:31:00 pm »
[these are my estimations btw]
Cool, no reason to believe them whatsoever.

You make up Qrntz, u always angry, just calmdown. :police:
I am stupid idiot who dares to open mouth and start debating

ULTRA Random ViruS

  • Posts: 924
  • Turrets: +4/-101
    • ZdrytchX's reference website
Re: Stuff to make a HD tremulous
« Reply #321 on: April 21, 2012, 05:05:44 pm »
the posts from the beginning such as the goon texture, rifle texture etc... what do you think?  ::)