Tokamak/Genesis3D Code

Programming Reality Factory and Genesis3D.
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Tokamak/Genesis3D Code

Post by kikosmalltalk »

Hi all


I wondered if I can get the code source of Tokamak and Genesis3D.
I uses Newton Game Dynamic and I have some problems.

For example.

Newton uses meter and Genesis3d seems not to have units system.
Newton uses left hand system and Genesis3D right hand system.
See the code of Tokamak and Genesis could give me some hints of as solving this type of problems


Advance thank you

KIKO
User avatar
Anonymu$
Posts: 77
Joined: Sun Aug 06, 2006 2:51 pm
Location: Lithuania

Post by Anonymu$ »

I dont know where you could get the code of takomak...
but for genesis 3d there is allways http://www.genesis3d.com

if there will not be what your searcing , you could fint it in forums :)
:)
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi

Thank you.
The code of genesis3D I already have it.
The demo RealityRace2 uses Tokamak for physics.
I wondered if I could get this code that unites Tokamak and Genesis3D.


Kiko
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

This would be the best place to start looking. I'm pretty sure someone posted a link to the source somewere in there.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi jonas


I found several topics on physics, but anything on what I look for.
This belongs one to them
http://www.realityfactory.info/forum/vi ... e&start=45

KIKo
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi



Here there are some things to discharge.
http://realityfactory.altervista.org/download/index.php
Is what I look for?

KIKO
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

It looks like PhysicsRFdemo_Alpha_Release_4sept2005.zip has source code with it in the source folder.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi jonas, All

Well, I donwload the code.
Now I want to ask some questions.

Tokamak uses meter or inche ?. How unit of measure.

I was looking for in the tokamak forum but I could not find the answer.

Genesis3D doesn't have unit of measure defined, that is to say genesis3d has generic units.
How homogenizing the units of Genesis with those of Tokamak?
I was looking for in the code and I found this:

void CPhysicsManager::AddGeometry(int BodyId, neAnimatedBody *Body, geVec3d ActorScale, geVec3d Origin, geVec3d Offset, geVec3d Angles, char *GeometryType, int MaterialId, int BreakageType, float BreakageMass, float BreakageMagnitude, float BreakageAbsorption)
{
neGeometry *geom;
geom = Body->AddGeometry();
geom->SetUserData(BodyId);
geExtBox theBBox;
CCD->ActorManager()->GetBoundingBox(aPhActor[BodyId], &theBBox);
float DeltaX = (theBBox.Max.X - theBBox.Min.X)*ActorScale.X;
float DeltaY = (theBBox.Max.Y - theBBox.Min.Y)*ActorScale.Y;
float DeltaZ = (theBBox.Max.Z - theBBox.Min.Z)*ActorScale.Z;


Is this part the one that solves the problem of the unit and scale?

My problem is that newton uses meters and Genesis3d generic units.
I cannot define an appropriate scale to solve the problem.
It is for that reason that I want to know as they solve it with tokamak.

It is an important problem and I cannot solve it

Advance thank you.
Sorry for my English

KIKO
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

well i think fredico made all the physics stuff
Herp derp.
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Well, to me it's not just easy to answer your question. The implementation of Tokamak is due to Nout, but I think he's not around here anymore. Anyway the scale was a big problem. I think he simply translated 1texel (genesis3d) to 1 tokamak unit (meters? inches? I don't know). The result was a scale too big for the genesis3d engine. We actuallly designed the demos scaling down the actors and the world in a 1/10 factor in order to have a decent result (that's why the very first demo had a "moon physics").
What are you doing exactly? a Newton implementation in Genesis3d or RealityFactory? ...or something else?
I'm curious... :wink:
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi federico

Sorry for not answering, I was disconnected for a while.

You wrote:

We actuallly designed the demos scaling down the actors and the world in a 1/10 factor in order to have a decent result (that's why the very first demo had a "moon physics").


As you do carry out this?

You wrote:
What are you doing exactly? a Newton implementation in Genesis3d or RealityFactory? ...or something else?


I try to build a demo in Smalltalk MT with Genesis3D as render and Newton as physics.
I don't want to use REalityFactory at the moment.
But in fact a demo of a vehicle like RealityRace 2.

My problems is:

Let us suppose that I have a room of 1000*1000*1000 GenesisUnit, , as Newton it uses meters like measure units. I could define my car with a measure of 1.8*1.5*3 meters.

Which the problem is?
My car would be very small in the room !!!.

So that my automobile is normal in my room I would have to put a measure of 50*50*100 meters .
This not serious correct. Right?
It is for that reason that I wonder like they made with tokamak.

Do you understand my problem?
Do I explain to it well?

Already ask in Newton forum, but I don't have answers.
It is supposed that the scale is rotted to modify in Newton in some time, but I cannot wait to that is solved .
At the moment the scale cannot modify in Newton.


Advance thank you

Kiko
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

It seems to be the same problem we have with tokamak, am I right? But my contribute on the RFwithPhysics integration was mainly on scripting and testing. Nout take care of that part and I think that he had the same problem you now have, and he left it unsolved. Really, the mass/scale of the objects was difficult to handle. You should talk about this with Nout, but I don't think he's here anymore...
kikosmalltalk
Posts: 37
Joined: Mon Sep 25, 2006 1:12 pm

Post by kikosmalltalk »

Hi Federico

You wrote:
You should talk about this with Nout, but I don't think he's here anymore...


Haaaaaaaaa, that bad luck .
I ask in the genesis forum, look:

http://www.genesis3d.com/forum/viewtopi ... &forum=3&2

I believe that Jeef didn't understand my problem.

Also ask in Newton forum, look:
The problem is that you should be member to be able to enter to forum

http://www.newtondynamics.com/forum/vie ... php?t=3382.

http://www.newtondynamics.com/forum/vie ... da0680915a


I will continue trying to solve the problem. If I find a solution me send to the forum

Thank you

KIKO
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

yes Jeff wasn't able to understand. Send me a PM with your e-mail. I'll try to make a connection between you and Nout. :wink:

Anyway, How's your project going on. Do you have an alpha release or something? I'm really curious. Were you able to put all the stuff (smalltalk, genesis and newton) together, and make them work? I mean, except the scale trouble?

If your result was succesful, please share with us. Probably a version of RF with physics could become possible with Newton.
Nout
Posts: 136
Joined: Tue Jul 05, 2005 5:14 pm

Tokamak

Post by Nout »

Hello all,

I'll try answering some of your questions

Tokamak is a physics engine that no longer is supported and for which the source code was never released. I've tried to trace back source, programmer etc... but no source is available

I've choosen for Tokamak as it is one of the less "heavy" physics engines and therefore better suited for RF, while still supporting all key aspects.

Tokamak is not using a real unit system and the integration into RF was just 1 texel to 1 Tokamak unit. Tokamak works the best with small units (a known limitation) and offers limited flexibility to adopt performence towards larger units. Basically you only have step time, size of the objects and amplitude of the forces.
ODE offers more features and more flexibility, but is also more expensive in CPU time. Newton is again a step higher in features.

Not sure what your goal is, but Newton integration with more modern open source 3D engines are freely available.

If you have other specific questions, feel free to PM me

Cheers, Nout
Post Reply