• Welcome to the largest (sim) racing website in the world!
    Blurring the line between real and virtual motorsports.

Tutorial - Objects for BTB with Sketchup

Discussion in 'Bob's Track Builder' started by Biggles1212, Oct 16, 2009.

  1. Richard Hessels

    Richard Hessels
    Premium

    Messages:
    1,280
    Ratings:
    +345
    But it's difficult to find those inside out faces when you already applied textures on them.
    So when you reversed the faulty faces, you have to apply the texture again.
    As placement is not always preserved.
     
  2. Erwin Greven

    Erwin Greven
    retired from this site.

    Messages:
    1,538
    Ratings:
    +258
    Maybe i misunderstood this phrase. "Reverse side of faces" being NOT equal to the "blue face"
     
  3. Aus_Crosso

    Aus_Crosso

    Messages:
    5
    Ratings:
    +0
    Sorry for not being clear enough...I'll try and explain some more. And thank you for the simtrackpedia link! That should help *touchwood*.

    So I have a Grandstand with a roof and some Sponsors on the wall. However, the Sponsor 'texture' has taken over the roof 'texture' so that the logo is not only showing on the wall...but also as the roof!

    I also checked the Xpacker and realised that the roof texture was not in the texture tab!

    So Simplified...

    I have 2 walls with 2 different textures. I checked the white wall was facing out in Sketchup etc.

    I export to Google Earth in Sketchup 6

    I open Xpacker, import object (.dae) and then make sure images are correctly sized. In one of the examples one of the images wasn't actually there! And thus the material had linked to another Image.

    Open BTB and put in the Object and both of my walls have the textures...rather than a different one.

    Hope that makes Sense:D
     
  4. martinez

    martinez

    Messages:
    749
    Ratings:
    +16
    Ok, two things:
    1. "Paint reverse faces..." and you are gone xD
    2. I used to export even after every single operation in Sketchup to check if he had not screwed anything.

    No offence, but when you learn some Max and open some Sketchup projects.. Google is a great company, but SU - big mistake .
     
  5. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    Check with "monochromatic" if you got reversed faces. It show the rights side as white and reverse side as bluegrey.
     
  6. Erwin Greven

    Erwin Greven
    retired from this site.

    Messages:
    1,538
    Ratings:
    +258
    [​IMG]
    How i build objects with Sketchup.
    1. I open SU7 (Sketchup 7.0) and build the whole object. image 1.
    2. Then i open materials and delete everything in "model".
    After this i add all the textures needed. Image 2,3 and 4.[​IMG]

    [​IMG][​IMG]
    3. I delete the bottom face and all the not necessary polygons.
    The "Glas"-texture i took from SU and added into model. After this i exported it as a texture and added to the object.
    4. I save it as a SU6 model and close SU7. Image 5.[​IMG]
    5. I open SU6 and export it as a Google Earth 4 object. image 6,7 and 8.
    [​IMG]

    [​IMG]

    [​IMG]
    6. I close SU6.
    7. Now i change the extention *.kmz into *.zip and extract it. Salamander is very helpfull with this. (image 9.)

    [​IMG]

    8. Exploring the "Images"-map learns that all the textures are well exported. image 10 and 11.
    9. I change the sizes into 128/256 and so on.

    [​IMG]

    [​IMG]

    10. I make copies of every texture and rename them. Image 12 and 13.

    [​IMG]



    [​IMG]

    Question.
    1. In the file "textures", would it be a problem when i rename "../images/texture0.jpg" into "../images/Hoogh300.jpg"? So it would read: <../images/Hoogh300.jpg> <"../images/Hoogh300.jpg>
    And after this deleting the old files?
    2. Now i used 7 textures. Using Sketchup, would the chances on succes improve when i combine all the textures as a single texture. I have seen Martinez using all his textures in one single sheet.
     
  7. martinez

    martinez

    Messages:
    749
    Ratings:
    +16
    Yes, I used "texture positioning" in Sketchup - select a polygon, right click and choose Texture - Position. Then manipulate with the pins. Be carefull to operate on one part (central one) of the texture and don't exceed over the texture edge, or you will get two materials with the same texture. Export often and check for number of textures. Or even go often to these kmz files and check exported textures. IF there are some blank materials - this means that something is inside your model - search and destroy! :D
    For more flat and simple objects (like stones), "Texture Projection" worked quite well too.
    Anyway - whatever you do in Texture-Position, the mapping most probably will be spreaded over other (not central) UVW areas. This is what SU is ;)
    I did not find anything much better in both SU 7 and 8 - so for models I used always SU 6 - avoiding that mid-save (from other to 6). Sketchup 8 I use now only for creating big terrain sceneries and for load problematic models made in Sketchup to export them to .3ds (and load to Max ;) )
     
  8. Erwin Greven

    Erwin Greven
    retired from this site.

    Messages:
    1,538
    Ratings:
    +258
    The example above is how you work when you use SU7. But the newest buildings i start immediately in SU6. I can do in 6 just the same i can do in 7.
    With search and destroy, how do i work? There will always be a blue texture of the back of a face/polygon. The inside of a wall or roof.
     
  9. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    You need to first of all, design the Texture Atlas (more than one texture in the same image). There are multiple choices here; either use the atlas from the beginning (easy way) or changeand reposition all textures one by one to use the atlas (hard way). There are some limitations: using atlas, you can not have repeating patterns! You can make vertical strips that wrap around vertically (or vice versa) but not corner to corner patterns. This is a problem using SU, UV mapping is shite..

    For your object, the doors and windows are the first one to benefit from atlas. For ex, change them all to 128x256, and create one texture: 512x256. There are now four "slots" available in that large atlas. Position the two doors and the one window in that atlas. You ca use the "slot" that's left for creating the transparent glass. You still win, you get 1 texture with 4 channels (RGB and Alpha) Instead of 4x3channel and 1x4channel textures. Since that transparent window is very simple, you can add details on it's texture...

    Those walls and the roof are not really good for atlas, it's so much easier to use repeating patterns there...

    I'll normally use small repeating textures when painting flat surfaces (32x32 or 64x64, with bumb maps in double resolution..). That increases material count but makes everything else so much simpler that i'll gladly sacrifice some performance to agility in the creating process (less steps, better creativity..)

    It all depends on the model in hand: If it's suppose to be on the background, large surfaces with the details in the texture. If the object is suppose to be close to player, use more polygons to create details. One good way to check how your track is optimized is to shitch the texture+wireframe mode on and driving/looking around in BTB. Where you see a lot of blue, there the polycount is high. With racing games, the polycount increases in the distance (track & terrain meshes mostly) but the game engine has some clever optimizations that is uses there. Concentrate on the objects, hide the terrain and track and see how the vertical surfaces work. In the pitlane, the long huge and detailed objects quickly become a real resource hogs, both transform and fill bound..

    One way of doing things is to first make simpler placeholders and position them on the track. Replacing them later will more likely resort to better optimized object for it's purpose, only later in the project you can really see what are the objects real properties. For ex. does it need to have back side, can the car get close, what resolution texturing it needs etc. For place holders you can even use PNG format to quicken the process. they can always be changed later. PNG is better than JPG, they for ex wrap around cleanly, JPGs have horrible borders due to compression.. This applies to all application in the chain, also AFAIK PNG is less performance hog than JPG.

    Those who knows what are the disadvantages of using repeating textures, please enlighten us.

    For those who want to learn optimization, i recommend this article and it's followup: http://www.ericchadwick.com/examples/provost/byf1.html It's not specifically for racingsims, more to FPS games but the principles are excactly the same. It has helped me immensely, by understanding the reason, even the placeholders are optimized to some degree.
     
  10. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    I paint the reverse sides with some high visibility texture/rarely used texture thats already in the object. Shift-click will paint all the faces that are assigned to that texture. Using the shift clik with the white faces too will eliminate those frontcolors. In the last object (paddock, pits and park ferme/podium) i used one blue texture to mark all the insides and replaced it with a one that needed to be used in the last stage (atlas of sponsor logos...) It kept everything well organized, i had one face reversed in the entire object. It's just hard to remember to keep checking with the monochromatic mode and keep painting those reversed sides often..

    One tip i've noticed: Choose "render onle selected" from the export options, you can split objects easily. Making the object as component, then selecting everything inside that component and exporting only that will place the object to 0,0,0 automatically. Good for creating SObjects.
     
  11. Richard Hessels

    Richard Hessels
    Premium

    Messages:
    1,280
    Ratings:
    +345
    Why don't you combine all textures in one file?
    Just place them on the right spot in SU.
    Than export, now you end up with zillions of files for a whole track.
     
  12. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    Did you even read my posts? It's not always usefull to use atlas. "Just place them..." You do realize that using a small repeating pattern texture for large surface is way faster than to reposition EVERY texture manually for EVERY face?
     
  13. Richard Hessels

    Richard Hessels
    Premium

    Messages:
    1,280
    Ratings:
    +345
    Yes. i realize...
    But just use repeating textures is also making the environment objects look flat & bland .

    As long as we can't cast shadows on such a large scale.
    We need to make some on the model already.
    Modern systems have no problem working with larger textures.

    I do not try to take your topic down, but wanted to add something.
     
  14. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    Arguments belong in a good conversation and every side is beneficial :) I believe in a certain system or a method, some use different methods. The goal is to get to the best solution.

    I would like to see those shadow, how will they work in morning vs evening? Adding grime and dirt, wear&tear to textures is always a good idea. But i can't justify creating large textures when i can use small to do the same job. With dirt comes another problem, then you have the same dirt pattern in every surface you paint with it. For a big wall like 10mx20m that sits close to the player like pitbuildings, the resolution for a fullsized texture would have to be huge to have some details working up close (basically the size of your screen isn't enough resolution) that it really isn't the way to go. With only one tiny texture, like 64x64 repeating in tiles you can walk right up to the wall using bumb mapping.and see a "natural" surface.

    I don't know if it's possible in some other 3D software to create different UV mapping for bumb/spec than what diffuse uses.. Then we could have the best solution.. Small diffuse and bumb repeating and large spec for ex..

    For far away objects, using atlas all over is better solution but then you don't need to use large textures for it.. Poistion the object in track, drive aling the track to a place where it is closest and measure the screenspace it takes. Then use that figure to decide on the resolution.. In most occasions, the texture will be in the range of 64x64px - 256x256px

    I still think that the best way is to mix those two. Creating atlases for details and and paint the large surfaces with repeating tiles. Polycount is slightly increased and material count too (well, maybe one or two materials more, not a biggie) but it's just so much quicker in buildingphase, plus it's much simpler to change objects geometry that way. Using atlas all over will force you to edit it every time you want to create a new door, or everytime you want the building to be 50cm taller..
     
    • Like Like x 1
  15. Richard Hessels

    Richard Hessels
    Premium

    Messages:
    1,280
    Ratings:
    +345
    But screensizes vary quite a lot, what looks good on your monitor can look bad on my setup.
    I race on 3x 24inch, so many things are 3x times more big when i drive up to it.
    So for my setups textures should be at least the double size.
    Than there is the options to choose your texture size in the game it self.
    So people can choose what resolution the want the textures to be in the end
     
  16. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    Yeah, people do use different resolutions so we just have to generalize. Calculating for 1920x1080 (or similar resilution) is good enough. And your triple monitor only shows horizontally a lot more, you still have basically the same vertical resolution..

    I don't care about game settings, i use max with texturedetail set to 100 when testing. That's why there is a betatest phase, to sort out glitches in different setups, the designer/builder can not do betatesting: betatesters needs to be someone who is not involved in creative process, builder can only do alphatesting. People usually go for good performance and with any rig the texturedetail is at least 100, we can't really expect the user to change their settings for every track. Good mipmapping is the only thing we can offer for people who need lower specs.
     
  17. Richard Hessels

    Richard Hessels
    Premium

    Messages:
    1,280
    Ratings:
    +345
    Still the impact of larger and much better looking textures on modern hardware is only a few percent.
    But that goes for everything that makes it look better.
     
  18. Kennett Ylitalo

    Kennett Ylitalo
    Premium

    Messages:
    4,753
    Ratings:
    +3,968
    I agree, we have it so much easier than for ex 5 years ago.. We don't need to build for 1gig RAM and 256meg video mem anymore.. But one factor we still have, filesizes... And making extremely large textures creates bottlenecks still: making them one step larger quadruples the size, multiplied by the number of shader maps used and they will become very quickly a limiting factor... There are so many bandwidths to think about, HD to RAM, RAM to GPU etc. and not everyone has high speed unlimited internet connection... Once verything is loaded and ready for GPU, then the texture size is not important but for every step before that.

    Just one example:
    2048x2048 texture with 3 maps and alpha channel: ~12Megs
    1024x1024 texture with 3 maps and alpha channel: ~4megs
    512x512 texture with 3 maps and alpha channel: ~1megs

    So there's a real reason to use 1024 as the basic maximum size and to use resolutions over that only when it's absolutely needed. We still need to optimize and i think it's part of the fun... It really bums me out when i see a track that has completely wrong size textures used. I use HQ textures in the initial build and try to measure the actual sizes when testing.
     
  19. Richard Hessels

    Richard Hessels
    Premium

    Messages:
    1,280
    Ratings:
    +345
    Indeed when afterwards you find out the texture map is too big, you scale it down.
    Most textures get a bit sharper if they get scaled down.
     
  20. moeom

    moeom

    Messages:
    18
    Ratings:
    +1
    I keep getting this problem when i try to import models into xPacker:

    Unhandled exception blah blah blah. And at the bottom of it.

    TODO: mesh part have different vertex buffer definition.

    What does that mean?
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.