351

(7 replies, posted in Tutorials/Examples)

PunBB bbcode test

So there's 4 levels in this example :

3 method to control a door (using translate only for now) :

1) With getPosition
2) With a Timer
3) With a Trigger
Last level is a platform controlled by a timer

• Project : Door Examples

• LUA script only : Door + getPos
• LUA script only : Door + Timer
• LUA script only : Door + Trigger
• LUA script only : Platform + Timer

352

(21 replies, posted in External Tools)

Have you unzipped the files ?

If i remember correctly, you just have to install the maratis.zip file alone, without unzip.

Hope this help

353

(49 replies, posted in General)

PunBB bbcode test
working perfect, many thanks !

354

(49 replies, posted in General)

Alright thanks, wish i can help but my programming skills are so fail that its not possible

as proof i took 4 hours trying to set a delay to play 1 sound after another one. and still failed.
Note, i can set events at a given time, its working perfect, like this one, starting rotating after 4seconds

if (t > 240) then
    rotate(mini, {0, 0.4, 0}, 3, "local")
end

but what im trying to do here is for example
execute one action 3sec after the previous one, or every 3sec (regardless of the timeline, like a 1sec delay or an imaginary "wait" option), that kind of stuff.

ive made a "delay" variable and tried to toy with t= / t> / t< (dont even know if thats the right way to do it)
but nothing worked

Once again im crying for your help sad

s1 = getObject("s1")
s2 = getObject("s2")


   t = 0
   sound = 0
   delay = 0

-- scene update
function onSceneUpdate()
   
    -- 1 second   
    if t == 60  then       
       print("one second")   
    end
   
    t = t+1
   
    -- Sound
    if isKeyPressed("X") then
        if sound == 0 then
            playSound(s1)
            delay = 1
            playSound(s2)
        end   
        sound = 1
    else
        sound = 0
    end
   
    -- delay
    if delay == 1 then
     then.. then what ? ><
    end

end

Ah thanks i was wondering the same.

Searching a bit,  i found this (for performances):

Modern graphics cards are really good at pushing a lot of polygons, but they have quite a bit of overhead for every batch that you submit to the graphics card. So if you have a 100-triangle object it is going to be just as expensive to render as a 1500-triangle object. The "sweet spot" for optimal rendering performance is somewhere around 1500-4000 triangles per mesh.

356

(49 replies, posted in General)

Hello, another batch of questions, here we go :
-------------------------
Timer, Timeline

Is it possible to manage the time ?
that would greatly help for sounds, lights and others object changes

for example let's say i want to make a progressive FOV change,

if isKeyPressed("X") then
setcamerafov (cam, 90)
(timer here, lets say 0.1 seconds)
setcamerafov (cam, 100)
(timer here, lets say 0.1 seconds)
setcamerafov (cam, 110)
etc

And also, i dont see how i can use the timeline for now ? cause i dont find any scripts
related to time

------------------
Non-bones blender animation

Is it possible to export animations WITHOUT using bones directly from blender to maratis ?
i mean just scale/rotate/translate animations

and possibly cloth/fluid modifier for water effects
-------------------

Animation Blending

Currently, is that possible?

------------------

Sorry for many questions, just want to make 100% sure

357

(49 replies, posted in General)

anael wrote:

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"


Well thing is, when AngularFactor is set to 0.00 theres no collision problems, but without any angle rotations,
a car on a terrain with hills looks pretty bad

When i set angularFactor to 1.00 (or even 0.xx) with (box shape) angles rotations are good but theres collisions
making it unplayable

still with angularFactor to 1.00, with sphere or capsule shape this time, my model is doing 360° rotations even on a flat plane so its a bit hard to make tests ^^'

I'm sure is just a simple value to change somewhere but nvm i will stay with a flat plane for now, and take a deeper look later on

358

(49 replies, posted in General)

Hmm still the same, but now im sure its a problem with angularFactor, cause
when i dont use it, it runs just perfect.

Gonna toy around with the settings and hope for a win >.>

359

(49 replies, posted in General)

Oh, i'm using box-shaped only for now
i'm gonna try this in about 1hour (must do something right now)
Gonna post the results after that

Thank you

360

(49 replies, posted in General)

One thing i forgot to say, its when i use angularFactor that this problem happen

For the triangles, i tried :

- 30k triangles terrain
- 10k triangles terrain
- 622 triangles terrain
- with / without subdivide surface

Honestly i didnt noticed any major differences =x

Also noticed i dont have much problems with a very small terrain, but when i scale it to make a huge one it happen

361

(49 replies, posted in General)

Hmm one last problem for now, i have trouble with triangle-mesh shape.

To describe the problem its like my car/hero is colliding with an invisible thing on the floor
(comme si ils trébuchaient / se font bloquer par un truc, meme quand le surface est plate)

On a simple flat road for exemple for now i can set shape to convex-hull and its just perfect but
when i want to use more complex models like a terrain with hills or a twisted road i have to use triangle-mesh
but then its not playable

I tried with/without feet & bounding box, differents settings editor, in both way result is the same.
Tried to copy settings from Yorankie exemple too, as i noticed the level is in triangle-mesh too and dont have this problem but .. not working for my models :x

Any ideas ?

362

(49 replies, posted in General)

Fantastic, that's exactly what i needed !

Now i have everything i needed to make a good looking scene

Gonna post the results soon

you rock wink

363

(49 replies, posted in General)

http://img130.imageshack.us/img130/7302/image1555compressed.jpg

Perfect, thank you smile

364

(49 replies, posted in General)

hm there's no error log in maratis console so i guess it's me failing with blender somewhere =x

Another quick question,

About image transparency, its me failing again or it is not supported yet ?

Tree in blender:

http://img860.imageshack.us/img860/263/image131951compressed.jpg

Exported :

http://img6.imageshack.us/img6/5481/image121650compressed.jpg

365

(3 replies, posted in External Tools)

And for the future, you can upload images there : http://imageshack.us/

366

(47 replies, posted in Engine)

iPhone is the best platform for indies to publish imo
Great news smile

367

(49 replies, posted in General)

I'm a bit confused.

I did like u explained, so now i made 2 files in my project/shader folder,
one Reflect.vert and Reflect.frag

Applied custom shader in blender, etc
But now i tried to export like 30 times with differents settings at each try,
most of the time in game my object is displayed black without reflexions

I'm doing something wrong for sure but i dont see what
Anyone kind enough to show me the correct settings ? :x

And thanks for your help smile

368

(49 replies, posted in General)

Kralle wrote:

fast reflections are mostly done with an envmap (environment map)

and i also asked for cel shading (for the outline to be exact) - see here
http://forum.maratis3d.com/viewtopic.php?id=56

Oh i missed that topic

I remember this technique for cell shading, found on anim8or site years ago ^^
http://www.anim8or.com/tutorials/from_u … _hints.jpg

Also for envmaps i was thinking about that yes but mapping : Reflection has to be applied
for good results and currently only UV are supported thats why i tried my luck
with baking, but i cant get something decent out of this..

thanks anyway

369

(49 replies, posted in General)

And im back!

Animated GIF

.gif files can be applied to a mesh ? i've seen on blender export help page
"Images" and "Clip" are supported so i was wondering, that might help for a GUI

Reflections

I want to achieve 2 things, one soft reflection like this one :
http://img5.imageshack.us/img5/6008/ok2d.gif

First i tought that was done by baking textures but then i've found this :

Baking reflections and specular highlights is a bad idea if you want to move the camera, the object or any of the lights. The position and content of the reflections and highlights depend on their relative positions.

And a 100% mirror reflection one.

I made lots of tests in blender but still failed in the end
any ideas ?

Shaders

Let's say i want to make a cell shaded game, i guess i have to set a custom shader in blender export ?

Searching a bit i found these 3 tools :

http://developer.nvidia.com/object/fx_c … l#features
http://developer.amd.com/archive/gpu/re … fault.aspx
http://glintercept.nutty.org/index.html

Will i be able to set my own shader in blender export with these or there's an easier way ?

Shooting Bullets

This one is giving me hard times.

Logically i think :
(no lua script, just to tell how i imagine the thing)

when a key is pressed
create "Bullet" every 0.5seconds at position (gun.x, gun.y, gun.z)
(with bullet going on the good direction at the good speed ofc)
Destroy "Bullet" on collision

But yeah i know, it's not that easy.

For now: i have a character, a gun attached to him, and a bullet attached to the gun >.<
Problem is when i shoot, the bullet is coming back on the gun (follow behavior)
wich doesnt look really realistic xD

Is there a "Create Object" option or equivalent ?
Also, i havn't found a way to move an object at another object position without using follow behavior so here is it, my next question :

Place an objet at another object position

Let's say :

I want OBJECT1 to move at OBJECT2 position when i push a key

Logically i just think :
(no lua script, just to tell how i imagine the thing again)

when a key is pressed
setPosition(OBJECT1, {OBJECT2.x+2, OBJECT2.y+4, OBJECT2.z-2})

But yes once again its not that easy and im kinda stuck for now

/cry

370

(3 replies, posted in Tutorials/Examples)

What you will need

- Terragen
http://www.planetside.co.uk/terragen/wi … dwin.shtml
- Terragen render script
- Blender 2.56

Using Terragen

First part of the tutorial is taken from :
http://forums.virgal.net/faq-creation-m … rragen.htm

However it's in french so im gonna translate (if we can call this a translation =p)

1) Launch terragen -> customise & generate your terrain -> use the preview button
2) In the rendering window :
- Uncheck "Fixed height above surface"
- Pick the best possible quality
- Choose 512*512 as image size
http://img708.imageshack.us/img708/8793/skyboxrenderwindow.jpg
3) Open Notepad, copy/paste the script and save it as skyboxscript.tgs

initanim "C:\sky", 1
; You can set another path.
; The last part (here : "sky") is the prefix
; to name your files, and the first part
; (here : "C:\") show where you gonna save the files

;_ft
Zoom 1.0
CamH 0
CamP 0
CamB 0
frend

;_lf
Zoom 1.0
CamH 90
CamP 0
CamB 0
frend

;_up
Zoom 1.0
CamH 270
CamP 90
CamB 0
frend

;_bk
Zoom 1.0
CamH 180
CamP 0
CamB 0
frend

;_rt
Zoom 1.0
CamH 270
CamP 0
CamB 0
frend

;_dn
Zoom 1.0
CamH 270
CamP -90
CamB 0
frend

4) In terragen, click on terragen menu at the top, then "Execute script" -> select your skyboxscript.tgs
5) Once rendering is complete, open the path where you saved, and here are your 6 BMP files -> you can convert them as JPG if you want
6) Ur done!

NOTE: Take a look at the script,
Below each camera rotations there is a

;_ft (= Front)
;_lf (= Left)
;_up (= Up)
;_bk (= Back)
;_rt (= Right)
;_dn (= Down)

This is the order of your rendered images
so when you done rendering, rename them using these names so you know
what your images are.

Using Blender

If you want a little shortcut, here's a .blend file with a prepared box:
(Including Skybox.blend1 and Skybox.blend2 i dont know if they are needed to start Skybox.blend)
http://dl.dropbox.com/u/19970067/Blender/Skybox.rar

Or if it works just with just skybox.blend file :
http://dl.dropbox.com/u/19970067/Blender/Skybox.blend

And as example the 6 images i used for this tuto (2.577ko) :
http://dl.dropbox.com/u/19970067/Skyboxes/Images.rar

What i did there :
- Splitted all 6 cube faces
- Unwraped them
- Applied a material on each face, Set material "Emit" at (1.11). (thanks anael)
- Applied texture & bind UV coordinates (you just have to open your images now)
- Named faces, materials and textures UP, DOWN, LEFT, RIGHT, FRONT, BACK
- Moved each face by 0.004 / -0.004 on the correct x/y/z so the edges of the cube aren't visible
(there was a very small space at each cube edge that was visible, so like this its ok) 

From here you have to:

- Load a texture on each cube face
- Set texture for each face on UV map window (Edit mode)
http://img822.imageshack.us/img822/8189/sanstitre1tyv.jpg
- Change viewport to "Textured" (its hard to select faces when you are in texture viewport with no texture applied)
- Once all faces are textured, select face one by one and apply on each of them :
1) In Object mode -> Select a face
2) Press TAB to enter Edit mode -> in Tool shelt, under "normals" tab, press "Flip direction"
(Texture will be displayed inside of the cube instead of outside)
(In the UV menu (EDIT MODE only) use UV -> Mirror -> X Axis or Y axis if the texture isn't displayed correctly)
3) Press TAB again (to go back in Objet mode) and repeat the 1-2 steps for each cube face
- Once it's done, press "A" (select all) then export as maratis mesh (you dont have to join faces)

This is how it must look when ur done :
Outside box
http://img713.imageshack.us/img713/6680/image13243.jpg

Inside box
http://img121.imageshack.us/img121/2371/image131756.jpg


In maratis

anael wrote:

Import the mesh in Maratis, go to the behavior tab and add a "Follow" behavior. Set the camera name as the target, set delay to 0. Scale the skybox to fit the clipping max of the camera. The skybox will follow the camera position but will not rotate with it, so it's the definition of a skybox


I'm not saying that's the best way to make a skybox but it worked for me and that was quite fast & easy,
so it should work for you too.
And take note you can change settings in Terragen to make completely differents atmospheres

If you find this tuto not clear enough / possible error / better way to do it / way to improve,  just tell !

And thanks anael for showing me the way !

Results :

http://img43.imageshack.us/img43/4279/image115126.jpg
http://img638.imageshack.us/img638/2761/image115339.jpg
http://img203.imageshack.us/img203/2382/image115412.jpg
http://img52.imageshack.us/img52/4757/image115426.jpg

NOTE: in maratis, try changing the camera FOV and see the results

371

(49 replies, posted in General)

Link selection ! that was that.
I watched the video (of course) but seems i missed that part...
And i see now for the Feetbox. that make sense.

anael wrote:

An invisible mesh can also be used as a trigger when set as "ghost"

This tip will be very useful too

For the skyboxes, mine is almost ok, gonna make a tutorial once its perfect

anael wrote:

Display mouse :
It's possible only using the game plugin system.

For the plugin system unfortunately i'm ultra allergic to C++ (can be mortal!) so i cant go this way

Thanks for your help !

anael wrote:

If you have more question don't hesitate.

Preparing my next batch of noob questions
and im back
wink

372

(2 replies, posted in Bug report)

That's working perfect, thanks smile

373

(2 replies, posted in Bug report)

Hello,

I have a problem with sounds, for example, i want to play a sound when theres a collision between objects.
All is working perfect except on collision, it looks like the sound is playing 50 times at once, resulting in a crazy noise.
I havn't found a script or option in the editor to make the sound only play 1 time so i guess its a bug ?

if not i'm sorry !

374

(11 replies, posted in Gossip)

I support the idea, the sooner we have some infos on the basics of maratis, the faster we can start making
concrete & good looking projects
And i think funding isn't necessary at this time, just let people toy around and share what they
discover (if they are willing to !)

I'm currently working on a Car game and (fake)2D platformer for a start, planning to make tuts about this
if i can bring them to a decent level smile

375

(49 replies, posted in General)

Hi and first thank you for this awesome soft!

I have a few questions about maratis and to dont polluate i will ask all them here:

Invisible bounding box
The invisible bounding box in the examples, i guess it is bind to the model in blender and then exported ? how can i reproduce it ?

Feet Box
The feet box under the 3d models in YoFrankie and Jules example, what does it stand for ? what are the advantages
of using one ?

GUI and images
I've read in another topic, theres a way to attach it to the camera
But i really dont see how this can be done (i mean, how can i display my images, healthbars etc ?)

Display Mouse
Is it possible ?

edit/ one more for the road
Skyboxes
How can i set one ? i tried some things with different render settings but in the end i failed

Thank you