Page 1 of 3

[Ogre 2] Porting Particle Universe

Posted: Mon Nov 10, 2014 8:26 pm
by al2950
I am currently updating particle universe to ogre 2.0, however it uses SceneManager::has*** functions which have been removed from ogre 2.0.

Now I know movable objects are no longer stored in a map with a string key, but is there an easy way to check an object exists before you delete it from scene manger, or can you try and delete an object that no longer exists without any adverse effects?

Remember I am updating a 3rd party lib and I don't know why it has checks in it before deleting objects but iam assuming they are there for a reason.

Re: [Ogre 2] How to check an object exists in scene manager

Posted: Mon Nov 10, 2014 10:26 pm
by Transporter
al2950 wrote:I am currently updating particle universe to ogre 2.0, however it uses SceneManager::has*** functions which have been removed from ogre 2.0.

Now I know movable objects are no longer stored in a map with a string key, but is there an easy way to check an object exists before you delete it from scene manger, or can you try and delete an object that no longer exists without any adverse effects?

Remember I am updating a 3rd party lib and I don't know why it has checks in it before deleting objects but iam assuming they are there for a reason.
Nice work! There are a few ways to solve that problem. You can ...
  • ... create your own has*** function by recursive searching the node tree (you could provide a name to an object with setName function)
  • ... create a map where you store names and object ids and search for them (it look like there is a bug in that function: https://ogre3d.atlassian.net/browse/OGRE-451)
  • ... invent a new way for handling

Re: [Ogre 2] How to check an object exists in scene manager

Posted: Wed Nov 12, 2014 5:03 pm
by al2950
I dont want to play around with Particle Universe too much as I am not really sure of its architecture and so dont want to have to add extra "Memory Management".

I was thinking of adding some functions back into SceneManager, but the point of them being removed is partly to put the responsibility on to the creator to manager them. So from that point of view I am going to remove the checks from PU as it creates it and it should delete it, other bits of code can not get hold of the objects easily and should always go through PU to manipulate or delete it.

If anyone reading this has some objections to this point of view, please let me know!

Re: [Ogre 2] Porting Particle Universe

Posted: Wed Nov 12, 2014 8:32 pm
by al2950
Sigh.... Can, open.... worms everywhere! There is a lot more to do than I thought :cry:

PU uses various Ogre objects like BillboardSet, but does not create them via Ogre, and so Ogre has no idea about them leaving PU to manage the rendering of them, which I must admit I dont like.

Anyway PU uses _notifyCurrentCamera quite alot, mainly to sort particles and choose a LOD technique and some other bits and bobs. Looking through the Ogre 2.0 code can I assume I can move that code to _updateRenderQueue :?:, as it now contains a camera pointer and seems the logical place to do these things

Re: [Ogre 2] Porting Particle Universe

Posted: Sun Dec 21, 2014 2:08 pm
by c6burns
How did I not see this thread before? :o Thanks for pointing it out to me. You probably won't love the work I've done getting PU running in my own Ogre 2.0 framework, but I will at least share what code and what little knowledge about PU I do have :)

Here's my fork ... the 2.0 branch does currently build against the 2.0 CTP, but there is much that does not work:
https://github.com/c6burns/particleuniverse

Now ... I should address the terrible hackery that has been performed on this poor helpless library. I added a camera and scenemanager member to the ParticleSystemManager singleton. I then proceed to use this to patch up the MovableObjects that are created in places within PU where there is no access to the SceneManager (eg. inside renderers or attachables). It's good in that now I have it building and working, but its really bad in that now you are limited to the one SceneManager you assign in ParticleSystemManager. It would have been smarter to pass the SceneManager down into the Renderers from the Technique (which keeps a pointer to it), but I went for the superfastbadprogramming route. It's quite likely that the only working renderer is the BillboardRenderer, but it's the only one I use and thus the only one I needed to update.
al2950 wrote:PU uses various Ogre objects like BillboardSet, but does not create them via Ogre, and so Ogre has no idea about them leaving PU to manage the rendering of them, which I must admit I dont like.
You really don't have a choice about this without a major overhaul. Let's say for example you create all your BillboardSets using the SceneManager ... then you switch scenes and call SceneManager::clearScene. Blammo, all your templates just got flushed down the drain. PU creates a template as it parses the scripts during resource loading and then uses it to copy attributes to new ParticleSystems. So the next time you go to create a ParticleSystem from template after calling clearScene you will be crashing, because the SceneManager has cleared out all of your MovableObjects. I learned this by trying it :lol: oops

Also, in the case of BillboardSets, Ogre is designed to accomodate particle systems that manage their own billboards within the set. This is what the externalDataSource param in the constructor is for. Ogre will let you create a BillboardSet and manage the billboards yourself by setting externalDataSource=true and calling:
1) BillboardSet::beginBillboards
2) loop through particles calling BillboardSet::injectBillboard
3) BillboardSet::endBillboards

This is how PU has worked in the past and it still works in 2.0. I also briefly experimented with letting the BillboardSet manage my billboards by setting externalDataSource=false and using BillboardSet::createBillboard. This also works but I switched back to PU's original way of doing it.

Anyway ... in order to get the code running I made a lot of hacks in my fork. But I labelled each with "// hack 2.0" so that I'd be able to track down the bullet wounds from my wild running and gunning if a certain feature didnt work later on. Hopefully this helps you or someone else do a better job of porting this great library :)

Re: [Ogre 2] Porting Particle Universe

Posted: Sun Dec 21, 2014 3:16 pm
by al2950
c6burns wrote:How did I not see this thread before? :o Thanks for pointing it out to me.
No problem!
c6burns wrote:
al2950 wrote:PU uses various Ogre objects like BillboardSet, but does not create them via Ogre, and so Ogre has no idea about them leaving PU to manage the rendering of them, which I must admit I dont like.
You really don't have a choice about this without a major overhaul. Let's say for example you create all your BillboardSets using the SceneManager ... then you switch scenes and call SceneManager::clearScene. Blammo, all your templates just got flushed down the drain. PU creates a template as it parses the scripts during resource loading and then uses it to copy attributes to new ParticleSystems. So the next time you go to create a ParticleSystem from template after calling clearScene you will be crashing, because the SceneManager has cleared out all of your MovableObjects. I learned this by trying it :lol: oops
This is certainly true for the billboard renderer, however do you know why other renderers like the Beam renderer create a billboard chain via the scene manager instead of creating one by its self like in the billboard renderer?

I am trying very hard not to be hacky, but after I get everthing working I think there are a few bits I would come back to and sort out. I have made quite an effort to understand the PU code base and there are defeinatly a few things I would like to improve given what I have learnt of dark_sylinc!

Also apologise to anyone waiting on me to port this, hopefully there are none. However home life is very busy and I am not allowed to officially work on anything regarding Ogre 2.0 at work until Ogre 2.0 final is released, so I work on this whilst waiting for other projects to compile! Or at least that is what I tell work :D

Re: [Ogre 2] Porting Particle Universe

Posted: Sun Dec 21, 2014 3:31 pm
by c6burns
The BeamRenderer doesn't create anything in the SceneManager in its constructor. It waits until the Technique calls _prepare. I assume BillboardRenderer could also be refactored to work this way, which is how I would consider doing it "the right way" because inside _prepare you are passed the Technique as a parameter, which gives you access to the SceneManager specific to that ParticleSystem. Then you avoid my whole ugliness with the SceneManager in a Singleton.

Take a loot at BillboardRenderer::copyAttributesTo ... this gets called to copy a templated Renderer into a new instantiated one that gets added to your scene. BillboardRender uses its BillboardSet member to store settings which get copied. BeamRenderer doesn't do that, which is what allows it to create its BillboardSet later on and use SceneManager::createBillboardChain/destroyBillboardChain to manage it.

Re: [Ogre 2] Porting Particle Universe

Posted: Sun Dec 21, 2014 3:48 pm
by al2950
c6burns wrote:The BeamRenderer doesn't create anything in the SceneManager in its constructor. It waits until the Technique calls _prepare. I assume BillboardRenderer could also be refactored to work this way, which is how I would consider doing it "the right way" because inside _prepare you are passed the Technique as a parameter, which gives you access to the SceneManager specific to that ParticleSystem. Then you avoid my whole ugliness with the SceneManager in a Singleton.

Take a loot at BillboardRenderer::copyAttributesTo ... this gets called to copy a templated Renderer into a new instantiated one that gets added to your scene. BillboardRender uses its BillboardSet member to store settings which get copied. BeamRenderer doesn't do that, which is what allows it to create its BillboardSet later on and use SceneManager::createBillboardChain/destroyBillboardChain to manage it.
Those where my thoughts to. I think I will carry on as I am with 2 separate mem managers, one for templates & one for actual systems. Then I will look at refactoring it after everything else is working.

Thanks for your input :)

Re: [Ogre 2] Porting Particle Universe

Posted: Fri Mar 13, 2015 12:11 am
by al2950
Good news! I have finished porting PU to Ogre 2.0 & Ogre 2.1. You can find the repos here;
https://github.com/scrawl/particleuniverse

Bad news.... BillboardSet and BillboardChain do not work properly, which means most particle system do not work :(. I am currently not interested in fixing them as I would prefer to spend the time on a more modern approach to rendering particles, but if anyone wants to tackle it please do. I am not sure if the issue is in PU or Ogre (Its most likely Ogre).

There are a numbers of things that I do not like about the current state of PU, mostly how it gets updated. Also the updating of particles could be made a lot faster with not too much effort using DOD techniques and of course multiple threads.

And of course there are probably a whole load of other bugs. But my priority at the moment is to get my engine up and running, even if some of the effects dont look right yet.

Next stop MyGUI :D

Re: [Ogre 2] Porting Particle Universe

Posted: Fri Mar 13, 2015 12:29 am
by dark_sylinc
Mmmm... BillboardSet & BillboardChain are working, they just have a few "quirks" on 2.1.

Is there any specific of what is broken with them for you?

Re: [Ogre 2] Porting Particle Universe

Posted: Fri Mar 13, 2015 11:47 am
by al2950
Well in PU renderers are abstracted so;

the billboard renderer (which uses billboard sets directly), works but looks wrong, so mostly likely have got the wrong settings for the blend block.

The Ribbon Trail & Beam Renderer (which use billboard chains), do not show at all. Although when using renderDoc something is being rendered, its just invisible and broken by looks of things in renderDoc!

I will get around to looking at them, but as I said before I think we should create a completely new renderer as well as a PU HLMS implementation to go with it.


NB. I forgot to mention in the previous post soft particle have been removed, the idea is to have the PU HLMS deal with it instead

Re: [Ogre 2] Porting Particle Universe

Posted: Fri Mar 13, 2015 11:54 am
by AshMcConnell
al2950 wrote:Next stop MyGUI :D
Good news....this has already been done, for 2.0 at least: - http://www.ogre3d.org/addonforums/viewt ... 17&t=30366

Re: [Ogre 2] Porting Particle Universe

Posted: Fri Mar 13, 2015 12:36 pm
by al2950
AshMcConnell wrote:
al2950 wrote:Next stop MyGUI :D
Good news....this has already been done, for 2.0 at least: - http://www.ogre3d.org/addonforums/viewt ... 17&t=30366
Yes, thank you, I was aware of that. But 2.0->2.1 is a lot more involved that 1.x->2.0 :(

Re: [Ogre 2] Porting Particle Universe

Posted: Fri Mar 13, 2015 3:01 pm
by AshMcConnell
ah :)

Re: [Ogre 2] Porting Particle Universe

Posted: Tue Mar 24, 2015 11:28 pm
by criatura
Hi, I'm trying to try Particle Universe Working with Ogre 2.1, but I'm having troubles with CMakeLists.txt of Particle Universe.

I have a folder with Ogre static libraries (.a) files and a folder with the ogre include files (.h) (I'm working in Ubuntu).

I changed this:

Code: Select all

find_package(OGRE REQUIRED)
link_directories(${OGRE_LIBRARY_DIRS})
include_directories(${OGRE_INCLUDE_DIRS})
list(APPEND LIBS ${OGRE_LIBRARIES})
By this:

Code: Select all

ADD_LIBRARY(OGRE_MAIN STATIC IMPORTED)
ADD_LIBRARY(OGRE_HLMS1 STATIC IMPORTED)
ADD_LIBRARY(OGRE_HLMS2 STATIC IMPORTED)
ADD_LIBRARY(OGRE_MESH_LOD STATIC IMPORTED)
ADD_LIBRARY(OGRE_OVERLAY STATIC IMPORTED)
ADD_LIBRARY(OGRE_GL3 STATIC IMPORTED)

SET_TARGET_PROPERTIES(OGRE_MAIN PROPERTIES
    IMPORTED_LOCATION /home/cr/code/Dependencies/Ogre/libOgreMainStatic.a)

SET_TARGET_PROPERTIES(OGRE_HLMS1 PROPERTIES
    IMPORTED_LOCATION /home/cr/code/Dependencies/Ogre/libOgreHlmsPbsStatic.a)

SET_TARGET_PROPERTIES(OGRE_HLMS2 PROPERTIES
    IMPORTED_LOCATION /home/cr/code/Dependencies/Ogre/libOgreHlmsUnlitStatic.a)

SET_TARGET_PROPERTIES(OGRE_MESH_LOD PROPERTIES
    IMPORTED_LOCATION /home/cr/code/Dependencies/Ogre/libOgreMeshLodGeneratorStatic.a)

SET_TARGET_PROPERTIES(OGRE_OVERLAY PROPERTIES
    IMPORTED_LOCATION /home/cr/code/Dependencies/Ogre/libOgreOverlayStatic.a)

SET_TARGET_PROPERTIES(OGRE_GL3 PROPERTIES
    IMPORTED_LOCATION /home/cr/code/Dependencies/Ogre/libRenderSystem_GL3PlusStatic.a)

SET(OGRE_LIBRARY_DIRS  /home/cr/code/Dependencies/Ogre/)
SET(OGRE_LIBRARIES  ${OGRE_HLMS1} ${OGRE_HLMS2} ${OGRE_MESH_LOD} ${OGRE_OVERLAY} ${OGRE_GL3} ${OGRE_MAIN})
SET(OGRE_INCLUDE_DIRS /home/cr/code/Dependencies/Ogre/include)
link_directories(${OGRE_LIBRARY_DIRS})
include_directories(${OGRE_INCLUDE_DIRS})
list(APPEND LIBS ${OGRE_LIBRARIES})

set(OGRE_PLUGIN_DIR_REL /home/cr/code/Dependencies/Ogre/)
set(OGRE_PLUGIN_DIR_DBG /home/cr/code/Dependencies/Ogre/)

add_definitions(-DOGRE_PLUGIN_DIR_REL="${OGRE_PLUGIN_DIR_REL}")
add_definitions(-DOGRE_PLUGIN_DIR_DBG="${OGRE_PLUGIN_DIR_DBG}")
I got the following compilation errors:

Code: Select all

-- Looking for OIS...
-- Found OIS: optimized;/usr/lib/x86_64-linux-gnu/libOIS.so;debug;/usr/lib/x86_64-linux-gnu/libOIS.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cr/particleuniverse/build
Scanning dependencies of target Plugin_ParticleUniverse
[  0%] Building CXX object Plugins/ParticleUniverse/CMakeFiles/Plugin_ParticleUniverse.dir/src/ParticleUniverseAtlasImage.cpp.o
In file included from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseTechnique.h:28:0,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseSystem.h:29,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseScriptSerializer.h:28,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseSystemManager.h:29,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniversePCH.h:27,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/src/ParticleUniverseAtlasImage.cpp:24:
/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseRenderer.h:56:4: error: ‘BillboardSet’ in namespace ‘Ogre’ does not name a type
    Ogre::BillboardSet* mBillboardSet;
    ^
In file included from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseScriptSerializer.h:28:0,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseSystemManager.h:29,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniversePCH.h:27,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/src/ParticleUniverseAtlasImage.cpp:24:
/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseSystem.h: In member function ‘bool ParticleUniverse::ParticleSystem::isParentIsTagPoint()’:
/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseSystem.h:342:49: error: ‘mParentIsTagPoint’ was not declared in this scope
    inline bool isParentIsTagPoint(void) {return mParentIsTagPoint;};
                                                 ^
In file included from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseSystemManager.h:31:0,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniversePCH.h:27,
                 from /home/cr/particleuniverse/Plugins/ParticleUniverse/src/ParticleUniverseAtlasImage.cpp:24:
/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleRenderers/ParticleUniverseBoxSet.h: At global scope:
/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleRenderers/ParticleUniverseBoxSet.h:101:4: error: ‘VertexData’ in namespace ‘Ogre’ does not name a type
    Ogre::VertexData* mVertexData;
...
How I can modify the CMakeLists.txt in order to load the Ogre libraries that I have in my folders?

Thanks!!

Re: [Ogre 2] Porting Particle Universe

Posted: Mon Mar 30, 2015 11:00 am
by al2950
Hi

Sorry I have been away for a bit. The compile errors you are getting seem to be a bit more serious than a cmake issue. It does not look like you are using the right code base. What repo and revision changeset are you using?

The update PU version for Ogre 2.1 should be downloaded from here;
https://github.com/scrawl/particleunive ... e/Ogre_2.1

Re: [Ogre 2] Porting Particle Universe

Posted: Thu Apr 02, 2015 6:30 pm
by criatura
I'm using the repository that you posted. I believe that it is some CMake problem, because it just fails at the begin of the compilation and it doesn't recognize Ogre classes :(

Re: [Ogre 2] Porting Particle Universe

Posted: Thu Apr 02, 2015 9:30 pm
by c6burns
Options from here:
1) keep posting frowny faces until someone takes pity on you
2) take the first error and resolve it, then proceed to the next error until there are no errors

I'll help get you started on 2), since I only suggested 1) to shame you into doing 2) :lol: If you want to use software libraries before they are released stable, my sage advise is to get used to defaulting to option 2)

Code: Select all

/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseRenderer.h:56:4: error: ‘BillboardSet’ in namespace ‘Ogre’ does not name a type
    Ogre::BillboardSet* mBillboardSet;
So ... the compiler says there is no Ogre::BillboardSet. Is that because there is no BillboardSet at all, or because it's been moved to a different namespace? A cursory check of the Ogre source will answer this question. When you are trying to use bleeding edge software, you can't be afraid to get your hands dirty. :D

Re: [Ogre 2] Porting Particle Universe

Posted: Thu Apr 02, 2015 9:51 pm
by al2950
The reason I was questioning what version you are using is because of the compile error

Code: Select all

/home/cr/particleuniverse/Plugins/ParticleUniverse/include/ParticleUniverseRenderer.h:56:4: error: ‘BillboardSet’ in namespace ‘Ogre’ does not name a type
    Ogre::BillboardSet* mBillboardSet;
However if you look at that line in the repository;
https://github.com/scrawl/particleunive ... erer.h#L56

It clearly says;

Code: Select all

Ogre::v1::BillboardSet* mBillboardSet;
Not

Code: Select all

Ogre::BillboardSet* mBillboardSet;
Are you 100% sure you have the right repo and are using the Ogre 2.1 branch? If you are then I am afriad I am very confused by those error messages!! :?

Re: [Ogre 2] Porting Particle Universe

Posted: Thu Apr 02, 2015 10:08 pm
by c6burns
Oh good catch, it must be that he did not change to the 2.1 branch (of ParticleUniverse). I haven't used Ogre 2.1 yet, just 1.10 and 2.0

Re: [Ogre 2] Porting Particle Universe

Posted: Mon Apr 13, 2015 10:21 pm
by criatura
Ouch! shame on me, I was in the incorrect branch!

Now I'm on the branch Ogre_2.1 and it compiled until:

Code: Select all

[ 14%] Building CXX object Plugins/ParticleUniverse/CMakeFiles/Plugin_ParticleUniverse.dir/src/ParticleUniverseTechniqueTokens.cpp.o
[ 14%] Building CXX object Plugins/ParticleUniverse/CMakeFiles/Plugin_ParticleUniverse.dir/src/ParticleUniverseSystemManager.cpp.o
/home/not/particleuniverse2/particleuniverse/Plugins/ParticleUniverse/src/ParticleUniverseSystemManager.cpp:41:47: fatal error: Compositor\OgreCompositorManager2.h: No such file or directory
 #include "Compositor\OgreCompositorManager2.h"
I am compiling in Linux, so the "\" is not valid, so I updated path to "Compositor/OgreCompositorManager2.h".

Then I got the following error:

Code: Select all


[ 14%] Building CXX object Plugins/ParticleUniverse/CMakeFiles/Plugin_ParticleUniverse.dir/src/ParticleUniverseSystemManager.cpp.o
/home/not/particleuniverse2/particleuniverse/Plugins/ParticleUniverse/src/ParticleUniverseSystemManager.cpp: In member function ‘ParticleUniverse::BoxSet* ParticleUniverse::ParticleSystemManager::createBoxSet(const String&, Ogre::SceneManager*, ParticleUniverse::uint)’:
/home/not/particleuniverse2/particleuniverse/Plugins/ParticleUniverse/src/ParticleUniverseSystemManager.cpp:178:58: error: ‘Ogre::SceneMemoryMgrTypes’ is not a class or namespace
             &sceneManager->_getEntityMemoryManager(Ogre::SceneMemoryMgrTypes::SCENE_DYNAMIC),
Ogre::SceneMemoryMgrTypes is defined in OgreCommon.h and I have this file on my include dir. Any hint is appreciated.

Thanks for all guys! Sorry for the late response...

Re: [Ogre 2] Porting Particle Universe

Posted: Tue Apr 14, 2015 10:28 am
by al2950
Ah yes sorry, that is invalid C++, :oops:, but Visual Studio does not seem to complain!

I had made the changes, but Git managed to delete my commits because I changed the origin.... I F'ing hate Git!!! I know its more powerful then Hg, but it has pissed me off too many times!!

Anyway, need to re-clone repo and re-compile, so may take me a few hours to sort, I will post when I have done.

Re: [Ogre 2] Porting Particle Universe

Posted: Tue Apr 14, 2015 12:35 pm
by al2950
Done. However please note I had to delete my Linux partition as I needed the space, so there may be other mistakes as I have not tested it.

PS. Thanks for the bug report!

Re: [Ogre 2] Porting Particle Universe

Posted: Tue Dec 22, 2015 8:43 am
by Kohedlo
I update renderer to 2.1 december 21 and download last PU from reppository for 2.1.

After some fixes PU compiled and run.

Code: Select all

1) fix 

	
							//switch (MessageBox(0, message, "AssertViolation, see console for details.", MB_ABORTRETRYIGNORE))
			        //{
					//	case IDRETRY:
					//		return NX_AR_CONTINUE;
					//	case IDIGNORE:
					//		return NX_AR_IGNORE;
						//case IDABORT:
					//	default:
						return NX_AR_BREAKPOINT;
					//}
				//	*/
					
					
					
					
					2) fix
					
				#ifdef PU_PHYSICS_PHYSX
	//	externFactory = PU_NEW PhysXActorExternFactory();
	//	mParticleSystemManager->addExternFactory(externFactory);
	//	mExternFactories.push_back(externFactory);

	//	externFactory = PU_NEW PhysXFluidExternFactory();
	//	mParticleSystemManager->addExternFactory(externFactory);
	//	mExternFactories.push_back(externFactory);
#endif //PU_PHYSICS_PHYSX	



fix 3)

Extern* createExtern(Ogre::IdType id, Ogre::ObjectMemoryManager *objectMemoryManager, Ogre::SceneManager *manager)
				{
					return _createExtern<PhysXFluidExtern>(id, objectMemoryManager, manager);
				};
				
				
				
			
			Extern* createExtern(Ogre::IdType id, Ogre::ObjectMemoryManager *objectMemoryManager, Ogre::SceneManager *manager)
				{
					return _createExtern<PhysXActorExtern>(id, objectMemoryManager, manager);
				};
	
				
	Fluid - >	Extern(Ogre::IdType id, Ogre::ObjectMemoryManager *objectMemoryManager, Ogre::SceneManager *manager	
				
			
			PhysXActorExtern(Ogre::IdType id, Ogre::ObjectMemoryManager *objectMemoryManager, Ogre::SceneManager *manager);		
					
					
					
					
					//----end
PU was initialised succesfully.
For test i use mp_torch.pu
Additionaly i create material from .pu file and add texture.

In result adding particle on to scene was crash.

CrashPoint is In MainOgre_d.dll after sceneManager::cullFrustrum -> RenderQueue::AddRenderablev2 -> AddRenderablevV1.

First in last function is getting blendblock istranspatent status.

In depth getDatablock of renderable is complete unable.

Re: [Ogre 2] Porting Particle Universe

Posted: Tue Dec 22, 2015 2:33 pm
by al2950
I made a couple of fixes in the 2.1 branch on the 7th december, so ill assume you have got the latest, if not, get the latest! I think the most likely cause would be that the datablock is null? Check your material is begin loaded correctly, and make sure you set the render queue to the correct mode, (ie V1_FAST).

PU will most likely have a number of issues as I only ported it to a point where my system would run, but if you post here I will try and help and fix. When trying to fix a crash please post the full callstack as it makes it much easier to diagnose.