Raz0r Posted July 28, 2015 Posted July 28, 2015 I don't think there is any concept of buoyancy in JA, but Xycaleth has previously added it using ODE physics engine as part of JAPhys Archangel35757 likes this
Ramikad Posted July 28, 2015 Posted July 28, 2015 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
Archangel35757 Posted July 28, 2015 Posted July 28, 2015 @@Ramikad - so the fog.tga could also be replaced for a more underwater-like tga image as well I see... I wonder if the fog shader would allow a lightmap that would replicate the underwater caustic effect? http://marine-wp.acfr.usyd.edu.au/wp-content/uploads/2014/06/320px-UndImgLighteffects.png https://cdn.tutsplus.com/cg/uploads/legacy/135_C4D_Caustics/finalEffectCaustics.jpg
Ramikad Posted July 28, 2015 Posted July 28, 2015 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.
Circa Posted July 28, 2015 Posted July 28, 2015 @@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.
Archangel35757 Posted July 28, 2015 Posted July 28, 2015 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.
Raz0r Posted July 29, 2015 Posted July 29, 2015 JAPhys would not have any code related to Rend2, totally doable =p Archangel35757, Exmirai and Tempust85 like this
Ramikad Posted July 29, 2015 Posted July 29, 2015 @@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
Circa Posted July 29, 2015 Posted July 29, 2015 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. It looks pretty good in-game. That preview video doesn't do it quite as much justice. But yeah, you're right.
Xycaleth Posted July 30, 2015 Posted July 30, 2015 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 Tempust85, Exmirai and Boothand like this
Archangel35757 Posted July 30, 2015 Posted July 30, 2015 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.
Xycaleth Posted July 30, 2015 Posted July 30, 2015 There's still no getting rid of the blue tint though
Archangel35757 Posted July 30, 2015 Posted July 30, 2015 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.
Tempust85 Posted July 30, 2015 Posted July 30, 2015 Yeah but water is done in cgame, not the renderer.
Archangel35757 Posted July 30, 2015 Posted July 30, 2015 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.
Xycaleth Posted July 30, 2015 Posted July 30, 2015 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.
Archangel35757 Posted July 30, 2015 Posted July 30, 2015 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
Raz0r Posted July 30, 2015 Posted July 30, 2015 No. I mean, the code would be available, but it would not automatically apply to all mods just from running the OpenJK engine.
Archangel35757 Posted July 31, 2015 Posted July 31, 2015 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?
Raz0r Posted July 31, 2015 Posted July 31, 2015 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
Archangel35757 Posted July 31, 2015 Posted July 31, 2015 ...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?
Raz0r Posted July 31, 2015 Posted July 31, 2015 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.
Archangel35757 Posted July 31, 2015 Posted July 31, 2015 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?
eezstreet Posted July 31, 2015 Author Posted July 31, 2015 You're assuming thata) every mod that uses OpenJK as an engine uses the OpenJK cgameb) every mod that uses the OpenJK cgame is kept completely up to date on the bleeding edge of updatesc) the point of OpenJK is to add features and make the game "better"d) everyone is going to use rend2e) everyone cares about waterf) everyone who uses the OpenJK cgame is using the rend2 branch for cgameg) nobody wants the blue tinth) adding the thing you're suggesting is triviali) if G isn't true, then making it removable is trivialj) rend2 is meant to alter cgame AshuraDX likes this
Recommended Posts