When I use cardboard on a device which has a big screen, 5.5 inch.
And it's resolution is 2560*1440,dpi=640.
The question is that the parallax is too big, so that I can see two non overlapping images through a VR device.
So, what should I to to fix it?
Thanks.
It looks like your phone might be reporting an incorrect DPI, which prevents the SDK from drawing the two images at the right place on the screen.
According to the numbers you gave, the phone DPI should be around 534, not 640.
What is your phone model? Even better, could you give us the output of the following:
adb shell getprop | grep "model|manufacturer|hardware|product.name|lcd_density"
This way we could add a DPI override in the cardboard SDK for your phone model.
Related
In normal i have canvas size 500x500 and it will create camera size (500,500)
But when i change
game.camera.width=5;
game.camera.height=5;
then visible area it the same? what will happen when change width and height camera, how to understand that thanks
Based upon the documentation and an older post from the creator of Phaser on the HTML5 Game Dev Forum where he said:
You're not doing anything wrong, you just can't change the camera dimensions - they match the game size at the moment.
and then in 2015 on the same thread:
So you can tell if something is within the camera bounds or not. Which is impossible if the camera doesn't have a size.
suggesting that things haven't changed since 2013, and the camera doesn't resize as you're expecting.
Testing as well suggests that things haven't changed either.
I'm trying to create the "Ed, Edd, and Eddy" art style. Here's an example image:
Specifically, I'm trying to capture the effect of having accent lines with varying stroke values within the same line.
I have access to the Adobe suite. Spent a couple hours trying to see if I could do something in Photoshop or Illustrator to no avail. Any help?
You'll need to use Illustrator, here's a quick tutorial on how it's done in Illustrator CC.
Draw your starting shape:
Choose the width tool from the toolbox
click anywhere on the path and drag it out to the desired width
Repeat this (you can widen and thin the stroke) until you have the desired result.
In Photoshop, simply create a brush that is pressure sensitive (= change brush diameter with pressure) with your tablet.
That should give you the desired effect.
#user3488148 you are looking for a free form drawing strokes and for that you can use a brush that provides accents while you draw and can respond to pressure (if a tablet stylus is used) as well. Check out for inbuilt brushes and modify their diameter, length, pressure, etc.
I don't know if I'm misunderstanding something fundamental in how screen resolutions work, but I'm getting stuck on an issue with the Kindle Fire HD (7").
I have a responsively designed page that, as normal, uses CSS media queries to change the presentation of certain elements. This works as expected on all browsers and devices tested, except for when browsing with the Kindle Fire HD (7"). According to specs (http://en.wikipedia.org/wiki/Kindle_Fire_HD) it has a screen resolution of 1280 x 800 px. This is also verified when I check the device using WURFL's test tool at tools.scientiamobile.com.
So... I have breakpoint screen widths set for
'mobile' - 767px and below
'tablet' - 768 - 989 px
'desktop' - 990px and above
... so I'd expect the Kindle Fire to display my page in 'tablet' mode in portrait orientation, or 'desktop' mode in landscape. However instead it shows it in unexpectedly smaller breakpoints: 'mobile' mode in portrait, and 'tablet' mode in landscape.
On closer inspection, I'm not sure this is actually much to do with my webpage, or its CSS. When using this device, I also seem to be seeing 'smaller' breakpoint views of other RWD sites (e.g. in portrait mode, I get the 'tiny' breakpoint view of getbootstrap.com, which is aimed at 767px and below).
What's then strange is that, when detecting the screen size using JavaScript, I get 534 x 854px (and have also tested this again on other sites, like supportdetails.com, and got the same results).
I haven't found any similar issues reported re this device, so I'm wondering a) if anyone's encountered similar issues, or b) if I'm just misunderstanding something crucial with how screen resolutions are detected by different devices.
Thanks!
When doing media queries you need to take into account the CSS pixel ratio.
The value you need to use on the media query = (The Advertised number of pixels) / (CSS Pixel Ratio).
This wikipedia page is a good source of CSS pixel ratios to use for this:
http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density
Good Luck
I am trying to do thing that is already done in default Android 2.3 camera application - rotation only for some elements (such as buttons) when changing orientation of the device.
For example, when I switch my phone to landscape orientation I don't need to change whole layout - I only need to rotate some UI elements.
Don't know about Camera application in Android 4, but in Android 2.2 it looks the same as I want.
Is it possible?
(and sorry for bad English, guys)
This is an old question but I've just stumbled across it by accident. In case anybody finds this and is stumped there are two easy solutions. Your elements support a 'rotate' attribute which can do most of the hard work for it (just set an angle), but beware this seems to change the canvas dimensions and can leave you with empty padding. There is also a Rotate Drawable which will help you rotate other drawables.
So I have two images set to fill the screen - one at 320x480 (iPhone 3) and the other at 640x960 (iPhone 4).
img.png (320x480)
img#2x.png (640x960)
In Interface Builder, I have img.png set to fill the view (it shouldn't be filling the iPhone 4 view, though, right?), and when I build and run, it is notably too small.
So, when I do the opposite, setting img#2x.png as the img, a giant blue question mark fills the view. The project still builds and the image fills the screen, but is very pixelated as if it has been rescaled. It shouldn't have been rescaled, though, as it is the higher resolution.
Now using...
img.png (640x960)
img#2x.png (320x480)
I've also tried switching which file takes the #2x suffix, but that has not helped either. With the smaller file taking the #2x suffix, and setting the image view to img.png, it shows up way larger than the view canvas, but way too small when on the phone. With the smaller file still having the #2x suffix, I tried switching the view to the new img#2x.png and once again got the oversized, pixelated question mark in IB and a low res full-screen image when deployed to the phone.
I also made sure that my view size was set to 640x960 in the size inspector. What else should I be doing?
Don't use #2x when specifying the image name. Just use the base name of the image (so in your case, just img). iOS will do the magic behind the scenes to use the 2x version if it's on a retina display and the regular version otherwise (including when you use a xib to lay out your interface).
The displayed dimensions of the image will always be the dimensions of the non-2x image. The retina display just displays 2 pixels for every 1 which is why the scale is 2.0 and you have to double the dimensions of the original image. So your view size in IB should be 320x480.
Edit
If IB is being finicky, especially in Xcode 4, just try deleting the xib and starting over. Sometimes it gets a bit corrupted and doesn't know what to do with itself. I've had to do this on one or two occasions, and it seems that it worked for the OP as well.