Texturing a terrain

Posted By: TrackingKeks

Texturing a terrain - 01/23/10 10:58

Hello, I have a little problem!
I had created a terrain and made a texture file. It looks pretty good in MED. But after I had wirtten a script and runned it, the terrain texture had the wrong coordinates and wasn't scaled.
How can I place the texture right?
Thank you for your help!
Posted By: MrGuest

Re: Texturing a terrain - 01/23/10 13:22

you can either change its position in WED,
unless you've added a camera position, the default will be at 0,0,0 so you could change the camera position

if you're using lite-c without WED, when you create the terrain
use something like...
Code:
me = ent_create("the_terraid.mdl", nullvector, NULL);
vec_set(my.x, vector(0, 0, -100); //move the terrain down 10 quants
vec_fill(my.scale_x, 2); //make the terrain twice it's size
my.pan = 90; //change the yz angle of the terrain

hope this helps
Posted By: rvL_eXile

Re: Texturing a terrain - 01/24/10 03:51

Is the Texture size a power of 2? like 512*512?
If not, it could be come to a wrong Texture position...

cYa Sebastian
Posted By: TrackingKeks

Re: Texturing a terrain - 01/25/10 18:10

OK, thanks for helping. But the texture size is a pcx file and a power of 2. I had used earth sculptor to generate it.
Posted By: rvL_eXile

Re: Texturing a terrain - 01/26/10 11:22

maybe the Texture file is broken, create a dummy Texture in same size then have a look wheater the texture is badly mapped again
Posted By: TrackingKeks

Re: Texturing a terrain - 01/26/10 11:35

I've exported the texture again, changed the file in the skin editor and now it is placed right. You're right. Probably the file was broken. Thank you!
© 2023 lite-C Forums