maya2osg-users Mailing List for Maya2OSG
Status: Alpha
Brought to you by:
jtaibo
You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(110) |
Jun
(36) |
Jul
(19) |
Aug
|
Sep
|
Oct
(50) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
From: Javier T. <jav...@gm...> - 2015-12-11 17:26:17
|
Hi David, I have just committed your changes to SVN trunk. The only change is that HardwareMipMapGeneration is enabled for linear_mipmap_linear filtering. Can you test if the current trunk is working for you? In case you have a test scene reproducing the mipmap problem, please send it to me and I'll try to debug it. 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 |
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 |
From: BOYREL D. <dav...@ok...> - 2015-12-07 12:56:38
|
Hello, You will find attached to this mail a little bug fix in vertex color setting. The difference with mesh.cpp revision r266 is located line 459. The fix avoid the vertex color to be overriden by the command : triangle[ tv ].Colors[ cs ] = osgVec4 ; located line 466. 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 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. |
From: BOYREL D. <dav...@ok...> - 2015-12-07 12:38:36
|
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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> http://www.oktal.fr ________________________________ De : Javier Taibo <jav...@gm...<mailto:jav...@gm...>> Envoyé : mardi 18 novembre 2014 22:01 À : may...@li...<mailto: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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> http://www.oktal.fr ________________________________ De : Javier Taibo <jav...@gm...<mailto:jav...@gm...>> Envoyé : vendredi 14 novembre 2014 20:43 À : may...@li...<mailto: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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> 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...<mailto: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...<mailto: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...<mailto: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. |
From: BOYREL D. <dav...@ok...> - 2015-03-04 14:44:02
|
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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> http://www.oktal.fr ________________________________ De : Javier Taibo <jav...@gm...<mailto:jav...@gm...>> Envoyé : mardi 18 novembre 2014 22:01 À : may...@li...<mailto: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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> http://www.oktal.fr ________________________________ De : Javier Taibo <jav...@gm...<mailto:jav...@gm...>> Envoyé : vendredi 14 novembre 2014 20:43 À : may...@li...<mailto: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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> 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...<mailto: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...<mailto: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...<mailto:May...@li...> https://lists.sourceforge.net/lists/listinfo/maya2osg-users -- Javier Taibo |
From: Javier T. <jav...@gm...> - 2015-02-13 19:46:38
|
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 |
From: BOYREL D. <dav...@ok...> - 2015-02-04 13:06:25
|
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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> http://www.oktal.fr ________________________________ De : Javier Taibo <jav...@gm...<mailto:jav...@gm...>> Envoyé : vendredi 14 novembre 2014 20:43 À : may...@li...<mailto: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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> 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...<mailto: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...<mailto:May...@li...> https://lists.sourceforge.net/lists/listinfo/maya2osg-users -- Javier Taibo |
From: Javier T. <jav...@gm...> - 2014-11-18 21:01:38
|
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 |
From: BOYREL D. <dav...@ok...> - 2014-11-18 09:06:09
|
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...<mailto: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<tel:%2B33%20%280%291%2046%2094%2093%2052> Fax : +33 (0)1 41 41 91 44<tel:%2B33%20%280%291%2041%2041%2091%2044> 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...<mailto:May...@li...> https://lists.sourceforge.net/lists/listinfo/maya2osg-users -- Javier Taibo |
From: Javier T. <jav...@gm...> - 2014-11-14 19:43:49
|
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 |
From: BOYREL D. <dav...@ok...> - 2014-11-14 16:07:49
|
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 |
From: Javier T. <jav...@gm...> - 2011-10-23 12:48:31
|
On Sun, Oct 23, 2011 at 12:37 PM, Peter Wrobel <pp...@cg...>wrote: > Hi Javier, > > Could you check if you have submitted all the files for the current > version? I see that some new files have been added, but no changes in > CMakeLists.txt. I'll add them and test, but please, just in case, could you > verify that you have submitted all the changes and there are no other > missing modifications? > > Yes, I added 4 files the geometry and skin classes ( both .h and .cpp ). > So, we have to edit the CMakeLists.txt for source files, but not for mel > scripts, is this right ? > Yes. It is already in SVN. Just adding the files was enough, at least in a first test it seems to be everything working OK. I have also some test scenes, which I did not upload, as there are some bugs > in osgAnimation itself. Unfortunatelly the developers are not responding to > my mails on the forum. What do you think we should do about this, shall I > still add them to the repository ? > Yes, I think they won't harm anybody. My proposal is to upload the test files and document the problems so this files could be used in the future to test if these problems are correctly solved. Regards, -- Javier Taibo |
From: Peter W. <pp...@cg...> - 2011-10-23 10:37:42
|
Hi Javier, > Could you check if you have submitted all the files for the current > version? I see that some new files have been added, but no changes in > CMakeLists.txt. I'll add them and test, but please, just in case, > could you verify that you have submitted all the changes and there are > no other missing modifications? Yes, I added 4 files the geometry and skin classes ( both .h and .cpp ). So, we have to edit the CMakeLists.txt for source files, but not for mel scripts, is this right ? I have also some test scenes, which I did not upload, as there are some bugs in osgAnimation itself. Unfortunatelly the developers are not responding to my mails on the forum. What do you think we should do about this, shall I still add them to the repository ? Cheers, PP > On Fri, Oct 21, 2011 at 5:26 PM, PP CG <pp...@cg... > <mailto:pp...@cg...>> wrote: > > Hi guys, > > skinning ( Beta ) is done, tested the scenes, nothing seems to be > broken. Morphing and Skinning combination is not tested, and > should also > not work ( Morphs will be exported, but not updated as, the update > Visitor will not reach them ). > > I added basic Poly Shape Instancing, will extend it to all DAG Nodes. > > I've done some design decisions which might not be the best due to my > lag of c++ and osg experience. Maya Skinning does not map very well to > osg Skinning. Will explain in the wiki and might need to discuss > with you. > For now there are no settings for skinning, but those might come > later one. > > @J-S, I added the setting for applying the Unit reacalculation called > "Linear Working Units" under general. In the Plug In you can grab them > with Config::instance() -> getArgBool( "-computeShadows" ). I suggest > you apply them there where you need the recalculation and ignore all > animation stuff, I'll work on that later. > > Cheers, PP > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Maya2osg-users mailing list > May...@li... > <mailto:May...@li...> > https://lists.sourceforge.net/lists/listinfo/maya2osg-users > > > > > -- > Javier Taibo > > > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > > > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users |
From: Jean-Sébastien G. <jea...@cm...> - 2011-10-22 21:48:52
|
Hi Peter, > I applied your patch j-S, but changed it a little. According to me the > default unit should stay cm, as in Maya. OK, it doesn't affect us as we always set them to Meters. > Seems to work, but I don't have any real world testcase. Please test :-) I'll do that next week and let you know. Thanks a lot, J-S -- ______________________________________________________ Jean-Sebastien Guay jea...@cm... http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ |
From: Javier T. <jav...@gm...> - 2011-10-22 21:27:59
|
Hi all, At least I have some time again to deal with Maya2OSG... :) On Sat, Oct 22, 2011 at 8:43 PM, PP CG <pp...@cg...> wrote: > Hi, found the place ( code ) of confusion, Line 281 in Mesh.cpp > > // Revert normals if opposite (needed for correct lihgting when using > FFP) > // If we are using GLSL instead of FFP, we do not reverse the normals > because > // it is already done in the shader > bool reverse_normals = !Config::instance() -> getArgBool( "-useGLSL" ) > && !doubleSided(mDagPath.node()) && opposite(mDagPath.node()); > float normalDirection = ( reverse_normals ? -1.0f : 1.0f ) ; > > What to do about it ? I think we should keep the setting, but need to > switch the culling ( backface, frontface ) as well, and that shoud fix J-S > issue, right ? > This is how I left this code, and AFAIK it should be working OK. I don't really know the meaning of the "flip normals if surface mode is opposite" option, that I can see in current trunk is not present anymore. As I said, I think it is working OK right now. The test model I use is the one in "tests/project/scenes/test_geometry.ma". It has all the combinations of single/double/opossite and smooth and hard edges and so on... I tested it with FFP and GLSL shaders and the look is just as seen in the Maya viewport. @J-S: Can you test if the problem you detected still exists and in such case could you add an example of your offending geometry to the " test_geometry.ma" test model so we can use it for fixing the problem and keep it for future tests? Regards, -- Javier Taibo |
From: Javier T. <jav...@gm...> - 2011-10-22 20:38:02
|
Hi Peter, Could you check if you have submitted all the files for the current version? I see that some new files have been added, but no changes in CMakeLists.txt. I'll add them and test, but please, just in case, could you verify that you have submitted all the changes and there are no other missing modifications? Thanks, On Fri, Oct 21, 2011 at 5:26 PM, PP CG <pp...@cg...> wrote: > Hi guys, > > skinning ( Beta ) is done, tested the scenes, nothing seems to be > broken. Morphing and Skinning combination is not tested, and should also > not work ( Morphs will be exported, but not updated as, the update > Visitor will not reach them ). > > I added basic Poly Shape Instancing, will extend it to all DAG Nodes. > > I've done some design decisions which might not be the best due to my > lag of c++ and osg experience. Maya Skinning does not map very well to > osg Skinning. Will explain in the wiki and might need to discuss with you. > For now there are no settings for skinning, but those might come later one. > > @J-S, I added the setting for applying the Unit reacalculation called > "Linear Working Units" under general. In the Plug In you can grab them > with Config::instance() -> getArgBool( "-computeShadows" ). I suggest > you apply them there where you need the recalculation and ignore all > animation stuff, I'll work on that later. > > Cheers, PP > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users > -- Javier Taibo |
From: PP CG <pp...@cg...> - 2011-10-22 18:44:05
|
Hi, found the place ( code ) of confusion, Line 281 in Mesh.cpp // Revert normals if opposite (needed for correct lihgting when using FFP) // If we are using GLSL instead of FFP, we do not reverse the normals because // it is already done in the shader bool reverse_normals = !Config::instance() -> getArgBool( "-useGLSL" ) && !doubleSided(mDagPath.node()) && opposite(mDagPath.node()); float normalDirection = ( reverse_normals ? -1.0f : 1.0f ) ; What to do about it ? I think we should keep the setting, but need to switch the culling ( backface, frontface ) as well, and that shoud fix J-S issue, right ? Cheers, PP > > On Wed, Oct 19, 2011 at 9:41 AM, PP CG <pp...@cg... > <mailto:pp...@cg...>> wrote: > > Hi guys, > > > I don't remember why is this "flip normals if surface mode is > > opposite" option required. Probably Peter explained it to me > some time > > ago, but I don't remember. It was supposed to work automatically in > > FFP as well as in GLSL mode. > > > > Peter can you throw some light here? > > When I added this option I thought one could save a StateSet > change when > some surfaces have backface culling and some frontface culling. But > AFAIK we figured that it was not working correctly, and removed this > option from the UI. > @Javier, I think you needed it only for one special case ( Shders ? ). > > > I think I don't need it. It wasnt originally in the export options. > The opposite flag was checked in FFP as well as in GLSL. There were > some bugs about this some time ago, but I thought I solved them. I'll > take a look at it as soon as I can, to check if it is working OK. > > > Regards, > > -- > Javier Taibo > > > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Ciosco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > > > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users |
From: PP CG <pp...@cg...> - 2011-10-22 15:07:40
|
Hi, its Config::instance() -> getArgBool( "-linearWorkingUnits" ) of course, anyway, its done. Cheers, PP > @J-S, I added the setting for applying the Unit reacalculation called > "Linear Working Units" under general. In the Plug In you can grab them > with Config::instance() -> getArgBool( "-computeShadows" ). I suggest > you apply them there where you need the recalculation and ignore all > animation stuff, I'll work on that later. |
From: PP CG <pp...@cg...> - 2011-10-22 15:01:55
|
Hi Guys, I applied your patch j-S, but changed it a little. According to me the default unit should stay cm, as in Maya. Seems to work, but I don't have any real world testcase. Please test :-) Cheers, PP > Hello all, > > Maya is initially set to treat its units as centimeters (I don't know > why), and here we always set it to meters in Window - > Settings/Preferences - Preferences. However, when I export a file with > Maya2osg, the exported file's transforms seem to have gone back to > centimeters (or something). > > I have a transform which I've moved to (0 0.7 0), and it's exported as a > matrix with a translation of (0 70 0). > > I guess when exporting we would need to get the current units setup from > Maya and make sure we export in those units everywhere... But I'm > surprised no one has run into this before. > > Any suggestions? > > J-S |
From: PP CG <pp...@cg...> - 2011-10-21 15:26:49
|
Hi guys, skinning ( Beta ) is done, tested the scenes, nothing seems to be broken. Morphing and Skinning combination is not tested, and should also not work ( Morphs will be exported, but not updated as, the update Visitor will not reach them ). I added basic Poly Shape Instancing, will extend it to all DAG Nodes. I've done some design decisions which might not be the best due to my lag of c++ and osg experience. Maya Skinning does not map very well to osg Skinning. Will explain in the wiki and might need to discuss with you. For now there are no settings for skinning, but those might come later one. @J-S, I added the setting for applying the Unit reacalculation called "Linear Working Units" under general. In the Plug In you can grab them with Config::instance() -> getArgBool( "-computeShadows" ). I suggest you apply them there where you need the recalculation and ignore all animation stuff, I'll work on that later. Cheers, PP |
From: Javier T. <jav...@gm...> - 2011-10-19 19:26:28
|
On Wed, Oct 19, 2011 at 9:41 AM, PP CG <pp...@cg...> wrote: > Hi guys, > > > I don't remember why is this "flip normals if surface mode is > > opposite" option required. Probably Peter explained it to me some time > > ago, but I don't remember. It was supposed to work automatically in > > FFP as well as in GLSL mode. > > > > Peter can you throw some light here? > > When I added this option I thought one could save a StateSet change when > some surfaces have backface culling and some frontface culling. But > AFAIK we figured that it was not working correctly, and removed this > option from the UI. > @Javier, I think you needed it only for one special case ( Shders ? ). > I think I don't need it. It wasnt originally in the export options. The opposite flag was checked in FFP as well as in GLSL. There were some bugs about this some time ago, but I thought I solved them. I'll take a look at it as soon as I can, to check if it is working OK. Regards, -- Javier Taibo |
From: PP CG <pp...@cg...> - 2011-10-19 17:27:03
|
Hi J-S, > I will be updating to the trunk of the plugin today I guess. However I > am afraid that it won't contain the changes I sent since the last few > days. Have you committed your latest changes Peter? Yes, in my local they are, but not the unit patch, as for this would take again some time for debugging animation stuff, and I am not sure if I'll have the time for this. Currently I am working on all the stuff, and trying to debug some error. As said, most probably I'll need till the end of the week. I suggest you use the current trunk of the repo, the patches that you sent were just few, so should be added very fast. Cheers, PP |
From: Jean-Sébastien G. <jea...@cm...> - 2011-10-19 12:49:47
|
Hi Peter, Replying to your two messages: > @J-S, you mentioned that you are using some older version of Maya2osg, > do you still have the flag in the UI ? It should not be there. I will be updating to the trunk of the plugin today I guess. However I am afraid that it won't contain the changes I sent since the last few days. Have you committed your latest changes Peter? > Wouldn't just reversing the Vertex or Element Arrays do trick ? I think so. But I think maybe it's not the plugin's job to do this. Maybe it could print a warning if the surface mode "opposite" is checked in Maya, and then the artist can fix it. I think from a maintainability point of view, it's better if the plugin helps the artist make his model correct so then it doesn't need to contain too many case-by-case fixes for bad models. Less code = better IMHO. J-S -- ______________________________________________________ Jean-Sébastien Guay jea...@cm... http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ |
From: PP CG <pp...@cg...> - 2011-10-19 07:43:44
|
Hi J-S, > Hi guys, > > I think I found the case where winding will affect surfaces. > > An object scaled by -1 will have its normals inverted and winding will > be inverted too. Maya sets the "opposite" mode on this. It makes it look > OK in Maya. If, in the plugin, I set "flip normals if surface mode is > opposite", then the plugin will invert the normals (* -1) but the > winding will still be wrong, so they will be culled by CULL_FACE even > though lighting is correct. > > If I reverse the normals in Maya, my guess is that Maya also reverses > winding, because then all is OK. > > So I think the plugin should warn when the surface mode is set to > opposite AND single sided, as that will not work unless triangle winding > is reversed (which is maybe too complex for an export plugin to do). At > least with a warning artists can see there is a problem and fix it on > the affected surfaces. If the data is wrong, fix the data! :-) Wouldn't just reversing the Vertex or Element Arrays do trick ? Cheers, PP |
From: PP CG <pp...@cg...> - 2011-10-19 07:42:02
|
Hi guys, > I don't remember why is this "flip normals if surface mode is > opposite" option required. Probably Peter explained it to me some time > ago, but I don't remember. It was supposed to work automatically in > FFP as well as in GLSL mode. > > Peter can you throw some light here? When I added this option I thought one could save a StateSet change when some surfaces have backface culling and some frontface culling. But AFAIK we figured that it was not working correctly, and removed this option from the UI. @Javier, I think you needed it only for one special case ( Shders ? ). @J-S, you mentioned that you are using some older version of Maya2osg, do you still have the flag in the UI ? It should not be there. Cheers, PP |