sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Reverse face and uv

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 245 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      giuseppe500
      last edited by

      Hello.
      I'm creating a sketchup importer in c++ and opengl.
      I have a problem with th UV mapping.
      I see that in sketchup the uvs can be positive or negative , and if i reverse a face the UV changes , but is not only inverted the sign , whats changes and how i can import it in opengl system UV.

      1 Reply Last reply Reply Quote 0
      • G Offline
        giuseppe500
        last edited by

        I don't have really clear what are the difference between faces and reversed faces, so in my importer i use an atlas and I calculate the new uv with an

        newU = abs(U) * scaleMatrixU + offsetU;
        newV = abs(V) * scaleMatrixV + offsetV;

        and this in non reversed face seems correct , the problem is when i have a reverse face , the texture UV are wrong .

        if i don't use the abs the UV are wrong at all both in reversed that in non reversed faces.

        But what mean a negative U or a negative V in sketchup?
        is a form of tile or wrap?
        I not understand

        thanks.

        1 Reply Last reply Reply Quote 0
        • TIGT Offline
          TIG Moderator
          last edited by

          This really is a very basic concept about face orientation... πŸ˜’

          Most exported and 3rd party renderers assume that the part of the face you want to render is the front of that face, with its applied mamterial [if any].
          IF you have a sloppily made model where some faces are the wrong way round - so the back of the face is visible [when most sane people would expect to see the front face] - then it might well look OK in the SKP - Sketchup is quite forgiving... BUT most 3rd party tools will ignore that face's back material completely and simply give it a default material like all of the other back faces which are [usually] unseen [often white/black depending on the app]... and then render the face's front with whatever material it might have [which is then 'unseen'!!!]

          You need to give your SKP and other app's a chance and model appropriately - not sloppily!!!
          You should never need to consider a face's back_material IF your model has been made properly. If you have a thin object - like a glazed-window-pane - then it should have two skins [faces], each of which should face out so you never have to see or consider the 'back_material'... πŸ˜’

          TIG

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement