core animation xml or json framework - iphone

Does anyone know if there is a framework for dynamically loading core animation sequences from some kind of description file like xml or json or even better if there is some kind of core animation studio. I would need some way to allow designers to work on animations without having to talk to programmers for every single change ...

In a project I worked on, we did this exact thing (at least the description part). The animation data is passed down in JSON and parsed and interpreted. It maps to a lot of the major animation capabilities provided by Core Animation--mostly position and frame animations.
Unfortunately what we developed is proprietary and it is highly doubtful the company would be willing to release it as open source.
In the end my answer to your question is there don't appear to be any frameworks that currently support this, however, implementing it yourself wouldn't be too terribly difficult. Then creating a tool your designers can use to generate the animation JSON would be the next logical step. If the tool was not WYSIWYG but rather just a bit of a pseudo design tool, it probably wouldn't be too hard to create either.
Good luck and best regards.

It sounds like you're looking for Quartz Composer, except that QC depends heavily on hardware acceleration and isn't available on iOS. Perhaps that will change in the future.

Related

OpenGL ES, OpenFrameworks, Cinder and IOS creative development

I'm in the middle of a difficult choice.
I'd like to learn a language that can help me create application with a strong artistic/creative/graphic component and use it for commercial projects for my customers.
My first choice was OpenGL ES, i think of it as the "Standard" way to go through.
But, in the meanwhile, i discovered this site : http://www.creativeapplications.net/ where i found many cool apps for ios, for most built using OpenFramewors and Cinder.
My question is: why choose this 2 "wrapper" instead of OpenGL? I need to understand benefits and disadvantages.
I'm not sure that using these frameworks i can mix in a easy (and standard) way (As for OpenGL) UIKit/Cocoa and Graphics. At the moment i still prefer OpenGL because i know that this's the way suggested by apple (i mean... proposed by Apple) and i'm sure that i can take advantage of it for my customer too. While i' not sure that using OF and Cinder i can fully manage UIKit and Cocoa without tricks.
The benefits of using a framework are, as stated by Ruben, that you're not re-inventing the wheel.
OpenGL doesn't come with a lot of classes you would normally need: Vectors, matrices, cameras, colour, images etc and the methods that you will need to work with them: normalise, arithmetic, cross product etc
Of course you can implement all this in OpenGL but if someone's done it before, why not just leverage that instead? Your choice of framework or library will depend on what implementation you prefer. OF will do things differently to Cinder which is different to another library instead.
You don't have to use everything a framework provides. If you don't like the base application (like Cinder for example) you can create your own contexts and what not and just use the framework's 3d maths libraries, or its image library, or whatever other part you want. Just include the relevant headers you want.
Alternatively you can just use a 3d math library if you are so inclined and do away with frameworks all together. This gives you more control over your rendering pipeline and also potentially decreases application size.
Ultimately what you choose will depend on its features and your preference for a particular style. I would suggest going with a framework or library you are comfortable with and that has been used in production (unless you are just playing around with stuff). Documentation is also important. If the docs/resources aren't very good I would shy away from using something.
Of course, if you want to learn the ins and outs (never a bad idea), by all means write your own library.
I think the main advantage of choosing OF and Cinder is that you can focus on your creation better than loosing lots of hours dealing with the OpenGL library. Cinder even includes image downloading and memory treatment. However, you must be patient because these frameworks are being imported to the iOS platform right now.
In some months or years, everybody will use these frameworks that abstract all the stuff behind the graphics programming to bring them the full potential and time to make art!
If you don't miss anything, i think you'd be OK with OpenGL alone.
Cinder offers some additional goodies, see http://libcinder.org/features/. Maybe triangulation, loading of system fonts, matrix support etc might be interesting for you in the future.
Also Cinder's Tinderbox makes creating new projects very easy.
Now both Cinder and OF fully support iOS platform and you can use them easily in an iOS application.
also note that these frameworks are designed specially with designers and creative artists/coders in mind, but OpenGL is a technical standard for dealing with graphic hardwares.
Note: I'm the author of this framework.
I've spent some time creating Rend, an Objective-C based OpenGL ES 2.0 framework for iOS. It's lightweight and focusing on pure rendering which may be appropriate for some projects.
Also, if you're creating your own framework, you may be able to use it for inspiration and code snippets.
http://github.com/antonholmquist/rend-ios

Designing a iPhone application

I am into designing a new iPhone application. My application is will contain almost all iPhone SDK concepts including core data, server integration, location services. Is there any design decisions I should keep in mind?
My plan was to go by designing a controller class for each iPhone app screen and also any utility classes to be used. Any guidance will be really appreciated.
I forget who said this first, but it goes like this: The first project you do in any new technology will probably be very bad!
This is similar to these sage words from Fred Brooks - "Plan to throw one away; you will anyway"
So the best way is to wade right in, get dirty, light up the dark corners and learn what works for you. Then you'll most likely have some very specific questions based on your experiences!
This is a tough subject to talk about generally. Design approaches that work for some will fail for others.
It would probably help to know more about what you are trying to do. For a counter-example, I'm working on a game. I create an OpenGL context and from that moment on I'm managing assets like shaders, textures, mesh data, sounds,... . The way I've designed my project will pretty much be useless to you.
However the best advice that I can come up is to really figure out what you are trying to do. Create mockups of your GUI and document workflows. Do sketches of GUIs. Become an expert in the domain in which you want your application to work. Develop a deep understanding of what you are trying to do.
Once you have the GUI figured out, start working on the other end of the Model-View-Controller approach - figure out what data you need in order to provide the GUI that you've designed. Not all data structures are equal. What's the best data design for the domain you're working on?
Once you have the view and model figured out you need to glue everything together with controllers. There's lots of trick and traps here. Do you use threading to prevent the GUI from blocking? Do you make direct calls to objects or do you decouple and use notifications?
But this is the public appearance of your application. You might want to track usage data - consider what you wish to track and append that to your design. Errors happen, so think how to approach them.
However, it's hard to be more detailed without more details than what you've provided. Every application has it's own quirks and gotchas. It's nearly impossible to talk about this in a general sense.

Collada geometry and animation file loading

I'm considering writing a Collada loader for geometry and animation. Could someone describe from a high level how this would be done? If it will take longer than a few weekends of time I may switch strategies so I'm trying to get a feel for what this involves. I tried to read the Collada spec for animation but I didn't understand once it started talking about different animation channels.
I'm not using any game engine. I'm interfacing directly with OpenGL.
I am just now learning Collada. It seems it is not impossible to get some parts up soon but to implement the entire capability set is quite a handful. There are a few libraries like OpenAsset Import Library, but for the iPhone that is somewhat heavy-weight and I haven't tested it. The code is probably portable enough that you could grab the Collada portion without too much trouble.
If you are going to parse it in yourself, I'd recommend this XML parser which I just read about from this question. It is very small, fast and works with iPhones and looks to be useful in other projects as well.

From a 3D modeler to an iPhone app - what are best practices?

I am quite new in 3D programming on iPhone and I would like
to ask for hints about organizing a work between designers
and programmers on that platform. Most of all: what kind of
tools, libraries or plugins cooperate the best on both
sides.
Although I consider the question as looking for general
best-practices advice I would like to find a solution for
my current situation which I describe further, too.
I've already done some research and found following libraries:
SIO2
Khronos OpenGL ES 1.x SDK for PowerVR MBX
Unity3D
Oolong Game Engine
I've checked modellers or plugins to them giving output formats
readable by those tools:
obj2opengl Wavefront OBJ to plain header file converter
Blender with SIO2 exporter
iphonewavefrontloader
Cheetah3D
PVRGeoPOD for 3DS / Maya
Unfortunately I still have no clear vision how to combine
any of that tools to get a desinger's work in an application.
I look for a way of getting it in the most possible complete way:
models, lights, scenes, textures, maybe some simple animations
(but rather no game-like physics), but I still got nothing.
And here comes my situation: I would like to find right way to
present few (but quite complicated) models from a single scene.
The designers mostly use 3DS Max 9, sometimes 10 (which partly
prevents using PVRGeoPOD) and are rather reluctant to switch to
something else but if there's no other choice I suppose it would
be possible.
The basic rule I've already found in some places "use Wavefront
OBJ" not always works. I haven't got any acceptable results with
production files, actually. The only things worked fine were some
mere examples. Some of my models did imported incomplete, sometimes
exporters hung or generated enormous files not really useful on
an iPhone, sometimes enabling textures (with GL_TEXTURE_2D) just
crashed an app.
I know it might be a problem with too complicated models or my
mistakes coming from inexeperience but I am not able to find any
guidelines for that process to have streamlined cooperation with
designers.
I am even willing to write some things from scratch in pure
OpenGL-ES if it's necessary, but I would like to avoid what might
be avoided and get the most from the model files. The best would be
the effect I saw on some SIO2 tutorials: export, build & go. But
at that moment I've got only "import, wrong", "import, where are
textures?", "import, that almost looks fine, export, hang" and so
on...
Is it really so much frustrating or I am just missed something
obvious? Can anybody share his/her experience in that field and
tell what kind of software uses for "making things happen"?
Well I can't say I know the perfect way to do this but after some experimenting I did get something working doing the following:
created the model(s) in Blender, exported it to wavefront .obj format (TRIANGLE,normals,hq)
then used obj2opengl.pl script to convert the model to a header file(.h)
then added the header in the project and used it in GLGravity - which is a sample program from Apple and modified the drawView function
maybe that could be a starting point for you too, just to get something up and running?

Is the Unity Framework any good for Inversion of Control?

I have been using IoC for a little while now and I am curious if I should use Microsoft's Unity framework (official name "Unity Application Block"). Does anyone have experience using it? So for I have been copying my IoC container code from project to project, but I think it would be better to using something standard. I think IoC can make a HUGE difference in keeping component based applications loosely coupled and therefore changeable but I am by no means an expert on IoC, so I am nervous to switch to a framework that will just paint me into a corner as a dependency I will one day want to walk away from.
I am using Unity with no real problems. I know a few ALT.NET type people warn against Unity but I really think that is just because of the history the MS P&P team have of writing bloatware. Unity is not yet bloated IMO and works well.
I took a look at the Unity Framework, but found it to be a little 'too big' for my needs (no, I can't really quantify that, it just seemed to require much more knowledge that other frameworks that I've been playing with... this was a while ago so it's possible that that's changed as Unity's been developed/refined).
My current IoC/Dependency Injection framework is Ninject. It's quick, fast, and I was able to go from reading the tutorials (about 10 minutes) to using it in a pre-existing project in about two hours.
If you're looking for a clean way to do dependency injection, I'd highly recommend checking it out.
I would say stick with the one you know until you feel confident with it and the whole concept. After what you'll have a better judgement to pick a framework which fullfill your needs.
I've played with CompositeWPF (aka Prism) - successor of Composite app block. From my experience Unity works much better as compared with previous version of ObjectBuilder. However it's up to you to evaluate IoC frameworks and choose one suited for your needs.
Unity tutorials & samples
Unity IoC Screencast