Texturing problem

Started by brunotrodrigues, April 05, 2012, 02:40:22 PM

Previous topic - Next topic

brunotrodrigues

(Possibly a beginner mistake with a simple sollution, still I was not able to make it work)

I'm extending the snork example as a way to practice using jPCT. So I took the dome.3ds file, mirroed it and united the parts in 3ds Max. I used the resulting object in my code and it seemed to work fine. But I noticed the stars texture was mirroed too in the application. Looking around you don't notice it until you look to the "horizon." There you can clearly see the mirroed texture because the stars are repeated.
How can I change this so that you don't notice the repetition of the texture?

EgonOlsen

By fixing the texturing in 3DS Max?

brunotrodrigues

No, there is no texture in the file. The texture (sky.jpg) is applied in the init method.

EgonOlsen

But there has to be some u/v-mapping in the file or otherwise, the texture won't who up at all... ???

brunotrodrigues

Hmm... I forgot about that...
Too bad I'm not very experienced with 3ds Max. I'll try this tonight. Thanks!

brunotrodrigues

#5
I've tried changing the uv-mapping on 3ds Max but could not do it properly.
Then I came accross some special textures of a starfield made to be applied to spheres (2048x1024). So I gave up on the .3ds and put a sphere primitive in its place.
And so I did, but how do I set the uv-coordinates on a sphere primitive? Is it even possible?
Right now it shows only a black background and no stars  :(.

EgonOlsen

No. As mentioned in the docs:

Quote
Except for the plane, objects created by this class don't have proper texture coordinates.

Primitive creates objects meant for quick-and-dirty prototyping and such. The object have no proper texture coordinates. If you need that, you have to use an editor for this or download some free stuff. It shouldn't be too hard to find a 3ds or obj file of a simple sphere.