Jump to content
The Dark Mod Forums

Water too fast


Tels

Recommended Posts

This is off-topic:

 

Well, we do have particle leaf trees... wind blowing... And as in NHAT you can just put rotate props on vegetation (sure that's how it was done) which works good and is probably better than animated models (big file size though I'm not sure about performance - I don't see why models with one or two bones playing an anim idle would have a big performance impact though)

 

They would have a big impact for the fact alone that this means you need to have *one entity per model* which is overkill and drags down performance (even if they are not animated). I am working on fixing this (the model combiner could theoretically "animate" the models it combines if it recombines them every frame), however, it is not there yet, and having a large number of plants "swaying" is ineffective.

 

Trailing smoke... well.. the particle editor crashes on me right now, but I'd be suprised if there isn't a trailing option for particles.

 

Particles are "static", they just play their "path" and are done, they do not react to forcefields, or can change their path, or collide with anything. I do to have a few ideas how to enhance them, but this is a long way off.

 

So you either have a "smoke trailing particle" where the smoke always trails the same way, or you don't, but it is not really possible to have something where the wind direction changes (unless you do other tricks like adding a func_emitter but that again drags down performance).

 

So, basically, a map with a lot of wind is hard to do right now.

 

And to get back to the topic at hand, the fast water we have is the default and *also* used for indoor water bodies, for cave water, fr kitchen sinks etc etc. Basically, a lot of places where there definitely is not wind, and where you definitely don't get these big waves. (That the waves are too fast is another thing which I don't like but I digres again :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Okay, visitors left us early, so I had a bit of time and I tried the following:

 

translate    0.01 * sintable[time * (parm5 || 0.08)], 0.01 * sintable[time * (parm5 || 0.08) * 1.25 ]
...
vertexParm 0 time * (parm5 || 0.05) * 0.5 , time * (parm5 || 0.08) * 2.5

 

That does, however, just result in a high-frequency wobble. Ugh.

 

I don't know why "parm5 || 0.08" doesn't work, maybe because parm5 is initialized to 1. Also, it turned out that idLiquid does NOT have any code that reads out the spawnargs and puts "shaderParm5" actually into the renderentity.shaderParms[5] slot. Oops. Fixed that now in code, but in first tests it doesn't work either. Oh well..

 

And after fixing the code, '''parm5 || 0.08''' just doesn't work. So I settled for '''parm5''' and put a default vaule into atdm:liquid_water.

 

And now it works, see here:

 

http://bloodgate.com/mirrors/tdm/pub/video/tdm_water_new.mpg

 

(Edit: Had to reupload, first version was borked. Sorry)

 

Left entity has parm5=0.01 and parm6=1.5, the right entity has parm5=0.2 and parm6=5, both have same material. The defaults (and the old values) are 0.08 and 1.5. (I don't know what the value for parm6 actually is, I though it is the wave-height, but I am not entirely sure).

 

So here is a small task that someone could do over the next week:

 

* open a bug tracker entry

* replace all translate and vertexParam lines in materials/tdm_water.mtr with the following formulas:

 

translate    0.01 * sintable[time * parm5], 0.01 * sintable[time * parm5 * 1.25 ]
...
vertexParm 0 time * parm5 * 0.5 , time * parm5 * 2.5
vertexParm 1 parm6

 

* remove the now superflous file materials/tdm_water_slow.mtr

* recompile a new windows DLL

* make a testmap with various atdm:liquid entities and assign "shaderParm5" and "shaderParm6" spawnargs to them, where 5 is between 0.01 and 0.1, and parm 6 is between 0.5 and 3.5.

* Find out what parm6 actually represents

* document all this on the wiki http://wiki.thedarkmod.com/index.php?title=List_of_shaderParm_variables and add a water wiki entry

* close the bugreport

* post success here

* cheer with a nice glass of wine

 

B)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Apart from the issue "what should be the default speed", there is the issue "how do we let the mapper select the speed". And it just occured to me we could change the materials so they use shaderparms. Then the mapper can just add spawnargs to the water body, and the wave speed/wave height will adjust accordingly. You could even change it at runtime...

 

This would be awesome. I have a lake in the rain that still wants some agitated roiling waves, but I know it doesn't look good for most uses.

 

But for a default I'd have a slow bobble. I imagine it'd be hard to find a value that would work perfectly for lakes, ponds, and standing puddles alike; not even sure which one gets used the most, either. So maybe find the closest common denominator I guess.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Exactly. Add several is best rather than change what we have or maybe pass the value from the map via a parm. Especially when adding a few new ones instead is just adding a few hundred bytes which compress down to a tiny amount in the pk4s.

 

What I mean is that wave frequency varies from a washtub to a canal to an ocean. This can be adjusted somewhat by changing the texture scale (and direction for flow.) Don't know if it's the same texture but I spent some time tweaking canal water in my next FM. There is water in Thief's Den, Trainer, St. Lucia, and others which have been adjusted to give the appearance wanted by the mapper.

Link to comment
Share on other sites

Exactly. Add several is best rather than change what we have or maybe pass the value from the map via a parm.

 

Please re-read my last post :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

done. :laugh:

 

It has been almost weeks and nobody did the small things I asked on 2010-09-10 :mellow:

 

* Bug report opened: http://bugs.angua.at/view.php?id=2362

* removed the slow water textures,

* and added some info to the bug report.

 

TODO:

 

* modify all materials,

* make testmap,

* find out what second parm really does and if we can either ignore it or base it on the first parm, so the mapper needs to adjust only one value.

* close bugreport.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Meh,

 

those who do not know features will reimplement them...poorly.

 

Now that I wanted to document the new feature, I read this:

 

http://wiki.thedarkmod.com/index.php?title=Swimmable_Water#Wave_Frequency_and_Direction

 

Oh well.. need to toy around with that and see if that is already what I wanted.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

(For my part) Sorry, haven't been following this closely enough to even be sure what's the hubbub.

 

I want:

 

* the default water waves to be much slower

* and it easily controllable by the mapper

 

So I added code that liquids can also have shaderParms set on them in DR (which is nice to have, too). Then I propose modify the water texture so these shader parms are taken into account.

 

Then I asked while I am gone that somebody else relieves me from small tasks (because I am the coder, not the do-it-all-alone-guy, delegating stuff etc :) Nobody did. So I started cleaning it up myself (wasting my precious time :)

 

Watch the latest video that shows how you can thus change the speed. (you could even change it during runtime!) It also means you don't need new water material shaders just to change the speed.

 

http://bloodgate.com/mirrors/tdm/pub/video/tdm_water_new.mpg

 

Afterwards I detect that the wiki mentions changing the scale of the texture also changes the speed. Duh! (Of course, this method might not be equal to my method, changing the scale at runtime can be tricky, also, slow water with the same scale would not be possible).

 

That's the summary... way too much talk for such a small change (which will not be the default, thanx to "wah we cannot change anything it might possible break something somewhere" attitude we all seem to developer more and more lately :-/

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

You can't expect me to do anything on this because as I said I oppose what you want to do. :)

 

There are two issues (I am repeating myself..):

 

* change the default water speed. Formerly, this was very complicated (you need to change all materials), now it is easy, just tweak the two default spawnargs on atmd:liquid. However although I'd like to do this, it is entirely optional, not done yet, and probably won't done. However, if someone wants to do it, they can do it now more easily..

* make the water speed (both wave speed and texture scale speed) easily controllable for the mapper. This is already done.

 

 

All I did ask was to free me for coding tasks and finish all the other stuff like documenting the new abilities, making a testmap etc etc.

 

How can I justify coding some new features in or fix bugs, when people can't even be bothered to read my posts fully before replying? *sigh* :mellow:

 

Anyway, I'll finish it myself. I have nothing else to do tonight, anyway.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Not sure what you encoded that video with Tels, but I can't see anything much but a bunch of choppy pixels. lol Doesn't matter what player I use.

 

Hm, I just copy&pasted some instructions from the web, when it comes to encoding video, I am clueless. And despite the big filesize, the quality is not good. I'll post when I finish the testmap, then you should simply try it yourself in the game engine :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Ok, I have gone through the material file, and everywhere there is something like time * factor I have replaced it with time * parm5 * factor/parm5 so that the new value based on parm5 = 0.1 (the default) is exactly the same value as before. Likewise for parm6 (which is the wave height from the vertext program). That was a lot of changes, ouch.

 

Also added a testmap test/water_speed.map which shows the defaults and some modified speeds for some water textures. The testmap really should be expanded, I missed a few like cave_water etc. However, I am tired for today.

 

Regarding changing the default speed, it is not as simple as I though, because almost all of our water textures have different speeds. Some make sense (like the one for sea water), others are compeletly off the whack (like water_green), and others look like they where just copy&pasted from whatever they where based on. And since we very probably will not get an agreement on what the speed should be, we'll just leave it alone. Mappers can now easily set the speed and wave height in DR, that is all that matters :)

 

Also set the defaults (0.1 and 1.5) on atdm:liquid and also documented it here:

 

http://wiki.thedarkmod.com/index.php?title=List_of_shaderParm_variables

 

and

 

http://wiki.thedarkmod.com/index.php?title=Swimmable_Water

 

Revision #11055 if anybody wants to check it out :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I repeated that I oppose what you are proposing so your answer is to repeat what you are proposing. So I still oppose what you are proposing because it hasn't changed.

 

Maybe I'm misunderstanding what the words "change" and "default" means? I thought you meant "change the default water speed and frequency." I thought you were changing water surface materials? That is, the ones used in many existing maps. I thought you were changing the speed and frequency of water in the materials that are already in use in existing maps. If instead you are adding new water materials (which I said I support) then that's fine.

Link to comment
Share on other sites

I repeated that I oppose what you are proposing so your answer is to repeat what you are proposing. So I still oppose what you are proposing because it hasn't changed.

 

Maybe I'm misunderstanding what the words "change" and "default" means? I thought you meant "change the default water speed and frequency." I thought you were changing water surface materials? That is, the ones used in many existing maps. I thought you were changing the speed and frequency of water in the materials that are already in use in existing maps. If instead you are adding new water materials (which I said I support) then that's fine.

 

lol You're definitely misunderstanding.

 

As he has explained several times now, he is not changing what you see in existing maps. he has simply made a small change in the material files so now mappers can change the speed and waves in Dark Radiant....whereever there was

time * factor I have replaced it with time * parm5 * factor/parm5 so that the new value based on parm5 = 0.1 (the default) is exactly the same value as before. Likewise for parm6 (which is the wave height from the vertext program).

 

The existing water in maps will remain the same, but mappers can drop that very same water into a map and change the speed and wave height in Dark Radiant. Sounds good to me.

Link to comment
Share on other sites

Yes, but I have only so much time and like Sneaksie I've not followed this closely. This thread has been confusing. I have difficulty reconciling the claims with statements like

I want:

 

* the default water waves to be much slower

(which I cannot reconcile with your claim that nothing will be changed in existing maps)

 

and

 

There are two issues (I am repeating myself..):

 

* change the default water speed.

Re-reading that last one a 4th time I think you actually mean the opposite: the issue is NOT to change the default water speed but "keep the same default water speed by using a new method which allows the mapper to more easily change it FROM the default water speed if he wants. Changing FROM a default is not the same as changing the default. A better issue definition might have been "Keep the same defaults but provide an easier way for mappers to change from them."

 

Given the confusing presentation you failed to gain support. ;)

Link to comment
Share on other sites

Yes, but I have only so much time and like Sneaksie I've not followed this closely. This thread has been confusing. I have difficulty reconciling the claims with statements like (which I cannot reconcile with your claim that nothing will be changed in existing maps)

 

Sorry, english problem. I should have more clearly stated that this is what I "wish" for, but not nec. what is happening. :)

 

Given the confusing presentation you failed to gain support. ;)

 

The story of my life :D

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...