[SoC 2006] RmOgreInstaller

Threads related to Google Summer of Code
mr_burns
Kobold
Posts: 33
Joined: Mon Dec 11, 2006 8:53 pm
x 1

Exporting Shaders From RenderMonkey To Ogre

Post by mr_burns »

Hi,

I'm looking for a simple tutorial on exporting a Shader from RenderMonkey to Ogre.

If anyone can point me in the right direction (weblink, pdf, wiki, etc.) I'd appreciate it.
Gat
Gnoblar
Posts: 6
Joined: Thu Dec 28, 2006 10:23 am

where I can find renderMonkey 1.6 ?

Post by Gat »

It seems the export option is not available in renderMonkey 1.62.

Could anyone tell me where I can download the 1.6 installer or if there is a way to use the rmOgreExporter in RenderMonkey 1.62 ? Is does not seem to be available on ati's website
mr_burns
Kobold
Posts: 33
Joined: Mon Dec 11, 2006 8:53 pm
x 1

Post by mr_burns »

Gat,

I've been looking for a RenderMonkey 1.6 for a while, and have had no luck.

If you can find a copy of 1.6, please PM me.

B.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

You should probably just rebuild the exporter with the new RM SDK. The source is in ogreaddons/rmogreexporter.
User avatar
sebarnolds
Greenskin
Posts: 111
Joined: Thu Jun 22, 2006 12:55 pm
Location: Belgium
Contact:

Post by sebarnolds »

Yeah... easier said than done :wink:

I am currently trying to recompile everything with Visual Studio 2003 but I have found some problems :
1) Workspaces are only up-to-date for Visual Studio 2005, was quite easy to modify them with wordpad to open them with 2003
2) Lots of libraries to download, no version specified... time-consuming but I think it is ok
3) Some compilation errors / project settings to change... done
4) Boost problems... boooom !

There are four components : fake_ogre_mat, pyogre_mini, pyrmgatewayplugin and pyrmsdk. The only one remaining is the pyrmsdk which I can't build because of boost. I downloaded boost 1.33.1 and build successfully boost_python (required). However, in pyrmsdk, there are some binding to be done which are not accepted by the compiler.

Here is a part of the compiler ouput:

Code: Select all

PyRmTypes.cpp
../../include\wrapper_tools\convenience.hpp(71) : error C2780: 'boost::_bi::bind_t<R,boost::_mfi::dm<R,T>,_bi::list_av_1<A1>::type> boost::bind(R T::* ,A1)' : expects 2 arguments - 3 provided
        C:\RmOgreExporter\boost_1_33_1\boost\bind.hpp(1616) : see declaration of 'boost::bind'
        \RmOgreExporter\RmOgreExporter\src\PyRmSDK\PyRmTypes.cpp(371) : see reference to function template instantiation 'wrapper_tools::nullary_functor wrapper_tools::bind_to_expose_const<std::wstring>(T,const char *)' being compiled
        with
        [
            T=std::wstring
        ]
../../include\wrapper_tools\convenience.hpp(71) : error C2780: 'boost::_bi::bind_t<R,boost::_mfi::cmf8<R,T,B1,B2,B3,B4,B5,B6,B7,B8>,_bi::list_av_9<A1,A2,A3,A4,A5,A6,A7,A8,A9>::type> boost::bind(R (__thiscall T::* )(B1,B2,B3,B4,B5,B6,B7,B8) const,A1,A2,A3,A4,A5,A6,A7,A8,A9)' : expects 10 arguments - 3 provided
        C:\RmOgreExporter\boost_1_33_1\boost\bind\bind_mf_cc.hpp(222) : see declaration of 'boost::bind'
../../include\wrapper_tools\convenience.hpp(71) : error C2780: 'boost::_bi::bind_t<R,boost::_mfi::mf8<R,T,B1,B2,B3,B4,B5,B6,B7,B8>,_bi::list_av_9<A1,A2,A3,A4,A5,A6,A7,A8,A9>::type> boost::bind(R (__thiscall T::* )(B1,B2,B3,B4,B5,B6,B7,B8),A1,A2,A3,A4,A5,A6,A7,A8,A9)' : expects 10 arguments - 3 provided
        C:\RmOgreExporter\boost_1_33_1\boost\bind\bind_mf_cc.hpp(211) : see declaration of 'boost::bind'
../../include\wrapper_tools\convenience.hpp(71) : error C2780: 'boost::_bi::bind_t<R,boost::_mfi::cmf7<R,T,B1,B2,B3,B4,B5,B6,B7>,_bi::list_av_8<A1,A2,A3,A4,A5,A6,A7,A8>::type> boost::bind(R (__thiscall T::* )(B1,B2,B3,B4,B5,B6,B7) const,A1,A2,A3,A4,A5,A6,A7,A8)' : expects 9 arguments - 3 provided
        C:\RmOgreExporter\boost_1_33_1\boost\bind\bind_mf_cc.hpp(198) : see declaration of 'boost::bind'
../../include\wrapper_tools\convenience.hpp(71) : error C2780: 'boost::_bi::bind_t<R,boost::_mfi::mf7<R,T,B1,B2,B3,B4,B5,B6,B7>,_bi::list_av_8<A1,A2,A3,A4,A5,A6,A7,A8>::type> boost::bind(R (__thiscall T::* )(B1,B2,B3,B4,B5,B6,B7),A1,A2,A3,A4,A5,A6,A7,A8)' : expects 9 arguments - 3 provided
        C:\RmOgreExporter\boost_1_33_1\boost\bind\bind_mf_cc.hpp(187) : see declaration of 'boost::bind'
And it goes on like this for a lot of errors before giving up (more than 100 errors, aborting compilation). I didn't use Boost before and don't know it at all. Does anybody knows about these errors ? Do you know how I can fix this ?

[EDIT]
I just installed Service pack 1 and nothing changed. Is it possible that the 2003 compiler doesn't work with that Boost part (seems impossible to me), should I try with the 2005 Express ?

Maybe I should try another Boost version ? Has anybody succeeded in rebuilding the plugin ?
[/EDIT]

Thanks,
Sebastien
User avatar
Piraaate
Gnoblar
Posts: 1
Joined: Fri Jan 26, 2007 10:17 am
Location: Paris

Post by Piraaate »

Hi sebastien and all!
I managed to compile the Ogre exporter for RM 1.62, didn't encounter any problems, I used boost 1.33, loki 0.1.5 and it compiled easily with .NET 2033 once the VcProject was modified...
I got the exporter files from the ogreaddons, nothing particular here, your problems are strange !

Anyway, the export works fine but once in the engine I can't display it, I mean, I export a model and once in the engine I do something like p->setMaterialName("materialName") but I can't see my effect...
Apparently it finds the material but nothing happens, I can't figure out what happens. Any idea ?

Thanks !
User avatar
sebarnolds
Greenskin
Posts: 111
Joined: Thu Jun 22, 2006 12:55 pm
Location: Belgium
Contact:

Post by sebarnolds »

Hello everybody.

I just wanted to inform you about the progresses I've made while trying the exporter with RenderMonkey 1.62 :
- It didn't compile with VS2003
- It compiled fine with VS2005 except for a few changes with the RM SDK (patch at the bottom of this post)
- I installed Python 2.4.4 and pywin32 2.10

Now, let the fun start !!! I had to read the installer script to understand where to install things :
- PyRmGatewayPlugin.dll goes to RenderMonkey plugins directory
- OgreMain.dll, devil.dll, ilu.dll and ilut.dll go to RenderMonkey directory
- boost_python.dll, python24.dll, ogre_mini.pyd and rmsdk.pyd goes there too
- I created a Py\RmOgreExporter subdirectory of RenderMonkey directory and copied in it all the .py files from the PyRmOgreExporter subdirectory of the plugin sources
- I created a PYRMGATEWAY_MODULE environment variable and set it to "RmOgreExporter" (it refers to the name of the directory in which you put the *.py files but I don't think you can use another one without modifying the python scripts)
- I created a PYRMGATEWAY_SCRIPTS_DIR environment variable and set it to the path to the directory containing the RmOgreExporter directory with the *.py files i.e. in my case, $RENDERMONKEY_DIR\Py

As you see it is really a PITA to do all this but I finally succeeded in doing it. Now I can see the exporter in RenderMonkey when I right-click on an effect.

I have two questions about this :
1) What should I do with the patch ? Should I submit it as a patch ? (I believe it is an API modification introduced from RenderMonkey 1.6 to 1.62).
2) I tried the fur and fire sample effects and whenever I tried to export an effect, I had an error with GL shaders:

Code: Select all

Unhandled exception: "'RmGLShader' object has no attribute 'GetEntryPoint'"
Anyone has an idea aboput that ?

Code: Select all

*** PyRmPlugIn.cpp
--- PyRmPlugIn.cpp
*** PyRmPlugIn.cpp	24 Jul 2006 10:05:34 -0000	1.6
--- PyRmPlugIn.cpp	1 Feb 2007 10:21:29 -0000
***************
*** 365,378 ****
  			}
  		}
  
! 		HWND CreateViewerWindow(HWND hParentWindow, RmEffect *pEffect) {
  			object meth = o_.attr("CreateViewerWindow");
  			if (meth) {
! 				INT_PTR x = call<INT_PTR>(
  					meth.ptr(),
  					r_c<INT_PTR>(hParentWindow),
  					ptr(pEffect));
- 				return reinterpret_cast<HWND>(x);
  			}
  			throw std::runtime_error("pure virtual");
  		}
--- 365,377 ----
  			}
  		}
  
! 		void CreateViewerWindow(HWND hParentWindow, RmEffect *pEffect) {
  			object meth = o_.attr("CreateViewerWindow");
  			if (meth) {
! 				call<void>(
  					meth.ptr(),
  					r_c<INT_PTR>(hParentWindow),
  					ptr(pEffect));
  			}
  			throw std::runtime_error("pure virtual");
  		}
***************
*** 385,390 ****
--- 384,397 ----
  			}
  			throw std::runtime_error("pure virtual");
  		}
+ 
+ 		bool GetViewerUpdateStatusFlag() {
+ 			object meth = o_.attr("GetViewerUpdateStatusFlag");
+ 			if (meth) {
+ 				return call<bool>(meth.ptr());
+ 			}
+ 			throw std::runtime_error("pure virtual");		
+ 		}
  	};
  
  	PYRMSDK_DEF_EXPORT_TYPE(IRmEffectViewerPlugIn_Proxy, PRIORITY_TYPE) {
Thank you very much for your attention.
Sebastien
User avatar
sebarnolds
Greenskin
Posts: 111
Joined: Thu Jun 22, 2006 12:55 pm
Location: Belgium
Contact:

Post by sebarnolds »

Ok, I searched a bit in the Python source files and it seems the exporter doesn't handle GLSL shaders at all (it forces HLSL shaders and therefore generate an error with the entry point when exporting effects using GLSL).

Can anyone confirm me that the exporter doesn't support effects with GLSL ? I personally tried a HLSL effect and it exported fine.

Thanks, Sebastien
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

sebarnolds wrote: Can anyone confirm me that the exporter doesn't support effects with GLSL ?
I can. It doesn't support effects with GLSL - this SoC item was not implemented eventually.
But actually the framework to do so is there (i.e. the whole python bindings thing can be used with GLSL - it just has to be written).
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

Anyone has an idea aboput that ?
it looks like they introduced new method in new SDK. since the python bindings source were missing that method, they would not link (sorry, didn't try to compile stuff *yet* - so all this is just a late night guess).
User avatar
sebarnolds
Greenskin
Posts: 111
Joined: Thu Jun 22, 2006 12:55 pm
Location: Belgium
Contact:

Post by sebarnolds »

Hi.

Thanks for your answers. I figured out how to handle OpenGL shaders. In your code you directly considered that shaders were HLSL. I added coded to handle both types (HLSL and GLSL). Unfortunately, shader parameters are not handled the same way by RenderMonkey and there is also a need of coding in that area. If I have time I will look at it as this exporter is a must have in my company.

About the entry point error, it is because it always considered HLSL. The difference is that GLSL shaders have no entry point (it is always "main").

What do you want me to do with the code ? Should I post it (a bit too much I think) ? Send you by email ?

Sebastien
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

It didn't compile with VS2003
sorry for that, I don't have a VS2003 around anymore. Only VS2005.
The binding stuff looks like some problem with arguments - i.e. incompatible arguments to the functor for some reason.

it looks like your VS2003 build uses non-unicode configuration for some reason. If you could switch that, so that unicode version of RMSDK would be compiled - at least this error should be gone.

The rabbit hole is not too deep actually, here is the place where error was triggered:
RmOgreExporter\RmOgreExporter\src\PyRmSDK\PyRmTypes.cpp(371) : see reference to function template instantiation
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

sebarnolds wrote:What do you want me to do with the code ? Should I post it (a bit too much I think) ? Send you by email ?
you can put it somewhere and post here a link?
my email works fine too. But maybe there will be some other interested folks around.
If you do want to mess with GL shader support and implement it - it could be branched and stuff so that you can commit your code. Once it is done, it could be merged back.
Or, you can maintain your branch and then send a patchset once it is ready. I dunno what is the best solution here.
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

If I have time I will look at it as this exporter is a must have in my company.
just for the sake of it - what is the company name? so far there were only interested individuals..
User avatar
sebarnolds
Greenskin
Posts: 111
Joined: Thu Jun 22, 2006 12:55 pm
Location: Belgium
Contact:

Post by sebarnolds »

Hi.

The name is Alterface (http://www.alterface.com), in Belgium. We are building interactive multimedia systems for museums, theme park... We have a proprietary engine able to handle all interactions but, until now, 3D support was very limited through the use of OpenSceneGraph.

We are now switching to Ogre3D and we are trying to build a good pipeline. For the scenes we are using 3D Studio Max with oFusion (Pro) but it would be interesting to easily build / debug visual effects. There comes your exporter :-)

Sebastien
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

sebarnolds wrote:For the scenes we are using 3D Studio Max with oFusion (Pro) but it would be interesting to easily build / debug visual effects.
I see. Cool.
Let me know if you guys need help understanding internals etc. - the code is not much documented (I could say rather undocumented, huh, - as my mentor once said "it is summer of _code_ after all") - and there is a significant boost presence there, as you probably noticed.
Also, the build process has to be polished, redundant dependencies should be removed, fake ogre material framework should be eliminated (most likely this requires modifications in ogre itself, so that serializers can be used without extracting them with meat).. these is just sanity stuff, I don't mention feature requests.
If you guys will find this stuff useful - the stuff could certainly use some rigorous attention, heh ;)
User avatar
sebarnolds
Greenskin
Posts: 111
Joined: Thu Jun 22, 2006 12:55 pm
Location: Belgium
Contact:

Post by sebarnolds »

Hi again !

I managed to export OpenGL effects to Ogre materials ! I didn't need to modify the internals of the plugin but to tweak the Python scripts a bit. I included the patch at the end of this post. I was careful not to modify existing code so that HLSL works the same as previously.

I noticed some more problems about the exporter, I might be able to correct them in the future but maybe not :
- Time_0_X auto-variable is not recognized as an auto-variable
- Manual textures (not related to files) are not recognized as such and the exporter tries to copy a file which doesn't exist

Here is the patch, I would gladly hear your remarks about it. It would be cool to update the CVS version of the patch.

Code: Select all

*** 	Wed Dec 31 14:00:00 1969
*** src/PyRmOgreExporter/RmOgreExporter/exporter.py
--- src/PyRmOgreExporter/RmOgreExporter/exporter.py
*** src/PyRmOgreExporter/RmOgreExporter/exporter.py	12 Jul 2006 04:04:41 -0000	1.5
--- src/PyRmOgreExporter/RmOgreExporter/exporter.py	2 Feb 2007 11:00:37 -0000
***************
*** 81,93 ****
              return program_name
          from syntax import syntax, get_syntax_from_source
          if rm_shader.IsHighLevel():
!             prog = self.__hlgpu_pman.createProgram(program_name,
!                                                    '',
!                                                    'hlsl',
!                                                    ogre_program_type)
!             prog.setSourceFile(source_filename)
!             prog.setParameter("entry_point", str(rm_shader.GetEntryPoint()))
!             prog.setParameter("target", syntax[rm_shader.GetTarget()])
          else:
              self.__gpu_pman.createProgram(program_name,
                                            '',
--- 81,105 ----
              return program_name
          from syntax import syntax, get_syntax_from_source
          if rm_shader.IsHighLevel():
!             if rm_shader.GetFullNameWithApi()[4:10] == "OpenGL":
!                 logger.log('detected OpenGL shader: "%s"' % rm_shader.GetFullName())
!                 prog = self.__hlgpu_pman.createProgram(program_name,
!                                                      '',
!                                                      'glsl',
!                                                      ogre_program_type)
!                 prog.setSourceFile(source_filename)
!             elif rm_shader.GetFullNameWithApi()[4:7] == "D3D":
!                 logger.log('detected DirectX shader: "%s"' % rm_shader.GetFullName())
!                 prog = self.__hlgpu_pman.createProgram(program_name,
!                                                      '',
!                                                      'hlsl',
!                                                      ogre_program_type)
!                 prog.setSourceFile(source_filename)
!                 prog.setParameter("entry_point", str(rm_shader.GetEntryPoint()))
!                 prog.setParameter("target", syntax[rm_shader.GetTarget()])
!             else:
!                 logger.log('unknown type of shader: "%s"' % rm_shader.GetFullNameWithAPI())
!                 assert(None)
          else:
              self.__gpu_pman.createProgram(program_name,
                                            '',
***************
*** 99,124 ****
          return program_name
  
      def process_shader_params(self, rm_shader, ogre_gpu_prog_params):
!         is_high_level = rm_shader.IsHighLevel()
!         rm_shader_constants = rm_shader.constants
!         rm_shader_constants.sort(lambda a, b : cmp(a.GetRegister(), b.GetRegister()))
!         for rm_shader_const in rm_shader_constants:
!             rm_var = rm_shader_const.GetParameterNode()
!             assert(rm_var)
!             index = rm_shader_const.GetRegister()
!             if rm_var.IsPredefinedVariable():
!                 rm_semantic = rm_var.GetVariableSemantic()
!                 action = var.auto_actions.get(rm_semantic)
!                 if not action:
!                     # TODO: must warn here and fallback to constant export here
!                     logger.log('unknown automatic variable type "%s"\
  , exporting as constant' % rm_semantic)
                      var.export_var(rm_shader_const, ogre_gpu_prog_params, is_high_level)
                  else:
!                     action(rm_shader_const, ogre_gpu_prog_params, is_high_level)
!             else:
!                 var.export_var(rm_shader_const, ogre_gpu_prog_params, is_high_level)
! 
      def process_texture_unit(self, rm_tex_obj, ogre_tu):
          rm_ref = rm_tex_obj.GetTextureReference()
          assert(rm_ref)
--- 111,160 ----
          return program_name
  
      def process_shader_params(self, rm_shader, ogre_gpu_prog_params):
!         if rm_shader.GetFullNameWithApi()[4:10] == "OpenGL":
!             is_high_level = rm_shader.IsHighLevel()
!             rm_shader_constants = rm_shader.constants
!             rm_shader_constants.sort(lambda a, b : cmp(a.GetRegister(), b.GetRegister()))
!             for rm_shader_const in rm_shader_constants:
!                 rm_var = rm_shader_const.GetParameterNode()
!                 assert(rm_var)
!                 index = rm_shader_const.GetRegister()
!                 if rm_var.IsPredefinedVariable():
!                     rm_semantic = rm_var.GetVariableSemantic()
!                     action = var.auto_actions.get(rm_semantic)
!                     if not action:
!                         # TODO: must warn here and fallback to constant export here
!                         logger.log('unknown automatic variable type "%s"\
  , exporting as constant' % rm_semantic)
+                         var.export_var(rm_shader_const, ogre_gpu_prog_params, is_high_level)
+                     else:
+                         action(rm_shader_const, ogre_gpu_prog_params, is_high_level)
+                 else:
                      var.export_var(rm_shader_const, ogre_gpu_prog_params, is_high_level)
+         elif rm_shader.GetFullNameWithApi()[4:7] == "D3D":
+             is_high_level = rm_shader.IsHighLevel()
+             rm_shader_constants = rm_shader.constants
+             rm_shader_constants.sort(lambda a, b : cmp(a.GetRegister(), b.GetRegister()))
+             for rm_shader_const in rm_shader_constants:
+                 rm_var = rm_shader_const.GetParameterNode()
+                 assert(rm_var)
+                 index = rm_shader_const.GetRegister()
+                 if rm_var.IsPredefinedVariable():
+                     rm_semantic = rm_var.GetVariableSemantic()
+                     action = var.auto_actions.get(rm_semantic)
+                     if not action:
+                         # TODO: must warn here and fallback to constant export here
+                         logger.log('unknown automatic variable type "%s"\
+ , exporting as constant' % rm_semantic)
+                         var.export_var(rm_shader_const, ogre_gpu_prog_params, is_high_level)
+                     else:
+                         action(rm_shader_const, ogre_gpu_prog_params, is_high_level)
                  else:
!                     var.export_var(rm_shader_const, ogre_gpu_prog_params, is_high_level)
!         else:
!             logger.log('unknown type of shader: "%s"' % rm_shader.GetFullNameWithAPI())
!             assert(None)
!                 
      def process_texture_unit(self, rm_tex_obj, ogre_tu):
          rm_ref = rm_tex_obj.GetTextureReference()
          assert(rm_ref)

*** src/PyRmOgreExporter/RmOgreExporter/var.py
--- src/PyRmOgreExporter/RmOgreExporter/var.py
*** src/PyRmOgreExporter/RmOgreExporter/var.py	6 Jul 2006 04:19:14 -0000	1.2
--- src/PyRmOgreExporter/RmOgreExporter/var.py	2 Feb 2007 11:00:43 -0000
***************
*** 10,15 ****
--- 10,18 ----
          ogre_const_name = str(rm_shader_const.GetName())
      else:
          ogre_const_name = ''
+     if index == -1:
+         logger.log('Warning: shader constant named "%s" has no index (ignore if exporting OpenGL effect)' % ogre_const_name)
+         index = ogre_gpu_prog_params.getNumConstantDefinitions()
      ET_INT = ogre.GpuProgramParameters.ElementType.ET_INT
      ET_REAL = ogre.GpuProgramParameters.ElementType.ET_REAL
      eltype = None

*** src/PyRmSDK/PyRmPlugIn.cpp
--- src/PyRmSDK/PyRmPlugIn.cpp
*** src/PyRmSDK/PyRmPlugIn.cpp	24 Jul 2006 10:05:34 -0000	1.6
--- src/PyRmSDK/PyRmPlugIn.cpp	1 Feb 2007 10:21:29 -0000
***************
*** 365,378 ****
  			}
  		}
  
! 		HWND CreateViewerWindow(HWND hParentWindow, RmEffect *pEffect) {
  			object meth = o_.attr("CreateViewerWindow");
  			if (meth) {
! 				INT_PTR x = call<INT_PTR>(
  					meth.ptr(),
  					r_c<INT_PTR>(hParentWindow),
  					ptr(pEffect));
- 				return reinterpret_cast<HWND>(x);
  			}
  			throw std::runtime_error("pure virtual");
  		}
--- 365,377 ----
  			}
  		}
  
! 		void CreateViewerWindow(HWND hParentWindow, RmEffect *pEffect) {
  			object meth = o_.attr("CreateViewerWindow");
  			if (meth) {
! 				call<void>(
  					meth.ptr(),
  					r_c<INT_PTR>(hParentWindow),
  					ptr(pEffect));
  			}
  			throw std::runtime_error("pure virtual");
  		}
***************
*** 385,390 ****
--- 384,397 ----
  			}
  			throw std::runtime_error("pure virtual");
  		}
+ 
+ 		bool GetViewerUpdateStatusFlag() {
+ 			object meth = o_.attr("GetViewerUpdateStatusFlag");
+ 			if (meth) {
+ 				return call<bool>(meth.ptr());
+ 			}
+ 			throw std::runtime_error("pure virtual");		
+ 		}
  	};
  
  	PYRMSDK_DEF_EXPORT_TYPE(IRmEffectViewerPlugIn_Proxy, PRIORITY_TYPE) {
In summary here is what has been added to the exporter:
- API of shaders is detected ("OpenGL" or "D3D") and shaders are created as appropriated
- index of shader constants is automatically incremented in OpenGL as they don't seem to have one (always "-1")
- Compilation error of the gateway plugin due to RM API change from 1.6 to 1.62

Sebastien
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

looking at it

Post by buddy »

I am currently installing RenderMonkey 1.62 to be able to test your patch and to provide new installer build with up-to-date python and binaries. Hopefully, by the end of weekend it will be done.
I also put RenderMonkey 1.6 SDK headers into CVS and will put 1.62 SDK headers there, so that changes in SDK could be easily identified and exporter code updated.
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

I incorporated the changes by sebarnolds (with slight modifications) - the code now compiles with RenderMonkey 1.62, glsl export works (to the best of my knowledge - I didn't test if the exported materials are actually loadable by OGRE but it seems that everything is ok.)

Also, the official version numbers in "version.txt" within CVS were introduced:
RmOgreExporter (v1 branch) is at version 1.00 - there were no changes in that codebase for quite some time already.
RmOgreExporter (v2 branch) is now at version 2.01.

The binary installer compatible with RenderMonkey 1.62, Python 2.4 is packaged and available at
http://sukhoy.public.iastate.edu/soc200 ... 2-py24.exe
md5: 6a3b59a1cf007f6716218f0a0172db9e

wiki page was also updated: http://www.ogre3d.org/wiki/index.php/SoC2006_RmExporter
Last edited by buddy on Sun Feb 04, 2007 5:21 am, edited 2 times in total.
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

- Time_0_X auto-variable is not recognized as an auto-variable
Auto-variable support lacks - it is not just Time_0_X but actually a whole bunch of automatic variables which are not exported, although they have to.
The place is var.py - perhaps I will be able to look at that tomorrow.
Keep these reports coming though.
- Manual textures (not related to files) are not recognized as such and the exporter tries to copy a file which doesn't exist
Again, the support is just missing - i.e. if it is a RenderTarget texture the exporter should bark, if it is generated one - it should create a file and save the contents - not sure if this can be done with just python - perhaps some enhancements are needed in the bindings.
RA/pdx
Halfling
Posts: 47
Joined: Thu Dec 28, 2006 4:55 pm
Location: Nuernberg, Germany
Contact:

Post by RA/pdx »

Hello Buddy.

I have used your OgreRmInstaller, but i still can´t find the exporter in RenderMonkey 1.62. Is it right that i put the "py" folder in the root of RenderMonkey?

Any ideas?
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

RA/pdx wrote:Hello Buddy.

I have used your OgreRmInstaller, but i still can´t find the exporter in RenderMonkey 1.62. Is it right that i put the "py" folder in the root of RenderMonkey?

Any ideas?
I think it should work out of the box (remember - right click on the effect node).
Did you install pywin32 (damnit, I forgot to put it into the installer yet again)?
davekilljoy
Gnoblar
Posts: 9
Joined: Fri Feb 02, 2007 6:27 pm

Post by davekilljoy »

I cant seem to find the export option either. I have all the required python stuff installed, when i click on an effects node -> export -> all I see is FX export. =Z
buddy
Google Summer of Code Student
Google Summer of Code Student
Posts: 78
Joined: Tue Mar 29, 2005 3:35 pm
Location: USA

Post by buddy »

ok, guess I'll repackage it, now with pywin32.
If you don't see the export option it means that RM could not load the plugin in its address space for some reason, the most obvious one being that some dependency DLL is missing, and/or unaccessible.
lathieeshe
Kobold
Posts: 26
Joined: Wed Feb 14, 2007 1:16 am

Post by lathieeshe »

hey buddy,

i've installed python-2.4.4.msi , pywin32-210.win32-py2.4.exe, render monkey 1.62 and RmOgreInstaller-201-rm162-py24.exe, still i don't see the export option for ogre fx in render monkey. is there something else i'm missing or not doing?
Post Reply