www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Material Scale « View previous topic :: View next topic » 
Author Message
inucasoftware
PostPosted: Mon Jul 11, 2011 6:47 am    Post subject: Material Scale Reply with quote



Joined: 08 Jun 2011
Posts: 18

scale : 30 * 30
Rotation : 0.0
Orientation : 90 , 90

Export

sTextureMapping *pMapping = channel.mapping;

pMapping ->scale.x; not value 30
pMapping ->scale.y; not value 30

how to calculation recover scale value?
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Jul 11, 2011 7:23 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

As the comments in the source explain, once you have an orientation in the sTextureMapping, the scaling is no longer as a repeat factor (tiling in UV space). It needs to be in world space since texture custom orientation is computed based on projection in world space.

In your Grome UI this scaling is the one in world space but because the values would be too small it is divided by 1000. So what you have in the scale member inside sTextureMapping is the correct value to be used when computing the final UV matrix.

There are various threads already explaining how to deal with this structure. You can look at these threads:

http://www.quadsoftware.com/forum/viewtopic.php?t=620

http://www.quadsoftware.com/forum/viewtopic.php?t=505

The second one even presents how to compute the final matrix.

Or you can just have a search with sTextureMapping on the forum.

Let me know if this fixes you issue.

Kind Regards,
Adrian L.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group