I have a PhotoEditorSDK for android 5.0.7. When the image editing is configured to use fixed aspect ratio like this
settings.getConfig().setAspects(new CropAspectConfig(4, 3));
it is not possible to rotate the image at all. I can understand why I cannot rotate it for +- 90 degrees - it will break the aspect ratio. But is there any legal possibility (maybe via extension of TransformEditorTool to make rotation happen in 180 degrees steps, so that aspect is preserved. Unfortunately I could not find a suitable place in code where I can influece the behavior. changeOrientationCW and changeOrientationCCW methods in TransformEditorTool look promising, but get never called when clicking on rotate button even when it is allowed to do. Any suggestions
It's a Bug, we are currently fixing this problem. A Bug fix should be available next week.
Related
I want to add an image (a factory layout displayed on the floor) to an ExtrudeBufferGeometry (the floor) which is based on a shape with holes. I only want to cover the surface and not have it wrap around the corners - is that possible? If not, I am fine with a 2D geometry/plane as well as long as I can still punch in some holes.
I have successfully added said image to a PlaneGeometry but that does not allow for any holes.
I also managed to add it to the ExtrudeBufferGeometry but it looks like it only covers the border area as you can see colors when viewing it from the side. If I set the texture's repeat value using texture.repeat.set(), I can see the image properly. However, I do not want it to be repeated. It should only be displayed once. I'm having a hard time knowing what properties to set and change to achieve the desired result.
I researched a lot to get to this point but I cannot find a final solution for my specific problem. Any help or suggestions are highly appreciated - thank you!
Edit:
I managed to do it using ShapeGeometry. However, I still need texture.repeat.set(), otherwise it will be a tiny image on one side. Can anyone tell me how to adjust the scale?
I'm working on a project that uses a lot of lines and marks with the camera at a very low angle (almost at ground level). I'm also using an outline effect to highlight selected objects in different ways (selection, collisions, etc.).
Native AA is lost when using postprocessing effects (eg: outline effect). This causes jagged lines on screen, more noticeable when the camera is closer to ground level.
I have created this jsFiddle to illustrate the issue (using ThreeJS r111):
https://jsfiddle.net/Eketol/s143behw/
Just press mouse/touch the 3D scene to render without postprocessing effects and release mouse/touch to render with it again.
Some posts suggest using an FXAAShader pass will solve it, but I haven't had any luck with it. Instead, I get some artifacts on the scene and in some cases the whole image is broken.
So far my options are:
Get a workaround to get the outline effects without postprocessing effects:
The ones I've seen around (eg: https://stemkoski.github.io/Three.js/Outline.html) duplicate the meshes/geometries to render a bigger version with a solid color applied behind the main object. While it may be ok with basic static geometries like a cube, it doesn't seem an efficient solution when using complex 3D objects that you need to drag around (objects with multiple meshes).
Increasing the renderer.pixelratio value to get a bigger frame size: This is not an option for me. On my test it doesn't make a big difference and also makes the rendering slower.
Try to get FXAAShader working without artifacts: As I said, it doesn't seem to fix the issue as well as the native AA does (and it is not as compatible). Maybe I'm not using it correctly, but I just get antialiased jagged lines.
Question 1: It may sound silly, but I though there would be an easy way to send the antialiased image directly to the composer or at least there could be some extra pass to do this, keeping the native AA. Is this possible?
Question 2: Maybe using Scene.onAfterRender to get the image with native AA and then blending the outline effect somehow?
Question 3: Googling around, it seems this issue also affects to Unity. In this post, it says this won't be an problem with WebGL2. Does this also apply to ThreeJS?
I'm creating a skin (possibly a set of skins) which I plan to publish at some point. As I was working I ran into an issue with rotating an image meter. Its size is dynamic to a scale variable.
The image is resized when it is rotated. I believe this is due to the diagonal of the image not fitting within the frame of the meter. Although I'm not sure how I can solve the issue.
The Following is the code of the Image Meter:
[icon0]
Meter=Image
ImageName=#Resources\images\gear.png
W=(50*#scale#)
H=(50*#scale#)
X=(5*#scale#)
Y=(5*#scale#)
ImageRotate=90
When the value of "ImageRotate" is changed from 90 to 45 the icon scales down.
I tried to look at an example which created the effect that I wanted, but I couldn't figure it out. I also looked for a forum, or information in the "Rainmeter Manual" to find some useful information. I found something about the ScaleMargin, but it didn't seem to have the effect I wanted.
Thank you in advance for any help that I get.
I think you need to calculate the maximum possible W/H after rotation yourself. Possibly change X/Y too, if you want it to rotate around origin.
There is an example shown here. It uses Rotator meter .
Looking at that example, your code would be like:
[icon0]
Meter=Image
ImageName=#Resources\images\gear.png
W=(SQRT((50*#scale#) ** 2 + (50*#scale#) ** 2))
H=(SQRT((50*#scale#) ** 2 + (50*#scale#) ** 2))
X=(5*#scale#)
Y=(5*#scale#)
ImageRotate=90
Haven't tested it myself, you may need DynamicVariables=1 for #scale#s, and you probably need to calculate X and Y if you want to rotate around the center of the image. Not sure what you want though, I'll leave it to you.
Edit:
You may also need DynamicWindowSize=1 under [Rainmeter] section as well. Otherwise it will crop the image after rotation, if it doesn't fit the initial size of the skin.
I'm working on a project where I'm capturing people making free throw shots via a video camera. I need a way to detect, as fast as possible, the instant the ball is released from a player's hand. I tried researching a lot of detection/tracking algorithms, but everything I've found seemed more suited to tracking the ball itself. While I may eventually want to do that, right now all I need to know is the release timing.
I'm also open to other solutions that don't use the camera (I have a decent budget), but of course I'd like to use the camera if possible/fast enough. I'm also able to mess with the camera positioning/setup, and what I even want in the FOV.
Does anyone have any ideas? I'm pretty stuck right now, and haven't been able to find anything online that can help.
A solution is to use visual markers (motion trackers) on the throwing hands and on the ball. The precision is based on the FPS of the camera.
The assumption is that you know the ball dimension and the hand grip on the ball that may vary. By using visual markers/trackers you can know the position of the ball relative to the hand. When the distance between the initial grip of the ball and the hand is bigger than the distance between the center of the ball and it's extremity then is when you have your release. Schema of the method
A better solution is to use a graded meter bar (alternate between black and white bars like the ones used on the mythbusters show to track the speed of objects). At the moment there is a color gap between the hand and the ball you have your release. The downside of this approach is that you have to capture the image at a side angle or top-down angle and use panels to hold the grading.
Your problem is similar to the billiard ball collision detection. I hope you find this paper helpful.
Edit:
There is a powerful tool, that is not that expensive named Microsoft Kinect used for motion capture. The downside of this tool is that it's camera works with 30 fps and you cannot use it accurately on a very sunny scene. However I have found a scientific paper about using kinect to record athletes, including free-throws in basketball. Paper here
It's my first answer on so. Any feedback on how to improve my future answers is appreciated.
Does anyone have a good description or reference for how to convert between ECI Euler Angles to KML View Angles? Any help is good help. Thank you
Firstly, the KML specification states about kml:Model:
The structure and appearance of the textured 3D object are not defined in this specification.
However Google Earth roughly models the appearance by applying roll, tilt then heading rotations (in this specific order). I found this out by trial and error, since the GE docs don't describe this anywhere. Unfortunately GE's orientation calculation is buggy and sometimes it spins things by 180 or spins the wrong way or spins a small amount in another axis - this is a known behaviour.