Re: [osg-users] [osg-submissions] AC3D Texture clamping
Hi, On Monday 03 November 2008 20:30, John Cummings wrote: > I think it may be too late to have anything changed, but I'd like to learn > something out of this matter. I do not think that you are too late. I was just willing to make the majority of users again happy. When you had responded earlier, you would have gotten a solution immediately. Now we might find one now :) > I still consider myself an OSG neophyte, so > goes easy on me. You proposed two solutions: > 1. add an ac3d options struct > 2. install a read callback in the osgDB::Registry of your local application > where you modify the texture parameters > > On #2, is this the same as the NodeVisitor that Robert references in the > "Call for feedback" thread? More or less yes. You are able to install a osgDB::Registry::ReadFileCallback into the database manager. That acts as a postprocessing step just past loading models. There you might make use of a NodeVisitor, to walk the model and change texture parameters of all or some specific texture objects. > On #1, is that just a class derived from > osgDB::ReaderWriter::Options with attributes added for specifying repeat > and clamping preferences? Yes, something like that. Then the loader must use this option and act as desired. Depending on what youo want to do, you might also use a different fileformat which provides what you need. That is maybe more than what ac offers? > Thank you for all of your work on this issue. My apologies again for not > responding to this thread sooner. (And I thought I did well posting > examples the same morning I received the other messages... sigh) :) Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] AC3D Texture clamping
Sorry about not seeing this thread earlier. I was going back and reading the osg-user and osg-submission threads about the AC3D clamping issues and saw reference to a thread where I had not replied. That mention caused me to search out this thread. I think it may be too late to have anything changed, but I'd like to learn something out of this matter. I still consider myself an OSG neophyte, so goes easy on me. You proposed two solutions: 1. add an ac3d options struct 2. install a read callback in the osgDB::Registry of your local application where you modify the texture parameters On #2, is this the same as the NodeVisitor that Robert references in the "Call for feedback" thread? On #1, is that just a class derived from osgDB::ReaderWriter::Options with attributes added for specifying repeat and clamping preferences? Thank you for all of your work on this issue. My apologies again for not responding to this thread sooner. (And I thought I did well posting examples the same morning I received the other messages... sigh) -John -- Original Message -- Subject: Re: [osg-users] [osg-submissions] AC3D Texture clamping Date: Tuesday 21 October 2008 From: Mathias Fröhlich <[EMAIL PROTECTED]> To: OpenSceneGraph Users , John Cummings <[EMAIL PROTECTED]> Hi, On Tuesday 21 October 2008 03:49, Csaba Halász wrote: > I don't personally have ac3d either, so I asked other people :) > > When texrep is omitted, it defaults to texrep 1 1 as per the spec, and > that means texture *is* repeated, according to the texture > coordinates. Also, when texrep is set to 1 1 in the gui, upon saving > the texrep attribute is omitted. > > Using texrep 0 0 scales the texture coordinates to 0, 0 so the whole > area is filled with the corner texel (this seems to work same in osg) > > We couldn't come up with a way to produce clamped textures in ac3d. Hmm ok. John, I intent to make the ac3d loader load files like they are in ac3d. That is with all time texture repeate on and default to 1. For your problem I can see two solutions: * add an ac3d options struct * install a read callback in the osgDB::Registry of your local application where you modify the texture parameters will thet read callback be an option for your problem? If so, I would prefere this solution. Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 --- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] AC3D Texture clamping
Ok, I did not get any answer from John. I will now submit a change to revert the behaviour to be unconditional ac3d conformant. Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] AC3D Texture clamping
Hi, On Tuesday 21 October 2008 03:49, Csaba Halász wrote: > I don't personally have ac3d either, so I asked other people :) > > When texrep is omitted, it defaults to texrep 1 1 as per the spec, and > that means texture *is* repeated, according to the texture > coordinates. Also, when texrep is set to 1 1 in the gui, upon saving > the texrep attribute is omitted. > > Using texrep 0 0 scales the texture coordinates to 0, 0 so the whole > area is filled with the corner texel (this seems to work same in osg) > > We couldn't come up with a way to produce clamped textures in ac3d. Hmm ok. John, I intent to make the ac3d loader load files like they are in ac3d. That is with all time texture repeate on and default to 1. For your problem I can see two solutions: * add an ac3d options struct * install a read callback in the osgDB::Registry of your local application where you modify the texture parameters will thet read callback be an option for your problem? If so, I would prefere this solution. Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] AC3D Texture clamping
On Mon, Oct 20, 2008 at 8:50 AM, Mathias Fröhlich <[EMAIL PROTECTED]> wrote: > > With the lack of an ac3d modeller here, can you tell me how it looks like in > ac3d, when texrep is > * omitted > * set to 0 0 > Is there a way to get non repeating textures in ac3d? I don't personally have ac3d either, so I asked other people :) When texrep is omitted, it defaults to texrep 1 1 as per the spec, and that means texture *is* repeated, according to the texture coordinates. Also, when texrep is set to 1 1 in the gui, upon saving the texrep attribute is omitted. Using texrep 0 0 scales the texture coordinates to 0, 0 so the whole area is filled with the corner texel (this seems to work same in osg) We couldn't come up with a way to produce clamped textures in ac3d. -- Thanks for looking into this. Csaba ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] AC3D Texture clamping
Hi, On Friday 17 October 2008 14:10, Csaba Halász wrote: > The texrep parsing change that went into the plugin about 2 weeks ago > is against the ac3d spec, that says: > > *texrep %f %f > > Optional - default 1.0,1.0 . The texture repeat values for the tiling > of a texture > on an object's surfaces." > > (http://www.inivis.com/ac3d/man/ac3dfileformat.html) > > I believe this means the default behavior should be texture repeat > (assuming texrep 0 0 would disable repeat, which I am not sure of). > Can we please change it or at least have an option for it? In > flightgear a lot of models are suddenly broken because of this. Sure. >From Johns post - the original change requestor, I got the impression that this the old behaviour was wrong - which is not ... The default must do what the 'standard' says, and this should (hopefully) match the reference default behaviour of ac3d. If you cannot get non repeating textures with native ac3d, then we might need an option. With the lack of an ac3d modeller here, can you tell me how it looks like in ac3d, when texrep is * omitted * set to 0 0 Is there a way to get non repeating textures in ac3d? Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osg-submissions] AC3D Texture clamping
Hi! The texrep parsing change that went into the plugin about 2 weeks ago is against the ac3d spec, that says: *texrep %f %f Optional - default 1.0,1.0 . The texture repeat values for the tiling of a texture on an object's surfaces." (http://www.inivis.com/ac3d/man/ac3dfileformat.html) I believe this means the default behavior should be texture repeat (assuming texrep 0 0 would disable repeat, which I am not sure of). Can we please change it or at least have an option for it? In flightgear a lot of models are suddenly broken because of this. -- Thanks, Csaba ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org