Neil you need to know the following to be able to re-map the texture 1) The number of pixels of the texture for U and V 2) The Real world size of the texture either the texture is 10m by 5m and you work out the pixel size or you know that each pixel represents 2m either way you have to have the pixel size 3) You will need to now the original S & T used to apply the texture to each triangle (and if that already has been scaled in some way) 4) The size of the triangle and it that ( has been scaled and is in the same world sizes as that of the texture)
If you don not have all this information then you simply cannot do what you want Gordon __________________________________________________________ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __________________________________________________________ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Thursday, January 29, 2009 11:23 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Re How to deduce texture size .... As I said without knowing the real-world size of the texture, that's it what each pixel represents 1cm, 1m, 5m, 30m etc you cannot do this as you would be scaling against what ? Just because it texture is 512x512 pixels means nothing unless you know what each pixel represents in rela world sizes for each texture etc Gordon __________________________________________________________ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __________________________________________________________ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of neil.hug...@tesco.net Sent: Thursday, January 29, 2009 11:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Re How to deduce texture size .... Hi Art and Gordon, A further thought on this was that I omitted to mention that I do know that the 3D coordinates of the triangles on my object are all in mm. Given that I therefore know the real world size of the triangle, and for each vertex I know the S,T co-ordinate in the texture domain, would this help at all in the math to get a size for the texture applied ? Neil. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org