Problems with version 1.12.9 Topic is solved

Problems building or running the engine, queries about how to use features etc.
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Problems with version 1.12.9

Post by Pellaeon »

Ogre Version: 1.12.9
Operating System: Win10 x64
Render System: DX9/DX11

I upgraded my program from Ogre 1.12.7 to 1.12.9. With 1.12.7 all worked fine. I use DX11 and RTSS. The scene is loaded with the new DotScene plugin.
After the upgrade 'renderOneFrame' throws an exception. The current exceptions says that Ogre cannot find "FFPLib_Common.glsl".

I didn't change anythink in my code. I also deleted the old Media folder and use the new ones. What could be the problem? As I wrote: with 1.12.7 all works fine. I am a little confused atm and have no idea where to look first for the problem.

And when switching back to DX9, I have no exception, but my scene is empty?!


Edit: These are the media folders which I load:

Code: Select all

Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/RTShaderLib/materials", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/RTShaderLib/HLSL_Cg", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/ShadowVolume", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
Excerpt from the log:
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_1weight' failed
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_1weight' failed
09:15:55: Program '7e29516ebce55cc629d101675e435831_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Program '1bf45ca5c4d79c6893c9633c5a60b4b9_FS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_2weight' failed
09:15:55: Program '72dcbbb6c5be4ba9e248607da20728d4_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_3weight' failed
09:15:55: Program 'd318d6172bb01a3d879b29e32c89d41b_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_4weight' failed
09:15:55: Program 'bf3ee6acdccf41d84cb1e34b7d83f1c7_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_1weight_twophase' failed
09:15:55: Program '4dbe69f6663aa2b7cba79494ac27debc_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_2weight_twophase' failed
09:15:55: Program 'c2a4404c46e783e460261537236ae58e_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_3weight_twophase' failed
09:15:55: Program '5aa32ba2b4e07b8a1996c0e61ed2b7e4_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_dq_skinning_4weight_twophase' failed
09:15:55: Program '2f4a11e5242a86c216bcbcb84de57b17_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_skinning_1weight' failed
09:15:55: Program 'f1f7e4a4cc84eab1248265071b3a25d7_VS' is not supported: Cannot locate resource OgreUnifiedShader.h in resource group OgreInternal.
09:15:55: Error: RTSS - creating GpuPrograms for pass 0 of 'Ogre/RTShader/shadow_caster_skinning_2weight' failed
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: Problems with version 1.12.9

Post by sercero »

Try copying the file "OgreUnifiedShader.h" to one of the media folders you are using.

The file can be found in: "ogre-1.12.9\Media\ShadowVolume\OgreUnifiedShader.h" in the OGRE3D sources.
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

Hi,

the file is already in the media/ShadowVolume dictorionary, which I also use in my program. Anyway, I copied the file to Media/RTShaderLib/HLSL_Cg, but the exception remains.

Best regards
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

What could be a reason that in DX9 mode without RTSS nothing is visible?
There is no warning or error in the log file. Background color changes as expected, but I see nothing more than the background color.

Perhaps the problem here is the same which influences the RTSS in DX11?

What changes in 1.12.8 or 1.12.9 could be a reason for this behaviour?
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

OK, for the DX9 problem, I (perhaps) have a hint. The 'SceneLoaderManager' doesn't call load because mSceneLoaders is empty.

When looking onto the attaced image: the debugger doesn't stop at the first breakpoint in the image. mSceneLoaders is empty.

When looking into the log file:
16:38:53: Loading library .\Plugin_DotScene_d.dll
16:38:53: Installing plugin: DotScene Loader
16:38:53: Plugin successfully installed
Seems the plugin is loaded. So why is mSceneLoaders empty? When starting another program with ogre 1.12.7, it's not empty and load is called.
Attachments
SceneLoader.jpg
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

scene loading is now done through the Codec API, SceneLoaderManager is a dummy for backwards compatibility.
The only visible change here is that ResourceGroupManager::getWorldResourceGroupName is used as the resource group instead of the group that you pass to the loader. Maybe this affects you and it does not find your files.

The RTSS is now using GLSL shaders everywhere - consequently you must add the RTShaderLib/GLSL folder, even when using D3D11.

Pro-tip: for an overview of changes happening in Ogre, one can look at the News page: https://www.ogre3d.org/2020/07/26/ogre- ... -roundup-6
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

paroj wrote: Tue Nov 10, 2020 5:38 pm scene loading is now done through the Codec API, SceneLoaderManager is a dummy for backwards compatibility.
The only visible change here is that ResourceGroupManager::getWorldResourceGroupName is used as the resource group instead of the group that you pass to the loader. Maybe this affects you and it does not find your files.

The RTSS is now using GLSL shaders everywhere - consequently you must add the RTShaderLib/GLSL folder, even when using D3D11.

Pro-tip: for an overview of changes happening in Ogre, one can look at the News page: https://www.ogre3d.org/2020/07/26/ogre- ... -roundup-6
Hi,

thanks for the hints. Adding the GLSL folder to the resources eliminated the exception in DX11. Now it runs without a crash.
But now, my model is only white/grey-colored. All colors are gone?! Are there some changes regarding the materials? The models and materials worked fine with 1.12.7 and I changed nothing on the model/material data.

Regarding DX9: I still see nothing. Seems the guess with the DotSceneLoader was wrong. When looking into the debug output, it says that my meshes are loaded. So I suppose,perhaps it is a problem with the material (because of the material problem also with DX11?).

Regarding the pro-tip: I always look in the change log when a new version is released. The things you wrote are not deducible from the changelog at all. E.g. there is no clue that the DotSceneLoader is a codec now (furthermore, it is still named "Plugin_DotScene" and not "Codec_DotScene").

And of course I noticed that there are changes in the RTSS. But there is again no clue that this influences the needed resources. For you it's obvious, you are one of the Ogre developers. But it's not obvious for users of the SDK.

Regarding the media folder: In my opinion, the structure of the media folder is sub optimal. It mixes resources which are necessary for integral parts of the SDK with resources which are only necessary to run the samplebrowser. A distinction would be very nice. Because when using Ogre for my own applications, I don't want to have the samplebrowser resources.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

Pellaeon wrote: Wed Nov 11, 2020 9:08 am thanks for the hints. Adding the GLSL folder to the resources eliminated the exception in DX11. Now it runs without a crash.
But now, my model is only white/grey-colored. All colors are gone?! Are there some changes regarding the materials? The models and materials worked fine with 1.12.7 and I changed nothing on the model/material data.
you are likely calling initialiseAllResourceGroups before all resource locations are added, so materials are not properly created - or registering the scene manager with the RTSS too late, which has the same outcome.
Pellaeon wrote: Wed Nov 11, 2020 9:08 am Regarding the pro-tip: I always look in the change log when a new version is released. The things you wrote are not deducible from the changelog at all. E.g. there is no clue that the DotSceneLoader is a codec now (furthermore, it is still named "Plugin_DotScene" and not "Codec_DotScene").
you can still use the SceneLoaderManager API to access DotSceneLoader, and indeed this is not part of your issues..
Pellaeon wrote: Wed Nov 11, 2020 9:08 am And of course I noticed that there are changes in the RTSS. But there is again no clue that this influences the needed resources. For you it's obvious, you are one of the Ogre developers. But it's not obvious for users of the SDK.
the factored out media files were mentioned in the release notes:
https://github.com/OGRECave/ogre/blob/m ... edia-files

altough I must admit that the word "stable" is misleading and the actual location was not mentioned, which is:
https://github.com/OGRECave/ogre/tree/master/Media
(as opposed to Samples/Media)

Note that Media/ShadowVolume is actually always needed and will be named Core in Ogre 1.13.
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

paroj wrote: Wed Nov 11, 2020 1:15 pm you are likely calling initialiseAllResourceGroups before all resource locations are added, so materials are not properly created - or registering the scene manager with the RTSS too late, which has the same outcome.
This is my current RTSS init. It is called before the scene is loaded.

Code: Select all

bool OgreManager::initRTShaderSystem()
{
	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/RTShaderLib/GLSL", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/RTShaderLib/HLSL_Cg", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/RTShaderLib/materials", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("./materials/Media/ShadowVolume", "FileSystem", Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
	
	//
	if (!Ogre::RTShader::ShaderGenerator::initialize())
		return false;

	m_RtssIsInitialized = true;

	//
	auto shaderGenerator = Ogre::RTShader::ShaderGenerator::getSingletonPtr();
	
	shaderGenerator->setShaderCachePath("./materials/Media/RTShaderLib/cache");
	shaderGenerator->addSceneManager(m_pSceneMng);	

	//
	m_techListener = std::make_unique<OgreBites::SGTechniqueResolverListener>(shaderGenerator);
	Ogre::MaterialManager::getSingleton().addListener(m_techListener.get());

	//
	m_pRenderWindow->getViewport(0)->setMaterialScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);

	//TEST
	//Ogre::RTShader::RenderState* schemRenderState = shaderGenerator->getRenderState(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);
	//Ogre::RTShader::SubRenderState* perPixelLightModel = shaderGenerator->createSubRenderState(Ogre::RTShader::PerPixelLighting::Type);
	//schemRenderState->addTemplateSubRenderState(perPixelLightModel);

	return true;
}
After this code Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups() is called.

Later, I load my model. I use a new resoruce group for it and not the initAllResourceCall.

Code: Select all

void Machine_tool_graphic::load_machine_tool(const std::wstring& scene_file)
{
	clear();

	try
	{
		//set resource path
		auto scenePath = std::filesystem::absolute(std::filesystem::path(scene_file));
		m_res_group_name = scenePath.filename().string();
		m_res_group_name_devices = "Device Group";

		//create and initialize resources
		ResourceGroupManager& resMng = ResourceGroupManager::getSingleton();
		resMng.createResourceGroup(m_res_group_name);
		resMng.addResourceLocation(scenePath.parent_path().string(), "FileSystem", m_res_group_name, true);
		resMng.initialiseResourceGroup(m_res_group_name);
		//resMng.loadResourceGroup(m_res_group_name);

		resMng.createResourceGroup(m_res_group_name_devices);
		resMng.initialiseResourceGroup(m_res_group_name_devices);

		//use scene loader to import the machine tool data
		m_p_machine_tool =  m_ogre_mng.getSceneManager()->getRootSceneNode()->createChildSceneNode(m_res_group_name);		

		//
		Ogre::SceneLoaderManager::getSingleton().load(tuc::helpers::to_utf8(scene_file), m_res_group_name, m_p_machine_tool);
	}
	catch(Ogre::Exception& ex)
	{
		if (m_err_handler)
			m_err_handler((ogre_graphic_consts::err_msg_graphic_err + (ogre_graphic_consts::err_msg_load_file + scene_file + L". " + tuc::helpers::to_utf16(ex.getDescription()))).c_str());
	}
}
Yet, I didn't use loadResourceGroup which works fine (at least till 1.12.7). In 1.12.9 I tried with and without loadResourceGroup, but no difference: with DX11 all is with white material, with DX9 there is no model visible (in DX9 RTSS is disabled, here I use FFP).

The Log file says, that the material file is loaded (14:39:15: Parsing script N30.material). I added the file in the attachments. The IDs are strange (because of the old 3dsmax Ogremax exporter) but they worked till yet.
Attachments
N30.material
(10.87 KiB) Downloaded 50 times
Ogre.log
(15.55 KiB) Downloaded 63 times
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

everything look right so far. Can you provide a screenshot of what is rendered?

Also, do you get the same error when displaying the mesh using ogre-meshviewer?
https://github.com/OGRECave/ogre-meshviewer
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

paroj wrote: Wed Nov 11, 2020 5:17 pm everything look right so far. Can you provide a screenshot of what is rendered?

Also, do you get the same error when displaying the mesh using ogre-meshviewer?
https://github.com/OGRECave/ogre-meshviewer
I used the prebuild from here: https://github.com/OGRECave/ogre-meshviewer/releases.
I tested several mesh files and the mesh viewer diplays them properly. Don't know if the whole scene would work because the viewer doesn't load scene files. But I suppose so.

The attached image shows a screenshot from one of the mesh files within the OgreMeshViewer. The model is straightforward and has only simple materials (no shaders and in this case also no textures).
Attachments
Screen.jpg
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

and how is it rendered in your tool?

I am currently out of ideas what else could go wrong. It must be something with the Ogre init sequence though. Which you will have to compare with OgreMeshViewer (aka. ApplicationContext).
Note that the OgreMeshViewer 20.10 release uses a master snapshot for some performance fixes, however 20.09 uses vanilla Ogre 1.12.9.
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

paroj wrote: Wed Nov 11, 2020 6:06 pm and how is it rendered in your tool?

I am currently out of ideas what else could go wrong. It must be something with the Ogre init sequence though. Which you will have to compare with OgreMeshViewer (aka. ApplicationContext).
Note that the OgreMeshViewer 20.10 release uses a master snapshot for some performance fixes, however 20.09 uses vanilla Ogre 1.12.9.
Ok, I also tested 20.09, same result.

"how it is rendered in your tool"
My tool is build on wxWidgets and in one of the widgets I use Ogre. So I use an external renderwindow system, no SDL and no ApplicationContext.
I initialize root, scenemanager etc. at the beginning. After this I load my scene (code see previous post). For this, I use the DotSceneLoader, because my scene is described by a SCENE file. The main window invalidates the ogre window control and in onPaint I call renderOneFrame.
I have no special listeners (only one to handle multiple defined materials of the OgreMax export). So all is common, no tricky things.

One thing I noticed in DX11 with RTSS: I can add a material in the SCENE file to an entity. When I do this, the entity is rendered with the material. So the material is applied to all sub entites. Therefore, I think that my material resources are loaded properly (otherwise this shouldn't work either).
When I outcomment lights, the whole scene is grey. So lightning also works. It seems that all entites have the same material, althrough the entities defines different materials within the mesh files.

Are there some changes in Ogre 1.12.8/1.12.9 regarding the mesh loading?

And still DX9 without RTSS: I see nothing of my model.



EDIT As you can see in the attached image: after loading my scene with the DotSceneLoader, the debugged entity has BasicWhite for all sub entites as material. But this isn't right. You can see the right materials in the subentites entry in the XML file (I know that the DotsceneLoader doesn't parse the subentity entries. But within the MESH file the materials are also set).
Attachments
Screen.jpg
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

Ok,

I debugged through the mesh loading. The mesh loader reads the correct material name for the sub mesh and then it searches in the group "General" for the material. The MaterialManager doesn't find the proper material and returns an empty material. Therefore, I suppose, I get the BasicWhite in DX11.

When calling the DotSceneLoader I pass my own resource group as argument. But this seems not enough?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

paroj wrote: Tue Nov 10, 2020 5:38 pm The only visible change here is that ResourceGroupManager::getWorldResourceGroupName is used as the resource group instead of the group that you pass to the loader. Maybe this affects you and it does not find your files.
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

Ok, I thing I got the problem. It's the change from Plugin to Codec of the DotSceneLoader.
When calling the Codec, the group name isn't forwarded (see attached image).

You wrote that it is still possible to have the DotSceneLoader as plugin. What must I do to to this?
Attachments
Screen.jpg
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

paroj wrote: Thu Nov 12, 2020 2:14 pm
paroj wrote: Tue Nov 10, 2020 5:38 pm The only visible change here is that ResourceGroupManager::getWorldResourceGroupName is used as the resource group instead of the group that you pass to the loader. Maybe this affects you and it does not find your files.
Now I understand what you mean. In the post where you mentioned it first I didn't see the correlation to the source, because there is no 'getWorldResourceGroupName ' in it.

so first: how can I fall back to the old behaviour?

second: wouldn't it be better to have the user-defined group also in the codec variant? Otherwise users of DotSceneLoader must use the resource group "General" all the time?!
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

So DX11 with RTSS works. I create an instance of the following class before my load call

Code: Select all

class LocalDotSceneLoaderRegister
{
	public:
		//!
		LocalDotSceneLoaderRegister()
		{
			Ogre::SceneLoaderManager::getSingleton().registerSceneLoader("DotScene Loader", { ".scene" }, &m_loader);
		}

		//!
		~LocalDotSceneLoaderRegister()
		{
			Ogre::SceneLoaderManager::getSingleton().unregisterSceneLoader("DotScene Loader");
		}
		

	private:
		//!
		Ogre::DotSceneLoader m_loader;
}

. . .

LocalDotSceneLoaderRegister loader;
Ogre::SceneLoaderManager::getSingleton().load(tuc::helpers::to_utf8(scene_file), m_res_group_name, m_p_machine_tool);
Regarding this I have a wish for future version. Either to route the group name through the codec API or to go back to the plugin version of the DotSceneLoader. But the current solution is more like a design bug: having the group name parameter which is ignored at all.
And wouldn't it be better to throw an exception in the case of a not found material? Or at least to do an entry in the log file?

The DX9 renderer (without RTSS) still renders nothing of my model. So this is another issue.
Any ideas where I could search for the problem? If the cameras would be wrong I would expect the same issue with DX11, because the code is the same. I only change teh rendersystem and I doesn't load RTSS for DX9.

At last: thank you very much for your help :!: Very appreciated :)
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

Pellaeon wrote: Thu Nov 12, 2020 2:33 pm
paroj wrote: Thu Nov 12, 2020 2:14 pm
paroj wrote: Tue Nov 10, 2020 5:38 pm The only visible change here is that ResourceGroupManager::getWorldResourceGroupName is used as the resource group instead of the group that you pass to the loader. Maybe this affects you and it does not find your files.
Now I understand what you mean. In the post where you mentioned it first I didn't see the correlation to the source, because there is no 'getWorldResourceGroupName ' in it.

so first: how can I fall back to the old behaviour?
you can call setWorldResourceGroupName to specify the group you want. I will patch the loader API to do so for the next release.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

Pellaeon wrote: Thu Nov 12, 2020 4:04 pm Regarding this I have a wish for future version. Either to route the group name through the codec API or to go back to the plugin version of the DotSceneLoader. But the current solution is more like a design bug: having the group name parameter which is ignored at all.
And wouldn't it be better to throw an exception in the case of a not found material? Or at least to do an entry in the log file?
fixed in:
https://github.com/OGRECave/ogre/pull/1773
Pellaeon wrote: Thu Nov 12, 2020 4:04 pm The DX9 renderer (without RTSS) still renders nothing of my model. So this is another issue.
Any ideas where I could search for the problem? If the cameras would be wrong I would expect the same issue with DX11, because the code is the same. I only change teh rendersystem and I doesn't load RTSS for DX9.
maybe this?
viewtopic.php?f=2&p=549302
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

paroj wrote: Thu Nov 12, 2020 7:53 pm
Pellaeon wrote: Thu Nov 12, 2020 4:04 pm The DX9 renderer (without RTSS) still renders nothing of my model. So this is another issue.
Any ideas where I could search for the problem? If the cameras would be wrong I would expect the same issue with DX11, because the code is the same. I only change teh rendersystem and I doesn't load RTSS for DX9.
maybe this?
viewtopic.php?f=2&p=549302
Yeah, you're my hero of the day :D This works!!! Thank you very much. Now, all works like expected.


But perhaps one last question about your change in the scene loader. Wouldn't it be better to store the old global resource group temporarily, setting the new one, calling the codec and restoring the original value after the call of the codec?


Best regards
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Problems with version 1.12.9

Post by Pellaeon »

@paroj: Atm I build Ogre 1.12.11 and I saw that there is still the fix you did for me to route the user group name to the scene loading.

While this fix works fine for me, it could produce unexpected side effects for people who rely on the word group. The scene loader changes the world group permanent. But I suppose a user of the scene loader does not expect this, because it's hidden in the library.

Therefore, I would suggest to restore the old resource group at the end of the scene loading:

Code: Select all

// set resource group for the next call
auto oldGroupName = ResourceGroupManager::getSingleton().getWorldResourceGroupName();

ResourceGroupManager::getSingleton().setWorldResourceGroupName(groupName);
// getCodec will throw on failure
Codec::getCodec(ext.substr(1))->decode(stream, rootNode);

ResourceGroupManager::getSingleton().setWorldResourceGroupName(oldGroupName);
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

thats a deprecated codepath anyway so I am hesitant to put any superfluous effort in it.

Thanks to sercero, we have now some documentation on how to use that without deprecated paths:
https://github.com/OGRECave/ogre/tree/m ... e-dotscene
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: Problems with version 1.12.9

Post by sercero »

Hello,

Sorry for reviving this thread but I came across this problem now that I'm playing with texture shadows.

I understand that I have to include the "Media\ShadowVolume" folder.

But I want to understand if it is really necessary if we are using this type of shadows: SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED (or modulative).

I think that it is not strictly necessary and perhaps this should be changed in "OgreSceneManager.cpp"

Code: Select all

    if (isShadowTechniqueInUse())
    {
        // Prepare shadow materials
        initShadowVolumeMaterials();
    }
To something like this:

Code: Select all

    if (isShadowTechniqueInUse() && !isShadowTechniqueIntegrated())
    {
        // Prepare shadow materials
        initShadowVolumeMaterials();
    }
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Problems with version 1.12.9

Post by paroj »

if you are using integrated shadows, you dont need most of that - except for the default shadow caster material: "Ogre/TextureShadowCaster".
Post Reply