News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

idLiquid

Started by MrC, April 10, 2018, 08:22:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrC

Howdy folks,

Not sure if this is the right place to post this but... I've been toying with idLiquid lately and wanted to show some progress so far and see if anyone else might know any more tricks regarding this little hidden gem (well it was for me anyway).

Credits go to Human Head as it was within Prey that I found the basis for the idLiquid model entity, which is basically just an text file with various properties, as with the def files (modified versions found below).



A breakdown of what you're seeing and to try this yourself...

entityDef test_liquid512x512 {
   "inherit"               "idLiquid"
   "editor_color"            "0 .5 .8"
   "editor_mins"            "0 0 -24"
   "editor_maxs"            "512 512 24"
   
   "mins"                  "0 0 -24"
   "maxs"                  "512 512 4"
   "model"                  "liquids/test_liquid.liquid"
}

liquids/test_liquid.liquid:

size_x         512
size_y         512
verts_x         32
verts_y         32
liquid_type      1
density         1
drop_height      10
drop_radius      6
drop_delay      8000
update_rate      20
seed         22
shader      textures/rock/greenrocks2_lavascroll   

I think that's everything, "density" needs to be 1 or else the liquid will ripple but come to a stand still, I'm not even sure if everything actually does anything but it's what's there so far, play round and see what you can come up with and if anyone has any more information on this please share.

The Happy Friar

that stock doom 3?  I remember there being an idliquid entity but it was never used in d3. 

it's in misc.cpp but everything is commented out it looks like! :)

MrC

It's fhdoom, it's a bit buggy but I really dig it. Afaik this should work in vanilla though.

https://github.com/TTimo/doom3.gpl/blob/master/neo/renderer/Model_liquid.cpp

Misc.cpp https://github.com/TTimo/doom3.gpl/blob/master/neo/game/Misc.cpp#L2339

Misc contains the usual spawning, saving etc... but also has idLiquid::Event_Touch. In the Prey SDK these functions have been expanded upon to allow player interaction, among other things. As you pointed out most of it is commented out. But the simulation and visual element works. It's solid so the player can Jesus walk on it so it's best left in areas where the player won't be able to interact with it.

I noticed TDM has taken to use MD3 to achieve a similar result which is probably faster anyway. Still though, I wasn't sure if anyone else has played around with this, it's pretty cool how many things (including Megatexture) were put into D3 for later use, and discovering them is like finding some hidden gems - or I don't know, maybe I'm just going off the rails here.

The Happy Friar

I was always under the impression that the D3 engine was always a WIP engine & D3 was just the first game released under it. 

Quake 1/2 GPL engines do something similar with water that D3 does here.  it works on all existing water too, it's pretty cool.  You can also have water interact with objected too.  Makes me think D3 could have this done too.

MrC

Yea that's what I meant. Like things we would have followed as a community with id's once open nature, we never really got to see as they transitioned into whatever it is now (meaning no offence). Classic coke and the new recipe.


Wow, I hope this reply makes sense in the morning.  O0