open source Ogre3d wrapper

BlitzMax Forums/BlitzMax Programming/open source Ogre3d wrapper

Chris C(Posted 2006) [#1]
Ogre has come a long way since the last time I looked (which was quite a while ago!!) Its actually not the bag of bolts it used to be and has come on leaps and bounds!

I've made a start and already I can load an entity and render a frame from max with Ogre

Just what features are important for people?

because Ogre is opening its own context, polled input wont work, and also I'm fairly sure getting max2d to work with it would be more trouble than its worth (but you never know!)

There are plenty of things in Ogre for 2d stuff and input too.

I have had problems getting Ogre to compile under Ubuntu and would welcome help from anyone who has compiled Ogre specifically with Ubuntu or for that matter any other Linux

I'd also appreciate any mac owners who have been able to compile Ogre for MacOS getting in touch

The initial source release (for windows) will come within a week or two, once I have some kind of basic entity manipulation and input working to my satisfaction.
(time and help dependant)


Beaker(Posted 2006) [#2]
I'm sure most people are looking for a Blitz3D-alike replacement that has extras such as shaders, shadows, water etc.

When I say Blitz3D-alike I mean: friendly entity system, picking, collisions etc.


Chris C(Posted 2006) [#3]
yeah thats how its looking about now, basically you get shaders etc for free from the wrappers point of view

I'm aiming to keep it simple like Blitz3d for sure!

at the moment I'm just using the models/materials from the Ogre SDK, anyone want to contribute a *slim* set of media with resources.cfg and material scripts .mesh's etc ?

I'm working on basic entity manipulation at the moment, after that I'll implement input and make a first release :D

Thanks for the feedback Beaker!


AntonyWells(Posted 2006) [#4]
I wonder whose it will borrow from, Sweenies or mine.

I wonder if it will be as good as either.

:)


SillyPutty(Posted 2006) [#5]
oh boy


Beaker(Posted 2006) [#6]
Aurora - yeah, cos you didn't 'borrow' from Sweenies wrapper did you?

Chris C doesn't need to borrow from anywhere. He is perfectly able to write his own code.


N(Posted 2006) [#7]
*Throws a chair*


Kuron(Posted 2006) [#8]
*Yells Jerry! Jerry!*


Tom(Posted 2006) [#9]
* gets off broken chair on floor "next time, a warning, k?" *


Chris C(Posted 2006) [#10]
tips hat to beaker... ;)

@aurora looking at the (badly formatted) docs for your "engine" I see that some of your functions don't even use the full functionallity of Ogre, so I wont be "basing" it on your "engine" thats for sure

I'm in contact with Sweenie, who as been very helpful (thanks sweenie) I've already offered him assistance and fully intend to help him out with his engine at a later date once he's carried out some reorganising he wants to do.



I've had an offer from someone to do media (thanks!), there should be a small demo out before long...


Chris C(Posted 2006) [#11]
its *very* ugly to use at the moment and theres no input yet...


taking out all the C string nonsence and adding a bit more to the max side of the wrapper will get



TS_LOCAL can be used to specify local,world or parent rotations

do people think that the node bit is confusing, should it be hidden away in the entity?

or is what I have so far understandable?


Gabriel(Posted 2006) [#12]
Hide it away in the entity, and have some entity methods to work with the node when we need to ( for example, moving to a different scene manager or whatever. )


Chris C(Posted 2006) [#13]
hmmm I'm still not sure...
what if you want more than one entity connected to a node?


While True
	RenderWorld()
	rollNode(Node1,0.1,TS_LOCAL)
	If iskeydown(KC_ESCAPE)<>0 Then End
	camYaw(cam,-getMouseRelativeX()*0.05)
	camPitch(cam,getMouseRelativeY()*0.05)
Wend


Tis starting to take shape tho!

but I *really* should have some object destructors in place rather than just an end!!!


Chris C(Posted 2006) [#14]
beginning to think you are right Gabriel

initOgre @3 sets stuff up
createCamera @4 makes a camera
sow_positionCamera @5 positions and points a camera
setVport @6 considering getting rid of this and just having single viewport only...
setAmbientLight @7
getcamname @9
setSkyBox @11 sets up a skybox
CreateEntity @12
CreateSceneNode @13 may become invisible part of entity
attachNodeToEntity @14
renderWorld @15 renders all the entities
pitchNode @16 rotates node pitch
yawNode @17
rollNode @18
iskeydown @19 returns true if key a key is down
getMouseRelativeX @20 mouse movement
getMouseRelativeY @21
camYaw @22 rotate camera yaw
camPitch @23
camRoll @24
camTranslate @25 move reletive to orientation
positionNode @26 position a node in world co-ords
addChildNode @27 add a child node to a node
scaleNode @28 scale a node


feedback guys whats needed... in what order....


Chris C(Posted 2006) [#15]
shadows etc



well if no ones got feedback and no one wants to help with the coding is there any point me continuing?


Diablo(Posted 2006) [#16]
Cant really tell you whats needed but so far it looks good.
Are you going to be writting an OOP side once the basic functions, etc. are converted?


Booticus(Posted 2006) [#17]
Checked it out and its looking good!


Damien Sturdy(Posted 2006) [#18]
Aurora didn't borrow from Sweenie as far as I know- and I've been with the project since day1. Aurora did spawn however since Sweenies wrapper didn't do what we needed yet, and we needed to make a start, so we did.

@Chris, This looks good.


I'm fairly sure getting max2d to work with it would be more trouble than its worth (but you never know!)



Yes. This is something we're still looking into. A couple of people have managed it over on the Ogre forums though :-)


Chris C(Posted 2006) [#19]
I still think charging for a simple wrapper round an open source product is damn unfair, and is the main reason for doing this wrapper

think I'll work on shaders params next...

@diablo basically because theres only me working on it I can only do one thing at a time... at the moment I'm working on the c++ wrapper, I do plan to further wrap the dll calls in max objects like Tentity for example which would hide all the cString stuff and SceneNodes

I really would appreciate some help with the coding guys, someone step up eh...


Damien Sturdy(Posted 2006) [#20]

I still think charging for a simple wrapper round an open source product is damn unfair, and is the main reason for doing this wrapper



Charging for man-hours isn't a bad thing is it? We've all agreed that Aurora would have been better at a much lower price- but EOTD, We cant make him change is mind, it's his product! :P

Suddenly there's so much rivalry around here.

Anyway, I wasn't here to start an argument, i was here to praise what you've done. It's good to see Blitzers making their own way forward :)


Vectrex(Posted 2006) [#21]
cool. hmm, the syntax looks pretty messy at the moment but that's expected :) Consistency is a bit off and I don't like abbreviations, code should be self documenting :).
At the risk of getting kneecapped I really like the Aurora syntax. Mainly because of the OOP but also because it's consistant, neat and hides alot of pointless stuff. Of course it's always good to be able to get at the fiddly stuff but it should be optional (shame max doesn't have overloading!)
I also suggest looking at gangstaWrapper/ogreNewt/NXOgre for physics, dotScene/oFusion for scene formats, www.yake.org for higher level game concepts including full ode physics/vehicle/high level events/state machines/audio/xml file formats etc etc


Alienforce(Posted 2006) [#22]
If you are going to a wrapper, it would be great if it used same syntax like in Blitz3D.


Chris C(Posted 2006) [#23]
so far all you're seeing is what will be internal (private) calls by the max wrapper , the actual programming api doesnt exist yet, and might not for a while yet...

@cygnus charging for man hours is fair enough if it was £5 I'd probably have bought it, if it was £7.50 with £2.50 to Ogre I'd have still bought it. But £40.... with no gaurantee that theres anything going to Ogre, even the "lite" version at £20 is too much, if you want to extend Open Source stuff you should either do it as a hobby or charge a realistic price and make sure that some of the money goes back to the project whos hard work you are taking advantage of, and calling a wrapper and "engine" thats just a joke.

ah thats better spleen vented...


Damien Sturdy(Posted 2006) [#24]
I agree with most of that, however different people have different views of what an Engine is. I wont talk about it from here on since this thread is about your wrapper, I don't want to fill it with a ton of Aurora stuff :)

BTW, I'm not actually involved with Aurora itself, We're just making a game with it.


Takuan(Posted 2006) [#25]
"I really would appreciate some help with the coding guys, someone step up eh... "

Why? You said a wrapper is simple.
Now go and spend all the time you have in a product which you dont want to charge for.
I expect E-Mail support, regulary updates and quick bug fixes.

Lets face it, you need money to eat and time to develope. Time=Money.

If you do some open source stuff in free time its cool and i have much respect for that poeple. But please dont bash that guys who charge money and therefore could finish their projects in a reasonable amount of time or provide proper support. I need them...

Excuse me, always freak out if i read "not fair" or "simple".
If Aurora is crap (realy dont know)...then bash it all the time:D


Haramanai(Posted 2006) [#26]
Chris just forget the easy to use part( Blitz3D stile ).
Do you have the wrapper at the level of gman's Irrlicht wrapper?
If yes give the wrapper to the community. The easy to use Functions or Methods will come... as more people will read and learn the Ogre3D SDK.
Or you have to write those parts in C++?


Josepho(Posted 2006) [#27]
I think the same as Haramanai, release the ogrewrapper and then maybe people would like to help you, if i could i will help, i have been waiting something like this !


Chris C(Posted 2006) [#28]
Yeah it just needs a bit of tidying and the C++ side is there for the basic entity handling stuff, 8hrs work, simple enough, I'm going to have a look the paged landscape plugin.

1 extra function to add for named (as opposed to indexed) params and shader basic shader support is done.

I'm trying to decide how much of the OO to do in the c++ and how much in max, it needs thinking about carefully

given the attitudes like takuan's and the fact that people are keen to leach but not to help I'm seriously considering weather or not it should be open.

I'll put a demo dll and .bmx demo up on my site a bit later


Josepho(Posted 2006) [#29]
Great, i will be waiting for that ^_^


kenshin(Posted 2006) [#30]
I would definately help if I could, but writing a wrapper is out of my league. I wouldn't know where to even begin. I'm certain there's a lot of other people in my boat too. I think that most people who could help already have a wrapper of their own to keep up to date.

Another problem I have is that I'm already a long way into coding my rpg. If I were to stop this for a few months then it could jeopardise my ability to continue coding it. If I leave my project to stagnate for any length of time I find it really difficult to get the desire to go back to developing it. I'm not sure if this is a common problem for everyone.

I think what you're doing is great though. I just can't help though, primarily 'cause I'm not proficient in the areas that writing a 3d wrapper demands.