Page 1 of 3

1.0.26

Posted: Sun Sep 23, 2007 23:47
by Graf Zahl
Yes, there's another release!

This was mainly done to fix a crash while reading the GLDEFS file.

In addition there are a few new features:

- added round and smooth particles from Skulltag
- added model interpolation from Skulltag
- added support for Strife's fullbright colors. Be advised that this needs a shader and therefore at least a Geforce 5 or similar card to work. I plan to expand this feature to full brightness map support in the next version. Since this is a shader based feature it is disabled by default so you have to enable it in the menu first to see the difference.

Posted: Mon Sep 24, 2007 0:11
by BlazingPhoenix
Yay! Another new version!

Posted: Mon Sep 24, 2007 15:52
by Karate Chris
You're on a roll! :D

Re: 1.0.26

Posted: Mon Sep 24, 2007 16:04
by Enjay
Graf Zahl wrote:- added round and smooth particles from Skulltag
- added support for Strife's fullbright colors.
Yay! Two things I've wanted for a while. Thanks Graf. Can't wait to get home and DL this. :)

[edit] and both of them look very nice. Any clues as to how the light-map shaders work? I've had a look at the lumps but I couldn't work out the format. [/edit]

Re: 1.0.26

Posted: Mon Sep 24, 2007 20:05
by Torr Samaho
Graf Zahl wrote: - added model interpolation from Skulltag
I just had a quick look at the code and it looks like you ported almost all of my changes of the model code. Thanks!

I guess it won't hurt if I mention all the changes in more detail, so that people know of their existence and can use them:

- model frame interpolation, controlled by the the new CVAR gl_interpolate_model_frames
- model skin color translation support. The skin texture may only use colors from the game palette, otherwise it won't work properly.
- Models respect the actor render style now, e.g. a model of a player with an invisibility sphere is rendered translucent. To reduce the problems caused by missing depth sorting, back face culling is used. This doesn't work if the model is not a closed surface.
- z-offset support to MODELDEF
- Doomsday like rotation of the weapon pickup models, controlled by the the new CVAR gl_rotate_weapon_models

Re: 1.0.26

Posted: Mon Sep 24, 2007 21:22
by Graf Zahl
Since I just wanted to get the version out as quickly as possible I just copied the stuff without making any changes to it so far. There's a few things I'd like to change though:
Torr Samaho wrote: - model frame interpolation, controlled by the the new CVAR gl_interpolate_model_frames
This still needs an option in the menu.
- model skin color translation support. The skin texture may only use colors from the game palette, otherwise it won't work properly.
I really wish I could find a way to apply translations to wall textures and flats in the software renderer. Then this could be turned into a universal feature...
- Models respect the actor render style now, e.g. a model of a player with an invisibility sphere is rendered translucent. To reduce the problems caused by missing depth sorting, back face culling is used. This doesn't work if the model is not a closed surface.
So where can I find a decent sorting algortihm for this?
- Doomsday like rotation of the weapon pickup models, controlled by the the new CVAR gl_rotate_weapon_models
This should be a MODELDEF option, not just applicable to weapons. I'll change this for the next version but keep the option in.

But first on my list is the implementation of customizable brightness maps so it may take a week or two.

Re: 1.0.26

Posted: Mon Sep 24, 2007 22:17
by Torr Samaho
Graf Zahl wrote:
- Models respect the actor render style now, e.g. a model of a player with an invisibility sphere is rendered translucent. To reduce the problems caused by missing depth sorting, back face culling is used. This doesn't work if the model is not a closed surface.
So where can I find a decent sorting algortihm for this?
I think sorting the triangles according to their barycenter in a quadtree should do it, but this is just a basic idea, not a ready to implement algorithm. Does anybody know if Vavoom or Doomsday use depth sorting? Both support model transparency, so they should use it (or suffer from rendering artifacts).
Graf Zahl wrote:
- Doomsday like rotation of the weapon pickup models, controlled by the the new CVAR gl_rotate_weapon_models
This should be a MODELDEF option, not just applicable to weapons. I'll change this for the next version but keep the option in.
Yeah, right. I planned to add several optional flags to MODELDEF to toggle different things, like rotation, interpolation and "pitch from momentum", but didn't have time to do so yet.

Posted: Tue Sep 25, 2007 3:20
by OdinM1
Kudos to Graf for another release! I like the new "rounded" particles.

Re: 1.0.26

Posted: Tue Sep 25, 2007 8:52
by Graf Zahl
Enjay wrote: Any clues as to how the light-map shaders work? I've had a look at the lumps but I couldn't work out the format. [/edit]

A short explanation:

Code: Select all

varying float fogcoord;
uniform int fogenabled;
uniform sampler2D brightmap;

// Input to this function is the unprocessed texel that would be displayed at this position.
vec4 lightpixel(vec4 pixin)
{
	vec4 lightcolor = gl_Color;

	// This 'if' only calculates depth fog. This is normally done automatically when no shader is used but in a shader you have to do it yourself.
	if (fogenabled != 0)
	{
		const float LOG2E = 1.442692;	// = 1/log(2)
		float factor = exp2 ( -gl_Fog.density * fogcoord * LOG2E);
		lightcolor = vec4(mix(gl_Fog.color, lightcolor, factor).rgb, lightcolor.a);
	}

	//Gets the color from the brightness map which is a second texture.
	// After that it is multiplied with the inverse of the current light color
	// and then added to it. If the brightmap is pure white this will result
	// in white light, otherwise something in between.
	vec4 bright = texture2D(brightmap, gl_TexCoord[0].st) * (vec4(1.0,1.0,1.0,1.0) - lightcolor);
	bright.a = 0.0;
	lightcolor += bright;
	// and finally multiply the input texel with the newly generated light color.
	return pixin * lightcolor;
}

Posted: Tue Sep 25, 2007 10:27
by Nash
This looks like a heavy new release! Much thanks Graf!

(And yay for porting Torr's stuff!)

EDIT: So it looks like unanchored sprites didn't make it... oh well...

EDIT 2: I can't get PNG alpha model skins (like a smooth fade out) to work. Broken feature perhaps... ?

Posted: Tue Sep 25, 2007 12:41
by Torr Samaho
Nash wrote:EDIT 2: I can't get PNG alpha model skins (like a smooth fade out) to work. Broken feature perhaps... ?
Nonexistent feature. Due to lack of depth sorting, I didn't add this yet. Only the actor render style is respected.

Posted: Tue Sep 25, 2007 13:15
by Nash
Oh, I see... I really hope it'll be implemented soon because there are a lot of nice things I can come up with such a feature.

Posted: Wed Sep 26, 2007 8:11
by Vaecrius
And on the somethingth day, Graf said, "Let there be lights.wad", and lo, there was lights.wad.

Posted: Wed Sep 26, 2007 9:13
by Graf Zahl
What do you mean by that cryptic statement?

Posted: Wed Sep 26, 2007 16:25
by Karate Chris
Graf Zahl wrote:What do you mean by that cryptic statement?
I think he is refering to the GLDEFS crash fix.