Is this project dead(resting?) and where did Miyagi go?

crankyslap

16-10-2012 21:37:23

I can't help but notice how dead these forums are. When I saw there was a C# wrapper for Ogre 3D I was really happy/motivated because I absolutely despise c++, I'm 10x more productive with c#. With c++ I always feel like I'm fighting the language rather than developing stuff. But now with Mogre it's not much different. So now I finally got set up with Mogre 1.7.3 + Miyagi and OgreNewt + it's Heightcollision patch, which has taken like 3 days, and now I'm stuck with Miyagi not having Miyagi.Common.Resources.TrueTypeFont anymore in 3.0, and I can't for the life of me figure out how to load fonts.

So I go over to it's sourceforge project page, to find that it's forum is no more. The creator, user "smiley" doesn't even seem to exist on sourceforge anymore... so now I don't know where to turn. Have people abandoned the Mogre project because it's idling at ~1.7.4 without any active maintainers or what's going on here? Also, sorry if I came across as a spoiled child, I am very thankful for everyone's hard work but I can't help but feel burned out after my experience with Mogre.

So again; what's goin on? And more importantly, can Miyagi still work with fonts? If so, how? And maybe even morerer important; what can I do to help get Mogre back on track? If that's even a possibility.. I have no idea what state it is in. What will it take to update it to newer versions of Ogre 3D? I thought the whole idea if this wrapper-instead-of-porting concept was that it was easy to keep up-to-date, but I have yet to find any explenations on how I can contribute.

I see these things like "Codegen", "AutoWrap", "cpp2java", "Doxxygen" (or something). What do these things do? How do I utilize them to upgrade Mogre to never versions of Ogre? Does Autowrap make it easier to wrap new functionality in Ogre by automating the conversion from the c++ type to the c# type or is that was cpp2java does? Or does nothing do that at all and will everything have to be done manually with C++/CLI ?

Again, sorry if I cam across as spoiled/imaptient, that is not my intention.. I'm just kinda lost in the unstructuredness that is Mogre, and also sad to see such an awesome project has such little interest. Thanks for reading.. and please don't hate me for critisizing all your hard work :o

smiley80

17-10-2012 10:20:51

Miyagi's home is here:
https://bitbucket.org/tbohnen/miyagi

TrueType font support has been moved to a separate assembly:
https://bitbucket.org/tbohnen/miyagi/sr ... at=default

I wouldn't say Mogre is dead. It's more undead. Getting reanimated from time to time like some kind of persistent zombie.

Zonder

17-10-2012 10:48:36

Mogre hasn't moved from 1.7.4 because no one has needed a 1.8 feature. Its a open source project if you need a 1.8 build look into what needs fixing and submit patches. At some point this will get done I would have done it my self but I have no free time at the moment.

See here for miyagi info http://www.ogre3d.org/tikiwiki/tiki-ind ... ght=Miyagi. Looks like the maintainer just doesn't like source forge any more use the other repository here https://bitbucket.org/tbohnen/miyagi (mentioned on the wiki page)

Now font loading I also got stuck on when I looked into Miyagi ages ago I have digged out my font loading code. it's for v1.2 which the repository has a branch for it may work on the dev branch as well but no idea. As I recollect the font loading needs another reference as well as it was removed from the core dll. But check the projects repository it will be in there somewhere


var objRange = new List<Range>();
objRange.Add(new Range(0x0, 0x7F)); // Basic Latin
objRange.Add(new Range(0x80, 0xFF));
objRange.Add(new Range(0x100, 0x17F));
objRange.Add(new Range(0x180, 0x24F));

Miyagi.Common.Resources.Font.Default = Miyagi.Common.Resources.TrueTypeFont.Create(system, "Arial",
new Miyagi.Common.Resources.TrueTypeFontSettings()
{
FileName = "arial.ttf",
CodePoints = objRange,
FontStyle = System.Drawing.FontStyle.Regular,
Resolution = 96,
Size = 22
});

var bounds = new Rectangle(Point.Empty, system.RenderManager.MainViewport.Size);

var objLabel1 = new Miyagi.UI.Controls.Label()
{
Rectangle = bounds,
Width = 400,
Text = "Hello World!",
Left = 50,
Top = 0,
TextStyle = new Miyagi.UI.Controls.Styles.TextStyle()
{
ForegroundColour = new ColourDefinition(Colours.Black, Colours.Black)
}
};


Now keeping mogre up to date isn't easy as wrapping other projects due to ogres size it's huge. But that's where AutoWrap comes in that analyses all classes in ogre and auto emits the necessary code to build mogre. The cpp2java program is used to get a structure of the project for autowrap. Codegen I can't remember. Doxygen is just to generate doumentation for ogre.

Now autowrap does actually need to be told certain things so it will wrap them as I recollect (it's been years since I looked at it) so this is the program that needs updating for 1.8.

The first step in all this is to use the new MogreBuilder to build your own copy of 1.7.4 then switch the config to use the latest ogre branch and start fixing build errors. That is the best way I can see of getting it updated.

It's ok it does get frustrating this forum isn't that active as people are just using mogre and it works. People also ask questions on the main forum as mogre is just a wrapper answers for ogre should apply to mogre.

crankyslap

17-10-2012 10:59:43

Miyagi's home is here:
https://bitbucket.org/tbohnen/miyagi

TrueType font support has been moved to a separate assembly:
https://bitbucket.org/tbohnen/miyagi/sr ... at=default

I wouldn't say Mogre is dead. It's more undead. Getting reanimated from time to time like some kind of persistent zombie.


Very happy to see Miyagi is still around, smiley :D I didn't notice that on the wiki (http://www.ogre3d.org/tikiwiki/Miyagi) "Mercurial Repo" actually pointed to bitbucket.. sourceforge project was on the top so I figured you just up and went away :)

The fact that the Mogre version is a bit stale actually doesn't bother me all that much; it's still a fine rendering system as it is. I just wish I knew how I'm supposed to wrap new Ogre version's functionality with the tools I mentioned in my first post, and even moreso keep wrapped libraries such as MogreNewt up to date as well. The linking stuff in C++ is what puts me off the most, there's always a gazillion errors I don't know what to do with and it usually boils down to some dependency not linked quite correctly. Which is hard to figure out of the error Visual Studio throws isn't descriptive at all.

In any case; glad to see the project isn't abandoned!

Mogre hasn't moved from 1.7.4 because no one has needed a 1.8 feature. Its a open source project if you need a 1.8 build look into what needs fixing and submit patches. At some point this will get done I would have done it my self but I have no free time at the moment.

...

Now keeping mogre up to date isn't easy as wrapping other projects due to ogres size it's huge. But that's where AutoWrap comes in that analyses all classes in ogre and auto emits the necessary code to build mogre. The cpp2java program is used to get a structure of the project for autowrap. Codegen I can't remember. Doxygen is just to generate doumentation for ogre.

Now autowrap does actually need to be told certain things so it will wrap them as I recollect (it's been years since I looked at it) so this is the program that needs updating for 1.8.

The first step in all this is to use the new MogreBuilder to build your own copy of 1.7.4 then switch the config to use the latest ogre branch and start fixing build errors. That is the best way I can see of getting it updated.


Ok, that sounds promising! Although you are correct, the 1.8 features that are new in Ogre don't seem all that important from what I've seen so far. If it wasn't such a pain in the butthole to keep Ogre3D addons such as OgreNewt up to date for Mogre I probably wouldn't have complained as much as I did. But for issues with that I should probably be asking more direct questions... possibly on a programming forum because it's not a subject that only affects Mogre of course ;)

Maybe the best way to improve the Mogre project right now is actually add some proper examples of things to do with the most-used version of Mogre, which seems to be 1.7.3 because it's binary "Cygon"(spelling) release is stickied on the main forum. Finding good, descriptive examples of pretty generic things to do, still proves a difficult task. That's probably the only way I can contribute at this time.

Zonder

17-10-2012 11:15:04

Well adding to the wiki is always useful even if information gets stale due to new releases at least there is a basis there that can be updated. And I know your pain with c++ errors they aren't that helpfull at times.

crankyslap

17-10-2012 13:58:44

Can't get the miyagi example to work. (http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=29359#p98806).

I am trying to port it to the QuickStart2010 (https://bitbucket.org/mogre/mogrequickstart/downloads) example, which is structured alot more conveniently... but it won't start, and I can't figure out why.

//////////////////////////////////////////////////////////////////////////
// Miyagi members
//////////////////////////////////////////////////////////////////////////
Dictionary<string, Skin> skinDict;
Dictionary<string, Miyagi.Common.Resources.Font> fonts;
MiyagiSystem system;
GUI gui;
ProgressBar progress;

/************************************************************************/
/* Start Miyagi */
/* Moved this code to this method in hopes of it fixing the problem */
/************************************************************************/
bool miyagistarted = false; //only start once
private void StartMiyagi()
{
if (!miyagistarted) miyagistarted = true;
else return;

//Some references we need
SceneManager mSceneMgr = mStateMgr.Engine.SceneMgr;
MoisManager Input = mStateMgr.Input;

system = new MiyagiSystem("Mogre");
gui = new GUI();

//For some reason we can't get past this line unless we include an ogre.cfg file.. and even then we sometimes get stuck
system.GUIManager.GUIs.Add(gui);

//This seems to work fine
system.PluginManager.LoadPlugin(@"Miyagi.Plugin.Input.Mois.dll", Input.MKeyboard, Input.MMouse);

// Create a cube for fun
var ent = mSceneMgr.CreateEntity(Mogre.SceneManager.PrefabType.PT_CUBE);
var node = mSceneMgr.RootSceneNode.CreateChildSceneNode();
node.AttachObject(ent);

// Create the empty font dictionary
fonts = new Dictionary<string, Miyagi.Common.Resources.Font>();

//Note: When loading fonts, the font file is loaded without the help of Mogre, so you must include the full path inside the TrueTypeFonts.xml.
//--
//Null reference exception seems to occur here, at CreateFromXml, but the file does exist and the xml file
// correctly points to "../../Media/bluehigh.ttf"
foreach (Miyagi.Common.Resources.Font font in TrueTypeFont.CreateFromXml("../../Media/TrueTypeFonts.xml", system))
fonts.Add(font.Name, font);

//Never reached any code below this line

Miyagi.Common.Resources.Font.Default = fonts["BlueHighway"];

// Load some skins. Unlike fonts, the images ARE loaded using Mogre, so you can have the images anywhere referenced by your resources.cfg file
Skin cursorSkin = Skin.CreateFromXml("../../Media/cursorSkin.xml", system)[0];

var skins = Skin.CreateFromXml("../../Media/testSkin_map.skin", system); //also an xml file, just a different extension
skinDict = new Dictionary<string, Skin>();

foreach (Skin skin in skins)
skinDict.Add(skin.Name, skin);

// Button - Note that you cannot click on this, as it is behind the TableLayoutPanel.
// Just move it to the side or resize the table to fix this
Button button = new Button();
button.Size = new Size(200, 100);
button.Location = new Point(50, 500);
button.Skin = skinDict["Button"];
gui.Controls.Add(button);

// Label
Label label = new Label();
label.Size = new Size(100, 50);
label.Location = new Point(500, 500);
label.Text = "Hello Miyagi";
gui.Controls.Add(label);

// Cursor
Cursor cursor = new Cursor(cursorSkin, new Size(50, 50), new Point(0, 0), true);
system.GUIManager.Cursor = cursor;

// Progressbar
progress = new ProgressBar();
progress.Size = new Size(300, 50);
progress.Skin = skinDict["ProgressBarH"];
progress.Location = new Point(50, 50);
gui.Controls.Add(progress);

// Table
TableLayoutPanel table = new TableLayoutPanel();
table.Location = new Point(50, 300);
table.Size = new Size(500, 500);

table.RowCount = 5;
table.ColumnCount = 5;

// Make sure you create the TableLayoutStyle objects, and add them to the table's column styles and row styles
// (dont need to do this for flow layout)
var colStyles = new TableLayoutStyle[table.RowCount];
var rowStyles = new TableLayoutStyle[table.ColumnCount];

for (int i = 0; i < colStyles.Length; i++)
colStyles = new TableLayoutStyle(SizeType.Absolute, 60); //width

for (int i = 0; i < rowStyles.Length; i++)
rowStyles = new TableLayoutStyle(SizeType.Absolute, 50); //height

table.ColumnStyles.AddRange(colStyles);
table.RowStyles.AddRange(rowStyles);

for (int i = 0; i < table.RowCount + table.ColumnCount; i++)
{
Button b = new Button();
b.Size = new Size(50, 50);
b.Skin = skinDict["Button"];
table.Controls.Add(b);
}

gui.Controls.Add(table);

// Flow layout panel
FlowLayoutPanel flowPanel = new FlowLayoutPanel();
flowPanel.Size = new Size(300, 500);
flowPanel.Location = new Point(600, 50);

for (int i = 0; i < 5; i++)
{
Button b = new Button();
b.Size = new Size(50, 50);
b.Skin = skinDict["Button"];
flowPanel.Controls.Add(b);
}

Button b2 = new Button();
b2.Size = new Size(80, 80); // Put in the middle to see the effect it has on the flow panel
b2.Skin = skinDict["Button"];
flowPanel.Controls.Add(b2);

for (int i = 0; i < 5; i++)
{
Button b = new Button();
b.Size = new Size(50, 50);
b.Skin = skinDict["Button"];
flowPanel.Controls.Add(b);
}

gui.Controls.Add(flowPanel);
}

/************************************************************************/
/* update */
/************************************************************************/
public override void Update(long _frameTime)
{
// check if ogre head exists
if (mOgreHead != null)
{
// rotate the ogre head a little bit
mOgreHead.Rotate(Mogre.Vector3.UNIT_Y, new Radian(new Degree(0.5f)));
}

// check if the escape key was pressed
if (mStateMgr.Input.WasKeyPressed(MOIS.KeyCode.KC_ESCAPE))
{
// quit the application
mStateMgr.RequestShutdown();
}

StartMiyagi(); //Will start miyagi if it hasn't or else immediately returned
}

As the comment sais, it gets stuck at system.GUIManager.GUIs.Add(gui); alot (it just freezes there..) and if it does get past I get a nullReferenceException in TrueTypeFont.cs:

System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
Source=Mogre
StackTrace:
at Mogre.Texture.GetBuffer()
at Miyagi.Backend.Mogre.MogreBackend.WriteToTexture(Byte[] bytes, String textureName)
at Miyagi.Common.Resources.TrueTypeFont.CreateFontTexture(MiyagiSystem system, FontStyle fontStyle) in C:\Users\Admin\Downloads\tbohnen-miyagi-a2c4b64ad638\tbohnen-miyagi-a2c4b64ad638\Projects\Addons\Miyagi.TrueTypeFont\TrueTypeFont.cs:line 449
at Miyagi.Common.Resources.TrueTypeFont.CreateFont(MiyagiSystem system) in C:\Users\Admin\Downloads\tbohnen-miyagi-a2c4b64ad638\tbohnen-miyagi-a2c4b64ad638\Projects\Addons\Miyagi.TrueTypeFont\TrueTypeFont.cs:line 264
at Miyagi.Common.Resources.TrueTypeFont.CreateFont(MiyagiSystem system, TrueTypeFont font) in C:\Users\Admin\Downloads\tbohnen-miyagi-a2c4b64ad638\tbohnen-miyagi-a2c4b64ad638\Projects\Addons\Miyagi.TrueTypeFont\TrueTypeFont.cs:line 276
at Miyagi.Common.Resources.TrueTypeFont.CreateFromXml(XElement xElement, MiyagiSystem system) in C:\Users\Admin\Downloads\tbohnen-miyagi-a2c4b64ad638\tbohnen-miyagi-a2c4b64ad638\Projects\Addons\Miyagi.TrueTypeFont\TrueTypeFont.cs:line 196
at Miyagi.Common.Resources.TrueTypeFont.<>c__DisplayClass1.<CreateFromXml>b__0(XElement ele) in C:\Users\Admin\Downloads\tbohnen-miyagi-a2c4b64ad638\tbohnen-miyagi-a2c4b64ad638\Projects\Addons\Miyagi.TrueTypeFont\TrueTypeFont.cs:line 144
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at Miyagi.Common.Resources.TrueTypeFont.CreateFromXml(String fileName, MiyagiSystem system) in C:\Users\Admin\Downloads\tbohnen-miyagi-a2c4b64ad638\tbohnen-miyagi-a2c4b64ad638\Projects\Addons\Miyagi.TrueTypeFont\TrueTypeFont.cs:line 144
at Quickstart2010.States.TurningHead.StartMiyagi() in C:\Users\Admin\Documents\Visual Studio 2010\Projects\TryFix-Miyagi-QuickstartStructure\Quickstart2010\States\TurningHead.cs:line 161
at Quickstart2010.States.TurningHead.Update(Int64 _frameTime) in C:\Users\Admin\Documents\Visual Studio 2010\Projects\TryFix-Miyagi-QuickstartStructure\Quickstart2010\States\TurningHead.cs:line 283
at Quickstart2010.Modules.StateManager.Update(Int64 _frameTime) in C:\Users\Admin\Documents\Visual Studio 2010\Projects\TryFix-Miyagi-QuickstartStructure\Quickstart2010\Modules\StateManager.cs:line 123
at Quickstart2010.Program.UpdateScene() in C:\Users\Admin\Documents\Visual Studio 2010\Projects\TryFix-Miyagi-QuickstartStructure\Quickstart2010\Program.cs:line 87
at Quickstart2010.Program.Main() in C:\Users\Admin\Documents\Visual Studio 2010\Projects\TryFix-Miyagi-QuickstartStructure\Quickstart2010\Program.cs:line 41
InnerException:

It actually seems I can only get past the system.GUIManager.GUIs.Add(gui); line if I add a breakpoint there and wait a second before stepping through.. how odd... and then the nullref exception still occurs. I'm trying this with Mogre 1.7.3 Release version which I also used to compile Miyagi and it's addons/plugins... what am I doing wrong?

Project download (VS2010): http://216.231.135.120/TryFix-Miyagi-QuickstartStructure.zip

Update: Note that in that project the resources.cfg file is wrong (goes back one folder too much) but fixing that didn't change any of the issues. Which isn't surprising because CreateFromXml uses it's own path, and the xml passed to it includes the font's locations directly as well.

Zonder

18-10-2012 11:38:57

Try defining your font like I gave above

Beauty

27-10-2012 18:24:05

Hi Crankyslap,

it's nice to see that you are interested in Mogre and made some first steps.
Also I like that you wrote about your problems and frustration. So we have a feedback.

Mogre isn't dead. But there are always only a few people, who give support and apply improvements.
The problem of most people is the rare free time. So often people just create improvements, when they need it for their own projects.

For support of Ogre 1.8 the auto wrapping process has to be updated / modified.
Some first steps were done.
More details you find in the (very long) MogreBuilder forum topic.
For some related posts I added links to this entry of the MogreBuilder issue tracker.
If you have questions related to the MogreBuilder usage or internals, use its forum topic.

You need some information about the autowrapping process?
There is a seperate topic with useful information. Unfortunately I don't remember its name and didn't find the topic by a quick search.

I'm not shure if the QuickStart2010 project is a good choice.
In general it's a useful bundle of compiled libraries (now outdated), but if I remember right, they based on a modified version of Mogre. So if you use it, it should work. But if you combine it with other binaries (compiled against the "official" Mogre), you can have trouble.

My suggestion:
Use the MogreBuilder to wrap and compile Mogre (1.7). The usage is very easy.
So you have the latest version and useful (generated) source files. These are needed to compile some other Mogre add-ons.

The MogreBuilder can also be used to compile MogreNewt (for using the Newton library). Most of the MogreNewt build process works automatically. Only the Newton stuff you have to include manually. Unfortunately I had no time to finish the fully automatic compile process for MogreNewt.

Currently I don't have much time. So I can't anwer more detailed to your questions at the moment. Sorry.

Beauty

27-10-2012 18:31:54

Related to Miyagi:
In the past there was one (or more?) example somewhere hidden on the project page (or in the repository?).
Perhaps smiley80 updated it related to the latest Miyagi version.
If so, smiley80 could post the link to the example. (and add it to the Miyagi page of the Ogre wiki)
One more task: The repository link still points to SourceForge. This should be updated for the BitBucket repository.

By the way - there is also an Example project by Aralox, including code:
viewtopic.php?p=98806#p98806

crankyslap

11-11-2012 12:52:55

Thx for the reply Beauty, I wish I had more time to figure it all out but it looks like I'll be preoccupied for the forseeable future.. bummer ;/

By the way - there is also an Example project by Aralox, including code:
viewtopic.php?p=98806#p98806

Yeah, that's the example I'm trying to port to the QuickStart2010 project, which still isn't working. You say it has been compiled against a custom version of Mogre but it seems to work fine with the binary I downloaded from the forums (1.7.3 "Cygon build"), so I"m not too sure if that's the issue here.

Beauty

11-11-2012 20:36:52

You say it has been compiled against a custom version of Mogre but it seems to work fine
Oh dear, I think I mixed up the project names. (The discussions were 2 years ago.)
It seems so that the QuickStart2010 project is based on the official Mogre version.

The package with the modified Mogre sources is called Mogre with MyGUI, PhysX and SlimDX.
More details here.
But in general you should prefer the official Mogre.

By your attention I figured out, that (the inactive) user mstoyke made a silent update to this project.
I forgot this project, but it seems to be really useful for beginners.
Here is the changelog:
Updated the VS2010 version of the quickstart project to Ogre/Mogre 1.7.3
Removed the VS2008 version of the quickstart project
Optimized file layout for the project
Added MOIS to the project and created an input manager class
Pressing escape now quits the application


1.7.3 "Cygon build"
The Cygon builds are based on the offical Mogre code for shure.
User Cygon was only active for a very short time ("just testing Mogre"), but added several improvements to the official Mogre project.

I uploaded some new Mogre binary packages. Maybe it's useful for you:
Mogre 1.7.4 binary files (release + debug) + MogreNewt 2.35

mstoyke

13-11-2012 15:33:19

Even though I do not have time to help update Mogre to Ogre 1.8.x at the moment, is there a need for an updated Quickstart project that uses the latest 1.7.x version of Mogre?

I may have some time to update it, but won't bother if nobody really needs it.

Beauty

13-11-2012 19:53:15

Oh, nice to see that you still follow up Mogre. :D

I really don't know how many people used your QuickStartProject.
You know, in general there were many download counts for Mogre files, but the feedback was very few at all.
Give the fact that our Mogre SDK is outdated, it would be a useful alternative for Mogre beginners.

I suppose it's not much work to update it. (e.g. embedd the binaries of my Mogre 1.7.4 bundle)
So it would be nice, if you do it.

Norris

14-11-2012 00:02:29

Hi ! Sorry for my bad english.
I'm new at Mogre. I learn 3D programming with VB.Net and OpenTK, and it's hard. Since sometime I know the existence of Ogre but just discovered Mogre recently.
I was very happy to see this project and beginning to learn it. But it's hard to find all the needed infos as a new member that know nothing at C++ and can only use VB/C# examples.

For example, currently, I try to use the Terrain, but in tutorials, we can read there is an old and a new Terrain, but I can't find infos to know if the new terrain exists in the current Mogre build.
I read that we can use MogreBuilder to compile a version with this new terrain manager, but in this post, I see a link with a 1.7.4 version compiled with this tool.
Is this build contain the new terrain ?

Sorry to post here, but I'm in the same sate of mind as crankyslap.
And again sorry for my bad english.

Beauty

17-11-2012 00:53:58

Hi Norris,

thank you for your feedback and welcome to our Mogre community.
Don't worry about your english. I understood everything of your post. :wink:

Yes, there are 2 common types of terrain extensions, an old one (Terrain Scene Manager) and a new one (Ogre Terrain Component).
In Mogre 1.7 both types are supported.
In Mogre 1.8 (not available yet) the support of the Terrain Scene Manager isn't available anymore.
For both there is a Mogre Tutorial in the wiki.

As alternative to terrain extensions you have the choice to load terrain from a mesh.