A running dwarf in Bmax

Community Forums/Showcase/A running dwarf in Bmax

Sweenie(Posted 2005) [#1]
Look!
I have a running dwarf in bmax.
Not running in the screenshot though ;)

The dwarf-model is made by Psionic and the rendering is done with a little help from the Irrlicht engine. :)




xlsior(Posted 2005) [#2]
Looking nice!


LarsG(Posted 2005) [#3]
did you import the Irrlicht engine in BlitzMax?


Sweenie(Posted 2005) [#4]
I wrapped a small part of it the same way I wrapped Tokamak.
So I should be able to setup the scene above in Blitz3D & Blitz2D as well.


LarsG(Posted 2005) [#5]
sounds interresting.. are you going to release the source so we can play with it too?!? :D


Alienforce(Posted 2005) [#6]
Please ?!?!?!,

/Alienforce


Sweenie(Posted 2005) [#7]
Here it is, but It's far from finished.
http://svenberra.net/IrrWrapper.zip

I have just wrapped the functions I needed to make the scene above.
The wrapperDll is made with Dev-C++.


Alienforce(Posted 2005) [#8]
Sweenie,

Are you going to "wrapp" the whole engine ??


/Alienforce


Dock(Posted 2005) [#9]
Wow, you have self-shadowing in there!
Does that take much of a hit to the frame-rate?


Sweenie(Posted 2005) [#10]
Are you going to "wrapp" the whole engine ??


I'm gonna try at least.
I'm thinking about writing a helpertool to make the wrapping a bit easier/faster (yes, I'm a lazy person).

Wow, you have self-shadowing in there!
Does that take much of a hit to the frame-rate?



With the crappy intel gfxcard I'm using here on my computer at work, yes it does.
Can't wait to get home and try it out on my Geforce 6800 GT.

I really must convince my boss that designing databases in Lotus Notes requires a highend gfx-card. ;)


Damien Sturdy(Posted 2005) [#11]
Frmo a profesional:

Lotus Notes R5 and above require High-end Graphics cards to display the technologically advanced buttons.




..Or..

Maybe not.

[edit]
I can't spell Frmo....


Sweenie(Posted 2005) [#12]

Lotus Notes R5 and above require High-end Graphics cards to display the technologically advanced buttons.


I do believe so. ;)


Kanati(Posted 2005) [#13]
Add some color to the poor guy's armor. I thought he was in black and white for a moment. :)

Looks great and irlicht is a good choice to add to bmax


Skitchy(Posted 2005) [#14]
@Sweenie - I thought BMax had gotten rid of the need to 'wrap' things like this :(
Why was it necessary here?


Sweenie(Posted 2005) [#15]
I tried to do it without using a wrapper dll but I'm not sure it can be done unless the dll has interfaces in it, like DirectX has.
I tried to access DirectX using the method they used in Powerbasic , and I almost made it(managed to get a DirectX error returncode which means I got contact with the "internal" functions)
But I got "scared" when I realized just how much work it would take to actually create a Directx binding.

But I'm sure someone will eventually do it.


ckob(Posted 2005) [#16]
good job so far when I get home im downloading this :) I hope you finish it.


Alienforce(Posted 2005) [#17]
Look really great!!!!

Please continue the wrapping

/Alienforce


Panno(Posted 2005) [#18]
sweeny which powerbasic version ?
post some pb sources ?

hmm interesting....


Erroneouss(Posted 2005) [#19]
Sweet!

I just downloaded Irrilicht last week for using with DevC++ to try it out, and it seems pretty cool so far!

By the way, do you have any tutorial on how to wrap stuff from C++ (Or another language) to Blitz3D (Or Plus, 2d, ect.)? There are some things I've been dying to use in Blitz. Thanks in advance if that's possible :)


Sweenie(Posted 2005) [#20]

sweeny which powerbasic version ?
post some pb sources ?



Just enter the powerbasic forums and do a search for directx.


I just downloaded Irrilicht last week for using with DevC++ to try it out, and it seems pretty cool so far!


I have checked Irrlicht several times in the past and I think that with the latest release(0.8) it has become a pretty mature engine.
Though I think the media they use in the demos is a little bit on the poor side and that has a tendency to "scare" some people away.
But hey, don't judge a book by it's cover.

By the way, do you have any tutorial on how to wrap stuff from C++ (Or another language) to Blitz3D (Or Plus, 2d, ect.)? There are some things I've been dying to use in Blitz. Thanks in advance if that's possible :)



Try this one...
http://www.blitzbasic.com/Community/posts.php?topic=38319


Clarks(Posted 2005) [#21]
i thought about wrapping the irr engine but then i said no. its not too much work for me but ill need a good reason to do so. its a powerful engine though.


Erroneouss(Posted 2005) [#22]
Hey! Cool! I never saw that before! :D Thanks!


puki(Posted 2005) [#23]
Oooh - I tell you what - I like the way the Dwarf casts a shadow on himself. I want a dwarf. The shadow on his chest looks a bit dodgy though.


Red Ocktober(Posted 2005) [#24]
hahahaha... yeah, shadowed dwarfs for everyone...

seriously though, nice job Sweenie... very niiice...

you're just interested in wrapping the rendering functionality, right... or are you looking into the whole magilla...

--Mike


Picklesworth(Posted 2005) [#25]
Wow, so many 3d engines already for BMax :)
That open-endedness is a great thing.


Erroneouss(Posted 2005) [#26]
By the way -- Sweenie, Check your email! :D


Bot Builder(Posted 2005) [#27]
Nice job sweenie :)

I suppose just using already made 3rd party engines is a pretty good way to get some decent 3d into bmax.


ckob(Posted 2005) [#28]
sweenie any chance of a demo ? I saw the code aboev but the level and dwarf werent included.


Sweenie(Posted 2005) [#29]
The level can be found in the Irrlicht sdk and the dwarf can be found on Psionics freeware models page.


Alienforce(Posted 2005) [#30]
Really cool Sweenie....

Irrlicht seems really good. Please more wrapping :)
I would like to know more about "how to wrapp" do you have any good links... ? Sweenie Tutorial :) ?

/Alienforce


Sweenie(Posted 2005) [#31]
Alienforce,
Check the link a few post above...

Red Ocktober,
I will try to wrap as much as I can.


Alienforce(Posted 2005) [#32]
"Tack så mycket" Sweenie

/Alienforce


Sweenie(Posted 2005) [#33]
"Tack så mycket" Sweenie


Ingen orsak ;)


Smurfpuss(Posted 2005) [#34]
what functions does this wrapper have right now is it the ones you have in the demo or is it more like particels and shaders


Smurfpuss(Posted 2005) [#35]
Pleas post if you make any more changes woulde love to see it i think this is great!

Bra jobbat! <-Swedish


Alienforce(Posted 2005) [#36]
Sweenie downloaded the tutorial, Looks like a good starter for wrapping.. Thanks alot for sharing your knowledge.

"Mycket bra jobbat, vill se mer :) " Swedish

/Alienforce


Red Ocktober(Posted 2005) [#37]
I will try to wrap as much as I can.


great news...

you are now 'the man'!!

--Mike


Smurfpuss(Posted 2005) [#38]
Well post as soon as you have something more pleas!


Sweenie(Posted 2005) [#39]
I'm currently trying out a more objectoriented way of wrapping irrlicht which means that it won't be very pleasant to use in Blitz3D.
But I believe theduck will cover that part.

Anyway, here is an example on how to load a quake3 map and load a dwarf.
Currently the wrapper only supports dwarves ;)

Import "-lirrwrap"
Include "IrrInclude.bmx"

Local Device:Irr_IrrlichtDevice = CreateIrrlichtDevice(800,600,32,False,False,False)
Local Scene:Irr_SceneManager = Device.getSceneManager()
Local Video:Irr_VideoDriver = Device.getVideoDriver()
Local FileSystem:Irr_FileSystem = Device.getFileSystem()

Local Mesh:Irr_AnimatedMesh = Scene.GetMesh("C:\dwarf\dwarf1.x")
Local Node:Irr_AnimatedMeshNode = Scene.AddAnimatedMeshNode(Mesh)
Local Camera:Irr_CameraNode = Scene.AddCameraNodeFPS()

FileSystem.AddZipFileArchive("C:\q3levels\meatpak\meatpak.pk3")
Local LevelMesh:Irr_AnimatedMesh = Scene.GetMesh("maps\whitemeat.bsp")
Local LevelNode:Irr_SceneNode = Scene.AddOctTreeSceneNode(LevelMesh)

While Device.Run() = True 

 Video.BeginScene(True,True,Null)
  Scene.DrawAll()
 Video.EndScene()

 FlushMem()

Wend

Device.Drop()



//Edit

Just wanted to mention a little about the method I'm using.

Basically I break down the whole namespace/class structure of Irrlicht into a set of "plain" functions.

I export these functions and create declarations for them in Bmax.

Then in Bmax I reconstruct the whole structure again using Bmax types and methods which call the declared functions.

So far it works pretty well and I will do some performance tests to see if this method have any significant impact on the performance or not.

Wrapping this way is a tremendous amount of work but I'm currently working on a tool that will do this for me.

The wrappertool should theoretically be able to wrap any kind of C++ Api this way but that is a later project.


LarsG(Posted 2005) [#40]
This is really looking better and better Sweenie..
I like the OO approach on it.. That way, it would be very easy to follow other (C++) tutorials and examples on Irrlicht. :)


Smurfpuss(Posted 2005) [#41]
have you wrapped some more functions in yet?
Just wondering


jhocking(Posted 2005) [#42]
Currently the wrapper only supports dwarves ;)

cheeky


Smurfpuss(Posted 2005) [#43]
Why not Elfs and orchs?


Red Ocktober(Posted 2005) [#44]
actually... i think they prefer to be called 'little people'...


--Mike


JustLuke(Posted 2005) [#45]
Neither Elfs nor Orcs have beards. Perhaps the wrapper only supports bearded models so far.