[WIP] Unity: Newton Model Format (NUTs Ver)

Share with us how are you using the powerrrr of the force

Moderator: Alain

[WIP] Unity: Newton Model Format (NUTs Ver)

Postby Stucuk » Sat Oct 01, 2005 5:14 pm

The following is a test version (would be nice if someone could translate the headers to C++ ** Hint Hint **). It works, tho it was never initaly intended to be shoved in a dll so it needs alot of work internaly. It also isn't flexable yet (Need to make it posible for users to add there own commands to the NMScript system for example). Basicaly its just a port currently.

Exe and Source (for UNM Viewer only)
- Download (See Below for more updated version)

Included in Download:

UNM Viewer
NUTs Core v2.0
UNM Nuts DLL v1.0
Sample UNM Models


UNM Viewer Keys:

W,S = Increase and Decrease depth (note: main view must be the active 'thing' on the form b4 W and S will work. click it to make it active)
Left click + drag = Rotate Camera
Right click + drag = pick objects
Last edited by Stucuk on Mon Oct 03, 2005 2:50 pm, edited 1 time in total.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby Stucuk » Mon Oct 03, 2005 6:54 am

Im currently trying to translate the Delphi Files to C. Im wondering how u represent the following in C:

Code: Select all
Vertexs             : Array of TVertex;
And
Userdata : Pointer;
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby tomek » Mon Oct 03, 2005 7:10 am

Stucuk wrote:Im currently trying to translate the Delphi Files to C. Im wondering how u represent the following in C:

Code: Select all
Vertexs             : Array of TVertex;
And
Userdata : Pointer;


If Array without dimensions is OpenArray then you probanly want to use pointer: TVertex *Vertexs;

and void *Userdata;

Byt the way plural for Vertex is Vertices :wink:
tomek
 
Posts: 102
Joined: Wed Jun 23, 2004 12:34 pm

Postby Stucuk » Mon Oct 03, 2005 7:13 am

Thx, btw i can't spell :P Never been good at it. Use to spell Triangles as Tryangles lol.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby Stucuk » Mon Oct 03, 2005 7:48 am

I was wondering if someone could check that iv converted it correctly.

- C Translation (~3KB)

Note: i havn't tryed to convert the Nuts header yet. The Delphi originals are in the .H files commented out. The units should be self contained (i.e u shouldn't need to use any other units with them to make them work)
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby Sury » Mon Oct 03, 2005 11:44 am

I'll try to help with the translation as soon as i can. I saw it briefly, seems like a very nice tool/format.
Unfortunately currently i have limited free time, and on top of this i felt sick.Hopefully i'll get better untill the end of the week.
User avatar
Sury
 
Posts: 193
Joined: Sat Aug 14, 2004 5:32 am
Location: Bulgaria

Postby Assembler » Mon Oct 03, 2005 2:23 pm

I can't download the UNV Viewer!
Is the link in the first post down?
Programming is just for 15 year old boys! Not for grown ups! :)

http://www.celement.de (currently german only)
Assembler
 
Posts: 47
Joined: Fri Mar 11, 2005 10:20 am
Location: Schorndorf (Germany)

Postby Stucuk » Mon Oct 03, 2005 2:49 pm

I'll try to help with the translation as soon as i can

thx :)

and on top of this i felt sick


I know the feeling my family has been struck with a bug. If only humans had debuggers. (got the bad joke gene from my dad)

Is the link in the first post down?

I took it down as it was old. Uploaded a new one

- Download (~2.6MB)

This time the UNM editor is also included and so is textures (don't think the previous release of this had textures). Currently it doesn't use the DLL (will be a nightmare converting it to use the DLL)

Btw if anyone has any suggestions/ideas, etc im all ears. Currently im planning on adding the ability to add commands to the nmscript system, the ability to add custom joints and i still need to add Collision types like Cone and Cylinder. When 1.35 is out i plan on adding vehicles (wanted to add them b4 but could never make a decent vehicle)
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby Assembler » Mon Oct 03, 2005 2:58 pm

Wow! I love that newton logo :D

This is realy cool! Perhaps i use it with my engine while it is just for myself and free.....
Programming is just for 15 year old boys! Not for grown ups! :)

http://www.celement.de (currently german only)
Assembler
 
Posts: 47
Joined: Fri Mar 11, 2005 10:20 am
Location: Schorndorf (Germany)

Postby hpesoj » Wed Oct 05, 2005 2:02 pm

EDIT

Lol, that's where my post vanished to :P.
Last edited by hpesoj on Fri Oct 07, 2005 10:46 am, edited 1 time in total.
hpesoj
 
Posts: 90
Joined: Sun Jan 09, 2005 4:36 pm
Location: Cambridge/Bristol, UK

Postby Stucuk » Thu Oct 06, 2005 9:23 am

Wrong Thread :P Can someone move it to "[WIP] The Newton Trampoline" plz.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby Stucuk » Fri Oct 07, 2005 9:46 am

Update.

Added ability to add ur own commands to the system. Basicaly its as simple as:

Code: Select all

UNM_AddToCommandList('materialrandomcolour',nil,nil,@MaterialRandomColourUse);

Procedure MaterialRandomColourUse(Const Params : TStringArray20; ParamCount : Integer; Var ID1,ID2,ET : Integer; var WaitUntil : TWaitUntil; var Process,NoInteruptions,R : Boolean; var Time : Single; ScriptID : Integer; var Model : TNMModel);
begin

Model.Materials[strtoint(Params[0])].ColourAmbient := SetVector(Random(255)/255,Random(255)/255,Random(255)/255);
Model.Materials[strtoint(Params[0])].ColourDiffuse := SetVector(Random(255)/255,Random(255)/255,Random(255)/255);

end;



The Test.NM's script has been modifyed with the command above added to it. Basicaly each time its loaded its material will have a random colour assigned. You can click on the checkbox in the Procs and Events bit to activate the colour change manualy.

There is also a new model. A hammer model which destroys a newton wall. It seems to do it realisticaly tho i havn't tryed it in real life.

Download URL is the same as above.
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby hpesoj » Sat Oct 08, 2005 8:33 am

Sweet :). I had fun playing with the crane script, it moves way too slowly by default, but you can make it a bit more exciting by upping the speed values ;). I've been trying to think of ways to impliment some more advanced scripting elements into the engine I am currently working on, I think something like this would be ideal (I think there are some similarities between your project and mine ;)).
hpesoj
 
Posts: 90
Joined: Sun Jan 09, 2005 4:36 pm
Location: Cambridge/Bristol, UK

Postby Stucuk » Sat Oct 08, 2005 5:23 pm

Btw, the UNM system can be used to recieve or trigger other script systems.

Note: i still need to expose the GetScriptID function so u can find and activate the procs of a UNM from the outside without recieving every single proc and event using(UNM_GetNMScriptProcsAndEvents).

For example, you could have a menu system, when u hold down one of the menu buttons with the mouse the UNM crane moves to the left. Release it, the crane stops. (basicaly u use a mouse down and mouse up trigger on the menu system tat activates a proc of the UNM)

You could also say have a level script that triggers a UNM to start doing something. You could have level entitys like buttons triggering a UNM model to do something too.

You could add a command to the UNM script system to activate an entity in the level (note: you can load any script for any model, so depending on the level u could have a different script for the model).

The posibilitys are endless.

BTW do u have a website?
User avatar
Stucuk
 
Posts: 800
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Postby hpesoj » Sun Oct 09, 2005 12:38 pm

We don't have a website at the moment :P, some technical problems apparently (I don't do websites ;)), but there is a forum thread...

http://forum.thegamecreators.com/?m=for ... =41284&b=8

The game is being built in DBPro, you may have heard of it as Walaber created a Newton wrapper for it (otherwise why would I be here :lol:). DBPro is a BASIC style language built around a 3D engine (you can get it for C++ use as of recently), and looking at your Delphi project code I can't really see me being able to use your engine :(. I would need to make a plugin to transfer the mesh data loaded from your model format into DBPro, and then there is the problem of creating the object in DBPro (low level commands object are somewhat limited). I do however think that a system in the style of your engine would be a great idea :). I will mention your name in the project if I get anywhere with it :P. I wish I could use your engine, but it would simply be too much hassle in the long run.
hpesoj
 
Posts: 90
Joined: Sun Jan 09, 2005 4:36 pm
Location: Cambridge/Bristol, UK

Next

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 1 guest

cron