Thank you for sharing!

No, I've published it with version of Maratis which I compiled on my machine.

Sorry, I cannot send this project.

I forgot to say that I modified line 360 of MPublishEvent.cpp

    const char * appName = "MaratisPlayer";

with

    const char * appName = "Maratis";

Without that, "published" folder in my project was empty after publishing.

With that, I cannot run  .app in published folder (as I found, there is MAratis.app  instead of MaratisPlayer.app in .app after that chnage in code).
I need only .npk, and .npk seems to be ok, so I left this unsolved.

I send published YoFrankie .app (beautiful example, by the way)
Notice that it will not run, it can be used as I think for checking .npk.   YoFrankie

Yes, it is not working.

I have not found a bug.

Also , when I compile and run Maraits from Xcode,  Publishing is ok. (.app size is about 44 MB )
If I run this compiled Maratis app from Finder, publishing is not working again, it produces .app with size ~ 9.5 MB

I compiled Maratis from sources, and published my scene from it.
The publish is ok, as I can see for now.
The size of .npk file is about 35 MBs

Both MCore and Mengine  was compile in Debug.
I think I can use Release for now.
If I need to use the Debug later, I will try to configure debug settings.
Thank you.

I switched  to Release, and project runs without errors.
Thank you for advice.
I will try to debug publishing of my scene now.

I compiled project successfully, but when I run the program, I've got crashes described above.

screen

I am trying to compile and run Maratis from sources (Mac, 64 bit, Lion, Xcode 4.3.1 / 4.5).
I want to debug Publish Project with my scene to see what is wrong.
I can compile Maratis
When I run it from Xcode on my Mac, program crashes (EXC_BAD_ACCESS) at Maratis::start()

engine->getBehaviorManager()->addBehavior(MBLookAt::getStaticName(), M_OBJECT3D, MBLookAt::getNew);

in

m_behaviors.push_back(newBCreator);

I cannot understand where is a problem.
As I can see, newBCreator is a valid object, and m_behaviors is instance variable, so it must be initialized automatically while creating MBehaviorManager.
If I comment

engine->getBehaviorManager()->addBehavior(MBLookAt::getStaticName(), M_OBJECT3D, MBLookAt::getNew);

, program crashes again in

engine->getMeshLoader()->addLoader(M_loadBinMesh);

in

m_loaders.push_back( loadFunction );

.
I understand that it is a C++ question.
I want to solve this problem to achieve proper publishing of my big scene from editor, so I ask it here.
Can you help me with it?

Sometimes, during launch program crashes at

m_packageManager = new MPackageManagerNPK();

in Maratis::Maratis with message
Maratis(5116,0x7fff72cbe960) malloc: *** error for object 0x100e8fb38: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug

If I Enable Guard Malloc for project, then project crashes in MLevel::MLevel  MDataManager::MDataManager  while constructing instance of
vector <MDataRef *> m_refs;

Moved this answer to SDK forum

Are there any console tools fro creating npks from maratis projects?
I export my scene from 3d max.
I think that in my scene may be errors
I want to see if there are any errors during creation of npk. I want to look at output of publish tool for that.

I tested my real app scene with one spot light with angle < 90.0. It works fine on the device, light is working.
I will use this approach in my scenes for now (only one light in scene, spot, with angle < 90.0).

I tried to remove torch from scene , and lighting works.
Now I have in scene one mesh (box), one spot light with angle 89 and camera, and light works ok on the device. If I set spot angle of spot light to 90.0, light stops working.

On iOS simulator that code works fine both for 89 and 90 spot angles.

Only difference I have found in execution when the spot angle < 90 and when the spot angle is 90 is that

                    render->getLightSpotDirection(i, &LightSpotDirection\[i\]);

in MiOSStandradRenderer::drawDisplay  line 405
returns non-zero vector when spot angle < 90 and  {0,0,0} when angle = 90
After that LightSpotDirection\[i\] is passed to shader, where is is used in computeLight.
May be there are other differences, but I couldn't find them.
In Simulator values of LightSpotDirection is the same as on the device, but the light is present for both scenes.
Also I cannot understand now how the presence of torch object affects on scene light.

I have found that if I remove omni light (light above the box) from the scene, and move spot light above the box (so the box is lighted), light is work ok on the device.
I think the reason may be in cooperative behavior of spot light and torch object (latter has transparency in one of its sub meshes, as I noticed).

I found that if in addition I set spot angle of spot light to 90.0, light remains on editor/player, and disappears on device.

anael wrote:

can you check that your camera is looking at the objects and that the clipping is correct,
also, just try the light with a big radius (in case)...

You are not using a custom shader with the mesh or something like that ?

Al is correct as I can see with camera, and light radius is quite big.

I created small scene. scene
Light is ok on that scene both in editor,player and on the iOS device.
On device however the torch is not animating.
If I remove torch from scene or make the spot light  non-spot or remove this spot light from scene, the box become black on the device, in editor and player all is ok.
On iOS Simualtor all is ok in all cases, so I think this somehow related to realization of  GL ES on iOS devices.
I will try to find the reason of such behavior now and fix it.

17

(9 replies, posted in General)

Thank you
libfreetype.a in project is compiled for Simulator. Can you include sources of thta lib in project or provide versions for iOS devices in project please?

I'm sorry, I found sources of the lib in the project.

I found that if I add one of my models to Demos.mproj , lighting for whole scene works ok (include my model) both in Maratis Editor/Player and on my iOS device,
and if I load  my own scene (in that scene ~10 such models and ~ 5 lights) it  displays fine in Maratis Editor/player, but models appears black (as without lighting) on device.
I'm loading both scenes (Demos.mproj with my model and my scene) in the same project, so I think the code is ok, and error something in settings of my scene.
I tried to compare .mproj. files and .level files, but cannot find error.

Yes
And one light

Before publishing? Yes

I have one light in my scene in Maratis editor. Models are look fine.
When I'm loading project on iOS, models are black (looks like there is no light in scene).
I set breakpoint in drawScene method, and I see that scene contains one light (lSize = 1).
Looks like that models textures are loading fine (I added debug output in MMeshRef ).
Where should I look at to solve this problem?
What may be wrong?

My scene contains ~ 60 nodels with 2000-4000 faces each,
When I published my project (File->Publish) from Maratis editor, whole .app file size was 6.8 MB, and npk file size was 220KB. 
When I launching published .app, I see empty Maratis player screen.
I think that npk must take more space, is this right?
What I'm doing wrong?
How to publish project correctly?

23

(9 replies, posted in General)

THank you

24

(9 replies, posted in General)

Are there any examples of loading .npk with SDK?  What is the correct way to add loading from package to iOS project?

25

(9 replies, posted in General)

Cool
Thank you.