|
|
On 4-10-2018 9:18, Thomas de Groot wrote:
> On 3-10-2018 15:17, Kenneth wrote:
>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>> So, I manage to get the arrow on the rod by tweaking:
>>>
>>> (0.483-screen_y_position*0.01)*cam_ang/image_width*image_height);
>>> #local dir_xy = vaxis_rotate (dir_y, cam_up,
>>> (0.535-screen_x_position*0.01)*cam_mirror*cam_ang);
>>>
>>> replacing the 0.5 value by respectively 0.483 in dir_y and 0.535 in
>>> dir_xy.
>>>
>>> Of course, this is entirely by just dumb trial and error, and I highly
>>> doubt if it is significant. I wonder now if it holds for other scenes...
>>> tests to do...
>>>
>>
>> Yeah, I've found that tweaking *something* (one of several different
>> things
>> actually) can put the arrow where it's supposed to be. But I suspect
>> that your
>> values would need to change, when using a different camera angle? My
>> own 'tweak
>> tests' have shown that the code as-is has the ideal overall values in its
>> arrow-placement equations-- but only at the most extreme
>> telephoto/zoom camera
>> angle. As that angle value climbs toward 90 (more and more
>> wide-angle), the
>> arrow position just gets progressively worse... and my own
>> value-compensation
>> tweaks have to get larger, to correct it. Very frustrating so far.
>>
>> BTW, what CamAng did you use for this test? 80?
>
> Yes, 80. You know, I was just beating the bush and whistling a merry
> tune, waiting for anything (a miracle?) to happen ;-) Totally crap of
> course.
>
>>
>> On a brighter note:
>> I've discovered a simple fix for ALL of the traced 'normal' problems
>> that I've
>> been dealing with!
>>
>> To wit: After spending WAY too much time trying to come up with
>> workarounds, I
>> replaced Norbert's
>> rotate <rx,0,rz>
>> with
>> Point_At_Trans(Norm) // a macro
>> from "functions.inc"
>>
>> That's it!
>
> Indeed. I forgot about that one. See below for further thoughts.
>
After testing, I think you will get more reliable results using
Reorient_Trans(y,Norm) instead. Otherwise the arrow text has a tendency
to rotate around the original y axis.
Btw, not in functions.inc but in transforms.inc ;-)
--
Thomas
Post a reply to this message
|
|