Page 1 of 1

livecode, 3D, Unity, and all that

Posted: Mon Aug 29, 2011 3:53 pm
by kevin11
Hi,

I would like to develop an app that is basically 2D for its GUI, and for 90% of the content. However, I also need to render and display 3D content, with lighting, texture mapping, etc, on some of the cards. The app is to be deployed on ipad.

I've read enough docs and websites on this that the result is that it has done my head in, and I remain confused as to the best way forward. I think have several options :

1 continue to use livecode, and use externals to handle opengl.

2 Use a third party 3D package (and Unity looks like the job) and work out how to integrate Unity and livecode

3 abandon livecode, switch to Unity, and do the 2D GUI in Unity, and incorporate 3D where required.

The problem with (1) is that externals need to be written to handle the opengl. The additional problems are that probably a lot of externals would be needed, and this on top of the learning curve of opengl itself.

(2) is the ideal solution, as it makes the building and rendering so much easier but I would need a method in livecode that does this :

"load the 3D model from an external file and use Unity (or something) to fly around it"

(3) obviously would work, but it seems a shame to have to abandon all the advantages that livecode has to offer and switch completely to a different package.

There have been a few postings (and only a few) in these forums over the years, including the suggestion of doing it all in a revbrowser. This still leaves the problem of needing a plugin like the unity webplayer, which of course may violate Apple's restrictions on an app loading external executable code.

Ideally I would like to do the 3D work in Unity (seems to have a good visual way of drag n drop, etc), and seems to do for 3D what livecode does for 2D, and than have an Apple-compliant method of rendering into a livecode object. I am happy for the 3D view to occupy the entire screen of the ipad (as any buttons etc can be done in Unity), but the entire screen perhaps being regarded by livecode as a card ?

Or is a browser method the way forward - Unity have a webplayer that can be loaded and played with javascript, but I'm not sure I would be allowed by Apple to call a unity player from an app, nor am I sure if the livecode browser could deal with it, as it seems happy to point to urls, but not load plugins ?


Is there anybody out there who has integrated Unity (or similar) with livecode, and in such a way that it will work under ios and keep Apple happy ? Or is there anybody who has built a 3D model in any package and had it render within livecode in an Apple-complaint way ?


Thanks

Kevin

Re: livecode, 3D, Unity, and all that

Posted: Mon Aug 29, 2011 11:15 pm
by Mark
Hi Kevin,

What exactly do you want to do with the 3D scenery?

Mark

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 8:49 am
by kevin11
Hi Mark,

I wish to render scenes of ancient architecture with a high degree of realism, including using hi-res photography, for example, the rooms of the tomb of Ramesses. Add a hundred tombs, and temples covered with heiroglyphs, for example, with hotspots leading to translations. So texture mapping of photos is a must, as is high detail. Also the rendering of a museum and the artefats within.

I did think of using Unity to build the models (I have the architectural surveys in digital form), and then perhaps rendering thousands of scenes and making it qtvr, but this may lead to a large download recquired when installing the app. Also, qvtr needs a lot of frames before it becomes as convincing as real-time rendering.

I have another app which needs to render Earth using an input texture map 43,200 pixels wide.

Kevin

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 8:58 am
by Mark
Hi Kevin,

So, basically you want to display your scenes as QTVR. That should be a simple task. There should be quite a few progammes, including free and open-source applications, which can render a scene as QTVR. Blender is one of them.

I'd suggest you render the scenes with a free or open-source tool and use LiveCode to display the QTVR. Also, I believe that QTVR movies don't need to be very big and if you have a really good app, it'll surely be worth the download.

Kind regards,

Mark

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 9:12 am
by kevin11
Hi Mark,

I thought about QTVR, but if you have a file that contains the views allowing 360 degree rotation, and repeat that for every point around the Earth that the user may wish to visit (this an app for a space agency), and repeat that for every altitude, the resulting file would be huge and not practical as a solution. Another app would need a similar approach within an archaeological site covering 36 acres, again, simply not practical to supply a QTVR file, it would need too much content for every possible view to be pre-rendered.

I still think the only solution is a programming one, and that is to render on the fly and perhaps use externals to call the rendering engine of something like Unity, but that may not be Apple compliant (in fact, I am sure it isn't, as you would be calling a third party executable). There is a way round the compliance issue though.

I have a feeling I have hit a brick wall with livecode here, and rather than getting a killer-app, I have an app-killer.

Kevin

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 9:27 am
by Mark
Hi Kevin,

If I understand you correctly, you have two different apps. If you can QTVR for one app, then don't worry about the second app yet. Perhaps a solution for the second app would be Google Maps integration, but that wouldn't be an option for the first app. I'd say, don't try to solve two different problems with one and the same solution.

Best,

Mark

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 10:08 am
by kevin11
Hi Mark,

More than two different apps, there are others in the pipeline, which is why I have been trialling livecode.

QVTR won't do the job for either. Fo a variety of reasons, Google Maps isn't the way forward.

The apps may be different, but the problem is similar - the realtime display of 3D views of objects with texture maps from real data, whether that data be from satellite imagery or ground photography.

Regards

Kevin

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 11:10 am
by Mark
Kevin,

How many apps doesn't matter. You described one app for which QTVR seems the solution. You don't need to agree, but that's my opinion. Good luck with your project.

Mark

Re: livecode, 3D, Unity, and all that

Posted: Tue Aug 30, 2011 9:55 pm
by paul_gr
Apple hasn't bothered to support QTVR in Quicktime X. Since the future of QTVR is unclear, various development apps are dropping QTVR support (eg Archicad).
You can do 2D work in Unity, although it can be very time consuming working around the 3D interface.

Paul

Re: livecode, 3D, Unity, and all that

Posted: Wed Aug 31, 2011 10:29 am
by kevin11
Hi Paul,

You make a good point. I have a query in to Unity at the moment concerning 2D GUI development and I'm waiting for their answer. I suspect I'm going to be dragged kicking and screaming into my option 1 - externals within livecode calling opengl. Can't even think of using webgl as an option as the ipad refuses to have anything to do with it.

Kevin

Re: livecode, 3D, Unity, and all that

Posted: Wed Aug 31, 2011 2:03 pm
by BvG
not sure why noone brought this up, but there's franklin3d.

Re: livecode, 3D, Unity, and all that

Posted: Wed Aug 31, 2011 2:11 pm
by Klaus
Call me picky, but I personally don't trust companies/software that, after all the years, still install
stuff at the ROOT level (sic!) of my hard disk without notice or the option to define a target folder!
8)

Re: livecode, 3D, Unity, and all that

Posted: Wed Aug 31, 2011 2:24 pm
by BvG
you mean like apples developer tools? :?

Re: livecode, 3D, Unity, and all that

Posted: Wed Aug 31, 2011 2:53 pm
by Klaus
Nope, that is for developers who should know what is going on :D
I mean "consumer" software and that includes stuff for the average LiveCode scripter 8)

Re: livecode, 3D, Unity, and all that

Posted: Thu Sep 01, 2011 5:49 pm
by kevin11
BvG wrote:not sure why noone brought this up, but there's franklin3d.
Franklin website doesn't mention ios, only Windows and Mac OS, so no good for an ipad, I believe.
It's based on the Irrlicht engine, which I already looked at, and Irrlicht also does not support ios and ipad.

but thanks for the pointer anyway.

Kevin