I've got a scene with ~35k sprites which are all pretty much static. The goal is to create an image that the user can save, so having the output be consistent across platforms is ideal. Below is roughly the same scene as rendered in both browsers, firefox on my desktop on the left and mobile safari on an iphone 6 on the right. The ios one is a little blurrier because I just took a snapshot of it, but the code running on both is exactly the same.
It seems like the mobile safari version gets darker the more dense things are, like where the semi-transparent heads of the soldiers are overlapping it's just not averaging right. I've set premultipliedAlpha: false, messed with material blend modes, texture settings, and for the life of me I can't get the ios version to match. Any help would be appreciated! :)
Related
I'm working on a school project and we are developing an interactive story with the A-Frame framework. The idea is to visit your old house and to have memories about good old times. So we're using 360° images in sky entities and we're switching those images between present and past.
I'm working on the transition when switching images, but the only good transition I can develop is a simple fade to black... My idea would be to get something similar to CSS Mask Transition here : https://tympanus.net/Tutorials/CSSMaskTransition/
Is it in any way possible to get a similar result ?
If not, would you have any idea of a good and easy transition that I could do ?
Just so you know, I'm not used to web development, we only have 3 days to finish this experience and I'm completely new to the A-Frame framework (I've been working on it for 3 days now only).
Thank you very much for you time and have a nice day !
Augustin.
A transition similar to that will be pretty involved to implement, I don't think it is possible in the span of a couple days with not much graphics experience. You'll mostly likely need to write your own shader that changes the alpha value of each pixel. Or you can maybe create an alpha map GIF or video, and use that to control the alpha values of the texture.
A-Frame has an example for transitioning between 360 images. For better performance, you have one image, do a fade to black, swap out the image, and fade back out: https://github.com/aframevr/360-image-gallery-boilerplate
Has anyone successfully used an IKImageBrowserView with a Retina Mac? What I get is that the image size is wildly misinterpreted. Previously I was using CGImage images which don't have a logical size, so it makes sense that the browser can't draw the at the right size. However, I've switched to NSImage, created using -initWithCGImage:size: and that still doesn't work right.
My images are 244x184 pixels and should be drawn at a logical size of 122x92. When passing 122x92 as the size, they are drawn way too large, at about 180 pixels wide. If I pass exactly half this, 61x46, the size is correct, but the image looks downscaled and not sharp. If I pass 122x92 and run with NSHighResolutionCapable set to NO in Info.plist, everything works well.
My conclusion is that IKImageBrowserView is not Retina compatible even with the 10.10 SDK on a Retina MacBook Pro running OS X 10.11. Or am I missing something? Any pointers would be appreciated!
I discovered that I wasn't really thinking the right way. The browser is supposed to always scale its images, so that's why the Retina-sized images ended up larger. I just subclassed the browser to be able to use a custom cell and customize the image frame per cell. There are however some subtle bugs in the browser that cause it to scale the images just a little bit in Retina mode, but I was able to work around that by creating a custom foreground layer for each cell that contains the image without scaling. Problem solved. Hopefully this will help someone else in the future.
I have no idea what causes this, so I'll refine tags as some answers/comments start to guide me in the right direction.
Sometimes, images with monochrome stripey parts (whether the whole image is colour or not), exhibit a strange flashy effect as I scroll past them.
This is where I most recently saw it, in an article on Dezeen:
As I scroll past that image (with Chrome on OS X 10.9) the wall on the right goes darker and brighter, according to my rate of scroll.
If I get just the right scroll speed, it doesn't flicker - but it is in the 'dark mode', like someone in the scene has turned the lights off. If I speed up or slow down, it begins to flicker again - so I'm pretty sure it's not an optical elusion!
I saw it before with a couple of .gifs, I thought maybe it was a strange property of them. But the image above a is a .jpg.
What causes this effect?
I just tried to scroll this image down with my screen refresh rate at 60 Hz then 75 Hz: it seems to flicker more at 60 Hz... Maybe it's also due to display lag.
PS: You may have more precise answers here: http://physics.stackexchange.com
I think this is a Moiré optical illusion due to the wall's thin, closely put together horizontal lines, not anything to do with scrolling or display at all.
#SkipR's reply should have been the accepted answer.
I am working on a game in Unity3d and I am facing a bizarre problem. My NGUI elements are turned into a black area when I run the game into iPod4 and iPhone4. However it is working well in iPad, iPod5 and iPhone5.
It seems to me that in iPod NGUI is not able to get the corresponding Atlas. Even the UIlabel are being shown as a black area in NGUI. Does anybody know what the problem might be?
Is there any memory problem on a lower capability device that might cause this?
Black sprites in NGUI on mobile platforms are usually caused by your atlas being larger than what is supported by the hardware. It's a simple physical limitation. The hardware simply does not support textures of a larger size.
The iPad and iPad2 (originally, though this changed) are limited to 2k textures. The iPad 2 (now), 3 and 4, as well as the Mini, the iPhone 4S and 5, and the iPod 5 do have 4k texture support.
So that explains the issues you were having. A simple hardware limitation.
Hey guys I got the solution. The problem caused by NGUI Atlas which was of 4096*4096. I have lower the atlas's resolution 2048*2048. Now everything is fine.
Black sprites in NGUI on mobile platforms are usually caused by your atlas being larger than what is supported by the hardware. It's a simple physical limitation
I'm working on a client-side web app that is meant to run on an iPad 1.
Besides the fact, that the framework I'm using is slow-as-a-snail (not my choice), the app is making a lot of calls to the server. Right now i'm working on a "Loading..." screen. My question is:
Should I use CSS3 animations or simple GIF animations? Which one is faster?
In my experience on iPhones and iPod Touches (not iPads, but I take it they'll probably be about the same), GIFs are several orders of magnitude slower in animation than CSS animations, transitions, or what have you. I think their framerate is deliberately slowed, maybe to save battery life.
the app is making a lot of calls to the server
Using GIF animations would require another call to the server to fetch the image. If the implementation times are comparable, using CSS3 seems more appropriate; it would likely take fewer bytes, and ride along with your existing CSS file.
A more pragmatic answer is that it doesn't matter, for a simple animation the speed difference is negligable. And if your app already requires a loading screen, why worry about how long the loading screen takes to load?