View Full Version : texrep
22nd April 2004, 08:18 PM
In order to get the 'correct' texture coordinates for a model in an AC3D file, do I need to just multiply each component by the corresponding repeat value?
Out of curiosity, why is there this repeat value instead of directly affecting the texture coordinates?
22nd April 2004, 09:54 PM
yea thats about it, and you want to offset them by the offset value as well.
just do it at loading time, that way you dont have to multiply by there repeat value every frame.
its makes it more editable to have a repeat value, rather than just effecting the UVs themselfs
say you have a level with a ground texture that repeats 50 times....
but you want it to repeat 100 times...
if the reapeat value just changed the UVs, you coulnt simple change the value to 100.
22nd April 2004, 10:20 PM
I didn't notice a mention of offset value in the file format doc... easily discovered, though. Thanks for the tip :)
I could see the repeat being useful during edting, but I would think it would make sense to bake the coordinates into the file when saved.
I am but an egg.
22nd April 2004, 10:23 PM
Hmm - should I be adding the offset before or after the multiplier?
22nd April 2004, 10:34 PM
and the reson the repeat/offsets arnt baked during saving is cause.....what if you wanted to re-open that level, and change the repeat/offset values
23rd April 2004, 09:01 AM
I could see this as being useful if you wanted to set the texture repeat on a newly created object to match the repeat on an existing object. This would only really be a valid action if both objects were the same scale, though.
If you want to change the repeat/offset after saving and opening a file, I see no reason why a new repeat/offset could not be applied and baked into the saved file.
It doesn't really matter, since I'm trying to use the files, not modify the editor :)
Thanks for your help!
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.