1

(2 replies, posted in Engine)

OpenGL doesn't support threads by default, you can load images in threads, but you cannot send the data to OpenGL in threads.
Instead, you can load a bunch of images in threads in a temporary buffer or array, then go back to the main thread and send the data to OpenGL.

Neat !
Good work.

3

(64 replies, posted in News)

I don't support Maratis3x sources anymore but here I updated the project for visual studio 2012:
http://www.maratis3d.org/code/VisualStudio2012.zip

Still x86 but it should not be hard to compile in x86-64 mode.

4

(2 replies, posted in Engine)

Hi,

In a c++ plugin you can customize MGame::update() and MGame::draw() to handle multiple scenes.

MScene *scenes[3]
scenes[0] = getSceneByName("Sky");
scenes[1] = getSceneByName("World");
scenes[2] = getSceneByName("GUI");

in update replace current scene update by:

for (i = 0; i < 3; i++) {
   scenes[i]->updateObjectsBehaviors();
   scenes[i]->update();
   if (i == 1) scenes[i]->updatePhysics();
   scenes[i]->updateObjectsMatrices();
}

in draw something like:

for (i = 0; i < 3; i++) {
   MOCamera * camera = scenes[i]->getCurrentCamera();

   render->setClearColor(camera->getClearColor());

   if (i == 0)
      render->clear(M_BUFFER_COLOR | M_BUFFER_DEPTH);
   else
      render->clear(M_BUFFER_DEPTH);

   camera->enable();
   if (i == 1) camera->updateListener();
   scenes[i]->draw(camera);
   scenes[i]->drawObjectsBehaviors();
}

Hi,

the pivot is the mesh origin (where the mesh local coordinates is 0, 0, 0).

There is a way to control the collision shape position:
- Create an Invisible centered-box (or sphere or tube to visualise) and enable collision
- Parent your object to the Invisible box
(you can even parent the invisible object to another one to use compound physical shapes)

Look at this example for complex cases : "Small Demos" > Physics.level

If you want to look at how the engine create the shapes, have a look at the function "createShape" here :
https://github.com/anael-seghezzi/Marat … MScene.cpp

Bests,

Anaël.

6

(4 replies, posted in Gossip)

You can try to compile it under linux with CMake (see instructions on github). You will need to install CMake first.

I don't know codelite but I guess you can generate a makefile with CMake and give it's path to codelite or something like that.
It's possible that codelite can open visualc++ projects (that you can generate with CMake too).

7

(1 replies, posted in Showcase)

Hi, it's interesting, do you plan exploration with camera movement or is it a succession of single screen puzzles ?

Be sure to parse all the textures of the mesh (mesh->getTexturesNumber()), you don't need to use the second parameter for that.
Also, if some textures are shared between objects, do this after all meshes are loaded in case the loading override the filtering.

In c++, after loading the mesh, you can parse the textures of the mesh and call :

MTexture * texture = mesh->getTexture(i);
render->bindTexture(texture->getTextureRef()->getTextureId());
render->setTextureFilterMode(M_TEX_FILTER_NEAREST, M_TEX_FILTER_NEAREST);

10

(3 replies, posted in General)

updated: http://www.maratis3d.org/?page_id=57

11

(3 replies, posted in General)

Hi, welcome !
Thanks for the feedback, I didn't notice the links were broken since google.code went in archive.
I'll check this.

12

(2 replies, posted in General)

Hi, dev moved to github with Maratis-4: https://github.com/anael-seghezzi/Maratis-4
M4 engine is ready, and I started a rewrite of the editor.

The old code is still on google.code: https://code.google.com/archive/p/marat … ult/source

You could carry my project Maratis4? Or even missing work to be used by a user?

I'm sorry I don't understand what you mean ?

If you don't need the editor, your code should be mostly retro-compatible.
Only some things are still unfinished, the sound contexts and lua are still not plugged (though this part is the same code as M3).

Now if you want to enable UTF-8 with Maratis-3 it's going to be a bit complicated. The only way is to update Maratis-3 source code with some part of Maratis-4 source.

First, you need to update "MFreetypeLoader.cpp" : https://github.com/anael-seghezzi/Marat … Loader.cpp

Then you need this to decode UTF-8 : https://github.com/anael-seghezzi/Marat … tinyutf8.h

You need to update "MStandardRenderer::drawText" with the one found here : https://github.com/anael-seghezzi/Marat … nderer.cpp

It works with Maratis-4 (I checked): https://github.com/anael-seghezzi/Maratis-4

What text editor are you using ?
If you are using Microsoft visual c++, be sure that your cpp file is saved in UFT-8.
In visual studio, go to File > Advanced Save Options > Unicode (UTF-8 without signature)

17

(2 replies, posted in Engine)

If you just want to add a behavior to an object in c++.

You can use the behavior manager if you don't have access to the behavior code directly:

MEngine *engine = MEngine::getInstance();
MBehaviorManager * bManager = engine->getBehaviorManager();

MBehaviorCreator * bCreator = bManager->getBehaviorByName("LookAt");

MBehavior *behavior = bCreator->getNewBehavior(object);
object->addBehavior(behavior);

MVariable var0 = behavior->getVariable(0); // var 0 is "target"
MString *targetName = (MString *)var0.getPointer();
*targetName = "objetNameToLookAt";

If you have access to the behavior class you can do this directly:

MBLookAt *behavior = MBLookAt::getNew(object);
object->addBehavior(behavior);

18

(2 replies, posted in Engine)

Hi, start with this tutorial :
http://www.maratis3d.org/?p=500

19

(2 replies, posted in General)

Awesome !
Would you like to write a tutorial on the tuto section of the forum ?
Or a youtube tutorial, even better smile

20

(4 replies, posted in Gossip)

Well, Maratis is not entirely dead on github: https://github.com/anael-seghezzi/Maratis-4
Today I mostly work on a C version of Maratis / image processing library: https://github.com/anael-seghezzi/Marat … -C-library

It's difficult to stand next to Unity or Unreal in a similar category, plus Maratis didn't get a lot of support. I also got more and more work on non-videogame projects (before my profession was more tied with Maratis).

Maratis-4 engine rewrite is complete, not the editor (and I'm not sure it will be in a classical sense). I think a shift is necessary to distance Maratis from other (big) classical 3d-editor models.

Hi,

in Blender, make sure you have a normal texture in the corresponding slot:
http://www.maratis3d.com/wp-content/uploads/2011/01/07.jpg

and that "normal map" is checked:
http://www.maratis3d.com/wp-content/uploads/2011/01/08.jpg

more doc here : http://wiki.maratis3d.org/index.php?title=User_manual

22

(2 replies, posted in Editor)

Hi.

What happens if you change "StandardRenderer" to "FixedRenderer" ?

Maybe you can try to update your graphic card drivers.
What system / windows version are you using ? (Windows 7 ?)

You can install the latest nvidia or amd drivers depending on your graphic card.
It could also be something else, not sure.

Not one of the demo here works ? : http://www.maratis3d.org/?page_id=53 ("YoFrankie" for ex)

It could be a driver issue, try to install latest opengl drivers.
Do you see a message in Maratis console ? OpenGL version or else ?

When you import, the model is converted to Maratis .mesh format in in your-project/meshs/
You may have to resolve the texture path, specially if your textures are not yet in in your-project/maps/

1: copy the textures in your-project/maps/
2: Open the converted file in your-project/meshs/ with a text editor and correct the relative path if it's not correct.
(should be in the form "../maps/texture.png" or "../../maps/texture.png")