Jump to content

Au3Irrlicht 2.0


JRowe
 Share

Recommended Posts

Hi linus and Thank You,

This new release is rocking so far in the short poke around I've had. :)

Example launcher works a treat this time round.

Help file is coming along nicely (makes me wish I'd put more effort into doing more of those headers and help examples).

Nice work on the emitters and other particle functions and all other functions you've worked into this release. ;)

Once the library is has all it's available functions proven and help file text/examples done then I think I'll have a go making a small game.

Nothing like a big FPS, more like a 2D flying shooter scroller but using 3D objects and effects (just to get my feet wet).

I've added you as contributor to the project page (yes, have the rights now ...) You have to create yourself an google account so you can log in.

Can I use my gmail account to log in (smashly66 at gmail dot com)?

Well I'm be back on the code side of things tonight when I get home (8am as I type).

Cheers

Edit just a side thought.

Is it possible to add the font creator binary from the Irrlicht 1.7 package?

It would make it easier for ppl to create their own .bmp fonts for project they make with au3Irrlicht2.

Edited by smashly
Link to comment
Share on other sites

This new release is rocking so far in the short poke around I've had. :)

yep, and this is also because of your contributions. BTW: you are the first downloading AND talking - same procedure as every release ...

Help file is coming along nicely (makes me wish I'd put more effort into doing more of those headers and help examples).

It's really becoming useful - also time for me to do something else with the UDF than supporting the UDF ;)

Can I use my gmail account to log in (smashly66 at gmail dot com)?

Should be no problem - changed it to smashly66, so you should now be able to sign in. I've also set up some tags and a nice dev branch in subversion. Good thing to learn a little bit about this!

Is it possible to add the font creator binary from the Irrlicht 1.7 package?

It would make it easier for ppl to create their own .bmp fonts for project they make with au3Irrlicht2.

If not too big why not - Irrlicht license should nothing say against it(?).
Link to comment
Share on other sites

Just a side note to those wanting to make games with this ;)

I have been messing around with Milkshape and found it is the easiest software of the ones I have tried (3dsMax, Blender, and others) for adding bones to models and animating them.

The helpfile went step by step on how to animate so it was easy to get the hang of.

It imports many types of 3d models (Md2, Md3, 3ds, etc.) and the best part is irrlicht2 supports Milkshape files so there is no need to export as any other type when finished.

Hope to see some good stuff soon!

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

MS3D costs a bit, so it's not the ideal solution (the weighting setup is also kinda off) but it is probably the easiest way to get an animated model working. Bones are directly accessible, so you aren't limited to a preset bundle of animations as with md2 or md3 models.

If you don't want to pay, then posts like this are very useful: http://www.hongkiat.com/blog/25-free-3d-modelling-applications-you-should-not-miss/

There are a bunch there that look very useful.

Look for .x exports if you want to be able to animate a model. I've tried to find an easy way of doing md2 or md3, and always end up frustrated. .x and skeletal animation is a breeze, though.

Good stuff, guys, keep up the good work!

Link to comment
Share on other sites

Simplicity of animation is one of the reasons I like milkshape. just place your joins and assign what part/s of the model move with that joint, select rotate and animate away.

I was determined to use 3dsMax because of its nice interface and modeling abilities, but when it came to adding bones and animating, it was horrid, I couldn't figure it out.

The only thing I need to get used to is there is no visual reference of keyframes (I'm used to this from my time of messing with FlashMX) Sure its got a sliderbar with timing marks, but there is no visual cue as to which marks are keyframes.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

As the alternative tool for md2 animation i suggest Misfit Model 3D

Bone animation is easy to use in it, and you can export it to frame animation for md2 format export

As the alternativ tool for modeling or any smaller work i suggest becose of its size and simplicity anim8or

both tools are free

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

I am not really sure if I missed somthing or not but it seems that you cannot delete .irrmesh nodes/meshes using _Irrremovenode and _Irrremovemesh.

_Irrremovemesh simply has no result.

_IrrremoveNode Crashes the entire program.

Also using the fade and delete animators also causes a crash. Did I overlook somthing? I am only having this problem with meshes obtained using .irrmesh files.

Link to comment
Share on other sites

Hi fireryblaze,

Maybe it's something your doing, not sure.

Here I create an .irrmesh from a MD2Mesh and load it into the scene, wait 3 secs and then use _IrrremoveNode to remove the .irrmesh from the scene.

MD2Mesh is the animated mesh on the right, Static irrmesh is on the left side.

Edit:I read your post again and added fade animation to irrmesh as well, it all seems to work for me.

#include "au3Irrlicht2.au3"

Global $hMD2Mesh, $hMeshTexture, $hSceneNode1
Global $hIrrMesh, $sIrrMesh = "ZumlinStaticMesh.irrmesh", $hSceneNode2
Global $Timer = TimerInit(), $iFlag

_IrrStart()

$hMD2Mesh = _IrrGetMesh("./media/zumlin.md2")
$hMeshTexture = _IrrGetTexture("./media/zumlin.pcx")
$hSceneNode1 = _IrrAddMeshToScene($hMD2Mesh)
_IrrSetNodeMaterialTexture($hSceneNode1, $hMeshTexture, 0)
_IrrSetNodeMaterialFlag($hSceneNode1, $IRR_EMF_LIGHTING, $IRR_OFF)
_IrrSetNodePosition($hSceneNode1, 0, 0, 20)

If _IrrWriteMesh($hMD2Mesh, $EMWT_IRR_MESH, $sIrrMesh) And FileExists($sIrrMesh) Then
    $hIrrMesh = _IrrGetMesh($sIrrMesh)
    $hSceneNode2 = _IrrAddMeshToScene($hIrrMesh)
    _IrrSetNodeMaterialTexture($hSceneNode2, $hMeshTexture, 0)
    _IrrSetNodeMaterialFlag($hSceneNode2, $IRR_EMF_LIGHTING, $IRR_OFF)
    _IrrSetNodePosition($hSceneNode2, 0, 0, -20)
    FileDelete($sIrrMesh)
EndIf

_IrrAddCamera(50, 0, 0, 0, 0, 0)

While _IrrRunning()
    If TimerDiff($Timer) > 3000 And $hSceneNode2 And Not $iFlag Then
        _IrrremoveNode($hSceneNode2)
        $iFlag = 1
    EndIf
    If TimerDiff($Timer) > 5000 And $iFlag = 1 Then
        $hSceneNode2 = _IrrAddMeshToScene($hIrrMesh)
        _IrrSetNodeMaterialTexture($hSceneNode2, $hMeshTexture, 0)
        _IrrSetNodeMaterialFlag($hSceneNode2, $IRR_EMF_LIGHTING, $IRR_ON)
        _IrrSetNodePosition($hSceneNode2, 0, 0, -20)
        _IrrRemoveMesh($hIrrMesh)
        _IrrSetAmbientLight( 1,1,1 )
        _IrrAddFadeAnimator($hSceneNode2, 3000, -1)
        $iFlag = 2
    EndIf
    _IrrBeginScene( 240, 255, 255 )
    _IrrDrawScene()
    _IrrEndScene()
WEnd

_IrrStop()

It's sorta hard to say why your having your problem without seeing the methods your using.

Edited by smashly
Link to comment
Share on other sites

Hey fireryblaze,

Thank you for telling me this ;)

You can try and use one of the following to suit your needs.

_IrrRemoveCollisionGroup($h_CollisionGroup, $h_Node)
_IrrRemoveCollisionGroupFromCombination($h_CombinedCollisionGroup, $h_CollisionGroup)
_IrrRemoveAllCollisionGroupsFromCombination($h_CombinedCollisionGroup)
These functions are in the library, but haven't got around to documenting and testing them yet so they are not listed in the help file just yet, but soon will be :)

Cheers

Edited by smashly
Link to comment
Share on other sites

Hey fireryblaze,

Thank you for telling me this ;)

You can try and use one of the following to suit your needs.

_IrrRemoveCollisionGroup($h_CollisionGroup, $h_Node)
_IrrRemoveCollisionGroupFromCombination($h_CombinedCollisionGroup, $h_CollisionGroup)
_IrrRemoveAllCollisionGroupsFromCombination($h_CombinedCollisionGroup)
These functions are in the library, but haven't got around to documenting and testing them yet so they are not listed in the help file just yet, but soon will be :)

Cheers

No problem Smashly,

I had used _IrrRemoveCollisionGroupFromCombination to solve the problem initialy. Though after reviewing my code I realised that I didn't need the collision detection at all for that object.

Link to comment
Share on other sites

I took a gander (male goose???) through the help file but I didn't see it. Is there a list of supported image formats for textures? (bmp, jpg, hopefully tga?)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

  • JPEG File Interchange Format (.jpg, r/w)
  • Portable Network Graphics (.png, r/w)
  • Truevision Targa (.tga, r/w)
  • Windows Bitmap (.bmp, r/w)
  • Zsoft Paintbrush (.pcx, r/w)
  • Portable Pixmaps (.ppm, r/w)
  • Adobe Photoshop (.psd, r)
  • Quake 2 textures (.wal, r)
  • SGI truecolor textures (.rgb, r)
It's possible to import animated gifs as textures if you're willing to hack around with the Irrlicht source - there's a plugin somewhere on their forums allowing that possibility. Anyway, texture support is about complete as it gets. ;)
Link to comment
Share on other sites

Sweet. That will make for less converting.

I have started a HUGE project that I hope I can get through.

If anyone is familiar with the game Vampire the Masquerade: Bloodlines, I plan on rewriting the game in autoit as an online game.

So far I am in the proccess of unpacking and converting all the graphics (which doesn't take much, just that there is a lot of models)

Then I will animate the models (animations won't cary over)

Then the fun begins with creating the new game.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

ok, so I have a couple questions about animation.

First I've been working on getting an animation to run saved in a milkshape model and I would think that doing:

_IrrSetNodeAnimationRange($body1,20,45)

_IrrSetNodeAnimationSpeed($body1,10)

would work (I didn't see any commands to actually start the animation) but it did nothing but set the model onto frame 20

So I did the only thing I could think of and that was add this to the scene loop

(set $A=20 before the loop)

_IrrSetNodeAnimationFrame($body1,$A)

$A+=.5

If $A>45 Then $A=20

But it seems like just a bad work-around especially for animation changes durring combat or walking to running, etc.

---------------------------------------------

The other thing is it doesn't seem like add child node is working as before, or maybe I'm wrong?

I added a head node as a child to the body (so the head could be changed out durring creation for unique looks) but when the body moves up and down (like when walking) the head does not move up and down with it, it stays at the same height...

--------------------------------------

*edit*

Last but not least... (for now)

I keep getting this error when I try to use _IrrGetNodePosition

ERROR: _IrrGetNodePosition() called with wrong number of args.

$bdpos=_IrrGetNodePosition($body1)

*another edit*

I found if I add

dim $a_vector3df[3]

at the start then change to

$bdpos=_IrrGetNodePosition($body1,$a_vector3df)

Then it works. Should probably be mentioned in the help file? (at least until fixed)

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

Fixed the head problem.

Instead of adding the head node dirrectly to the body as a child, I had to get a joint from the body and add the head to the joint as a child.

$hdjoint=_IrrGetJointNode($body1, "Neck")

_IrrAddChildToParent($head1,$hdjoint)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

First I've been working on getting an animation to run saved in a milkshape model and I would think that doing:

_IrrSetNodeAnimationRange($body1,20,45)

_IrrSetNodeAnimationSpeed($body1,10)

Both work perfect with _IrrSetNodeAnimationRange-example from help file. I can change start/end, and also set different speed values. Don't know if there is a difference between .md2 and whatever you exported from milkshape. Maybe you can upload a .zip with a cut down version of non-working script (including needed ressources) so it's possible to reproduce your problem?

I found if I add dim $a_vector3df[3]

at the start then change to $bdpos=_IrrGetNodePosition($body1,$a_vector3df)

Then it works. Should probably be mentioned in the help file? (at least until fixed)

Seems you should update ;) This is syntax from 2.03, with 2.04 I removed $a_vector3df as parameter from several functions, so

$posVector = _IrrGetNodePosition($body1)

should work without problems.

Link to comment
Share on other sites

Both work perfect with _IrrSetNodeAnimationRange-example from help file. I can change start/end, and also set different speed values. Don't know if there is a difference between .md2 and whatever you exported from milkshape. Maybe you can upload a .zip with a cut down version of non-working script (including needed ressources) so it's possible to reproduce your problem?

Seems you should update ;) This is syntax from 2.03, with 2.04 I removed $a_vector3df as parameter from several functions, so

$posVector = _IrrGetNodePosition($body1)

should work without problems.

I did download 2.04... I must have a lingering 2.03 file somewhere then. Thanks for the heads up.

Before I create a reproducer I'll take another look at the example in the help file, but from what I saw it was simply

_IrrSetNodeAnimationRange($body1,20,45)

_IrrSetNodeAnimationSpeed($body1,10)

then the irr loop.

I'm not exporting the milkshape files to any other format. They are being left as ms3d files.

Overall the project is going really well though :)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

Before I create a reproducer I'll take another look at the example in the help file, but from what I saw it was simply

_IrrSetNodeAnimationRange($body1,20,45)

_IrrSetNodeAnimationSpeed($body1,10)

then the irr loop.

Should be it ... And you are lucky - managed my first animation with milkshape (definetly near to professional ...) - so here is a quick and dirty example (see also comments for your question how to start/stop animation):

ms3D_simpleexample.zip

If not completely wrong, this is what you asked about, and it seems to be ok. If not, we have now an example to talk about with less guessing ;)

Overall the project is going really well though

Sounds promising - I am really locking forward to see some nice bigger things done with au3Irr2 from out there - also if WIP it would be interesting/motivating/helpful (think not only for me ...)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...