SRL Archive - OSR Help

Color: Finding camera angle--ideas?


purerange86

2014-12-12 17:15:05

For 07, Is there any way to find the elevation of the camera, or has anyone worked on a function to do this? Any suggestions on what techniques one might use to do this? I'm thinking maybe height of the player, but that seems to be variable based on what one is wearing.

What I really need is to do a check if the player is at SRL_angle_high or not, maybe that would be a starting point.

Thanks in advance for any help!

riwu

2014-12-12 19:16:59

Using reflection would be easy, but with pure color it would be quite difficult and won't be 100% accurate. (calculating the relative positions of ur top clothing and bottom clothing?)
I think @Flight is planning to work on it https://villavu.com/forum/showthread.php?t=105064
Determine the camera 'pitch' (also would take a bit of work)


What the srl include currently does is to just hold up arrow for 1000 + Random(300) to make sure the angle will be set to highest (or lowest if argument is SRL_ANGLE_LOW) regardless of the current angle (not a very human-like solution though)

I think the angle could be determined through the console as well but using that would be even more bot-like.

cosmasjdz

2014-12-13 05:34:40

From: purerange86
For 07, Is there any way to find the elevation of the camera, or has anyone worked on a function to do this? Any suggestions on what techniques one might use to do this? I'm thinking maybe height of the player, but that seems to be variable based on what one is wearing.

What I really need is to do a check if the player is at SRL_angle_high or not, maybe that would be a starting point.

Thanks in advance for any help!


I used to count stable item TPA length. Actually i did it in reverse effect, i was changing the tpa lenght filter based on the angle of the camera, so it could be done in reverse. This may actually work with charachter too. Or just count pozition of certain pixel of your charachter clothers maybe a helmet on the screen. Since charachter is not stable at screen either.

For example what i was doing: i get player with rune helmet/rune pickaxe in wildy rune rocks and rune rocks. I dont know which lenghts to filter because my camera used to be at various angles i mean not elevation but rotation wise and used it to know what lenght rune rock is supposed to be like for angle 45 degrees 25-35 length then i knew anyone bigger and smaller can be filtered out. Atso i use similar tactics at dragons bots for example guam leaf and green dragonhide had very similar colors but i get camera angle and based on that filter tpa lenghts. Since if i wouldnt for example and it would be like tpa between 12 to 110 for d hide 12 is small number but if i am low angle its only 12 pixels i get but if i am high angle i get guam of 31 pixel but d hide of 80 or so so i can adjust filters by angle if i dont wana pick guam leafs. So my script used to move mouse to spot only if tpa longer than 32 at high angle and if low angle then at 12+

So to summ up TPA length may also be used to determine camera elevation.

Flight

2014-12-13 08:56:22

From: riwu
Using reflection would be easy, but with pure color it would be quite difficult and won't be 100% accurate. (calculating the relative positions of ur top clothing and bottom clothing?)
I think @Flight is planning to work on it https://villavu.com/forum/showthread.php?t=105064


What the srl include currently does is to just hold up arrow for 1000 + Random(300) to make sure the angle will be set to highest (or lowest if argument is SRL_ANGLE_LOW) regardless of the current angle (not a very human-like solution though)

I think the angle could be determined through the console as well but using that would be even more bot-like.


Yeah that's possible via RSEntities I believe. Picturing it in my head I believe we could use the RSEntity.BasePnt's Y value to determine the pitch. Does anyone, with a knowledge of reflection, know the range of the lowest pitch to the highest pitch? Like is it 0-100 or something similar? I could probably whip up a formula to give us a close estimation based on this theory.

But to answer the OP's question no; there's no real way for color to know precisely the camera pitch such as a human cannot know. The closest we can get is by looking at where our player is located on the screen or how large he/she appears.

Hoodz

2014-12-13 09:23:34

From: Flight
Yeah that's possible via RSEntities I believe. Picturing it in my head I believe we could use the RSEntity.BasePnt's Y value to determine the pitch. Does anyone, with a knowledge of reflection, know the range of the lowest pitch to the highest pitch? Like is it 0-100 or something similar? I could probably whip up a formula to give us a close estimation based on this theory.

But to answer the OP's question no; there's no real way for color to know precisely the camera pitch such as a human cannot know. The closest we can get is by looking at where our player is located on the screen or how large he/she appears.


lowest pitch on rs was something like 23 i believe