N3XTD: 3D engine
Wow, incredible work you're doing with this. I've never seen an easier-to-use engine like this one. And very fast too. Another plus is the documentation. Everything is well detailed there.
A couple of questions:
1) Are pointers the only way to program?
2) Is there a way to detect when the window is closing? I noticed many examples will only end when the user presses ESCAPE but will not end when the window is closed.
Anyway, you're doing such a fine job with this and I will probably what to use when I start my first 3D game.
Keep it coming.
A couple of questions:
1) Are pointers the only way to program?
2) Is there a way to detect when the window is closing? I noticed many examples will only end when the user presses ESCAPE but will not end when the window is closed.
Anyway, you're doing such a fine job with this and I will probably what to use when I start my first 3D game.
Keep it coming.
Proud registered Purebasic user.
Because programming should be fun.
Because programming should be fun.
Yes, I thought at one time use ID, but that increasing the code and denatured performance.1) Are pointers the only way to program?
The use of pointers is a habit, though not very frequent with PureBasic.
There are several ways to terminate an application.2) Is there a way to detect when the window is closing? I noticed many examples will only end when the user presses
ESCAPE but will not end when the window is closed.
If you want a clean close of the application by closing the window, it is sufficient to detect the window close event and
to call in this case of releases N3XTD.
For example, in the example 'Sample001Gadget.pb it is possible to close the window without crash the application.
Good news. As I often say, the project is only the beginning, and it will continue its way quietly and matureAnyway, you're doing such a fine job with this and I will probably what to use when I start my first 3D game.
over the coming months.
Just updating info.
* 3DS (Passed No Errors) (Exported 3DS Max)
* LWO (Passed No Errors) (Imported 3DS from Max exported to LWO)
* OBJ (Loads the mesh but no texture)
* X (Failed, can't explain the mess it created over the mesh)
Might want to check out what is going on there it coursed a crash.
* 3DS (Passed No Errors) (Exported 3DS Max)
* LWO (Passed No Errors) (Imported 3DS from Max exported to LWO)
* OBJ (Loads the mesh but no texture)
* X (Failed, can't explain the mess it created over the mesh)
Code: Select all
;
*obj.IObject=iLoad3DObject("Acc.x")
If(*obj=#Null)
Debug "iLoad3DObject() Failed"
EndIf
*boat=iCreateMesh(*obj)
Define *cam.ICamera = iCreateCamera( )
iPositionNode(*cam, 0,25,-50)
iRotateEntity(*obj,0,30,0)
-For OBJ format, Did you file '.mtl' with the file '.OBJ' ?
-Regarding the file format. X ', it is known that Irrlicht has a little compatibility problem with this standard.
That said, attention, Irrlicht only supports uncompressed. X file.
and for your code:
wath iRotateEntity(*obj,0,30,0) ? (an inheritance of Dreamotion3D ?)
It would be better to write:
-Regarding the file format. X ', it is known that Irrlicht has a little compatibility problem with this standard.
That said, attention, Irrlicht only supports uncompressed. X file.
and for your code:
Code: Select all
Define *cam.ICamera = iCreateCamera( )
iPositionNode(*cam, 0,25,-50)
iRotateEntity(*obj,0,30,0)
It would be better to write:
Code: Select all
Define *cam.ICamera = iCreateCamera( )
iPositionNode(*cam, 0,25,-50)
iRotateNode(*cam,0,30,0)
-
- User
- Posts: 26
- Joined: Sun May 24, 2009 2:38 pm
hello.
i have two problems:
1. how to use shadows?
doesn't work. (i'm need cast tank shadows on plane)
2. why the model handle is displaced in the centre? (.3ds)
(sorry, i'm don't speak english )
i have two problems:
1. how to use shadows?
Code: Select all
*light.iLight = iCreateLight($ffffffff, 30)
iPositionNode(*light, 0,70,-40)
ICastShadowLight(*light, #True)
***
*plane.IMesh - iCreateHillPlane(20, 20)
*tank.IObject = iLoad3DObject("data\tank_body.3ds")
*tank_body.IMesh = iCreateMesh(*tank)
iPositionNode(*tank_body, 0,0,0)
2. why the model handle is displaced in the centre? (.3ds)
(sorry, i'm don't speak english )
Last edited by Machiavelli on Mon May 25, 2009 3:48 pm, edited 3 times in total.
2.)Before doing an export with 3DSMax, it seems to me to do a "Reset XForm" from the menu 'Utilities'.
1.)With Irrlicht, shadows are available only with the animations, it is a choice made by the Irrlicht
(which might say questionable). But it's like that.
An alternative is to load a static model as if it was an animation, in which case you can enjoy the shadows.
But the shadow system of Irrlicht is very brief, it is ShadowVolume Software, therefore very heavy in resource,
and therefore it should be reserved solely for the animation or mesh and can light many.
Most advanced users of Irrlicht worked with shaders to produce their shadows.
This is one of the low points of this engine.
1.)With Irrlicht, shadows are available only with the animations, it is a choice made by the Irrlicht
(which might say questionable). But it's like that.
An alternative is to load a static model as if it was an animation, in which case you can enjoy the shadows.
But the shadow system of Irrlicht is very brief, it is ShadowVolume Software, therefore very heavy in resource,
and therefore it should be reserved solely for the animation or mesh and can light many.
Most advanced users of Irrlicht worked with shaders to produce their shadows.
This is one of the low points of this engine.
Code: Select all
; Include files
IncludePath "includes" : IncludeFile "n3xtD_PB.pbi"
; Globales
Global anglex.f, angley.f, flagXDown.w
Global mox.f, omx.f, moy.l, omy.l
Global *app.l, Quit.l
;----------------------------------------------------------
; open n3xt-D screen
*app = iCreateGraphics3D(800,600)
; << OR >>
;*app = iCreateGraphics3D(800,600, 32, #False, #False, #EDT_DIRECT3D9)
If *app= #Null
End
EndIf
; set the curent folder
SetCurrentDirectory("media/")
;----------------------------------------
; load an 3D object
Global *obj1.IObject = iLoad3DObject("sphere.x")
Global *obj3.IObject = iLoad3DObject("plane.3ds")
;----------------------------------------
; create traditional light and set position
Global *light.ILight = iCreateLight($ffaaaaaa, 80)
iPositionNode(*light, 20,30,-30)
;----------------------------------------
;-----------------------------------------
; create plane
*plane.IMesh = iCreateMesh(*obj3)
iScaleNode(*plane, 1.5,1.5,1.5)
iPositionNode(*plane, 0,-1.5,0)
;----------------------------------------
;--------------------------------------
; create first animation B3D
*sp.IAnimatedMesh = iCreateAnimation(*obj1)
iPositionNode(*sp, 0,5,0)
iRotateNode(*sp, 0,180,0)
iShadowVolumeAnimation(*sp)
;iShadowColor( $96000000)
;-----------------------------------
; create a camera
Define *cam.ICamera = iCreateCamera( )
iPositionNode(*cam, 0,15,-25)
iRotateNode(*cam, 15,0,0)
; ---------------------------------------
; main loop
; ---------------------------------------
Repeat
; if Escape Key, exit
If iGetKeyDown(#KEY_ESCAPE)
Quit=1
EndIf
; ---------------
; Render
; ---------------
iBeginScene(50, 50, 50)
iDrawScene()
iEndScene()
Until Quit=1
; end
iFreeEngine()
Well, after two weeks of coding, here is the first integration of the physics engine.
For the occasion, I chose an engine that I already knew, Newton.
But, I integrated the 2.01 version, not the old version 1.53.
No big revolution in appearance, but to dwell on them, the advances are important and significant.
For the moment, only the coded features of bases, nothing impressive, I add over time additional
instructions to manage the advanced features, such as vehicles, ragdoll and other ...
Links are always those of the original post.
The next areas of work are:
- Further work on the physics engine..
For the occasion, I chose an engine that I already knew, Newton.
But, I integrated the 2.01 version, not the old version 1.53.
No big revolution in appearance, but to dwell on them, the advances are important and significant.
For the moment, only the coded features of bases, nothing impressive, I add over time additional
instructions to manage the advanced features, such as vehicles, ragdoll and other ...
Links are always those of the original post.
The next areas of work are:
- Further work on the physics engine..
The latest version (the 11) will be available Sunday.
And a new portal has been opened. ( http://www.n3xt-d.org )
N3XTD update ( the eleventh)
I have therefore taken account of some bugs and other shortcomings (eg antialiasing,
iFreeNode, etc ...)
Most of my work as promised, therefore, focused on 2D, so I included some instructions and created,
and to see how to do 2D, even if it does not equal time for the 'real' engine Dedicated 2D.
As an example, I write fast 2D two small programs in the form of a small simple game. The aim is
mainly to show what we can do and especially how.
The media are not top, but hey, I am quick with what I had on hand.
The yet to explore in 2D, the collisions, for the moment it is just testing positions, is very brief,
but it is an area to dig.
That said, N3xtD is still the basis of a 3D engine
As against the 2D/3D mix can with some effort to find nice things for those who work.
For against, with OpenGL, I have some machines on one or two small yet annoying visual bugs,
I'm trying to see where it can come.
Links are always those of the original post, or on http://www.n3xt-d.org web site (download section).
The next areas of work are:
- Always a bit 2D
- Various routines to improve and add some functions.
I have therefore taken account of some bugs and other shortcomings (eg antialiasing,
iFreeNode, etc ...)
Most of my work as promised, therefore, focused on 2D, so I included some instructions and created,
and to see how to do 2D, even if it does not equal time for the 'real' engine Dedicated 2D.
As an example, I write fast 2D two small programs in the form of a small simple game. The aim is
mainly to show what we can do and especially how.
The media are not top, but hey, I am quick with what I had on hand.
The yet to explore in 2D, the collisions, for the moment it is just testing positions, is very brief,
but it is an area to dig.
That said, N3xtD is still the basis of a 3D engine
As against the 2D/3D mix can with some effort to find nice things for those who work.
For against, with OpenGL, I have some machines on one or two small yet annoying visual bugs,
I'm trying to see where it can come.
Links are always those of the original post, or on http://www.n3xt-d.org web site (download section).
The next areas of work are:
- Always a bit 2D
- Various routines to improve and add some functions.
Works GREAT so far.
Managed to compile under Linux ( had to grab the Newton Sources and build that first tho ).
All examples run so far.
However:
CreateMesh Example - onQuit ends with a crash on cleanup:
purebasic_compilation1.out: ../../include/IReferenceCounted.h:119: bool irr::IReferenceCounted::drop() const: Assertion `!(ReferenceCounter <= 0)' failed.
At the two 2d to 3d game examples the Spritefile for the Player is case-sensitive under Linux:
iCreateSprite3D("Space1.png", 100.0) - > File is named space1.png - minor thing.
btw. Did you implement the Animators ?
Good Stuff!
Thalius
Managed to compile under Linux ( had to grab the Newton Sources and build that first tho ).
All examples run so far.
However:
CreateMesh Example - onQuit ends with a crash on cleanup:
purebasic_compilation1.out: ../../include/IReferenceCounted.h:119: bool irr::IReferenceCounted::drop() const: Assertion `!(ReferenceCounter <= 0)' failed.
At the two 2d to 3d game examples the Spritefile for the Player is case-sensitive under Linux:
iCreateSprite3D("Space1.png", 100.0) - > File is named space1.png - minor thing.
btw. Did you implement the Animators ?
Good Stuff!
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! "
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! "
- Psychophanta
- Addict
- Posts: 4997
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Lípetsk, Russian Federation
- Contact:
It is great and heavy work!!
@Tmyke, however, since we (me & my team) use only Windows, please let us know if you reach to superate Dreamotion3D with N3XTD.
@Tmyke, however, since we (me & my team) use only Windows, please let us know if you reach to superate Dreamotion3D with N3XTD.
http://www.zeitgeistmovie.com
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB
@Thalius: thx.
@Psychophanta:
I would say that the biggest concerns N3xtD compared to Dreamotion3D is speed.
The functions and capabilities with N3xtD are more numerous than DM3D but DM3D was much better optimized and thus allow heavier
scenes and more complex.
It is well known that the main defect of Irrlicht (from which N3xtD) is its low optimization.
This is one of the main axis of my work in the coming weeks, allowing N3xtD to make up for the delay on this.
I have already changed the code native Irrlicht with some codes from DM3D.
I think N3xtD reach maturity at the beginning of this autumn.
Thank you, I'll fix that.At the two 2d to 3d game examples the Spritefile for the Player is case-sensitive under Linux:
iCreateSprite3D("Space1.png", 100.0) - > File is named space1.png - minor thing.
Only animated textures yet. I think integrating the other possibilities in the future.btw. Did you implement the Animators ?
It's strange. I do not have Linux, but I will ask if anyone on the forum French encounter the same kind of problem.However:
CreateMesh Example - onQuit ends with a crash on cleanup:
purebasic_compilation1.out: ../../include/IReferenceCounted.h:119: bool irr::IReferenceCounted::drop() const: Assertion `!(ReferenceCounter <= 0)' failed.
@Psychophanta:
I would say that the biggest concerns N3xtD compared to Dreamotion3D is speed.
The functions and capabilities with N3xtD are more numerous than DM3D but DM3D was much better optimized and thus allow heavier
scenes and more complex.
It is well known that the main defect of Irrlicht (from which N3xtD) is its low optimization.
This is one of the main axis of my work in the coming weeks, allowing N3xtD to make up for the delay on this.
I have already changed the code native Irrlicht with some codes from DM3D.
I think N3xtD reach maturity at the beginning of this autumn.