Author Topic: Texturing problem  (Read 1558 times)

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Texturing problem
« on: April 05, 2012, 02:40:22 pm »
(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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12001
    • View Profile
    • http://www.jpct.net
Re: Texturing problem
« Reply #1 on: April 05, 2012, 02:41:43 pm »
By fixing the texturing in 3DS Max?

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Texturing problem
« Reply #2 on: April 05, 2012, 03:14:38 pm »
No, there is no texture in the file. The texture (sky.jpg) is applied in the init method.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12001
    • View Profile
    • http://www.jpct.net
Re: Texturing problem
« Reply #3 on: April 05, 2012, 03:57:05 pm »
But there has to be some u/v-mapping in the file or otherwise, the texture won't who up at all... ???

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Texturing problem
« Reply #4 on: April 05, 2012, 05:08:24 pm »
Hmm... I forgot about that...
Too bad I'm not very experienced with 3ds Max. I'll try this tonight. Thanks!

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Texturing problem
« Reply #5 on: April 17, 2012, 10:14:15 pm »
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  :(.
« Last Edit: April 17, 2012, 10:16:32 pm by brunotrodrigues »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12001
    • View Profile
    • http://www.jpct.net
Re: Texturing problem
« Reply #6 on: April 17, 2012, 10:45:09 pm »
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.