Floating Point Texture Compatibility Mobile Three.js - mobile

I am trying to learn how to take advantage of the GPU for making more interesting applications. I am using THREE.js to make web applications that use the GPU and have been using floating point textures. I realized that none of these textures work on mobile (at least not on my phone), and tried looking up more about this problem. It looks like a lot of phones support floating point textures, but maybe WebGL doesn't interface with them properly? I use a galaxy s6. Is it just that my phone is out dated and newer phones can use them? After going online it looks like the newest iPhone doesn't support them, but I could also be wrong. Also I realize that the GPUS support floats, just not rendering to floating point textures. Any information on this would be greatly appreciated. After doing some research I feel more confused since a lot of it seems to contradict itself.

Related

Video Camera and Stage3D on Mobile Adobe Flash AIR. Augmented-Reality on AIR

Quick Question
How to show webcam rapidly on Adobe AIR application with Stage3D?
Detailed question
About
My goal is to create prototype of AR (Augmentation Reality) mobile application. I have chosen Adobe Flash AIR for good 3D graphics support on mobile and AIR apps easy to porting to many mobile platforms (iOS, Android, Blackberry Playbook).
Purpose
I want to show up complex 3D model (so i need to use Stage3D). And underneath a video from Front Camera. As usual AR application.
Here is examples
(source: augmentedplanet.com)
Problem
Stage3D not transparent at all so i can't use StageVideo for the rapid showing of content of Camera, because StageVideo doesn't seen under Stage3D.
So
And only decision i have found - it's to create flat surface with dynamic texture updating.
Here is example of integration of webcamvideo with Starling Framework (Stage3D). But with many ordinary mobile devices we get such a big texture updating (almost as size of screen resolution), that any app will fall down to low fps or even crashes down. What i have done on my Galaxy Note for example. With 320x200 texture size it's has fairly good performance but look ugly at AR app.
So is any brilliant solution for create AR on AIR? Is anybody got same challenge?
This use case is unfortunately not well supported in AIR. Your best bet is really the manual upload. It might help to add votes to feature requests on Adobe forums for transparent Stage3D.
Now for why this feature was low priority: If you are doing AR you are probably already doing CPU work on the video. That means you already read back the camera data for processing either on the CPU or as a Stage3D texture. That's the expensive part, not the uploading a texture back to Stage3D.
In order for this to be useful there would need to be a lot of complicated code paths working together flawlessly. On all supported devices:
Read back low resolution camera for CPU or GPU AR image processing
Show passthrough high resolution camera image
Overlay 3D with blending
This is unfortunately very hard. On many mobile chipsets video/camera, CPU, and 3D are very separate units so it is hard to share data between them without stalling or copying. It can be done very well IF you target specific hardware. I know this does not solve your problem but I hope it explains why this use case does not work well in AIR yet. I think you have those options:
Go with AIR and readback/upload. It will be very slow on some HW, but it will work reliably.
Go native. It will be a huge win in the best case, but you need a lot of custom code and testing for every single target.
Go native on a single very narrow platform. Many very cool AR demos do this. Look at SDKs for AR from GPU vendors. Most of them have one.
Make the best out of a bad situation: Stick with low res and uploads but add some interesting filters on the video. Once you paid for the upload doing Stage3D stuff with you texture is very cheap.
I hope this helps a bit. While developing Stage3D this exact use case came up every now and then. I still think it is really cool! Maybe this post explained why it never made the top of the list yet.

Silverlight 5 - Drawing Sprites

I know this may be a bit early, but I've just started a new game in silverlight, and thought it would be neat to start it in Silverlight 5. The only problem is, I can not find -anything- online about drawing 2D. The very limited info out there is only for 3D. Does anyone have any links to examples, tutorials, or even just documentation that would help me with this? Would perhaps waiting a few weeks/months do me any good with google results?
Or am I totally wrong in my thinking, is silverlight 5 actually no more efficient at drawing 2D than Version 4? (or the slight benefit is not worth the complexity of drawing polygons in 3D space, and painting sprites on them)
If you want SpriteBatch in Silverlight 3 (or newer), use ExEn. It uses an elegant hack to get hardware accelerated immediate-mode sprite rendering using Silverlight's retained-mode graphics system.
(You could also use the retained-mode graphics system directly - but that is kind of painful for game development.)
If you want SpriteBatch in Silverlight 5, try the Silverlight Toolkit, which adds an implementation of XNA's SpriteBatch (and other handy things) on top of the subset of the XNA API that Silverlight 5 provides.
Check out this question and answer for a few tips on using it.
The major advantage of using the XNA stuff in Silverlight 5 is performance. It's hardware accelerated and it's immediate-mode rather than retained-mode. Ideal for game development. (And it can handle 3D.)
The two disadvantages are that there's a smaller install base of Silverlight 5, and not everyone has a video card capable of providing the hardware acceleration that its 3D stuff requires (whereas the retained-mode stuff can at least fall-back to software rendering).
By the way: Drawing in 2D using the 3D API is really pretty simple: Just set up an orthographic matrix, disable Z-buffering, and don't worry about the Z-coordinate.
(Disclaimer: I wrote ExEn, and I'm yet to actually try the Silverlight Toolkit for myself.)

Most widely used Mobile app development technology

In mobile development world, which is the best programming language/technology that we can use so that almost the same code that will run on all versions. I know it is little bit of a broad question and the most probable answer is Java. If I want to provide support for maximum number of devices(android, Iphone and other high end classes only), how many different code bases I should have?
Thanks,
GL
[...] that we can use so that almost the same code that will run on
all versions [...]
All modern mobile smartphones / devices support HTML 5 / CSS / Javascript.
PhoneGap Augments these basic tools with the rest of the functionality you'd need.
Projects like jQuery Mobile are gaining a lot of traction as well.
I'd start there.
I wouldn't say it's "The Most Widely Used" technology... at least not yet... but I have a hard time believing anyone wouldn't agree things are going that direction.
UPDATE: For anyone who hasn't seen PhoneGap before - this (free) product will take your HTML / CSS / JS, and package them up inside a native application (which includes some shims to startup your app, and augment it with access to camera / files / gyro / etc from javascript). Your app works offline, and can be deployed through all of the available standard app stores.
If it's a web app, then you can develop using a highly adaptive layout, HTML 5, CSS, and the JS library of your choice, and you'll be fine.
If you are running native apps, you're pretty much stuck: Java for Android, Objective-C for iOS.
Regarding HTML5/CSS3, even if it is possible to reuse 90% of codebase (mostly non-rendering JS), there are significant differences when it comes to graphical presentations. Even, if you think that because Androids and Iphones use Webkit, so they should have roughly similar capabilities, they are quite apart.
Just to give a few examples: CSS3 3D transforms are mostly not supported on Android phones (Android 2.3), Audio tag implementation varies between Android and Iphone (Androids do not use buffering and streaming, while Iphones do).
And just do not get me started on how Androids lie about dimensions and aspect ratio. It is a bloody mess.
We have not tested latest Windows mobile phones, but until IE10 is shipped, support for HTML5 in windows world is abysmal.
To conclude, currently, there is no technology, "that we can use so that almost the same code that will run on all versions." HTML5 is 'almost' there, but will take perhaps a few years for Androids to catch up and Webkit to get the required speed and functionality to be able to compete head-on with native apps.

Manipulation with GIS content on the web using the WebGL

I have task to create program for manipulation with 3d content on the web. When I said 3d content i mean
on 3d map (witch i have and it is something like *.sdm) which i should load into browser and work some basic operation with it (rotate screen, change camera etc...).
Because i am totaly n00b i want to ask a couple of questions:
1. How to load maps into browser. Just for notice that my map have sdm extension. Is this possible?
2. What i should use for represent 3d content. I am thinking of GLGE framework for webGL, if it is possible of course
What should be the most painless and the most effective way to do this? Maybe i was totally wrong when choose webGL?
Programs that use WebGL aren't mature enough to do what you want. Within the next few years, when GIS applications start popping up it may be possible, but not now.
Also, keep in mind that WebGL is what gives you access to a low-level graphics library. It does not directly have anything to do with GIS data.
You may want to take a look at OpenLayers (2d, javascript based) or WorldWind-Java (3d, jogl/java based). Both of these programs can display map information in a browser.
http://openlayers.org/
http://worldwind.arc.nasa.gov/java/

Silverlight for the masses, is it time

We are launching a site that is media heavy and looking at using silverlight, since most of our video library is in wmv and from what i understand flash serving still costs a couple bucks.
Is silverlight really adopted out there, I know i use it as well as a bunch of developers for internal apps but as far as a web application is it ready to go, i went through a mac install with safari and had to restart my whole browser to install it, not exactly a great user experience. I also noticed that MS doesnt even use it for http://video.msn.com and also the few sites that have launched get crazy MAC people crying bloody murder , read http://www.itwriting.com/blog/641-mac-users-refusing-to-install-silverlight.html where one New York Times reader said "Nope. Not going to use anything from Microsoft. If reading the NYT requires MS products then, for this reader, goodbye NYT." when asked to install silverlight for NYT site. Tech wise moving forward I like Silverlight and some of the things i can do from a framework / wpf perspective and want to move ahead with it just not sure it's the out there enough yet.
Just wondering what people think out there
I think that if you have a user base that refuses to upgrade from Internet Explorer 6, good luck with getting anything else adopted, including Silverlight.
The thing can be installed more or less automatically just like Flash, for crying out loud. How difficult could it be?
The argument up to now has been, "Flash is already installed on most computers, so it already has high adoption." But that's a chicken and egg problem. How did Flash get adopted in the first place?
The NYT reader just has a prejudice. Clearly he believes that Microsoft is the evil empire. There's really nothing you can do about that. The real question is, how prevalent is this attitude? Certainly it will be common among the Linux/open source crowd, but it's hard for me to believe that this attitude would be prevalent among the average user. If anything, the Microsoft name is a warm and fuzzy for them.
I personally think Silverlight will pick up pace on business applications just because it's much programmer friendly and the fact that you can program it in .NET languages means it is much easier to reuse and maintain your business logic.
However, in terms of consumer application I don't think it can beat Flash, who's got a much larger install base and already used by most major companies. Also, don't forget HTML5, which now has integrated video element supported by major browsers including Firefox, Chrome and Safari.
Despite codec arguments, it is another strong contender, which will squeeze Silverlight's market share even further.
As a user and as a web developer I like sticking to the bare minimum. Like it or not Flash has pretty much become the standard platform for rich media on the internet. Everyone I know has flash to use videos from common sources like You Tube.
Since money seems to be an issue I might suggest Flowplayer, an open source Flash video player. Currently it only supports mpg, mov, and avi, but it's fairly easy to convert wmv to other formats using open source tools.
Here is Flowplayer:
http://flowplayer.org/v2/player/index.html
Here are some simple instructions for converting video:
http://flowplayer.org/v2/tutorials/my-movies.html
The only major sites using silverlight are ones that microsoft either owns, or has paid to use it, and most of the ones that they paid for switched back to flash. The version number may be approaching 3.0, but it is still a very new and immature platform that is not as widely installed as flash (which is pushing 97% of all browsers).
If you are talking wmv vs silverlight, I would go silverlight. If you are talking flash vs silverlight, I would say flash hands down. If you want to be forward thinking, serve stuff up with the HTML <video> tag, with flash as a fallback.
I remember that MLB went from showing those games from silverlight back to flash due to a few issues that didn't get resolve. It work pretty well on the Olympics, but beyond that I can't say how good or bad it is. Do you have any idea what percentage of users have Silverlight installed for their browsers? That might be something to look at.
I've heard that desktop Silverlight penetration is around 30%. Flash is somewhere north of 95%.
Going with Flash seems the easy decision now. I can certainly imagine a lot of Mac users seeing the "install Silverlight" message and saying, "Ick! No!"
In the long run, probably most Windows PCs will have Silverlight. Diehard Mac fans may never install it.
Meanwhile, I've seen more and more people who don't install Java, and who just pass on any site that says to install Java.
Adobe's only weakness now is mobile. They seem to have desktop locked up tight.

Resources