1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

String Object (wall)

Discussion in 'Bob's Track Builder' started by Pedrosilvaaa, May 31, 2013.

  1. Hi guys. I'm trying to create a wall as a Sobject for my BTB project. Unfortunately I got 2 main problems
    First, the texture doesn't seem very fluid:
    [​IMG]

    I tried changing the texture for a very smooth one for testing purposes but the problem persisted:
    [​IMG]

    Second, on corners you can see the edges of the wall and it looks rather ugly:
    [​IMG]
    I tried ticking the "curve with spline" and "can stretch" options but it still doesn't get the desired effect.


    Any ideas on how to solve this? Here's an example of a perfectly working Sobject wall (no texture problem nor ugly looking corners):
    [​IMG]


    Free cookies for anyone helping me!

    PS: I'm creating the object for a RBR stage. So moving the sun around on BTB to fix the texture "shadows" problem won't help cause it has no effect in-game =x
     
  2. Well, since that example of working SObject is mine, i'll try to explain. The main difference can be seen really well in BTB by switching to Wireframe viewmode. It's all about the modelling.

    If i remember correctly, it's segmented and not a large single plane. But since it's designed to be used with "curve with spline", it needs a lot more shorter panel size. You have to imagine how it bends when your modelling it. Again, if i remember correctly the main shape was done with flat, long panels and then the object is split in several segments. I had to make several tests in BTB to find out what's the best shape. The polycount is about 3 times larger, still being regarded as lo poly model. The shorter panel size, the smoother curves you get. With walls you need shorter panels but they can often be quite high giving moreroom for optimizing.

    Note! With these kinds of repeating objects you have to make sure you don't overcomplicate things. You can make big changes by small tweaks: you eliminate 20 triangles from an object that's repeated 3000 times makes room for more objects.

    You also need separate pieces for start, middle and end, where the middle piece is repeated. you can use that to your advantage. to make more complex models.

    As for your texture problem, can you upload the texture you used, it just looks like it's not tiled texture but simple gradient...

    EDIT: maybe this helps: switch to wireframe mode and turn the middle part 90 degrees (YAW). That will make the three objects look separate. Use the different modes and move your object thru all kinds of terrain shapes, study how it bends. When you see it in motion, it'll all come clear, i hope.. That's how i learned it.
     
    • Like Like x 1
  3. To me it looks like a shadow problem. Presumably you imported the object via XPacker, so go back there, find the object and go to the Normals tab. Click on 'create normals' with 'default normals' selected.

    If you cannot unload the XPack from your project (because other things are in use), you'll have to copy and paste it from the XPacks folder into your project's folder.
     
  4. The object is as simple as it can be (basically 1 rectangle bot and squares on top) and I have 1 piece for start and then just mid. The end is not necessary (I think) cause the mid part also covers the end =).
    I'll upload my xpack and texture so you can have a closer look at what I might be doing wrong.

    http://www.mediafire.com/download/pelmqtiknz2xjrv/Xpack_+_texture.7z

    The texture is not tiled indeed but I don't think the shadow is related (maybe I'm wrong). In the meantime I'm gonna try to create a more segmented plane as you mentioned above and see the results =)

    To R Soul: I created the missing normals (default) when I created the Xpack =)
     
  5. When you go to the Object Pieces tab, by default there isn't a valid selection, you have to select each piece and then select the spline option. You can also select Start/Pattern/End if you ever have multiple objects in each section. You'll see problems though, because, unlike with walls and tracks, BTB can't create new polys as you bend the SOjbect. It can only stretch what's there. It's like when you have tight corner on the track but the panel length is too long. You need to split up the bottom part of the wall, preferably where it lines up with the block at the top, like this:
    [​IMG]

    Now, on to the shading problem:
    Having seen your object, I know what the problem is. Each piece has hidden faces. and these trick the program into smoothing the shading around each vertex.

    The start piece needs to be open at the end. The pattern piece needs to be open at both ends, and you will also need an end piece which is open at the beginning.

    Here's an example with some test objects I made. I used the 'space after' number to create gaps between each piece. Without it, they line up seamlessly.
    Start:
    Beginning:
    [​IMG]
    End:
    [​IMG]

    Pattern:
    Beginning:
    [​IMG]
    End:
    [​IMG]

    End:
    Beginning (of the end...)
    [​IMG]

    End of the end:
    [​IMG]

    Finally, you don't want any polygons where the top and bottom meet, so you need holes.
    Bottom piece, viewed from above:
    [​IMG]

    Top piece, viewed from below:
    [​IMG]
     
    • Like Like x 2
  6. Thanks R Soul, that's pretty much perfect explanation.

    A bit off-topic but i've noticed in other engines, like Source, they stress closed, convex geometry a lot.. I've been wondering whether it actually is useful of closing the bottom side here too.. I know, totally different engines and all objects that move or interact with the player should be convex and closed. gmotor2 seems to not mind about concave shapes but still, it's only few triangles more and possibly collision detection could work smoother in places where the objects bottom is not buried to the ground... Vertice with only one triangle attached to it, well, that edge is not complete, your vehicle might go thru the bottom and gets stuck in the middle of the object where it meets the first real edge (vertice with two triangles..) http://en.wikipedia.org/wiki/File:Two_types_of_collisions_and_corresponding_CSO_faces.svg
     
  7. Well, that's it! That solved both my problems R Soul :D. Thank you so much for your help and Kennett Ylitalo too ;)