|
Re: Fluid Dynamics for lower editions
[Re: VeT]
#277191
07/08/09 09:04
07/08/09 09:04
|
Joined: Dec 2008
Posts: 528 Wagga, Australia
the_mehmaster
OP
User
|
OP
User
Joined: Dec 2008
Posts: 528
Wagga, Australia
|
You can change the 'viscosity' value if you like. In line 24. evilSOB, you made this so simple! very user-friendly.
Last edited by the_mehmaster; 07/08/09 09:09.
|
|
|
Re: Fluid Dynamics for lower editions
[Re: VeT]
#277198
07/08/09 09:28
07/08/09 09:28
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I think Vet is right, the fps-independance is a bit of a "fudge" ATM. Im going to have another look at it shortly, just NEED coffee first.
Glad its user-friendly, thats something I take pride in...
Also guys, I think we may need to change the "name" of the viscosity define. Because if the terrain size IN QUANTS is small, the viscosity needs to be small to simulate a small body of water. But when the terrain size is large IN QUANTS, but has the same number of wertices as the small one, then you need to set the viscosity high to simulate a large body of water.
So maybe "viscosity_scale" or something? Any ideas...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Fluid Dynamics for lower editions
[Re: VeT]
#277204
07/08/09 09:52
07/08/09 09:52
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
My thoughts exactly. To my aging mind, the "velocity scale" and a fluids "viscosity" will be directly related to one another. So my "viscosity_scale" allows the programmer to "tweak" those values at the same time. A higher viscosity_scale means that either the terrain is a large body of "water", or a small body of a "thicker" fluid.
Would you guys agree with this? Play with the viscosity value with what Ive already posted to see what I mean if need be.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Fluid Dynamics for lower editions
[Re: EvilSOB]
#277205
07/08/09 09:57
07/08/09 09:57
|
Joined: Aug 2004
Posts: 1,345 Kyiv, Ukraine
VeT
Serious User
|
Serious User
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
|
"tweak" is good, but i dont think that its good in this case I think, that you may find distance between 2 vertexes and count viscosity_scale automatically For example, if dist_between_vertexes = 1 Quant, then viscosity_scale = 1, if dist_between_vertexes = 2 Quants, then viscosity_scale = 0.5, if dist_between_vertexes = 0.5 Quant, then viscosity_scale = 2 Something like this
|
|
|
Re: Fluid Dynamics for lower editions
[Re: VeT]
#277214
07/08/09 10:41
07/08/09 10:41
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Sorry, but I think that would be bad. FI, what if you have a level where one quant has a "game" scale of one inch, then another level/game where the game-scale is one quant = one foot. It would look awful. Its got to be up to the level designer to decide on the "viscosity_scale" that "matches" both the game-scale of the level, and the "type" of fluid being represented.
[EDIT] Getting this thing frame-rate independant is being a real bastard!
Last edited by EvilSOB; 07/08/09 10:46. Reason: footnote
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Fluid Dynamics for lower editions
[Re: VeT]
#277219
07/08/09 11:52
07/08/09 11:52
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Ill keep it in mind, cause I dont think it really makes any difference, after thinking about it. After all, the viscosity_scale calculation will take place at the start of the action anyway, and IF the entity is being created by ent_create, then the calculation will be completed by the time the calling function over-writes it with a hard-coded value anyway.
I'll have to get back to you on this later though, cause the time_scaling is being a real bastard, and the viscosity_scale will piggy-back off that when its done.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|