Re: [Maya2osg-users] TR: Add osg::Switch support to Maya2Osg
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2015-12-08 10:37:06
|
Hi David, Thank you for your contributions. I must apologize, I think I forgot your last message. I cannot test and commit the changes right now, but I will do it asap in the next days. There is one surprising thing. Why do you say enabling HardwareMipmapGeneration does not work? Have you got any test scene to reproduce the problem? Anyway, in case it does not work, there is no much sense in enabling hardware mipmap generation in NEAREST mode when mipmaps are not used :) I'll commit the changes one of these days. In case I forgot again, please, send me a remainder next week. Regards, On Mon, Dec 7, 2015 at 1:23 PM, BOYREL David <dav...@ok...> wrote: > > Hi Javier and maya2osg users, > > > It has been a long time since I worked on maya2osg exporter. Users I'm > working with reported me some > > problems on the exporter, so I made some fixes to solve them. I'll be > glad if these fixes could be commited > > to the trunk. > > > You will find attached to this email the first bug fix I did 7 or 8 months > ago. It seems that it has never been > > commited, so I submit it again. These are some bug fixes about cube maps > exports. The fixes are : > > - The filter type was not read in the correct node. > > - I set the default texture filter for the cubeMap to > LINEAR_MIPMAP_LINEAR. > > If at least one face of the cubemap has a texture filter set to None, I > set the texture filter of the whole cubemap > > to NEAREST. > > - Enabling HardwareMipMapGeneration with texture filtering does not seem > to work, so I enabled it only > > when filtering is set to NEAREST. > > - Cubemap was not visible when exporting the maya model in a binary file > with embedded textures, due to > relative file path. > > > I attached to this mail some icons I made for the new "create switch" > buttons. > > > Tell me if there is any problem with this submission, I will fix it if > there is. > > > Best regards, > > > -- > David BOYREL > OKTAL Paris > 19 Bd des Nations Unies - 92190 Meudon (France) > Tél. : +33 (0)1 46 94 93 52 > Fax : +33 (0)1 41 41 91 44 > http://www.oktal.fr > > > > ------------------------------ > *De :* BOYREL David <dav...@ok...> > *Envoyé :* mercredi 4 mars 2015 15:43 > *À :* Javier Taibo > *Cc :* may...@li... > > *Objet :* Re: [Maya2osg-users] Add osg::Switch support to Maya2Osg > > > Hi Javier, > > > Thank you for commiting the osg::Switch support to maya2osg. You'll find > attached to this mail some icons I made for the new shelf > > buttons. I hope they are fine for you ;) > > > You will find too the fix I did for the cubemap. I found several problems : > > - The filter type was not read in the correct node. > > - I set the default texture filter for the cubeMap to > LINEAR_MIPMAP_LINEAR. > > If at least one face of the cubemap has a texture filter set to None, I > set the texture filter of the whole cubemap > > to NEAREST. > > - Enabling HardwareMipMapGeneration with texture filtering does not seem > to work, so I enabled it only > > when filtering is set to NEAREST. > > - Cubemap was not visible when exporting the maya model in a binary file > with embedded textures, due to > > relative file path. > > > I'm currently trying to find a way to export the information about using > vertices colors as material infos (by setting > > the material color mode to something other than OFF). I thought about > using the "Display Colors" and "Display Color Channel" > > information set in the "Mesh Component Display" toolbox. If you have ever > thought about exporting those kind of informations > > or if you have any ideas about it, I'll be glad to hear your suggestions. > > > Best Regards, > > > -- > David BOYREL > OKTAL Paris > 19 Bd des Nations Unies - 92190 Meudon (France) > Tél. : +33 (0)1 46 94 93 52 > Fax : +33 (0)1 41 41 91 44 > http://www.oktal.fr > > ------------------------------ > *De :* Javier Taibo <jav...@gm...> > *Envoyé :* vendredi 13 février 2015 20:46 > *À :* may...@li... > *Objet :* Re: [Maya2osg-users] Add osg::Switch support to Maya2Osg > > Hi David, > > Sorry for the delay. I have reviewed your code and changed a few things. > The check for the dynamic attribute "isSwitch" has been simplified, and an > additional check for the presence of the switch is added before adding it > as a child of the transform node. > > Also, I added a pair of buttons to the shelf, so you can easily select > any transform in your scene and convert it to a switch or undo it. No icons > for this buttons (default icon), if anybody wants to contribute with some > art to the project, is welcome :) > > These changes are commited to trunk (r266). > > It would be nice to add also the switch configuration to Maya node, but > it is not trivial to keep it up-to-date with Maya scene graph (maybe > connecting the switch values with the visibility attribute of the > children). We'll let it for a future release :) > > If you send me the code with the corrections to the cubeMap, I'll take a > look as soon as I have time. > > > Regards, > > > On Wed, Feb 4, 2015 at 1:50 PM, BOYREL David <dav...@ok...> > wrote: > >> Hi Javier, >> >> >> Sorry for being so long to answer your mail. >> >> >> You will find attached to this email a submission for the osg::Switch >> support to maya2osg. >> >> >> The modification I made is the one we discussed : if a custom attribute >> named "isSwitch" is >> >> found on a maya transform node, the maya node is exported with an >> osg::MatrixTransform >> >> with an osg::Switch as a child, to keep to transformation data. The name >> of the attribute is case >> >> insensitive. >> >> >> The modification was made only on the group.cpp file. The revision I used >> is the head one (r265 >> >> from trunk). >> >> >> Tell me if this modification is good for you. >> >> >> I also found a problem in the setting of texture filter type of cubeMap >> textures. It seems that the >> >> test of the "filterType" plug is done on the wrong node. It needs to be >> tested a bit more. I'll send >> >> you a submission when I cleaned my code. >> >> >> Best Regards. >> >> >> -- >> David BOYREL >> OKTAL Paris >> 19 Bd des Nations Unies - 92190 Meudon (France) >> Tél. : +33 (0)1 46 94 93 52 >> Fax : +33 (0)1 41 41 91 44 >> http://www.oktal.fr >> >> ------------------------------ >> *De :* Javier Taibo <jav...@gm...> >> *Envoyé :* mardi 18 novembre 2014 22:01 >> >> *À :* may...@li... >> *Objet :* Re: [Maya2osg-users] Add osg::Switch support to Maya2Osg >> >> Hi David, >> >> Create custom Maya nodes is a bit overkill for what you want, if I am >> understanding it correctly what you are trying to do. >> >> I suppose all you need to do is check for the "script" attribute(s) and >> create a osg::Switch when present or an osg::Transform otherwise. It seems >> a light modification to the exporter, and should not break anything, so I >> would be happy to add it to the trunk. Send me the modified file(s) and I >> will review and commit them. Just follow the OSG submission rules (whole >> files, not patches). Thank you! >> >> >> Regards, >> >> >> On Tue, Nov 18, 2014 at 10:05 AM, BOYREL David <dav...@ok...> >> wrote: >> >>> Hi Javier, >>> >>> >>> Thank you very much for your quick answer. >>> >>> >>> Your suggestion is wise. I'm not experienced enough with maya to be sure >>> the solution I choose is the right one. But I saw that introducing new kind >>> of nodes in Maya will indeed results in errors when loading the Maya scene >>> in absence of maya2osg. >>> >>> >>> Using custom attributes seems good to me. >>> >>> >>> Do you think that I could submit to maya2osg the support of osg::Switch >>> using custom attributes? >>> >>> >>> Because I need anyway to perform some custom operations on the generated >>> OSG scene graph, so I could manage osg::Switch at that time, based on the >>> OSG nodes description, and leave the maya2osg exporter as it is. >>> >>> >>> Tell me if osg::Switch support may interest some other users of maya2osg. >>> >>> >>> Thank you again for your answer. >>> >>> >>> Regards, >>> >>> >>> -- >>> David BOYREL >>> OKTAL Paris >>> 19 Bd des Nations Unies - 92190 Meudon (France) >>> Tél. : +33 (0)1 46 94 93 52 >>> Fax : +33 (0)1 41 41 91 44 >>> http://www.oktal.fr >>> >>> ------------------------------ >>> *De :* Javier Taibo <jav...@gm...> >>> *Envoyé :* vendredi 14 novembre 2014 20:43 >>> *À :* may...@li... >>> *Objet :* Re: [Maya2osg-users] Add osg::Switch support to Maya2Osg >>> >>> Hi David, >>> >>> IMHO the best way to do what you want is by far the third one. It is >>> quite easy to add an extra attribute to a Maya transform node and later >>> check in the exporter whether the transform is marked as a switch and >>> create a Switch or a Transform depending on the case. >>> >>> From mel you can do it with something like that: >>> >>> addAttr -ln "isSwitch" -at bool | pSphere1; >>> >>> >>> Regards, >>> >>> >>> On Fri, Nov 14, 2014 at 4:53 PM, BOYREL David <dav...@ok...> >>> wrote: >>> >>>> Hello people, >>>> >>>> >>>> My name is David Boyrel from Oktal company. We develop a driving >>>> simulation software (SCANeR Studio), >>>> >>>> which visual application is based on OSG. You can find some (old) >>>> images on the OSG website : >>>> >>>> >>>> >>>> http://www.openscenegraph.org/index.php/gallery?AG_MK=0&AG_form_paginInitPages_1=1&AG_form_albumInitFolders_1=Screenshots/SCANeRII&AG_form_scrollTop=456&AG_form_scrollLeft=0&AG_MK=0 >>>> >>>> >>>> I am currently testing maya2osg in order to provide to some of our >>>> customers a way to export their database and vehicle >>>> >>>> production from Maya to our simulation software. For now, they use the >>>> OpenFlight exporter. Maya2osg seems to be more >>>> >>>> flexible. >>>> >>>> >>>> In order to add some logical informations into the scene graph, I'm >>>> currently searching a way to add osg::Switch support to maya2osg. >>>> >>>> >>>> Since I'm not very familiar with both Maya modeler and Maya API, I >>>> thought about 3 ways to do this. But I'm not sure if these >>>> >>>> methods are correct. Here are my thoughts : >>>> >>>> >>>> 1. Adding to the plugin a new custom DAG node, and to the exporter >>>> shelf a command to create this kind of node, as a child >>>> >>>> of the currently selected node. >>>> >>>> I managed to do this by creating a custom node that inherits >>>> MPxTransform. This node will become an osg::Switch >>>> >>>> when exported by maya2osg. >>>> >>>> However, I understood DAG nodes are only Transforms or Shapes. So >>>> my new DAG node does not seem to fit the Maya approach. >>>> >>>> And I would have to convert this node to an osg::Switch above an >>>> osg::MatrixTransform. >>>> >>>> >>>> 2. Adding to the plugin a new custom node (not a DAG node), and to the >>>> exporter shelf a command to create this kind of node. >>>> >>>> This new type of node will have an output attribute (maybe a table, I >>>> don't know if its possible), that could be plugged to a >>>> >>>> DAG node "visibility" attribute. >>>> >>>> So this new node will not be a DAG node, and so will not have any >>>> parent or children. >>>> >>>> I feel this is more the "Maya way" to give to maya users the ability >>>> to create switches. >>>> >>>> >>>> 3. Just adding a custom attribute to maya nodes. >>>> >>>> I saw the maya2osg exporter writes custom attributes to the OSG nodes >>>> description. >>>> >>>> I could then use a traverser to find the nodes having the switch >>>> attribute description, and then >>>> >>>> modify the scene graph to insert a Switch above the node. >>>> >>>> >>>> >>>> But adding a custom attribute in Maya does not seem to be very >>>> intuitive. >>>> >>>> >>>> I do not know Maya and its API very well, so maybe I'm totally wrong. >>>> >>>> So if you could please tell me what you think about this, or how would >>>> you do this, I would be grateful. >>>> >>>> >>>> My hope is to submit this development to maya2osg. That's why I tell >>>> you about this. >>>> >>>> >>>> Regards, >>>> >>>> >>>> -- >>>> David BOYREL >>>> OKTAL Paris >>>> 19 Bd des Nations Unies - 92190 Meudon (France) >>>> Tél. : +33 (0)1 46 94 93 52 >>>> Fax : +33 (0)1 41 41 91 44 >>>> http://www.oktal.fr >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Comprehensive Server Monitoring with Site24x7. >>>> Monitor 10 servers for $9/Month. >>>> Get alerted through email, SMS, voice calls or mobile push >>>> notifications. >>>> Take corrective actions from your mobile device. >>>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Maya2osg-users mailing list >>>> May...@li... >>>> https://lists.sourceforge.net/lists/listinfo/maya2osg-users >>>> >>>> >>> >>> >>> -- >>> Javier Taibo >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Maya2osg-users mailing list >>> May...@li... >>> https://lists.sourceforge.net/lists/listinfo/maya2osg-users >>> >>> >> >> >> -- >> Javier Taibo >> >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming. The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is >> your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Maya2osg-users mailing list >> May...@li... >> https://lists.sourceforge.net/lists/listinfo/maya2osg-users >> >> > > > -- > Javier Taibo > > This email is intended only for the above addressee. Since the integrity > of this message is not being secured on the internet, OKTAL SAS cannot be > held responsible for its contents. Any use or unauthorized distribution is > prohibited. If you are not the addressee of this message, please delete it > and notify the sender. > > > ------------------------------------------------------------------------------ > Go from Idea to Many App Stores Faster with Intel(R) XDK > Give your users amazing mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for multiple > OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users > > -- Javier Taibo |