PDA

View Full Version : Kambi VRML game engine - new release: X3D, events, movies



michalis
13-09-2008, 06:20 PM
Hi,

My little engine (used to develop "The Castle" (http://vrmlengine.sourceforge.net/castle.php)) just got a lot of significant improvements to VRML/X3D handling. For those of you who don't know, VRML/X3D (http://web3d.org/) is a 3D model format with open specifications and a support for many features. Besides being a great 3D model interchange format (geometry with materials, textures, shaders, worlds with fog and background and much more), it also allows to define animations and interactions of your 3D world. The idea is that you can even make whole games defined completely in VRML/X3D, and play them using any "VRML/X3D browser" with sufficient VRML implementation.

My Kambi VRML game engine (http://vrmlengine.sourceforge.net/) now supports X3D (in addition to previous VRML 1.0 and 2.0 and other 3D formats). It also supports events, so basic VRML interactions work: basic sensor nodes, linear interpolators and more. Many other improvements were made, like support for a MovieTexture node (you can use a movie like a normal texture). This allows us to e.g. play pre-rendered flame/smoke animations with full alpha channel.

Our VRML browser is called view3dscene (http://vrmlengine.sourceforge.net/view3dscene.php). As the word "engine" suggests, you can also use the code to plug VRML/X3D support into your own programs :)

More information on engine's home page: http://vrmlengine.sourceforge.net/

http://vrmlengine.sourceforge.net/images/progs_demo/medium_size/deranged_house_final_0.png (http://vrmlengine.sourceforge.net/images/progs_demo/original_size/deranged_house_final_0.png)

De-Panther
13-09-2008, 11:58 PM
VRML and Pascal - Great combination
thers some games i made with VRML trogh the years. I'll check if now they work in your Engine, lust time i checked they had problems

Did you ever toght about adding phisics engines support?

Thanks for the update.

Now that blaxxun server is down I need to look for another options to run my Quidditch game

michalis
14-09-2008, 12:12 AM
thers some games i made with VRML trogh the years. I'll check if now they work in your Engine, lust time i checked they had problems


Be aware that Script nodes don't work yet in my engine. Most existing games in pure VRML probably require this. Please test anyway and report any problems :)



Did you ever toght about adding phisics engines support?


Sure, I plan to integrate with some physics engine in the future. No concrete decisions yet (like "which physics engine"), but it's definitely a feature I want to have.

De-Panther
14-09-2008, 02:47 AM
After I tried to load my old games I saw on your site that script nodes don't work. but some buttons and animations worked in the way they ment to.

the script node is very importent for games in vrml.

also, a node for checking key press would be good idea, altho if i'm using pascal to control the scene is useless.

I have some problems with the viewpoints. after i'm running some animations - the viewponts change locations.


I liked all the new features that you add to the engine. Shaders and mapping. and the mirrors.



currently I find this engine very usefull to show VRML scenes. but as game engine, it still have lots of work.

First adding Script node.
Implementing Physics engine could help you with the collision detection(I saw you have some problems with that).
Adding options to use some program code from the VRML scene.

I need to check the code, to see how much work you need to do in order to change things in the scene from the pascal code while running.

I realy impresed how much it evolved since I saw it long time ago

savage
14-09-2008, 05:28 PM
Looks good, bumped to news item.

michalis
14-09-2008, 05:49 PM
also, a node for checking key press would be good idea, altho if i'm using pascal to control the scene is useless.


KeySensor node (http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/keyboard.html#KeySensor) is already implemented, following X3D spec. So this is covered.



I have some problems with the viewpoints. after i'm running some animations - the viewponts change locations.


Viewpoint transitions don't work yet as specification requires, this is known. That said, if you could submit some sample VRML file that shows this problem, this will help me fix this for next release :)



First adding Script node.
Implementing Physics engine could help you with the collision detection(I saw you have some problems with that).


I fully agree, scripting, better collision detection and physics engine are needed.



Adding options to use some program code from the VRML scene.


Hm, interesting idea --- something like a Script node that references some routines compiled in the program? I like this idea. Will be implemented.



I need to check the code, to see how much work you need to do in order to change things in the scene from the pascal code while running.

I committed simple example code showing how to do this. See kambi_vrml_game_engine/3dmodels.gl/examples/change_vrml_by_code.pasprogram in SVN (you can also view it directly (https://vrmlengine.svn.sourceforge.net/svnroot/vrmlengine/trunk/kambi_vrml_game_engine/3dmodels.gl/examples/change_vrml_by_code.pasprogram)).



I realy impresed how much it evolved since I saw it long time ago

Glad you like it :)

De-Panther
15-09-2008, 01:39 PM
here is something I made long time ago with change in the transformation of Viewpoint
http://www.tpeople.co.il/inuyasha/dp3dgame/2vrmlmanred2.wrl
http://www.tpeople.co.il/inuyasha/dp3dgame/1vrmlmanred1.wrl

And about the Physics with VRML, I toght about PhysicsNode.
I know that you have collision parameter in basic nodes. I toght using PhysicsNode like you use material node instead.

Regular cone shape


DEF Cone1 Shape {
appearance Appearance {
texture ImageTexture {
url IS bodytex
}
material DEF Red_mat Material {
ambientIntensity 0.200
shininess 0.200
diffuseColor IS bodycolor
}
}
geometry Cone {
height 2.000
bottomRadius 1.000
}
}


Cone shape with PhysicsNode


DEF Cone1 Shape {
appearance Appearance {
texture ImageTexture {
url IS bodytex
}
material DEF Red_mat Material {
ambientIntensity 0.200
shininess 0.200
diffuseColor IS bodycolor
}
}
physicsnode DEF SimplePhysics PhysicsNode {
mass 10
collision TRUE
friction 0.2
bounding 0.5
}
geometry Cone {
height 2.000
bottomRadius 1.000
}
}


Thats the basics. Didn't tought how to mention joints in the PhysicsNode. but maybe it could use the groups to determin the part in the joint(altho, how could you detouch joints?)

michalis
16-09-2008, 10:25 AM
here is something I made long time ago with change in the transformation of Viewpoint
http://www.tpeople.co.il/inuyasha/dp3dgame/2vrmlmanred2.wrl
http://www.tpeople.co.il/inuyasha/dp3dgame/1vrmlmanred1.wrl


1. Note that the viewpoint "manViewpoint", that is under animated transformation, was not even bound. Reason: you bind it using script, by "mnvw.set_bind = TRUE", but script does not work yet...

Fortunately, this case can be handled without scripts, with a little help of X3D node BooleanTrigger (http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/utils.html#BooleanTrigger) (which you can use also in VRML 97 for my engine):



DEF BoolTrig BooleanTrigger { }
ROUTE mants.touchTime TO BoolTrig.set_triggerTime
ROUTE BoolTrig.triggerTrue TO manViewpoint.set_bind
ROUTE BoolTrig.triggerTrue TO manav.set_bind


This makes manViewpoint and manav receive set_bind = TRUE when mants.touchTime occurs. And works with my engine.

2. The second problem is that view3dscene 3.0.0 did not react to changes to the currently bound viewpoint... That is, binding worked, but we did not honour the specification requirement that viewer position/orientation is always relative to current viewpoint position/orientation. This was a known problem of current implementation, and...

... it's just fixed in SVN :) Animating viewpoint's position (directly by Viewpoint.position or by any of parent transformations) works perfectly now, tested on your VRML (with BooleanTrigger modification above) and on my test file (https://vrmlengine.svn.sourceforge.net/svnroot/vrmlengine/trunk/kambi_vrml_test_suite/x3d/transform_viewpoint.x3dv).

Will be available in next view3dscene release (planned in a week or two).



And about the Physics with VRML, I toght about PhysicsNode.
I know that you have collision parameter in basic nodes. I toght using PhysicsNode like you use material node instead.


I would rather support (at least partially) Rigid body physics X3D component (http://www.web3d.org/x3d/specifications/ISO-IEC-FDIS-19775-1.2-X3D-AbstractSpecification/Part01/components/rigid_physics.html). But your simple PhysicsNode may also fit nicely as an extension. We'll see when I dig into physics implementation.

michalis
16-10-2008, 01:50 AM
Update: 1.5.0 version of the engine is released today. Major addition is the scripting through KambiScript language (http://vrmlengine.sourceforge.net/kambi_script.php). KambiScript is deliberately a very simple language, but allows you to operate on all basic types, and vectors, matrices, arrays. even images... Sample uses include writing game logic, simple particle engines, etc.

We also have very simple to use VRML browser component for Lazarus (TKamVRMLBrowser), and similar TGLWindowVRMLBrowser (using my TGLWindow GUI to initialize OpenGL context, without Lazarus).

More about new features on http://vrmlengine.sourceforge.net/.