PDA

View Full Version : texrep


Thaellin
22nd April 2004, 09: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?
-- Jeff

LiveWire
22nd April 2004, 10: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.

Thaellin
22nd April 2004, 11: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.

*shrug*

I am but an egg.
-- Jeff

Thaellin
22nd April 2004, 11:23 PM
Hmm - should I be adding the offset before or after the multiplier?
-- Jeff

LiveWire
22nd April 2004, 11:34 PM
after.

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

Thaellin
23rd April 2004, 10:01 AM
> after

Done. Thanks.

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!
-- Jeff