How to start with Ogre 2.0?

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
retron
Gnoblar
Posts: 12
Joined: Mon Apr 13, 2015 4:46 pm

How to start with Ogre 2.0?

Post by retron »

After a long time working on Leadwerks engine and other proprietary software, i decided to dedicate some time to the Ogre engine and, maybe, migrate some of my projects to it. However, i wasn't able to find any good books, tutorials or documentation on modern Ogre. Where i can find this? Also, any good samples to work with?

User avatar
Thyrion
Goblin
Posts: 224
Joined: Wed Jul 31, 2013 1:58 pm
Location: germany
x 8

Re: How to start with Ogre 2.0?

Post by Thyrion »

retron wrote: any good samples to work with?
https://bitbucket.org/sinbad/ogre/src/c ... 0/?at=v2-1

retron
Gnoblar
Posts: 12
Joined: Mon Apr 13, 2015 4:46 pm

Re: How to start with Ogre 2.0?

Post by retron »

Everything else is the same? What has changed since 1.7? Can i buy a book for 1.7 and easily migrate to 2.0?

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 134

Re: How to start with Ogre 2.0?

Post by c6burns »

retron wrote:Everything else is the same? What has changed since 1.7? Can i buy a book for 1.7 and easily migrate to 2.0?
No, you cannot. There are two options, in my opinion. You start with 2.1 and the SDL samples that come with it ... or ... you start with 1.10 and use the samples that ship with that, and the tutorials and framework from the wiki. If you are uncomfortable with integrating a library without a companion book or a collection of step-by-step tutorials, then 2.x is not a good choice for you at this time.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4262
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 832
Contact:

Re: How to start with Ogre 2.0?

Post by dark_sylinc »

It may be worth noting there is a manual at "Docs/2.0/Ogre 2.0 Porting Manual DRAFT.odt"
Open it with OpenOffice or LibreOffice (not MS Word) and export it to PDF for nice viewing.

Also, 2.1 is drastically different from 2.0; 2.0 is relatively similar to 1.x as it uses many similar interfaces, but with higher performance for scene management and frustum culling, and a different Compositor system.
However, 2.1 has massive performance improvements due to its RenderSystem & RenderQueue overhaul; and while it is very powerful & flexible, it is a work in progress and has some rough edges and missing features (including dead code that will not work).
IMHO using 2.1 is worth it (though I'm biased...), but it depends on your objectives, constraints and expectations.

From this news article:
Our main focus of development will be on Ogre 2.1. We will only be providing basic bug fixes for Ogre 2.0 to be able to dedicate more resources to Ogre 2.1.

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 47

Re: How to start with Ogre 2.0?

Post by syedhs »

darksylinc,

Lets say that for the moment, I cannot migrate to 2.x due to the software is now already finished and I cannot afford the time to migrate the existing source code to 2.1. However, I need to squeeze performance juice from the current software - is it not too difficult to extract code portion relating to scene performance and frustum culling and merge them into mine? Currently we are using 1.7.4.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me

al2950
OGRE Expert User
OGRE Expert User
Posts: 1216
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 150

Re: How to start with Ogre 2.0?

Post by al2950 »

syedhs wrote:darksylinc,

Lets say that for the moment, I cannot migrate to 2.x due to the software is now already finished and I cannot afford the time to migrate the existing source code to 2.1. However, I need to squeeze performance juice from the current software - is it not too difficult to extract code portion relating to scene performance and frustum culling and merge them into mine? Currently we are using 1.7.4.
That is what 2.0 is really. I converted my engine to 2.0 in a couple of days, 2.1 took longer. If you use a lot of your own RTT's then it may take a little longer due to the new compositor system, although once youve done one it should be fairly simple.

If I was you I would not try and back port the changes as the culling changes are not simply localised to one class, but spread throughout, I would however spend 3-5 days trying to port to Ogre 2.0. If after that you are still having issues I would leave it, for now.

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 47

Re: How to start with Ogre 2.0?

Post by syedhs »

al2950 wrote:
syedhs wrote: That is what 2.0 is really. I converted my engine to 2.0 in a couple of days, 2.1 took longer. If you use a lot of your own RTT's then it may take a little longer due to the new compositor system, although once youve done one it should be fairly simple.
Thanks for the response als2950.. :)
Entities count in my scene can be obscenely big, sometimes reaching 5000, and when coupled with 3 render windows, 3 viewports - the scenenode iterations are becoming a lot slower. I have done simple optimization like changing std::map<String,SceneNode*> to std::vector<SceneNode*> but it only yields about 20% performance increase. I am confident if done correclly, I can get more than 100% performance increase.

Probably, what I am looking for is:-
1) to increase data cache locality of scenenodes, probably the faster way is to have memory pooling for position and quaternion of each scenenode, so that they are adjacent to each other in memory.
2) and to mark certain nodes as static (therefore, not needing to calculate boundingbox everytime..)
3) lastly to multithread scenenodes iterations.

p/s: Sorry to hijack a bit the thread.. :mrgreen:
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me

al2950
OGRE Expert User
OGRE Expert User
Posts: 1216
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 150

Re: How to start with Ogre 2.0?

Post by al2950 »

2&3 are relatively easy :) (and part of Ogre 2.0)

1 is simple in theory, but requires a fair amount of thought and requires more changes than just SceneNode and SceneManager. You could back port these changes or do them your self, but I would guarantee it would be quicker for you to upgrade to Ogre 2.0.

Then there is instancing, I would assume that there are not 5000 unique entities? If not, instancing would help a lot, I realise you will not being rendering them all at a time, but even 10% of them would create more draw calls then I would like to give to old versions of Ogre!

FYI Ogre 2.1 is very different, but solves the many draw call issue, and it is very impressive. It will automatically batch entities up into single draw call, even if they have different material properties. If you upgrade to 2.0, stepping up to 2.1 is much easier and, although its very much in a WIP state, I would highly recommend others to creates a parallel development stream with it.

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 47

Re: How to start with Ogre 2.0?

Post by syedhs »

al2950 wrote: You could back port these changes or do them your self, but I would guarantee it would be quicker for you to upgrade to Ogre 2.0.
Probably I will go down that route - upgrade to 2.0.
Are 3rd party dependencies (like gui and particle universe) need to be ported too? I saw several threads on porting those libraries to 2.1 (I am not sure about 2.0).
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me

al2950
OGRE Expert User
OGRE Expert User
Posts: 1216
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 150

Re: How to start with Ogre 2.0?

Post by al2950 »

syedhs wrote: Are 3rd party dependencies (like gui and particle universe) need to be ported too? I saw several threads on porting those libraries to 2.1 (I am not sure about 2.0).
Are yes sorry, that is a very good point. MyGui has been ported to 2.0, and I ported PU to 2.0. As far as I am aware they work fine, but I have to admit I have not tested them thoroughly. I have ported PU to 2.1, but it has some rendering issues currently, and I plan to port MyGui to 2.1 before May. As for other libraries I am not sure, but I would check your dependencies before porting. Many are very easy to port, some not so much like PU!

Post Reply