EasyTOK Version 1.0

Blitz3D Forums/Blitz3D Programming/EasyTOK Version 1.0

Filax(Posted 2005) [#1]
Hi :)

EasyTOK is a library for Blitz3D. With EasyTOK you can add physics to your applications or games in a very easy way.

Toolbox page :
http://www.blitzbasic.com/toolbox/toolbox.php?tool=143

EasyTOK Page :
http://www.blitz3dfr.com/phpfrench/content.php?content.47

Download demo :
http://www.blitz3dfr.com/phpfrench/request.php?31

Examples :









Naughty Alien(Posted 2005) [#2]
Filax, this is your work?? I mean if it is, I will buy since you treating your costumers on very nice way ;)) good work man...you got me.. ;)


Filax(Posted 2005) [#3]
Yes EasyTOK is my work :) i have started this lib a very long
time. But it's stable now :)


Naughty Alien(Posted 2005) [#4]
well..since I have excellent experiance with your TeraEd, in next few days I will purchase EasyTok too..


Filax(Posted 2005) [#5]
Many thanks !!! :) i hope you like it :) I have made this
library to be the more simple possible ! :) like BCF :)


Naughty Alien(Posted 2005) [#6]
hehehehe...very good..it means I will be able to implement easy TOK in to TeraEd?? I cant wait..huhh


Filax(Posted 2005) [#7]
I'm seeying to do this, because i'm planing to make
terrain blitz workable with EasyTOK :)


Naughty Alien(Posted 2005) [#8]
good, good...any news about TerraED update? I really looking forward to it..and with this EasyTOK, its very interesting tool


Filax(Posted 2005) [#9]
for the moment i'm working on the new TerraEd format
because TerraEd format need to be changed at each update :/

I'm working on another solution.


Damien Sturdy(Posted 2005) [#10]
Hehe, Filax, you beat me to it man. I have been writing a wrapper (modified from Sweenies version) that included easy create functions and nibuilt networking.

neat work!


Filax(Posted 2005) [#11]
Thanks :)


Dock(Posted 2005) [#12]
Wow, amazing stuff!
Would it be possible to see the source code for any of those demos, so we can see how easy it is to implement?

I managed to get a MAV on the Expert Ragdoll 01.EXE by shooting the guy into the corner and making him clib the wall by shooting upwards. Other than that it was totally stable.

Can I specify values for physics in MAX? How does this export? Is it compatible with B3DPipeline?


OJay(Posted 2005) [#13]
/me is interested in the source of at least one demo too :)


big10p(Posted 2005) [#14]
Looks impressive but shouldn't you have called it "TOK-it-easy"? :P


IPete2(Posted 2005) [#15]
FABTASTIC work Filax!

IPete2.


Sledge(Posted 2005) [#16]

To clarify things, i am not selling neither Tokamak nor Sweenie's wrapper but only the EasyTok library...



That actually means you ARE claiming to be selling Tokamak and Sweenie's wrapper, and EasyTok is the only thing you AREN'T selling!


Try...

I am selling neither Tokamak nor Sweenie's wrapper but only the EasyTok library

...or...

I am not selling either Tokamak or Sweenie's wrapper but only the EasyTok library

[GRIN]


Filax(Posted 2005) [#17]
1) Thanks Sledge !

2) "Can I specify values for physics in MAX? How does this export? Is it compatible with B3DPipeline? "

Of course ! you can define Mass, Rotation,Scale, Life etc ..
from 3DS max or other 3D softwares, and, it's of course
fully compatible with pipeline, giles etc... The scene
(screenshot number 7) is made directly under Max => Blitz
and loaded with only one line of code.



Is there an example of code :



Only 9 lines of code are used to declare and use EasyTOK.




IPete2(Posted 2005) [#18]
Or "Tok - it- to the Limit" - lol

Filax,

how about meshes and terrain stuff - and how easy is it to set up? Just a few bits of easytok code would do to show us how easy it is...

IPete2.


Filax(Posted 2005) [#19]
See below Ipete2, for the Terrain (coming soon) and for the
mesh, it's very easy to use :) I always make library easy to
use...


OJay(Posted 2005) [#20]
hm i don't get it, why is:
TOK_CreateABCube("Wall03",0,30,15,-20,0,0,15,1,15,"",255,255,255,1)

simpler then:
ground = TOKAB_Create()
TOKAB_AddBox(ground,30,2,30)
TOKAB_SetPosition(ground,10,5,0)

?

i mean: what is the real advantage of your lib? maybe a function-reference or manual could clarify this, the demo-code doesn't (to me) :/

thanks


Filax(Posted 2005) [#21]
One of the big EasyTOK advantage ?? The physic setup
under 3DS max or other ! and many other stuff to create scene
with minimal line of code ! This library was made for
people who want setup quick and easily a Physic world.

EasyTOK is more than 2400 lines of code. If it was only a
stupid functions wrapping, I would never have sold it....

For better use, all sources, with media and 3DS scenes
are packaged with EasyTOK.


Techlord(Posted 2005) [#22]
Filax,

Thumbs Up!


Dock(Posted 2005) [#23]
Setup in MAX, and minimum lines of code wins my vote (I've just ordered it ^_^)


Destroyer(Posted 2005) [#24]
Yep just got it myself will have a play with it over the weekend :)


OJay(Posted 2005) [#25]
hm...what about an ODE version? :>


Filax(Posted 2005) [#26]
Many thanks guys !! I hope you like it ! and you found it
usefull :)


Paolo(Posted 2005) [#27]
Congrats Filax!

Just one question,
did you get to add some kind of convex bodies collision
or it is all based on the tokamak primitives?


Filax(Posted 2005) [#28]
Of course not ! You can define complex
level collision without using primitive !

EasyTOK keep the level structure for collisions !

My lightmapped demo are directly 3DS MAX => BLITZ


sampyxis(Posted 2005) [#29]
Hi filax,
Looks awesome.

I just bought it as well - will play around with it this weekend.

Thanks!


Filax(Posted 2005) [#30]
Many thanks sampyxis :)

Eurythmia : Are you talking about level or object in level
about convex body ? because convex body are very limited ...
255 vertices if i'm remember !

I think that the solution, example, for a space ship is
made the space ship part by part and attach all part with
joints, why ? :) because you can activate or desactivate
joint during game ! to destroy space ship in many part :)


sampyxis(Posted 2005) [#31]
filax,
That sounds great on the space ship - even if it's a combination of boxes - I think your wrapper will make that creation easy.


VIP3R(Posted 2005) [#32]
Nice work filax :)

I got a MAV on the 'Expert - Ragdoll 01.exe' after a few seconds, not sure why? (specs in sig) Otherwise everything ran ok here.

It would be good to see the physics processing time in the demo displays, should be easy enough to add.

Best of luck with EasyTOK ;)


sampyxis(Posted 2005) [#33]
filax,
The spaceship works great. Put together with joints - it falls apart beautifully.

Your wrapper really simplifies Tokamak.

Thanks!


Filax(Posted 2005) [#34]
VIP3R : I wish you good luck for your product/soft ! I began
working on EasyTOK one year and a half ago and i must admit
that your software inspired me a lot :)

For the MAV it appear some rare time for a strange reason !
and never to the same moment :) ! Malicious Tokamak Bug ?

I'm happy to see peace between blitz coder's !!!

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

Look at:) another proof of the capacity of EasyTOK This
example was created in 15 minutes and required 1 line of
code to be active !

TOK_CreatePhysicFromMesh("./ETOK_Medias/Demon.b3d")

And 11 lines of code to create flight and break ....

Get the demo

http://www.blitz3dfr.com/tempo/Beginning-Ship01.zip


KuRiX(Posted 2005) [#35]
Really nice work. Good physics added to good looking levels. Congratulations and keep the good work!


Paolo(Posted 2005) [#36]
Filax,
I mean convex bodies -> to level collision,
for example, I use trimesh collision for the levels and the
rest of the elements are made with combinations of
toka-primitives bodies (box, spheres, ...), similar to what
you said about the space ship,

but then,
how do you get proper collisions for the chain in the first screenshot here above?
Is each circle of the chain made off many rigid bodies?

[EDIT]
ok, looking carefully to the chain, I think it is just a
matter of setting the joints limits correctly, isn't it? :)


Filax(Posted 2005) [#37]
EasyTOK use convex to create very complex level, there is no
problems.

For the chain ? only a good joints placing and ... rbbox :)
And a sphere used for the big ball !

I have made in the sample code an example to create this chain
in one line of code :)

Proc_CreateChain("Chaine01","./ETOK_Medias/chain.b3d","./ETOK_Medias/boulet.b3d",15,10,50,5,2)


Pinete(Posted 2005) [#38]
Hi Filax,

first of all, congratulations for your work,
it seems impressive.

a) I would like to know, if possible, how you can setup
the physics from 3dsmax, from simple objects to more advanced objects like a ragdoll or a car. Could you describe the process in detail?

b) ...and how could I managed a "complex" scenario. I'm talking about a city with no more than 50,000 polys...

it's just an example, I'm refering if exist some kind
of function similar to 'maketokcollider'...

Please, could you say to us more about the advantages
regarding to the simplicity of your library in a more
detailed way?

Thanks in advance and regards!


Filax(Posted 2005) [#39]
Hi Pinete

Easy explain ? sure : It's 4 steps for a ragdoll.

1) Under 3DS Max place all body part (head, left leg, right leg etc) in the front view.

2) Connect all part with joints and define the joints angles
+ some easy parameters, under 3DS max.

3) Save you scene

4) Load it in blitz with EasyTOK and one line of code and
all is automatic !

I can't make more easy ! Process time ? hum :)

30 minutes ?

When i say that EasyTOK Simplify the creation of physics
largely, believe me! Why I would lie?


Alienforce(Posted 2005) [#40]
FILAXSTIC :) Great... I think i have to buy this one to..
To support your fantastic work Filax.

/Alienforce


Filax(Posted 2005) [#41]
Many thanks to all ! i'm making a tutorial
in the EasyTOK distribution with max example
scene for ragdoll :)


Destroyer(Posted 2005) [#42]
Hi Filax

Will you be doing more tutorials on useing EasyTok???

Also what about those who have already purchased EasyTok, How do we gain access to this ragdoll max example once it is compleat.

Thanks
DESTROYER


Filax(Posted 2005) [#43]
This example will be send to all customer :) don't panic :)


popcade(Posted 2005) [#44]
Considering to buy it now, it's nice and FAST on my machine ;)


Destroyer(Posted 2005) [#45]
Thanks Filax :)

It is so simple to use EasyTok, I recomend any body wanting to add physics to there game to buy this :).

Thanks

DESTROYER


Filax(Posted 2005) [#46]
It's ok ! :)

Check your mail box :)



You have receive the 3DS max scene + The example code

Only one line of code to load this ragdoll :) And 4 lines
to move it :)

Download the demo :)

http://www.blitz3dfr.com/tempo/Beginning-Ragdoll_3DS01.zip


Dock(Posted 2005) [#47]
I have bought the system, and I'm very happy with it! However, I have one question. How can I stick primatives together? Is it possible? I would like to overlap two sphere primatives, but I don't know whether this would work. If I wanted to create an 'L' shape from two boxes, how could I stick them together so that they behave as though one object?


Filax(Posted 2005) [#48]
Can you give me a simple illustration about the form that you
want ? If i can see really that you would obtain i'll can help
you :)

Cheers


Dock(Posted 2005) [#49]


I just want to stick two objects together so they move together completely solid. :) Any idea how?

EDIT: Ah, it looks like I solved it. I used a joint, with 0 degrees of movement. Is this the most optimal way of doing this?

[JOINT=JOINT12] [CONNECT=2] [BODYA=MYBALL07] [BODYB=MYBALL08] [TYPE=3] [VIEW=0][LAngle#=0][UAngle#=0]


Filax(Posted 2005) [#50]
Yes it's very simple :

Just put a joints ! TYPE=1 with an :

[UANGLE=0] / [LANGLE=0] and for
[BodyA=SPHERE01] / [BODYB=SPHERE02]
(see EasyTOK documentation : 3D Integration)

Put this joints at the spheres intersection !
And don't forget to apply correct specs for the TWO spheres !

And With Blitz move only one sphere :)

If you have problem send me an email i'll send to you an
example :) This night if possible else tomorow ! But don't
forget to explore 3DS max scene !

Because this night, i drink ! it's my birthday ! i'm 35 years :) I hope not to have a headache tomorrow...




Filax(Posted 2005) [#51]
Don't use [LAngle#=0][UAngle#=0] but only [LAngle=0][UAngle=0]

Warning : I have try to make a flexible syntax but carreful:)

Yes it's the good solution ! look the example :

Beginning - Ship 01.bb (and under the max file Demon.max )

All is here :)


Dock(Posted 2005) [#52]
Thanks Filax, this is all working fine! :)

Do I need one joint for every object attached? 3 objects = 2 joints, correct?

Happy Birthday! Hope you have a nice evening! ^_^


Filax(Posted 2005) [#53]
Yes because joints can attach 1 or 2 objects maximum :)

PS : I hope too :)


seferey(Posted 2005) [#54]
Dear filax I've played with your easytok and vipers jv-ode and I gotta say that both of yours are awesome expect for 2 things

filax When I tried out the car physics example in easytok it goes forward ,backwards etc. almost perfect well the only that is messed up in yours was the fact that the car itself
has turn left and turn right response problem don't get me wrong it works but when holding down forward and then pressing left or right to make the wheels turn as it's moving it has a hard time turning the object that represents the car and I wanted to let you know so you update it

I like yours and vipers as well :)


Filax(Posted 2005) [#55]
seferey : I have made quickly the physic for the car !
but it's possible to arrange the car steering :)


Rad Gravity(Posted 2005) [#56]
Hi filax, I bought your system and it's pretty nice but I have a problem I can't seem to get around.
I have a ship that rests on the ground (it will hover eventually with an applied force strong enough to resist gravity) and can be accelerated by applying an impulse to z#. However when I apply the impulse using TOK_ApplyImpulse("Ship",0,0,-200) it simply rotates the ship on the x-axis! What am I doing wrong??

p.s. It is the same when using ApplyForce too.


Filax(Posted 2005) [#57]
Hum !! it seem to be an axis problem with your 3D ship !

1) First check the axis orientation under 3DS Max !
try to rotate the axis in the good direction.

Look the 3DS scene : Demon.max the axis is correct on this
ship ! note the axis orientation and apply the same to your
ship :)

2) Apply a RESET X FORM (TOOLS tab under 3DS max)

I think that resolve your problem ! axis are very important
to apply force or impulse in a direction !

PS : Apply force to make flight ! Impulse is used to apply
impulse :)


Rad Gravity(Posted 2005) [#58]
Thanks for the reply filax.

It is strange isn't it.. I already tried resetting the xform as it's something I'm used to doing with b3d pipeline etc. The axis of the ship and pivot are correctly aligned with the centre of the ship and pointing in the appropriate direction etc.
Just to add to the confusion, the ship does not collide correctly with the static scenery (the node of the craft goes completely through it) or the other ship in the scene when it's pitching.

p.s. I am using force now but same result.


Filax(Posted 2005) [#59]
"the ship does not collide correctly with the static scenery"

Do you attach correctly all scenery object + resetxform before export ?

Send me your object i'll try tomorow to look the problem.


Rad Gravity(Posted 2005) [#60]
Ok dude, I've sent it via your website address.
I hope it isn't something embarrassingly simple!


Filax(Posted 2005) [#61]
I have receive you object :) i'll look it this day :)


Filax(Posted 2005) [#62]
I can open your max scene ? what version used ? i have the 6.


Rad Gravity(Posted 2005) [#63]
Oh crap, I have version 7.
I'm at work at the moment so I can't do anything with them.. Do the b3d files work if you do a quick knock-up program with them?

Thanks.


Filax(Posted 2005) [#64]
Send me scene in 3DS format !


Filax(Posted 2005) [#65]
Promise ! tomorrow i work on physic with blitz terrain !


QuickSilva(Posted 2005) [#66]
Looks cool. As I am new to this physics stuff is it possible to use EasyTOK as a complete replacement to Blitz3D`s own collision commands and retain a similar framerate with the added bonus of it being more flexible?

Jason.


Filax(Posted 2005) [#67]
I think that the better solution is using Tokamak for physic
and object moving, and continue to use filetype for collisions
because tokamak is a little bit light to detect and process
collisions


Barliesque(Posted 2005) [#68]
For collisions, have you (or has anyone else here) had good results with the Coldet library?

http://www.freewebs.com/elias_t/coldetwrapper.htm


Filax(Posted 2005) [#69]
Coldet library ???? What this ?


QuickSilva(Posted 2005) [#70]
Thanks filax for the response :)

Jason.


Plantagenet(Posted 2005) [#71]
> For collisions, have you (or has anyone else here) had good results with the Coldet library?

Yeah, I use the Coldet library. I´m chucking around 500 to 600 units on a terrain mesh and using coldet for my unit-to-terrain collision detection. Basically I use coldet to replace linepick.

In my program I found coldet is approximately 2x as fast as linepick. I recommend it.


Filax(Posted 2005) [#72]
Ok ok ! i'll try it !


Boulderdash(Posted 2005) [#73]
Im impressed, great work!


Filax(Posted 2005) [#74]
Thanks :)

Note for the customer's : i'm finishing another project at
this time don't panic if you don't receive upgrade for the
moment :)


Panno(Posted 2006) [#75]
hurra !!

i've got it and i love it !


Filax(Posted 2006) [#76]
http://www.blitzbasic.com/Community/posts.php?topic=55095

New feature coming :)