Jump to content

rd-rend2 (old thread)


eezstreet

Recommended Posts

Posted

can we control the color of the fog?

 

Apparently we can - checked out the fog shaders:

 

textures/fogs/fog1

{

    qer_editorimage    textures/fogs/fog.tga

    qer_nocarve

    surfaceparm    nonsolid

    surfaceparm    nonopaque

    surfaceparm    fog

    surfaceparm    trans

    q3map_nolightmap

    fogparms    ( 0 0 0 ) 256.0

    cull    twosided

}

 

The ( 0 0 0 ) indicates the RGB color, and the 256 (in this case) is the distance at which the fog turns completely opaque.

Archangel35757 likes this
Posted

I think that fog.tga is only a help when mapping, it doesn't even exist in base JA but only in mapextras.pk3.

 

About the caustic effect... I don't know. Honestly I'd rather have it "hard-mapped", with specific textures and shaders.

Posted

I think that fog.tga is only a help when mapping, it doesn't even exist in base JA but only in mapextras.pk3.

 

About the caustic effect... I don't know. Honestly I'd rather have it "hard-mapped", with specific textures and shaders.

But characters/NPCs (Mr. Shark) swimming thru a caustic effect would swim thru the light pattern.... like in that openGL video.

Posted

@@HiddenSpy achieved a pretty good looking caustic effect on his map Siren's Enclave, but I believe those were just textures he applied to the map's brushes.

 

With all the due respect, I wouldn't call it "good looking". Admittedly, though, there weren't many more options available to achieve it.

Circa likes this
Posted

With all the due respect, I wouldn't call it "good looking". Admittedly, though, there weren't many more options available to achieve it.

Right. By good looking, I meant for a JKA map. :P It looks pretty good in-game. That preview video doesn't do it quite as much justice. But yeah, you're right.

Posted

I don't recall the in-game water having any kind of "fog"? As far as I remember, the blue tint you get from going into water is literally a blue transparent square drawn on top of the screen by the cgame mod.

 

For a small progress update, I'm currently looking at optimizing what gets drawn. By default, everything that resides within active vis nodes (i.e. areas which the player can see from the node they are currently in) is drawn. However, this means that some objects are drawn unnecessarily even if they cannot see them from their current location and the direction they are facing. To improve this, I can determine which objects are actually visible on the player's screen and then just not draw them. Only drawing things which the player can see should give a nice performance boost on large and detailed maps :)

Boothand, Exmirai and Tempust85 like this
Posted

I don't recall the in-game water having any kind of "fog"? As far as I remember, the blue tint you get from going into water is literally a blue transparent square drawn on top of the screen by the cgame mod.

 

For a small progress update, I'm currently looking at optimizing what gets drawn. By default, everything that resides within active vis nodes (i.e. areas which the player can see from the node they are currently in) is drawn. However, this means that some objects are drawn unnecessarily even if they cannot see them from their current location and the direction they are facing. To improve this, I can determine which objects are actually visible on the player's screen and then just not draw them. Only drawing things which the player can see should give a nice performance boost on large and detailed maps :)

I'm saying that using a fog brush entity under water would create a more realistic water visibility effect... and the fog tga could be tinted to complement the water color.

Posted

There's still no getting rid of the blue tint though :(

Why is that? Because it's a hard-coded overlay? If so I think rend2 should allow it to be a mapper designated color that could be used in conjunction with fog (to better simulate underwater visibility conditions) ...please.

Posted

Yeah but water is done in cgame, not the renderer.

Okay... then cgame should be modified so that it's not hard-coded but rather can be established by the mapper somehow as a water brush parameter.

Posted

But cgame is specific to each mod. If you play on a server with basejka, you're using a different cgame from the one that's used with JA++, that's different from the one that's used in MB2, etc.

Posted

But cgame is specific to each mod. If you play on a server with basejka, you're using a different cgame from the one that's used with JA++, that's different from the one that's used in MB2, etc.

Would it not be an "enhancement" that could be baselined in OpenJK? And thus available to all mods using OpenJK? @@Raz0r

Posted

No.

 

I mean, the code would be available, but it would not automatically apply to all mods just from running the OpenJK engine.

Posted

No.I mean, the code would be available, but it would not automatically apply to all mods just from running the OpenJK engine.

But if the underwater texture that is hard coded to be that blue color was modified in OpenJK code to allow the mappers to manually set that color ( thru a water brush parameter or some other mechanism-- or accept that standard blue color as a default)... then a mod (based on OpenJK) would have to change the code back to whatever else they wanted... Right?

Posted

There's no texture, it just fills the screen with blue at some level of transparency. It's entirely CGame code, nothing in the engine. There's also no way for the engine to selectively discard the colour fill.

 

The main issue is, there are barely any mods based off OpenJK, and less that are kept up to date. I would expect 0-1 mods to adopt it.

Things get worse if it relies on features only present in Rend2

Posted

...There's also no way for the engine to selectively discard the colour fill..."

How's that? The source code can be modified... it could be totally removed, yeah? Seems like there would be some way to modify the code to have it be modifiable... or set to a specific color/hue... no?

Posted

Yes, if you modify the CGame portion, you can totally customise it. I'm just explaining that unless you're using the CGame provided by OpenJK, pretty much no one will have this new underwater feature.

Posted

Yes, if you modify the CGame portion, you can totally customise it. I'm just explaining that unless you're using the CGame provided by OpenJK, pretty much no one will have this new underwater feature.

I'm just not grasping your argument... I think it would be like any number of OpenJK enhancements-- that any mod using openJK would have this as an OpenJK base feature in cgame which they can then add their unique mod changes... and if for some unfathomable reason if they didn't want it, they could change it back, etc.

 

For example, perhaps the cgame could be modified to sample the base color of the water brush?

Posted

You're assuming that
a) every mod that uses OpenJK as an engine uses the OpenJK cgame
b) every mod that uses the OpenJK cgame is kept completely up to date on the bleeding edge of updates
c) the point of OpenJK is to add features and make the game "better"
d) everyone is going to use rend2
e) everyone cares about water
f) everyone who uses the OpenJK cgame is using the rend2 branch for cgame
g) nobody wants the blue tint
h) adding the thing you're suggesting is trivial
i) if G isn't true, then making it removable is trivial
j) rend2 is meant to alter cgame

AshuraDX likes this
Guest
This topic is now closed to further replies.
×
×
  • Create New...