BVE: Sphere Creator

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tof63
    Senior Member
    • Apr 2003
    • 392
    • Turin, Italy.

    #1

    BVE: Sphere Creator

    Clever idea this one! Thank you!

    The texture thing, I think, is too much complicated... a very headache thing..

    Luigi Cartello


    Luigi Cartello

    http://bve.altervista.org
  • tof63
    Senior Member
    • Apr 2003
    • 392
    • Turin, Italy.

    #2
    RE: Sphere Creator

    Yes, this version spreads the texture according to the object guide.

    But... if this can be the better method to apply the texture... is still another question...

    Luigi Cartello


    Luigi Cartello

    http://bve.altervista.org

    Comment

    • smace
      Senior Member
      • Apr 2003
      • 481
      • .

      #3
      RE: Sphere Creator

      As I consider this more, there is a better way, which I amy look into. Generate a network of 4( or 3) sided polygons that form the out side of the sphere and map to those. I do not remember the formular for a sphere, but with that, generating a sphere that is not a collection of cylinders is possible.
      For what I wanted the sphere to be, this one works well. If anyone wants the VB code, to improve on this, email or pm me.

      Comment

      • smace
        Senior Member
        • Apr 2003
        • 481
        • .

        #4
        Sphere Creator

        I have created a small utility to create a sphere in BVE csv format. It is in the attached zip file below. I wanted a hemisphere, not a full sphere, but was just as easy to make. Enter the radius in meters and munber of segments. Number of segments should be even to make a good sphere. The more the smoother, but the more resources it takes to show the sphere. Color can be any XXX,XXX,XXX to generate any color. XXX,XXX,XXX,XXX will gnerate a transparent sphere, but this is not a good effect.
        What I need help with is how I would make a texture map for the sphere. I need a method that is repatable so I can make the utility do it.

        BTW, enter some odd numers to look at the effect, 3 segments maks a pyrimid of sourts. This is also a beta test, I would loke any feed back on errors.

        Comment

        • smace
          Senior Member
          • Apr 2003
          • 481
          • .

          #5
          RE: Sphere Creator

          It came to me while asleep, as do many good ideas. Here is the version that will also alow texture mapping. The more segments, the better the map. Note it is not perfect, but for an object seen a little ways off, not bad. Enjoy

          Comment

          • smace
            Senior Member
            • Apr 2003
            • 481
            • .

            #6
            RE: Sphere Creator

            Luigi pointed out some errors in the version 2 that made the textures not quite right. Attached it version 3. If no one else finds any errors this week, I will upload to my page and the train-sim library, attached below. Note the globe is a 36 element sphere

            Comment

            • Simon_G
              Senior Member
              • Apr 2003
              • 203
              • .

              #7
              RE: Sphere Creator

              Hi

              The attached diagram should give the Cartesian co-ordinates for a general point on a sphere radius R.

              For a hemisphere (dome) θ can run from 0 to π/2, in whatever steps you require; for a complete sphere it should run from -π/2 to π/2.

              φ runs from 0 to 2π, again in whatever steps you require.

              The centre of the resulting sphere is conveniently at the origin (0,0,0).

              Cheers
              Simon


              Comment

              Working...