Changes in Terrain API 14 vs 13 [Ogitor]

Problems building or running the engine, queries about how to use features etc.
K0b0ld
Gnoblar
Posts: 6
Joined: Fri Dec 20, 2024 6:33 pm
x 1

Changes in Terrain API 14 vs 13 [Ogitor]

Post by K0b0ld »

I'm trying to compile Ogitor with Ogre 14.3, but there are significant changes between API 13 and 14.

ogitor/Dependencies/OgreTerrainConverter/source/OgreTerrainConverter.cpp

Code: Select all

bool OgreTerrainConverter::readLayerDeclaration(StreamSerialiser& stream, TerrainLayerDeclaration& targetdecl)
{
	...
	targetdecl.samplers.resize(numSamplers);
	...
	targetdecl.elements.resize(numElems);
	...
}

samplers and elements are no longer members of TerrainLayerDeclaration.
TerrainLayerDeclaration itself is now a list of samplers and I can't seem to find out what happened to the elements.

TerrainLayerSamplerSemantic is missing, too. It is now "do not use".

There are some more errors related to Camera and Light, but I found the required changes in the Deprecated List of the API documentation.
However, I need a hint in the right direction for the Terrain stuff, please.

paroj
OGRE Team Member
OGRE Team Member
Posts: 2126
Joined: Sun Mar 30, 2014 2:51 pm
x 1140

Re: Changes in Terrain API 14 vs 13 [Ogitor]

Post by paroj »

K0b0ld
Gnoblar
Posts: 6
Joined: Fri Dec 20, 2024 6:33 pm
x 1

Re: Changes in Terrain API 14 vs 13 [Ogitor]

Post by K0b0ld »

Thanks. I didn't notice that there is an ogre14 branch.

K0b0ld
Gnoblar
Posts: 6
Joined: Fri Dec 20, 2024 6:33 pm
x 1

Re: Changes in Terrain API 14 vs 13 [Ogitor]

Post by K0b0ld »

I managed to compile Ogitor (ogre14 branch) on Windows 10 in Visual Studio 2022 and after several hours of debugging it even loads the sample project. However, nothing is rendered.

Image

Here are some notes I took:

  • Ogitor uses nodeless positioning. See ogre/Docs/13-Notes.md for required changes.

  • Ogitor defaults to the D3D9 renderer which will crash in TerrainMaterialGeneratorB.cpp as it doesn't get a shader generator (at least there's a 'todo' comment there, hahaha). Use GL3+ oder D3D11.

  • I had to switch to C++14 because C++17 removed the bind1st() functionality.

  • All meshes in editorResources/ had to be upgraded with OgreMeshUpgrader.

  • .fontdef and .overlay files had to be edited because of deprecated, unsupported or changed symbols.

  • There are probably dozens of other bugs and crashes left.

That was my experience with Ogitor. I didn't even get to see the sample scene. Time to move on and build my own editor.

Wish you all a happy new year.

paroj
OGRE Team Member
OGRE Team Member
Posts: 2126
Joined: Sun Mar 30, 2014 2:51 pm
x 1140

Re: Changes in Terrain API 14 vs 13 [Ogitor]

Post by paroj »

K0b0ld wrote: Mon Dec 30, 2024 5:25 pm

[*] Ogitor defaults to the D3D9 renderer which will crash in TerrainMaterialGeneratorB.cpp as it doesn't get a shader generator (at least there's a 'todo' comment there, hahaha). Use GL3+ oder D3D11.

GL3+/ D3D11 wont work as Ogitor does not use the RTSS. GL1 should work.

K0b0ld wrote: Mon Dec 30, 2024 5:25 pm

Time to move on and build my own editor.

this might be easier as the Ogitor code is not very clean and quite old nowadays. You could start with:
https://github.com/OGRECave/ogre-meshviewer

User avatar
Crystal Hammer
Orc
Posts: 402
Joined: Sat Jun 23, 2007 5:16 pm
x 112

Re: Changes in Terrain API 14 vs 13 [Ogitor]

Post by Crystal Hammer »

K0b0ld wrote: Mon Dec 30, 2024 5:25 pm

That was my experience with Ogitor. I didn't even get to see the sample scene. Time to move on and build my own editor.

Yeah, well clearly :). I wish you success.
I did start my own in like 2011 BTW of Stunt Rally and it still is the best tool for me/us today. I also moved it to OgreNext not so long ago.

Wow Ogitor, I remember using it first and even tried writing a plugin for it, sooo long ago.
Felt like way much more work, instead of doing it all myself in one program.