Topic Development / Scenario & Object Development / Boni says we need a wind-ish system for windmills
... And caesar says it's too expensive. What about something simple, like this?
The idea is to simply check at 5 points instead of only at the center of the windmill. There would be a formula which is used to compute the turning speed. Each point where there is sky in the background would be summed in with some weightinf factor.
For example, from left to right: 5, 20, 50, 20, 5 (most likely not the optimal distribution of weights, I think Peter can come up with something better). This way, windmills would work better when build in open places, but could also still work when placed in cave entrances.
This won't be a perfect imitation of wind behaviour, of course, but it would be better than it is now.. ;)
The idea is to simply check at 5 points instead of only at the center of the windmill. There would be a formula which is used to compute the turning speed. Each point where there is sky in the background would be summed in with some weightinf factor.
For example, from left to right: 5, 20, 50, 20, 5 (most likely not the optimal distribution of weights, I think Peter can come up with something better). This way, windmills would work better when build in open places, but could also still work when placed in cave entrances.
This won't be a perfect imitation of wind behaviour, of course, but it would be better than it is now.. ;)
Attachment: windish.png (38k)
Not really. Why? If theres an obstacle between two of those points, chances are that its just some loam bridge or a rather thin chunk of material. Wind would ignore that. ;)
Besides that it would not turn due to its vertices being stuck, where is the problem? Since there is sky in the middle of your construction there, it must be some kind of tube... so wind should be able the get through it. Also: The same "problem" arises with the current solution! ;)
When I implemented your suggestion I noticed that currently the vertices of the generator do not play any roll since it uses mesh animations atm :/
a) replace animated mesh with attached object (bad for rotation and construction wireframe) or b) additional invisible attached object that has to be synced with the animation (more hacky but cleaner in the end).
I tend to do the latter atm *loud thinking*
a) replace animated mesh with attached object (bad for rotation and construction wireframe) or b) additional invisible attached object that has to be synced with the animation (more hacky but cleaner in the end).
I tend to do the latter atm *loud thinking*
b is preferred by me also, to the other question, please go ahead an implement this.
Make sure to apply the mesh transformation to the vertices of the invisible object or you will have the same problem with "bad for rotation" (collision vertices not being in sync with graphics).
Custom vertices reset when you rotate the object :/
I guess I will rely on "the windmill is never rotated too much" and just use hardcoded vertices
I guess I will rely on "the windmill is never rotated too much" and just use hardcoded vertices
http://docs.openclonk.org/en/sdk/script/fn/SetVertex.html set_custom_permanent?
Reply: Can't you make the default mesh have a rotor (and probably a ring which indicates how big it is going to be) and make that go away on construction?
The whole windmill is rotated by a random amount at construction for visual effects. Also it's not facing the screen like in CR
PPS: Then just check for a existing paths to those points (GetPathLength)
Is anything speaking against implementing it they way you suggested or should I just go ahead and do it? *revives dead topic*
Implemented.
I used 10 25 30 25 10.
For the "wings can be obstructed now"-thing:
I had no good idea to keep them in sync 100%. So that means if the windgenerator is obstructed and the wings stuck, the generator might stop a little bit later. If anyone wants to improve that, feel free
Other than that, we should see whether it annoys anyone ingame.. :)
I used 10 25 30 25 10.
For the "wings can be obstructed now"-thing:
I had no good idea to keep them in sync 100%. So that means if the windgenerator is obstructed and the wings stuck, the generator might stop a little bit later. If anyone wants to improve that, feel free
Other than that, we should see whether it annoys anyone ingame.. :)
Would it be helpful if I added an Anim_R function to the engine which synchronizes the animation state with the rotation of an object?
> most likely not the optimal distribution of weights, I think Peter can come up with something better
Uhm, only now I realize that I was name-dropped :-o
Well, I don't really have a strong opinion on this topic. I still think that having a safeguard against building completely useless windmills would be a good idea. And optimality is very hard to define here... What exactly would you try to optimize?
Instead, here's a random idea: Instead of five static points you could sample three points into a somewhat random direction every couple of frames - then weight the result, add to a moving average, and set the windmill speed accordingly. I think that could give some nice organic results.
Topic Development / Scenario & Object Development / Boni says we need a wind-ish system for windmills
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill