1,401

(4 replies, posted in External Tools)

I know there is one user who started making a max script to export maratis mesh, but I don't know where it is now.

There is a professional studio who developed a 3dsmax export plugin, you can maybe try to contact them :
contact @ medigames-studios.fr

For now, what you can do is exporting your data from 3dsMax or Maya in collada, and just use Blender for exporting.

1,402

(7 replies, posted in Tutorials/Examples)

Nice,
thank you for sharing !

1,403

(21 replies, posted in External Tools)

Is there any error message in the blender command window ?

1,404

(9 replies, posted in General)

There is a topic about Maratis iPhone publishing :
http://forum.maratis3d.com/viewtopic.php?id=66

An in-progress iPhone xcode project can be found on svn :
http://code.google.com/p/maratis/source … Publishing

1,405

(49 replies, posted in General)

Here one way to do a timer :

t = 0 -- timer t
startTimer = 0 -- timer off by default
timerInterval = 3*60 -- timer interval : here 3 seconds
timerLoop = 0 -- if you want the timer to loop, set timerLoop = 1

function onSceneUpdate()

    if isKeyPressed("X") then
        startTimer = 1
    end

    -- timer
    if startTimer == 1  then
        if t == timerInterval then
                print("time up !")
                t = 0
                if timerLoop == 0 then
                    startTimer = 0
                end
        end
    end

    -- increment t
    if startTimer == 1  then
        t = t+1
    end

end

1,406

(49 replies, posted in General)

Timer, Timeline:

The lua script update is syncronised at 60fps,
so you can create a timer with a simple variable like that :

t = 0

function onSceneUpdate()

    -- 1 second
    if t == 60  then
        print("one second")
    end

    t = t+1
end


Non-bones blender animation :

The actual blender python script is not implementing it,
that's possible in the future, if a contributor can improve the python script
it would be nice.


Animation Blending :

Currently not, I made some code for morphing, but I'm not sure I finished it, laking of time.
I will try to have a look at it at some point.

1,407

(1 replies, posted in Bug report)

yes you are right ! thank you.
I will correct that.

1,408

(47 replies, posted in Engine)

You can find the current xcode project in SVN branches/iPhonePublishing/ :

http://code.google.com/p/maratis/source … Publishing

There is no theoretical limits, it depend a lot what platform you target and the rendering you want to use,
for an iPhone for example you should try to have less than 5000 triangles visible at the same time.

For a recent computer, I would say less than 100 000 visible at the same time if you are using baked shadows, and if you are using dynamic lightning and shadow map, try to reduce the polygon count. It will depend a lot on your 3d card.

Most important is to try to subdivide your environment.

1,410

(47 replies, posted in Engine)

yes, i didn't find the time to continue since this post, so it's still missing the sound and the touch input, but if you don't mind testing the in-progress version, I will post it tomorrow.

1,411

(49 replies, posted in General)

try using "spherical" shape or "capsule" shape.
As you are changing the angularFactor and using a box shape, it's possible that the edge of
the box shape is being stuck because you don't allow it to rotate.

look at yo-frankie example, it use a transparent box for the collision, but the physics shape is "sphere"

1,412

(9 replies, posted in Scripting)

I will watch to correct the full example, but for now you can try this :

vec3 N = normalize(normal);

float ink = dot(normalize(-position), N);
ink = clamp(pow(ink*3.0, 20.0), 0.0, 1.0);

gl_FragColor = vec4(ink, ink, ink, 1.0);

1,413

(9 replies, posted in Scripting)

how, strange... thank you for the reply.
There is maybe a clamp computation or a negative value working differently on your 3d card,
it's probably a small thing to check. I will have a look, if you can also try to modify the shader
on your machine tell us.

1,414

(49 replies, posted in General)

are you using very large triangles ?
it's possible that bullet physics need subdivide surface when it's large.

1,415

(9 replies, posted in Scripting)

It's not exactly what you need but I made a simple ink shader example there :
http://www.maratis3d.org/?p=548

1,416

(49 replies, posted in General)

Hi, nice smile

I release a new example with envmap shaders if you want to have a look :
http://www.maratis3d.org/?p=548

1,417

(0 replies, posted in News)

Hi,

I just released a new example, showing how to use more complex custom shaders :

- simple envmap shader (reflexion)
- simple ink shader
- standard shader with diffuse/specular/normal/emit and shadow map
- standard shader with additional envmap

http://www.maratis3d.org/wp-content/uploads/2011/03/customShaders.jpg

http://www.maratis3d.org/?p=548

1,418

(49 replies, posted in General)

Hi,
for the tree, for hard transparency,
your foliage texture just need to have an alpha component
using pnj format for example.

The yo-frankie demo is using transparency for trees, i included the blend files
if you want to compare with your tree.

1,419

(3 replies, posted in External Tools)

You need to use a modifier in blender, it's called "edge split".

1,420

(49 replies, posted in General)

Look in the console window of Maratis if some error is printed.
If you want a shader example there is one in there : "Example/Demos/shaders/"

I'll try to send a tested reflexion shader soon.

1,421

(47 replies, posted in Engine)

Yesterday I started working on a xcode example showing how to use Maratis Engine for iPhone, it's not very complicated but as I'm not used to iPhone programming, it still need some work, here is the first test, still only fixed pipeline and no sound, but it should be good soon :

http://www.maratis3d.org/wp-content/uploads/2011/03/iPhoneJules.jpg

Work is mainly creating iPhone context and finding an alternative to DevIL and libsnd (LGPL). As I don't have any iPhone (and don't want), this example is using iPhone simulator.

See you soon,
Anaël.

1,422

(49 replies, posted in General)

Hi,

Animated gifs:
They are not supported, if you want to use animated textures, you'll have to make a single texture strip including multiple images, then animate texture translate to decal your texture in time.

Bullets:
There is a way to do it by script, but I should say that it will be more easy and optimized to use a c++ game plugin.
Look at Maratis/Examples/Demos/scripts/follow.lua to have a look on a more complex lua script to move objects.
Later, I'll try to give you a better example.

About shaders :
Create a custom shader will be the best to have your reflexion effect, in this case, as Kralle suggested, an envmap will be good enough.

A spherical envmap like this one for example :
http://www.codemonsters.de/home/img/textures/spheremap_bar.jpg

You can link shader using Maratis Blender export :
http://www.maratis3d.org/wp-content/uploads/2011/01/05.jpg

You can access each texture slot with your custom shader
http://www.maratis3d.com/wp-content/uploads/2011/01/06.jpg

To create shaders, you can just use a text editor, as Maratis is updating assets in realtime, each time you will modify and save your shader, the result will automatically appear on Maratis.

To create a reflexion using a shader, you can use the normals as uv coord, something like :

VERTEX SHADER:

attribute vec3 Vertex;
attribute vec3 Normal;

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

varying vec3 position, normal;

void main(void)
{
    normal = (NormalMatrix * vec4(Normal, 1.0)).xyz;
    position = (ModelViewMatrix * vec4(Vertex, 1.0)).xyz;
    gl_Position = ProjModelViewMatrix * vec4(Vertex, 1.0);
}

FRAGMENT SHADER:

uniform sampler2D Texture[8];
varying vec3 position, normal;

void main(void)
{
    vec3 N = normalize(normal);
    vec4 reflection = texture2D(Texture[0], N.xy);
    gl_FragColor = reflection;
}


This example is only showing how to make an envmap, for a full shader including texture, diffuse, normal map, you can have a look to the standard Maratis shaders, located in the source distribution : Maratis/Common/MRenderers/MStandardShaders.h

When I'll have some time, I'll try to give a standard shader that can be used as a start.

Anaël.

1,423

(7 replies, posted in Bug report)

Hi,
some people had problems because their 3d drivers was not up to date,
maybe try to update your 3d card driver to have the last openGL drivers.

I know it worked for others.

1,424

(2 replies, posted in Bug report)

The collision test is returning true when there is a collision, so since you objects are in collision you send a "playSound" order and the sound play from the beginning.

In script, you should do something like :




collision = 0

function onSceneUpdate()

    if isCollisionBetween(A, B) then
        if collision == 0 then
            playSound(sound)
        end
        collision = 1
    else
        collision = 0
    end

end

1,425

(9 replies, posted in Tutorials/Examples)

Thanks that's great !