Ogre3D for Blitz3D

Blitz3D Forums/Blitz3D Userlibs/Ogre3D for Blitz3D

bruZard(Posted 2010) [#1]
At first: excuse my bad english (i should put this phrase in my sig)

i work on a Ogre3D Wrapper for Blitz3D, named "BlitzOgre3D". For the moment it is not yet productively usable, but i'am working on it.



the Changelog so far
06.05.2010 // v0.41

added		: MouseX%()
added		: MouseY%()
added		: MouseDown%(button%)
added		: KeyHit%(keycode%)
added		: MouseHit%(button%)
added		: MouseMoved%()

changed		: die BlitzOgre3D.dll ist nun gegen die VC++ Runtimelibrary gelinkt


bis 06.05.2010 // v0.41
added		: AddResourceDir(resource_dir$)
added		: GenerateEntityName$(prefix$ = "entity_")
added		: GetPath$(fullpath$)
added		: UseDirectX()
added		: UseOpenGL()
added		: SetPluginCfg(plugin_cfg$ = "plugins.cfg")
added		: SetConfigFile(config_file$ = "bo3d.cfg")
added		: SetLogFile(log_file$ = "bo3d.log")
added		: InitOgre%(width% = 800, height% = 600, depth% = 32, fullscreen% = False)
added		: Graphics3D%(width% = 800, height% = 600, depth% = 32, fullscreen% = False)
added		: EndGraphics()
added		: RenderWorld%(lastUpdate# = 0.0)
added(0)	: Dither(enable% = True)
added		: WBuffer(enable% = False)
added		: AntiAlias(value% = 0)
added(0)	: HWMultiTex(enable% = True)
added(0)	: UpdateWorld(anim_speed# = 1.0)
added(0)	: CaptureWorld();
added		: ClearWorld()
added(0)	: LoaderMatrix(file_extension$, xx#, xy#, xz#, yx#, yy#, yz#, zx#, zy#, zz#)
added		: TrisRendered%()
added		: CreateCamera.obj(entity_name$ = "")
added		: CameraClsColor(camera.obj, r# = 0.0, g# = 0.0, b# = 0.0)
added		: CameraRange(camera.obj, near# = 0.1, far# = 1000.0)
added		: WireFrame(camera.obj, mode% = PM_WIREFRAME)
added		: PositionEntity(entity.obj, x#, y#, z#)
added		: MoveEntity(entity.obj, x#, y#, z#)
added		: RotateEntity(entity.obj, x#, y#, z#)
added		: TurnEntity(entity.obj, x#, y#, z#)
added		: CreateCube.obj(entity_name$ = "")
added		: AmbientLight(r# = 0.0, g# = 0.0, b# = 0.0)
added		: CreateLight.obj(light_type% = LT_POINT, entity_name$ = "")
added		: LightColor(light.obj, r# = 1.0, g# = 1.0, b# = 1.0)
added		: LoadMesh.obj(file$, entity_name$ = "")
added		: KeyDown%(keycode%)
added		: CreateOverlay.obj(overlay_name$ = "")
added		: OverlayAdd2D(overlay.obj, container.obj)
added		: ShowOverlay(overlay.obj, enable% = True)
added		: CreatePanel.obj(x#, y#, width#, height#, panel_name$ = "")
added		: PanelAddChild(panel.obj, child.obj)
added		: CreateTextArea.obj(x#, y#, width#, height#, textarea_name$ = "")
added		: TextAreaText(textArea.obj, txt$)
added		: TextAreaFont(textArea.obj, fontname$, size# = 12)
added		: LoadFont(fontname$, height# = 10, bold% = False, italic% = False, underlined% = False)


... and last the Download width included Executable:
http://bo3d.sedm.de/downloads/bo3d.0.41.zip

stay tuned!


Uber Jase(Posted 2010) [#2]
Looks good so far:) May I ask what features the engine has that Blitz3D or FastExtend doesn't have?


Virtech(Posted 2010) [#3]
Very interesting. Will you release the wrapper as freeware?


Panno(Posted 2010) [#4]
woot


bruZard(Posted 2010) [#5]
@Virtech: yes, BlitzOgre3D is Freeware ...

@Uber Jase
well ... i try to give your a list:
- Ogre3D is a next generation graphics 3D Engine
- DirectX9 (DX10 and 11 are in Dev) / OpenGL
- Shadows
- Shader
- Physics
- its free and better ;)

Today i've ported bo3d to BlitzMax ... stay tuned for 0.43 (BlitzMax and Blitz3D / BlitzPlus)


MCP(Posted 2010) [#6]
Good work so far bruZard! Ogre3D is a very capable engine.


Happy Sammy(Posted 2010) [#7]
I hope you could work on blitzmax verion later.


bruZard(Posted 2010) [#8]
0.43 for Blitz3D, BlitzPlus and BlitzMax in then next few hours ... stay tuned.


bruZard(Posted 2010) [#9]
>> BlitzOgre3D 0.43 for Blitz3D/BlitzPlus <<

>> BlitzOgre3D 0.43 for BlitzMax <<

at the moment theres no documentation ... take a look at the example (a executable is included)


wmaass(Posted 2010) [#10]
Wow. This could be really good.

So should we expect 0.5 in the next hour or so :)


Virtech(Posted 2010) [#11]
I'm getting an missing "msvcp100.dll" error when running the example.


Virtech(Posted 2010) [#12]
Installed the Microsoft Visual C++ 2010 Redistributable Package, and now it works :)


Hotshot2005(Posted 2010) [#13]
very good :)


SabataRH(Posted 2010) [#14]
What a wonderful idea. I wish you the best in this endeavour and will be following your progress with great anticipation..


bruZard(Posted 2010) [#15]
bo3d Blitz3D/BlitzPlus 0.44 all needed dll's included (i hope)

>> Download BlitzOgre3D // Blitz3D/BlitzPlus 0.44 (~ 6.3MB) <<

the changelog so far ...
05-10-2010 // v0.44

added		: MouseXSpeed%()
added		: MouseYSpeed%()

changed		: TurnEntity() now works with Cameras
changed		: RotateEntity() now works with Cameras

removed		: MouseMoved%()


05-08-2010 // v0.43

added		: TranslateEntity(entity.obj, x#, y#, z#)


05-07-2010 // v0.42

added		: CreateSkybox(material$)
added		: CreatePivot.obj(entity_name$)
added		: EntityParent(entity.obj, parent.obj)
added		: EntityPitch#(entity.obj)
added		: EntityYaw#(entity.obj)
added		: EntityRoll#(entity.obj)

fixed		: Typo at Entity-Consts


05-06-2010 // v0.41

added		: MouseX%()
added		: MouseY%()
added		: MouseDown%(button%)
added		: KeyHit%(keycode%)
added		: MouseHit%(button%)
added		: MouseMoved%()


05-05-2010 // v0.40
added		: AddResourceDir(resource_dir$)
added		: GenerateEntityName$(prefix$ = "entity_")
added		: GetPath$(fullpath$)
added		: UseDirectX()
added		: UseOpenGL()
added		: SetPluginCfg(plugin_cfg$ = "plugins.cfg")
added		: SetConfigFile(config_file$ = "bo3d.cfg")
added		: SetLogFile(log_file$ = "bo3d.log")
added		: InitOgre%(width% = 800, height% = 600, depth% = 32, fullscreen% = False)
added		: Graphics3D%(width% = 800, height% = 600, depth% = 32, fullscreen% = False)
added		: EndGraphics()
added		: RenderWorld%(lastUpdate# = 0.0)
added(0)	: Dither(enable% = True)
added		: WBuffer(enable% = False)
added		: AntiAlias(value% = 0)
added(0)	: HWMultiTex(enable% = True)
added(0)	: UpdateWorld(anim_speed# = 1.0)
added(0)	: CaptureWorld();
added		: ClearWorld()
added(0)	: LoaderMatrix(file_extension$, xx#, xy#, xz#, yx#, yy#, yz#, zx#, zy#, zz#)
added		: TrisRendered%()
added		: CreateCamera.obj(entity_name$ = "")
added		: CameraClsColor(camera.obj, r# = 0.0, g# = 0.0, b# = 0.0)
added		: CameraRange(camera.obj, near# = 0.1, far# = 1000.0)
added		: WireFrame(camera.obj, mode% = PM_WIREFRAME)
added		: PositionEntity(entity.obj, x#, y#, z#)
added		: MoveEntity(entity.obj, x#, y#, z#)
added		: RotateEntity(entity.obj, x#, y#, z#)
added		: TurnEntity(entity.obj, x#, y#, z#)
added		: CreateCube.obj(entity_name$ = "")
added		: AmbientLight(r# = 0.0, g# = 0.0, b# = 0.0)
added		: CreateLight.obj(light_type% = LT_POINT, entity_name$ = "")
added		: LightColor(light.obj, r# = 1.0, g# = 1.0, b# = 1.0)
added		: LoadMesh.obj(file$, entity_name$ = "")
added		: KeyDown%(keycode%)
added		: CreateOverlay.obj(overlay_name$ = "")
added		: OverlayAdd2D(overlay.obj, container.obj)
added		: ShowOverlay(overlay.obj, enable% = True)
added		: CreatePanel.obj(x#, y#, width#, height#, panel_name$ = "")
added		: PanelAddChild(panel.obj, child.obj)
added		: CreateTextArea.obj(x#, y#, width#, height#, textarea_name$ = "")
added		: TextAreaText(textArea.obj, txt$)
added		: TextAreaFont(textArea.obj, fontname$, size# = 12)
added		: LoadFont(fontname$, height# = 10, bold% = False, italic% = False, underlined% = False)


... and a new screenshot



bruZard(Posted 2010) [#16]
for skey-z from the german Blitzbasic Forums i've released the Version 0.44.1. This add the function GetFPS#(value%). "value" can be:

- FPS_AVG (default)
- FPS_BEST
- FPS_WORST
- FPS_LAST

>> Update to 0.44.1 for Blitz3D/BlitzPlus (61kb) <<

>> Update to 0.44.1 for BlitzMax (132kb) <<


bruZard(Posted 2010) [#17]
BlitzOgre3D v0.45

the update is available from here (Blitz3D / BlitzPlus)

you need BlitzOgre3D 0.44 for this release.




Uber Jase(Posted 2010) [#18]
WOW, you update FAST:)


wmaass(Posted 2010) [#19]
This is the coolest thing since Canadian bacon.


bruZard(Posted 2010) [#20]
Sorry, but my english is to bad for the following text. I used Google to translate it:

Today I have been fighting on two fronts. One was on the texture side and the other on the area known as the compositor. The latter are simple scripts that make it a Ogre3D disciples to allow the post-process area relatively free. I remember several Compositor scripts with BlitzOgre3D to define directly so that you can use these effects with a simple call (for example, "Depth of Field", "Bloom", "Motion Blur", etc.)

With the integration of compositors and the texture commands I go one step away from it all Blitz3D function directly in C + + to wrap. Instead, I loop through the required Ogre3D methods and glue it together in the BMax and Blitz3D.

Textures are to be produced in their Ogre3D format more complicated than the one in his Blitz3D banal "CreateTexture ()" is used to, but it also has much more possibilities. If you use CreateTexture () only with the required parameters "width" and "height" it gets just a 32 bit texture with the characteristics of RGB and alpha. Looking at the port of the wrapper on Mac and Linux (BMax), I have but all other formats are looped through. This can take a closer look in the file "include / bo_texture_pixelformats.bmx. This file also defines various ways to use the texture of trust (such as Render Target) and to determine the type of texture, what shader is not necessarily uninteresting (1D, 2D, 3D, CubeMap Texure).

Compositors Ogre3D scripts that a little bit of the GLSL or HLSL scripts are to anticipate and provide post-process effects. In BlitzOgre3D I sharpen all the methods needed to understand the one just around the documentation and / or tutorials, but can summarize the main effects together in their own methods / functions. For example, does a "SceneDOF (camera, near, far)" the complete end of Depth of Field, who would like to do but may be direct as in Ogre3D itself.

In the next release (0.48) which is then be possible.


bruZard(Posted 2010) [#21]
now you can get the source from GoogleCode SVN: http://code.google.com/p/bo3d/


KimoTech(Posted 2010) [#22]
hope you integrate some kind of triangle-accurate picking, as this is not present in OGRE.. OGRE can only pick bounding boxes. :(


bruZard(Posted 2010) [#23]
triangle accurate picking comes with the integration of Bullet Physics


KimoTech(Posted 2010) [#24]
but then you can only pick collision volumes ? what about the actual renderable meshes ?


bruZard(Posted 2010) [#25]
you're right. i think i do it with RaySceneQuery and WorldFragments.


Canardian(Posted 2010) [#26]
integration of Bullet Physics
That's the best choice. I studied all physics engines for Ogre, and found out that Bullet is the best.
I started to make a Ogre3D for C++ wrapper also, so you can use Blitz3D commands in C++.


bruZard(Posted 2010) [#27]
yes, bullet is one of the best physic engines.

Today i've committed revision 50 to the SVN, this release brings Bullet Physics to the Wrapper and many other changes.




DareDevil(Posted 2010) [#28]
support shader vertex and pixel your porting?
tnk


bruZard(Posted 2010) [#29]
yes


DareDevil(Posted 2010) [#30]
ok! Thanks


SabataRH(Posted 2010) [#31]
Is the BMax version of this wrapper further along than the b3d version? or are they identical.. just wondering.


bruZard(Posted 2010) [#32]
yes, the BMax version is a little bit further...


DareDevil(Posted 2010) [#33]
This wrapper is free or pay licence?


bruZard(Posted 2010) [#34]
free


Pinete(Posted 2010) [#35]
this seems pretty amazing!


Leszek(Posted 2010) [#36]
amazing ++
;)


Pinete(Posted 2010) [#37]
more info please!! more updates!! :P
hehehe


bruZard(Posted 2010) [#38]
new updates coming soon ... please wait *beep* still working *beep* buffer overflow *beeeeep*


Sake906(Posted 2010) [#39]
will it have basic collision detection too? some would simply prefer that to a physics engine. Having it would be a great addition IMO.

This is looking very promising!


jfk EO-11110(Posted 2010) [#40]
As an increasing number of download URLs, these files also seem to have vanished, but the good news is: this project seems to be alive, hosted by google. I used to download version .50 and from what I read in the readme (where's the documentation??), it claims to be rather complete, diffrences between Blitz3D are listed in 2 lines of text...

Anyway, I really would love to use it, esp. since it seems to allow shaders. But for some reason it won't work here. I tried it on my XP notebook, it will open a black window, then freezes, one time even used to freeze the machine completely. The ORGE startup log told be that the initialisation was ok. It may have something to do with the onboard graphics card that claims to be capable of certain things, that it actualy isn't capable of.

When I try it on my other machine, still with w9x (yes :P for good reasons), then it says "Userlib not found". What could this be? The DLLs and Decls are all in place. Is there a way to make Blitz tell me what userlib it refers to? Does OGRE have certain OS requirements? Or shader model or DX requirements?

BTW this is the google host url:
http://code.google.com/p/bo3d/downloads/list


Thanks bruzzard for your work. This could be the perfect gift for xmas :)


bruZard(Posted 2011) [#41]
spoiler: the next release is not far away.


Leon Drake(Posted 2011) [#42]
orly?


RifRaf(Posted 2011) [#43]
wow, why havent i seen this before. just downloaded .. amazing! I hope you keep working on this. I may start my next project in it.. Please add more mesh control via addvertex / surface and such so we can create editors and b3d mesh loaders as well.


bruZard(Posted 2011) [#44]
first version of the new Ogre3D Wrapper : http://bo3d.sedm.de/downloads/bogre.b3d.0.23.zip


RifRaf(Posted 2011) [#45]
looks good !, does ogre support low level mesh creation ? I have custom mesh formats that I would like to use.


Vorderman(Posted 2011) [#46]
Hmm, doesn't work for me - the precompiled EXE runs OK but example.bb won't work - it compiles OK but just sits with a black screen, and appears to have crashed the debugger.

Added some debuglogs and it falls over at this line:
If Not Graphics3D(800, 600, 32, False) Then End

The InitOgre command completes OK.
I'm using B3D version 1.106 on WinXP SP3. I copied over the userlibs file, was there anything else that needed to go into a specific location?

Last edited 2011


bruZard(Posted 2011) [#47]
it is not possible to run a Ogre3D App from the IDE. Try IDEal as IDE, with WindowsXP it works.

@RifRaf: Like this?
Local mesh:TMesh = CreateMesh("myMesh")

MeshBeginBuild(mesh, "BaseWhiteNoLighting", OT_LINE_STRIP)

AddVertex(mesh, -50, -50, 0)
AddVertex(mesh, 50, -50, 0)
AddVertex(mesh, 50, 50, 0)
AddVertex(mesh, -50, 50, 0)

VertexIndex(mesh, 0)
VertexIndex(mesh, 1)
VertexIndex(mesh, 2)
VertexIndex(mesh, 3)
VertexIndex(mesh, 0)

MeshEndBuild(mesh)


Repeat
	turnEntity(mesh, 0.1, 0, 0)
	RenderWorld()
Until KeyHit(KC_ESCAPE)


stay tuned, 0.24 will have it...


bruZard(Posted 2011) [#48]
v0.24 with basic support for manual objects: http://bo3d.sedm.de/downloads/bogre.b3d.0.24.zip
you need 0.23 for this update.


RifRaf(Posted 2011) [#49]
thanks BruZard! Keep it up. This is the best dx9 b3d wrapper ive looked at so far. Easy to understand, lightweight and powerful.


Yasha(Posted 2011) [#50]
This is really cool stuff! Thank you.

One thing though... why did the version numbers go backwards?


bruZard(Posted 2011) [#51]
because, it is a complete new wrapper.


bruZard(Posted 2011) [#52]
new in v0.25 : VertexColor() and VertexNormal(). AddVertex() now takes the additional parameters u, v and w for texturecoordinates.



v0.25 for BlitzPlus/Blitz3D(ca. 1.3MB) http://bo3d.sedm.de/downloads/bogre.b3d.0.25.zip


RifRaf(Posted 2011) [#53]
what do you recommend for 3D sound ?, and you mentioned you already were working on a physics lib wrapper to be included with the rest of this ?

Last edited 2011


bruZard(Posted 2011) [#54]
i use bullet for physics and collisions.
At this time i have no plans for 3d sound, maybe "Irrklang" or "Bass", i don't know ... but this has no priority.


bruZard(Posted 2011) [#55]
v0.26 -> http://bo3d.sedm.de/downloads/bogre.b3d.0.26.zip

You can now use gamepads or joysticks.