Irrlicht Wrapper for 3D games and applications

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

Postby MOD » Jun 08, 2011 21:48

Although "Object" is not a reserved word in FreeBASIC, not in the normal trunk and even not in the inheritance branche, it is not possible to use it (gives duplicate definition). Not sure if it's missing in the list or the list gives not the reserved keywords of FreeBASIC.
D.J.Peters
Posts: 7839
Joined: May 28, 2005 3:28

Postby D.J.Peters » Jun 08, 2011 22:32

@Frank

Gfx and physics libs used more and more quaternions to represent rotation.
One point (there are more) is the eulers gimple pitfall and how simple you can lerp between two quaternions.

How ever, be sure that your quaternion are in range of 0.0 to 1.0 after you square it before you convert it back to euler angles.

Joshy

Code: Select all

Sub PhysicsSetNodePositionAndRotation( obj as physics_obj )
   
    ' get the node associated with this body
    Dim as irr_node node = obj.node

    ' get the new position of the ODE geometry
    Dim as dReal ptr ode_pos
    ode_pos = dBodyGetPosition( obj.body )
   
    ' set the position of the scene node to match the ODE geometry
    IrrSetNodePosition( obj.node, ode_pos[0], ode_pos[1], ode_pos[2] )

    ' get the ODE geometry rotation quaternion
    Dim as dQuaternion ptr result
    result = cast( dQuaternion ptr, dBodyGetQuaternion( obj.body ))

    ' convert it to euler angles
    Dim as dReal w,x,y,z
    w=result->q(0)
    x=result->q(1)
    y=result->q(2)
    z=result->q(3)

    ' calculate the squares of the Quaternion parameters
    Dim as double sqw = w*w
    Dim as double sqx = x*x
    Dim as double sqy = y*y
    Dim as double sqz = z*z
    Dim as double l   = sqx+sqy+sqz+sqw
    if (l<>0) then
      if (abs(l-1)>0.00001) then
        l=1.0/sqr(l)
        x*=l
        y*=l
        z*=l
        w*=l
        sqw = w*w
        sqx = x*x
        sqy = y*y
        sqz = z*z
      end if
    end if
    ' convert them to euler angles
    Dim as single eX, eY, eZ
    eZ = atan2( 2.0 * (x*y + z*w),( sqx - sqy - sqz + sqw)) * 57.295779513
    eX = atan2( 2.0 * (y*z + x*w),(-sqx - sqy + sqz + sqw)) * 57.295779513
    eY = asin( -2.0 * (x*z - y*w)) * 57.295779513

    ' set the rotation
    IrrSetNodeRotation( obj.node, eX, eY, eZ )

End Sub
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Jun 10, 2011 5:57

Hi Joshy,

Thanks for the heads up I will do a quick search through the files and replace anything I find for the next real release.

I did mean to post some progress earlier but I keep on getting caught by mission creep I will try to post an update of the wrapper (even with the crash) soon.
Last edited by Frank Dodd on Jun 23, 2011 23:26, edited 1 time in total.
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Jun 19, 2011 22:19

Once again mission creep and constant faffing has meant that this has been delayed quite a bit I did want to get it up on Friday but there were plenty of minor issues to iron out. A development release will be coming soon I hope.
Last edited by Frank Dodd on Jun 22, 2011 17:34, edited 1 time in total.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Postby agamemnus » Jun 21, 2011 15:09

:-|

*dies*
applepi
Posts: 19
Joined: Oct 27, 2008 15:50

Postby applepi » Jun 29, 2011 7:09

where to download Irrlicht Wrapper here, i can't find it anywhere in the web, please someone post it again .
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Postby agamemnus » Jun 29, 2011 17:19

I'm not sure why Frank Dodd has removed the links to the wrapper... maybe accidentally, or not? The wrapper is still there if you search the internet for it, but I won't post the link since he might have a good reason.. perhaps bandwidth issues?
applepi
Posts: 19
Joined: Oct 27, 2008 15:50

Postby applepi » Jun 30, 2011 6:08

i have found the wrapper in the Frank Dodd site. yes it is a marvelous engine and wrapper, with beautiful examples, thanks.
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Jul 01, 2011 6:12

Hello,

I have been tidying up the links to old and removed versions of the wrapper and other miscellaneous files. The website is under reconstruction at the moment, I will hopefully have it back up at the weekend. Thanks.
applepi
Posts: 19
Joined: Oct 27, 2008 15:50

Postby applepi » Jul 01, 2011 8:06

when i run XEffects examples from example 99 to 102 it gives this error
Could not open file of texture: XEFFECTS_SM_512
XEffects: Please ignore previous warning, it is harmless.
FBO has one or several incomplete image attachments
FBO error
FBO incomplete

i am using the latest wrapper download. are there users also have this problem ??
all other examples are running okay
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Jul 01, 2011 18:55

hello,

This warning is a normal part of the operation of the XEffects module created by Bitplane. Do the examples appear to run OK for you otherwise or do you get a black screen? If you get a black screen what operating system and graphics card are you using?
applepi
Posts: 19
Joined: Oct 27, 2008 15:50

Postby applepi » Jul 02, 2011 5:02

thank you Frank , yes it seems running okay, the example 99 picture like this http://postimage.org/image/2u7ay4nms/
i have windows xp /sp2 with nvidia geforce 7300 GT
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Jul 02, 2011 20:55

Hi,

Actually that doesn't look right, it should look more like this

Image

Could you post an image of the Command Window that is underneath it so we can see the error messages. I really don't know much about the XEffects module though this is bitplanes work but I will see how I can help a Geforce 7300 shouldn't have any problems though.
applepi
Posts: 19
Joined: Oct 27, 2008 15:50

Postby applepi » Jul 03, 2011 7:52

Hi
i took pictures for 3 examples you may find it usefull:
ex 99
http://postimage.org/image/1fz7qb50/
ex 100
http://postimage.org/image/1gxy0lic/
ex 16:
http://postimage.org/image/1htd86w4/

in example 99 and 100 i have to close the graphics quickly so i got the beginning of the prompt messages since it is scrolling rapidly infinitely. i wonder how you got the picture of the graphics together with the prompt messages, since with me it is scrolling rapidly.
also testing the examples on windows 7 installed on the same machine i got the same error messages.
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Jul 03, 2011 10:33

Hi,

I took a look on the XEffect website and it seams that some other people with a 7300 had similar problems this appears to be a OpenGL support issue. It did however work for them in DirectX. You can change to DirectX by changing IRR_EDT_OPENGL to IRR_EDT_DIRECT3D9 however not all builds of irrlichtwrapper are built for DirectX you can give it a go though.

You will also need to swap around the irrlicht.dll and irrlicht_ms.dll files and the same for the irrlichtwrapper ones too.

Example 16 seams to be working fine. You can grab a screenshot like mine by pressing alt while running this lets you grab the titlebar with the mouse and position the window where you want it, then just do a screenshot load it into the GIMP and clean it up.

Good luck.

P.S: thanks for the earlier post agamemnus, I hope your project is going well.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest