Hybrid app with shiva3d on iOS

You feel lost? You don't understand how to use ShiVa?

Hybrid app with shiva3d on iOS

Postby maulik13 » 2014-09-17 14:20

I want to build an app that has a 3d viewport as part of the standard iOS UI. The 3d viewport sits inside a normal iOS app. When a user interacts with the iOS buttons, I want to manipulate 3d objects in the viewport.

Example,http://www.meshpad.org/

Is this possible to do this with Shiva?
maulik13
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: 2014-09-17 14:05

Re: Hybrid app with shiva3d on iOS

Postby broozar » 2014-09-17 15:37

hi

in general yes. shiva was not built with that use case in mind though, so i wouldn't be attempting it if you are just starting with our engine.

the process would be this:
- make what you need in shiva
- export as xcode project
- work from there and integrate your own components into the project

the other way round (create your own project and import shiva as a rendering library only) is much less comfortable.

another thing to consider: meshlab (the app you linked) can dynamically load model from several 3d formats. shiva does not come with this functionality. shiva expects its model to be in our own format, encapsulated in STK packages, not loose obj/3ds/... files.
--> if you want runtime 3d file format import, you will also have to write your own importer plugin or pre-package them in STK archives.
User avatar
broozar
Administrator
Administrator
 
Posts: 4093
Joined: 2007-09-16 10:22
Location: Berlin - Germany

Re: Hybrid app with shiva3d on iOS

Postby makkar » 2014-09-17 16:23

broozar wrote:the process would be this:
- make what you need in shiva
- export as xcode project
- work from there and integrate your own components into the project


You can certainly extend the Shiva project inside Xcode. We inserted an additional webview over the 3D view and made its buttons send messages to the 3D view. You should be able to work with other types of views, too, using native iOS elements.

But to make a different layout than fullscreen, to arrange them beside each other is something we did not try.

Partial reason why we chose a webview was that it can be replicated with little effort on Android, thus being almost a crossplatform technique.
makkar
Platinum Boarder
Platinum Boarder
 
Posts: 1560
Joined: 2007-12-27 17:20

Re: Hybrid app with shiva3d on iOS

Postby maulik13 » 2014-09-18 08:48

Thank you for the suggestions and opinions guys. Really appreciate it.

In the first option for starting from the exported Shiva3D project I wonder about the workflow if I need to develop Shiva3D part and iOS parts in parallel. But at least this is an option as confirmed by @broozar and @makkar.

Including Shiva3D as a library may provide better development workflow as long as I can load the the assets(esp. shaders, lights etc.) created in Shiva3D editor. Is this possible?

To give an idea about what I am trying to do,
I will have predefined models included in my app. These models are rigged so they have a skeleton attached to them. Now I will have some iOS controls that will trigger an action and I will animate the skeleton.
maulik13
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: 2014-09-17 14:05

Re: Hybrid app with shiva3d on iOS

Postby maulik13 » 2014-09-18 09:52

Is there any article or documentation about importing Shiva3D as a rendering library in my iOS app?
maulik13
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: 2014-09-17 14:05

Re: Hybrid app with shiva3d on iOS

Postby broozar » 2014-09-18 22:29

no. that's not what shiva was designed for.

you should be able to reverse engineer your way from a ShiVa-generated Xcode project though. in essence, i suppose you need
- the engine library (S3DClientNative_iOS.a) and
- the engine headers (S3DX folder) as bare minimum.

however, without these other components, i don't think you will be able to accomplish much:
- the Classes folder (view controller, client wrapper, etc)
- the STK in Resources (contains your models, textures, materials, etc)
- AIModels folder (contains ingame scripts)
- all framework dependencies, libxml2 and libz
- #include "S3DX/S3DXAIModel.h"
- some place in your layout xib where you put the engine view controller

.. basically everything except for Plugins, Additional, and most things in Resources. And most things are closely interwoven too, like the scripts in AIModels that refer to the STK in Resources, _AppDelegate in Classes referring to predefined images, and so forth - ShiVa was really not set up to be just a rendering module for other apps, but a complete app solution. You will have your work cut out for you if you really want to disentangle all those cross connections.
User avatar
broozar
Administrator
Administrator
 
Posts: 4093
Joined: 2007-09-16 10:22
Location: Berlin - Germany

Re: Hybrid app with shiva3d on iOS

Postby maulik13 » 2014-09-19 11:27

Thank you so much Broozar for taking time to reply in detail. I will probably try to do some tests before I start my project. And you provided enough info for me to try :)

Thanks!
maulik13
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: 2014-09-17 14:05


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 7 guests

cron