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

    Reversed textures in game

    Scheduled Pinned Locked Moved Newbie Forum
    sketchup
    13 Posts 4 Posters 744 Views 4 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.
    • K Offline
      Kaja9
      last edited by

      Hi all,

      First: I use Sketchup for my very first week and it is an amazing software ! During that time I managed create 3D model for my game. Which is unimaginable in any CAD systems before due to their top difficulty.

      But here is the problem:
      I created model and applied textures on it. Some has been projected some only by putting on the face.
      In Sketchup everything looks OK.

      I used plugin to export this model into .x file

      This model I opened in game (Rule the Rail)
      And what I get in game is model with reversed textures (like mirrored) Texts was mirrored and whole textures.

      To get proper looked model in game I have to make mirrored textures in Sketchup. So in sketchup it looks wrong and after exporting in game it looks well. But this method is, yes, at least crazy. πŸŽ‰
      Even, Some 3d parts are in game positioned mirrored as well and the whole model is for me now one big mess. Because I really dont know where is front, back etc.

      Somewhere on internet I read, that when creating parts by mirror function (which I used massively), it creates reversed textures in Google earth. To correct this it is recommended explode components. BUT, I have no components. I mirrored only single parts. AND THERE IS NOTING IN MY MODEL TO EXPLODE.

      Does anyone know how to solve this ?? Thanks a lot!

      1 Reply Last reply Reply Quote 0
      • iichiversiiI Offline
        iichiversii
        last edited by

        Ok, i make assets for games using sketchup also but iv not come across this problem before, but maybe i can help you, a few questions tho, what game engine are you using? and what format are you converting to? ie FBX, OBJ etc etc...
        and if you could post an images or model i maybe able to find out whats going wrong here πŸ˜„

        Bring on the Rain...

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

          When you model a face it has two surfaces - a front and a back.

          In your current Style the 'default' front and back materials should have distinctive colors - typically off-white and blue [magenta is also noticeable].

          In most 'view-modes' these will be clearly noticeable.

          When you make 3d forms - like you might do with PushPull - it's possible to form an object that is 'inside out', so that what ought to be the outside faces are looking inwards, or for some of the faces to be incorrectly oriented.

          When you apply materials to these faces the incorrect formation is no longer visible.

          Within SketchUp itself it's not that important, because it still renders OK etc, BUT if you use these objects in other programs you can get complicated results, when materials are either on what appears to be the 'wrong' faces [this is from your point of view, but correct from how it's been modeled!], or perhaps in some apps the material on the front-face gets reused on the visible back-face [back-face materials are usually ignored in other apps and rendered as the 'default-material', OR white, OR black, OR transparent, OR with the front-material - depending on the app]...

          If you apply a material onto a group or component-instance, then all faces within that 'container' which have the 'default-material' will display with the container's material on both sides of the face [although they are in reality still have the 'default-material'] - exporting these objects usually transfers the container's material to theses 'nested' faces in the exported file format.

          If you have been mirroring 'containers' then an applied textured material can get 'flipped' when exported to some formats.

          So... to recap... when modeling you should initially ensure that the faces are correctly oriented.
          Using View mode 'Monochrome' displays ALL faces in the default-material colors, so even if you have some added textured or colored materials on faces you can still check those faces for the correctness of their 'orientation'.

          If a face is the wrong way round then you can simply select that face and use the right-click context-menu tool 'Reverse' to flip it [a good idea is to make a shortcut key to do this].

          If you have a number of faces that are connected and some of them are the wrong orientation, then select a face that is already correct and then use the related context-menu 'Orient', now all connected faces will flip to match.

          If you have already applied textured materials to any fixed faces, and you have adjusted these materials positions, or if they were projected etc, then you may well need to redo these material on the correct side of the faces that you have just reversed.

          If you have faces nested within 'containers' [groups/components] then I recommend that you apply any textured materials directly onto those faces rather than the container itself.

          So, model correctly before doing any texturing... and apply textures to faces, and not onto their 'containers'.
          It must easier to fix as you go that it is to correct a whole bunch of errors at the end!

          TIG

          1 Reply Last reply Reply Quote 0
          • K Offline
            Kaja9
            last edited by

            I convert to X file (*.X)
            Engine of game I dont know, but I must to add these files into game to add model:
            3dmodel - file.x
            textures - file.dds
            loading info about models - file.xli

            Here are pictures I made.
            http://s5.postimage.org/6vjf3dzg7/In_game_pic.jpg
            http://s5.postimage.org/9bl8h8hiv/In_game_2nd_side.jpg
            http://s5.postimage.org/z9oun9n07/Sketchup_view_projected_textures.jpg

            I checked all faces orientation. Their are correct only light sides are visible (no blue)
            That back faces are no visible in game I already noticed πŸ˜„ So this I have checked.

            During modelling I made no groups or components.
            But can ou more explain what container is?

            I now tried apply orient faces function on some parts and it makes big mess with a lot of different textures. What this exactly do? I understand When using "reverse face" to one face. It turnes it.
            But when doing "Orient faces" and I have selected different faces then it turnes always different faces. Why? I repeate, that when using "monochrome view" all faces on model are white (no blue ones). Thank you very much for your answers

            1 Reply Last reply Reply Quote 0
            • N Offline
              nickchun
              last edited by

              Take a look at Fredos tools in the Plugins section of this forum. 'Thrupaint' will help you apply textures to the correct faces and 'Reverse orient faces' will help identify faces which are the wrong way round. But it helps to understand all the points that TIG has made about how things work in native Sketchup before you start relying on plugins though.

              1 Reply Last reply Reply Quote 0
              • K Offline
                Kaja9
                last edited by

                I have an idea.
                Bcs chimney is mirrored as well it seems to be like mirroring through XYZ planes in sketchup.
                My whole model is located in plus green axes coordinates. And exactly divided by gren-blu plane. And green-red plane. And the game somehow takes the minus coordinates to somehow (I dont know how exactly) mirrored parts in game.

                So the problem seems to be in taking minus data into game engine. I guess.

                And now, how to solve this? when I am inserting model in game from menu, it takes and rotates and places through 0,0,0 coordinates from sketchup.
                So when I move model into plus coordinates insketchup, then in game the center of model will be moved. And I dont want it.

                What do you think guys?

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Kaja9
                  last edited by

                  I moved my model into only positive coordinates (solid green, blue, red axes)
                  Opened in game the train is decentered by the values i moved. BUT textures are still correct and chimney on its "crazy" position. I dont understand.

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

                    I use the term 'container' to mean a group or component that 'contains' the faces etc...
                    This seems to be not the cause anyway...

                    How are you 'exporting' the data out of the SKP?
                    What app are you using that in?

                    Without these basic explanations we are shooting in the dark...

                    What is this 'X' format?
                    What's making it ??
                    Does it have any 'settings'...
                    Many 3rd party apps expect the YZ axes to be flipped when compared to the SKP's.
                    There are two rival conventions in 3d modeling.
                    For example, my OBJ exporter does that flip automatically [there is no choice].
                    The various Pro exporters shipped with SketchUp often have that in their Options button on the Export dialog, which you set before exporting the data.
                    If you don't flip the YZ axes and the receiving app expects it [or it's own import options are not set to match this requirement], then the object is flipped over compared to the SKP version, rotated about the X axis, and what was in the Y is now in the Z and everything that was in the Z is oriented 180 degrees wrong facing along the Y axis !
                    If you problem is consistent that could well be the issue...

                    More relevant details please so that we might help you further...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      Kaja9
                      last edited by

                      To export I am using this plugin:

                      3D Rad Exporter plug-in
                      Copyright 2008 Fernando Zanini
                      Version 1.01
                      Learn more at http://www.3drad.com

                      I choose 'export as generic DirectX file'

                      X format is Text- document. Which is possible to open in notepad and see the long list of numbers. Probably represents the coordinates. Plus contains info about textures and other. Not looking like changeable (like .cfg for example )

                      here is example:
                      2.400541;12.051488;0.696687;,
                      2.400541;12.087688;0.469460;,
                      2.400541;12.051488;0.469460;,
                      2.400541;12.087688;0.696687;,

                      What you are talking about sounds great, there could be the problem. Y and Z flipping.
                      In my plugin I dont see any settings. Maybe is good have a look for another one.
                      Hope I explained everything. you wanted know. Thanks a lot for your helping

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

                        I assume you have read this http://www.3drad.com/sketchup-exporting-guidelines.htm
                        I also assume this is the plugin in question http://www.3drad.com/Google-SketchUp-To-DirectX-XNA-Exporter-Plug-in.htm

                        Unfortunately the author has encrypted the plugin as an RBS file so I cannot see its inner workings!
                        One might hope that as it's a specific X format converter for a SKP file it would automatically do whatever is needed in axes manipulation.
                        reading a simple X file it exports it does look like the YZ flip is made, perhaps there's an error in its texture's UVmapping?

                        Are you following all of the instructions they provide, like exploding absolutely everything prior to exporting the SKP ?

                        We do try to help with general SKP modeling etc... BUT this is a custom exporter and file format - so you really need to ask advice in their own specific forums, where the tools' author will be more likely to see your posts, and also understand the issues and hopefully advise you appropriately πŸ˜•
                        Good luck...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • K Offline
                          Kaja9
                          last edited by

                          Understand.

                          Very useful info is that it is convert process issue. And YZ flip matter. That helped me a lot. Thank you for your help

                          Karel

                          1 Reply Last reply Reply Quote 0
                          • iichiversiiI Offline
                            iichiversii
                            last edited by

                            Ah I see you don't need my help after all, glad you could fix it πŸ˜„

                            Bring on the Rain...

                            1 Reply Last reply Reply Quote 0
                            • K Offline
                              Kaja9
                              last edited by

                              I have just solved it.
                              I make in Sketchup my model with right textures. And just before exporting I flip the whole model through YZ plane. The game takes this and reverts back to correct positions. It is comfortable for me because for the whole time I work with correct model.

                              I'll do this until I find plugin which will do it for me.
                              Have a nice days guys, I am very happy with my model!!

                              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