176

(6 replies, posted in Scripting)

you can apply the inverse of the gravity multiplied by the mass of the object :

-- scene update
function onSceneUpdate()

    addCentralForce(Object, -getGravity()*getMass(Object))

end

and you can additionally do your regular movement :

-- scene update
function onSceneUpdate()

    addCentralForce(Object, -getGravity()*getMass(Object))
    addCentralForce(Object, vec3(0.1, 0.0, 0.0)) -- additional move toward X

end

177

(32 replies, posted in Plugins)

Check again you are really in release mode :
http://stackoverflow.com/questions/3689 … press-2010

178

(32 replies, posted in Plugins)

yes I tested it, but on mac,
I just noticed "MLOG_ERROR" was not printing "here it is" in the console I don't know why,
it can be replaced by "printf("here it is");" but I don't think it's what causes a crash in your machine.

The code is the same as this : http://www.maratis3d.org/?p=500
What I don't understand is when you compile the tutorial you said it was working.

179

(32 replies, posted in Plugins)

i don't see anything wrong in the code.

Did you compile the plugin in 32bit ?

180

(32 replies, posted in Plugins)

Must be something wrong in the other files,
if you can show the full project code I'll have a look.

181

(32 replies, posted in Plugins)

What version are you using ? The windows version you downloaded from Maratis website ?
What compiler are you using ?

check this :
- Maratis.exe is compiled with microsoft compiler, a plugin used with this exe need to be compiled with the same compiler
  (mingw won't work with this exe)
- be sure you are linking to the same MCore.dll and MEngine.dll used by Maratis.exe
- try to compile your plugin, Game.dll, in Release mode (not Debug)

What happen when you compile this example ?
http://www.maratis3d.org/?p=500

182

(32 replies, posted in Plugins)

Hi,

from what I can see, I'll say that there is no scene named "menu" and getSceneByName return NULL,
so you should always add this by security :

menu = level->getSceneByName("menu");
if(menu)
{
    //mouseEntity = menu->getEntityByName("Mouse");
    //barEntity = menu->getEntityByName("Bar");
    TextEntity = menu->getTextByName("Text0");
}
else
{
    MLOG_WARNING("no scene called menu found");
}

For logs, you can use "MLOG_ERROR" or "MLOG_WARNING" (like above)
it will be written in a file called "maratis_log.txt" at the root of Maratis,
or launch Maratis from a command line and you'll see the logs in realtime.

The crash cannot be avoided if there is a bad access memory because it's native code and not a scripting langage.
In Maratis a lot of pointers are returned NULL when the object is not found.

183

(6 replies, posted in General)

In c++, everything is possible as there is a direct access to the engine,
you can even generate a mesh from code, like this : http://wiki.maratis3d.org/index.php?tit … coded_Cube

184

(6 replies, posted in General)

note that when you modify an asset, like a texture or a mesh file, it automatically refresh it in Maratis editor.

185

(6 replies, posted in General)

What format are you exporting from 3dsmax ?

- if you are exporting a Collada or OBJ file, you can use Maratis converter :

Open your project in Maratis
Clic on File > Import 3d model and select your 3d file
It will convert the file and save it as a XML .mesh in your-project/meshs/
Open the .mesh file with a text editor and search for your material nodes : "<Material"
Add this inside the material (check the local path) :

<vertexShader file="../shaders/myShader.vert"/>
<fragmentShader file="../shaders/myShader.frag"/>

Here is an example of a material in Maratis XML format (from a mesh found in the second link I gave you) :

<Materials num="1">
    <Material id="0" type="3">
        <blend type="1"/>
        <opacity value="1.000000"/>
        <shininess value="20.000000"/>
        <customValue value="0.000000"/>
        <diffuseColor r="1.000000" g="1.000000" b="1.000000"/>
        <specularColor r="0.500000" g="0.200000" b="0.300000"/>
        <emitColor r="0.000000" g="0.000000" b="0.000000"/>
        <customColor r="0.000000" g="0.000000" b="0.000000"/>
        <vertexShader file="../shaders/standardDSEN.vert"/>
        <fragmentShader file="../shaders/standardDSEN.frag"/>
        <ZVertexShader file="../shaders/Z_standard.vert"/>
        <ZFragmentShader file="../shaders/Z_standard.frag"/>
        <TexturesPass num="4" >
            <texturePass id="0" texture="0" mode="modulate" mapChannel="0" />
            <texturePass id="1" texture="1" mode="modulate" mapChannel="0" />
            <texturePass id="2" texture="2" mode="dot" mapChannel="0" />
            <texturePass id="3" texture="-1" />
        </TexturesPass>
    </Material>
</Materials>

186

(3 replies, posted in Gossip)

how did you hear about Maratis ?
do you have a game project ?

187

(6 replies, posted in General)

Hi,

you can find details on how to link shader in Blender here : http://www.maratis3d.org/?p=277
And there is some examples of shaders here : http://www.maratis3d.org/?p=548

In the example, the shaders are in the "shaders/" project folder.
It uses classic glsl shaders (vertex + fragment)
using custom uniforms and attributes sent by the engine.

For example this attributes for the geometry :

attribute vec3 Vertex;
attribute vec3 Normal;

Or this uniforms for the matrices :

uniform mat4 ModelViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat4 NormalMatrix;
uniform mat4 ProjModelViewMatrix;

188

(3 replies, posted in Gossip)

hi ! welcome.

189

(19 replies, posted in Engine)

Hi,
about your questions :

1 : yes, cmake should be able to generate usable visual studio projects,
but right now the cmake build system is a community fork, the official multi-platform build system is still scons.
I started to import Dahnielson cmake build to the official repository, so please list all your issues it's usefull

2 : The difference between MGui 1 and 2 is not huge but it will need some porting,
the best for you is to be sure to isolate the maximum of your code from MGui to minimize the effort.

190

(2 replies, posted in Showcase)

smile

191

(5 replies, posted in Gossip)

Hi all,

I just created a twitter account where I will be posting some news and ideas about Maratis development and programming in general. Come and say hello if you are interested  ! https://twitter.com/anaelseghezzi

Cheers smile

you can use getUnProjectedPoint :
pos = getUnProjectedPoint(Camera, vec3(0.5, 0.5, 1))

193

(5 replies, posted in Scripting)

Hi,
all this will be useful for an object to follow a specific smooth path.
you will still need a "path finding" algorithm, like Recast : https://github.com/memononen/recastnavigation

194

(1 replies, posted in Engine)

Hi,
the basics are working but it's still in development,
it's maybe not adapted to in-game GUI.

check this :
http://forum.maratis3d.com/viewtopic.php?id=788&p=2
http://forum.maratis3d.com/viewtopic.php?id=723

195

(5 replies, posted in General)

Strange. What version of Ubuntu is this ? 32bits or 64bits ?

I have an old version of ubuntu 32bit on one computer here that works,
and I tried the last version of Linux Mint 64bit (based on ubuntu) one week ago, working normally.

A possible explanation here : http://blog.habets.pp.se/2010/09/gettim … asure-time

196

(5 replies, posted in General)

Hi,
I'm surprised, because there is a mechanism used to synchronise the update at 60hz,
is it happening with the binary release from maratis website ?

if there is a bug, it will be with MWindow::getSystemTick()
or with the main loop sync inside Maratis main.cpp

197

(33 replies, posted in General)

ok it works by adding "$ORIGIN/" to CMAKE_INSTALL_RPATH :

SET(CMAKE_INSTALL_RPATH "@loader_path/.;$ORIGIN/")"

198

(33 replies, posted in General)

Hi,

I managed to build your version on linux,
the file "config_types.h" was missing in libogg, but it was easy to correct manually.

But after calling make install the application is not finding libMCore.so, there is probably a problem with the rpaths.

Hi,
sure, will it be enough assets for that ?

200

(5 replies, posted in Scripting)

Where is located the script calling dofile("other/Motion.lua") ?

ex 1 :
/scripts/main.lua -> call dofile("other/Motion.lua")
/scripts/other/Motion.lua

ex 2 :
/scripts/something/main.lua -> call dofile("../other/Motion.lua")
/scripts/other/Motion.lua