Aranuvir wrote:Same for the perspective view. Hoped there would be some collaboration. At the moment it does not work.
Maybe this year I'm able to do more in this direction. The perspective view does not work because part of the software I wrote was simply wrong. I mixed up focal distance and the focus angle
Therefore all limits are wrong, you cannot emulate a telephoto lens you need for portrait pictures. These are the new limits
Since a focal distance is more common than the focal angle, the focal distance is calculate from the focus angle with the formular:
- Code: Select all
15 / (2 * math.tan(math.radians(value/2)))
The 15 in front is still a hack. The next image shows pictures created with this setup and put together in GIMP. The last picture uses the eyes as a constant part, so that you can see that the differences. I also tried this on my Evi-character and an original photo of her. I was fascinated, when I used 50mm the form of chin and cheeks started to match.
My new idea is to use this tool to match a real photo, because real photos are not orbital. I guess this would help a lot. Of course, the x, y, z sliders should be replaced by an algorithm showing the same section (with a focus point) but using a different focus angle (or focal distance). When you look at the old perspective camera code there are some calculations in the code ... it seems to be a similar method.
At least the usage of a perspective camera should be simpler then. But I'm not sure if it is possible to use this in all screens without changing the code in core/mhmain.py if we have two different camera methods. So I restarted my "experiments" with the goal to have a plugin where you can navigate and see the effects of using a different focal lengths. The next step will be the positioning of a background picture.
I must confess, that my knowledge isn't still the best. I had a python training in between, because I also need it for my job, so that's fine. But I have the feeling, that I lost a lot of my mathematical knowledge in between. After 3 hours I learned that math.tan needs radians ...
Creating clothes with Blender and doing scenes is much simpler for me, but when I have a new version up and running at home, I will send a PM.