DIY photo studio
This material does not set itself the goal of fomenting a holy war between people who believe that only multimedia can be done on AS3, and people who are completely satisfied with AS3. Rather, this is a post on how a single development environment can save time.
The very thought of creating a server based on Adobe AIR and AS 3.0 may seem like a nightmare, but when you have the task of creating not just a website, but a whole platform for creating photos, storing them (on a universal scale), communicating with people and, worst of all, for online robot control, then the game is worth the candle.
So, the Touch Z-Distance project (started on September 1, works until October 15). The task is to assemble a photo studio in which it would be possible to photograph models via the Internet, using robots equipped with cameras. A similar studio is launched for the first time. What was required to launch this ambitious project?
1. Design the designs of robotic tripods that will control the TZ20 cameras:
- development of ergonomic design of tripods (Autocad, 2D-design, layout, preparation of files for cutting on a laser, milling cutter, 43 * 8 parts for assembly, 3D-design, placement of electronics);
- selection of materials for assembly: polystyrene, PVC, aluminum (flexible, lightweight material, mobile);
- development of mechanics in test samples (3 pcs.), In each subsequent eliminating the problems of the previous one.
Problem: Servo mechanisms broke into the extreme position when breaking out.
Solution: tripod design allows you to go to the extreme position.
Problem: wear parts.
Solution: replacement.
2. Program tripods (Arduino)
- firmware boards, board calibration, communication with servos, servo calibration;
- assignment of com-ports, assignment of the Arduino ordinal name;
Problem: The signal did not pass through the USB extension cable.
Solution: Separate power for each USB extension cable.
Problem: a 24kg / 1cm server caused interference with the Arduino during overload.
Solution: balancing the load on the servo.
3. Connection of parts
- power Arduino (8 pcs.);
- power supply for servos of different capacities (24 kg / 1cm, 10 kg / cm, 3 kg / cm; 64 pcs.);
- power supply, USB extension cable for Arduino (8 pcs.) .;
- power supply for USB controllers 15 pcs.
Problem: Arduino reboot. Decision:
elimination of a lack of power, separate power on the Arduino (a separate unit with a surge protector), a separate power supply for the USB cable.
Problem: lack of regular permanent power supply.
Solution: unpacking the battery emulator from a constant power supply; connecting webcams, assigning a name. Problem: The computer does not support more than one webcam at a time. Solution: expanding USB buses, increasing the number of controllers; bus expansion for stand-alone power via webcam controllers. Requirement: three degrees of freedom for a tripod, three degrees of freedom for finger mechanics (a unique example of mechanics on this scale (mini CNC)), tripods and cameras for 10 hours for 45 days.
4. Make uploading photos from cameras using Wi-Fi flash cards
- setting up a local network of wi-fi flash drives, assigning a name to flash drives.
5. Connect the three servers using AIR (1.5 terabytes of photos are stored on one of the servers).
6. Girls, makeup, clothes.
The main idea of the studio is models, and they (models) had to be programmed to be photographed in front of eight mechanical robots :) There were 32 models, by the way.
7. Studio and light (sunlightstudio room . ru )
- rent a photo studio;
- installation of studio light.
The list of equipment that was used and purchased in different countries:
- Wi-Fi flash drive (America);
- purchase of Arduino, servos (China);
- components for assembling plastic, adhesives, etc. (China, Russia).
So, as for the studio, everything was developed in ActionScript 3.0 in the FlashDevelop development environment, since it was the fastest way, besides Adobe AIR includes a full range of media management. If it was a different environment or language, then I would have to use many different technologies, and not the fact that all this would work fine.
The main advantages of AIR over other development environments are the speed of development and the fact that you do not need to switch between many programs - the interaction between the modules is at the “native” (intuitive) level, you do not need to achieve compatibility every time: everything is compatible.
Perhaps we would encounter some performance limitations if we had a task such as video conversion or a task of processing data (media) in large quantities (but even in this case, we could just use other programs in conjunction with AIR).
Due to the fact that it was necessary to separate user flows (so that everyone could see the site, but manage it in turn), problems arose in the software part with the queues of photos and people for shooting. The queue that was originally on the server was rewritten, all application modules were also constantly updated to increase stability in order to take into account various factors (for example, the Internet was lost in the studio or the server crashed).
The server part, which was responsible only for the queue, was transferred to the studio in order to solve the problem of out of sync (delays between the server and the studio).
Actually, the queue mechanism was built directly into the tripod control controller, which increased stability during queue processing and various difficult moments.
In addition to the software part, there were problems with hardware, but that's another story ...
-
The project will work for two more days, so you can go to the site and take pictures of the models, as well as criticize Adobe AIR and say that everything could be done better, simpler and faster.
Finally, a small project guide!
Questions, comments?
UPD!
BY THE WAY! STRAWBERRY!
Today and tomorrow from 00.00 we will be a little naughty! I will not reveal all the cards. But there may be a phrase “easy strip for likes” to tell someone something :) Do not forget to stop by at night !