Billboard just ain't gonna turn

Discussion in 'Track Modding' started by Johannes Rojola, Jan 18, 2012.

  1. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    I am trying to make simple billboarding tree by following the info in Track Technology pdf, but it just wont turn (face player). I tried everything I can imagine, and the dude only stands still.

    Hopefully my image explains my settings used:

    http://dl.dropbox.com/u/7364491/billboard.jpg
    [​IMG]
     
  2. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Did you change the Vertex Alpha to a non-default value?
     
  3. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    Yes I used 90 there
     
  4. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    OK, didn't notice this at first: uncheck Billboard in the exporter, and keep BB checked. Billboarding will be done on a Quad level (Stmp, BB, None checkboxes), rather than Object level (Billboard, Stamp checkboxes).
    You should also turn off Two Sided. If the billboarded object/quad faces the camera, there's no need for it to have two sides :) .
     
  5. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    No help :( Is there something specific I need to add to SCN file relating this object?
     
  6. mianiak

    mianiak Registered

    Joined:
    Oct 5, 2010
    Messages:
    691
    Likes Received:
    46
    If your using max 2010, check none and see what happens?
     
  7. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    At this point, I can only suggest trying another shader (Bump Specular T1 Stamp Vertex) with dummy textures for the other texture stages.
    There is an example in the Joesville section that was posted in the Tutorials thread. As a last resort, merge one of those objects and try exporting that?
     
  8. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    None of that helped, its odd. I have Max 9, maybe thats the reason I don't know. I try later importing Joesville object..
     
  9. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    OK, thanks for your patience. At least we can now rule out a dodgy shader or wrong exporter settings.
     
  10. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Have you tried creating a new scene in Max (either close and re-open Max, or do File->Reset), and merging in just that object, then exporting it again from the new scene? The only thing you should have to redo are the Instance settings (and where to output your mesh).
     
  11. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    Okay it worked finally when I merged one billboard object from Joesville Max file to my track scene, and exported it. But I wish I knew why my own tree does not work...
     
  12. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    I wonder ... was your tree element a quad (with the proper triangulation obviously)?
    I'm glad you managed to export the Joesville object fine. As a temporary solution, you could always take a quad from the Joesville Max file as a template and adjust the size and mapping to match your tree.
     
  13. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    Yes it was quad, it didn't work then. Then I made it to proper mesh and didn't work then either. Yes I probably have to use those imported polys as starting point now, and maybe I see later if I manage to do billboard from scratch. Thanks to all for the help :)

    EDIT: A lot more problems. Now it seems that I just can't resize the billboard object, it will always render in same size and shape no matter what I've set in Max. Then I was able to make new from scratch which for the first time started to work, and turned correctly. However, it lies in it's side at 90 degree angle. Well I triangulated it as suggested in pdf, now it stands in correct position BUT doesn't turn.

    I can't understand, I import a object from Joesville track. It looks fine as is, then I try to resize it for my purposes but it just doesn't make any difference. Not even if I pull the vertexes. It is just there in its original form :D

    Wow this is gettin' frustrating... I think I need to stick with desert tracks lol.

    EDIT2: Okay now it works, I had to turn everything around, change all pivots, move terrain worth of 400 square km's. Because of one tree. I hope I don't have to deal with this anymore.
     
    Last edited by a moderator: Jan 18, 2012
  14. mianiak

    mianiak Registered

    Joined:
    Oct 5, 2010
    Messages:
    691
    Likes Received:
    46
    Resizing will cause errors with this type of billboarding. If you do resize it do it in a submode.

    Infact, I just realised something, importing tracks does mix up the scale. I am working on a track I built in btb at this moment and one thing I notice when I go to weld verts together, it will let me weld them with a value of 0.1m without it welding other verts close to it. If I try to weld verts on a road for example on a track that has been completely scratch built in max, I need to go down to 0.001, otherwise it will weld many verts together. This type of billboarding afaik is very dependant on scale. The smallest movement or adjustment can cause problems.

    I have successfully had this working on a track that I did scratch build in max from the start, so I know it works.

    You can try creating a plane, converting it to an editable poly, then attach the imported tree mesh to it.

    I am not too sure that if you have actually made new trees, weather or not the other objects in the environment will cause you problems all round.

    What I am considering doing right now for this track of mine, is to make some splines from the track and terrain mesh, then I will export them as .obj, then take the zyx data from the obj and create a tabulated text file, import that into a new project using the tabulated text file import script and re do the track and terrain again from scratch in max.
     
  15. Gee76

    Gee76 Registered

    Joined:
    Jul 20, 2011
    Messages:
    10
    Likes Received:
    0
    Like Johannes, I have also been having trouble getting billboarding to work although I'm fairly new to 3dsMax so I'm still learning everyday (Noob), but after looking long and hard at Joseville_Section_rF2, rF2_Track_Technology.pdf and the rF2 Beta forums I have managed to get my own billboards that I created working (not meshes I've made merged into working Joseville meshes).

    Below in the screenshot is an example of three different billboards I've made that work in rF2 (at the foot of the tree).

    View attachment 1007

    Problem is the tree or more specifically the trees leaves (billboard cards), they are using the same gmt setting and texture/shader setting as the three working billboards, but as you can see from the next two screenshots not all of the polys rotate.

    View attachment 1004 View attachment 1005

    The tree itself is exported from Speedtree as a *.fbx, then imported into 3dsMax, I thought the issue might be that SpeedTree places the billboard polys very close together and a lot of them overlap and intersect each other, would this mess with the normals and interfere with them rotating?

    View attachment 1006

    I don't really want to replace the billboard leaves by hand in 3dsMax to prevent the polys from interfering with each other (if that is the problem), as SpeedTree produces nice looking trees of various shapes and sizes almost effortlessly, just add custom made textures for each species of tree and they should look great in rF2.



    Hopefully someone reading this has also got access to SpeedTree and can look into this billboarding issue, if not I recommend you give it a look, if nothing else it can save time generating some good looking tree trunks and branches (LOL), but if this problem gets solved then it would be a great app to partner 3dsMax for us track modders.

    Plus anyone got any tips/suggestions on how I might go about remodelling the billboard leaves so that they function properly.
     
  16. mianiak

    mianiak Registered

    Joined:
    Oct 5, 2010
    Messages:
    691
    Likes Received:
    46
    You want Stamp for those kind of trees so it rotates on all 3 axis instead of just the one.

    In 3dmax,,,
    Make sure the faces are facing North
    Make sure the triangulation is top left to bottom right (right click on object > object properties > turn off 'Edges Only', then if you have to fix them, in edit poly submode you can use 'Edit Triangulation')
    Make sure the verts have a non 0 alpha (remember the default 100 is equal to 0 because no vert alpha has been set).
    Make sure the vertex numbering on each face is lowest numbers on top and highest on bottom going in order of left to right.
    In the screen aligned quads section, turn on Stamp
    In the “box and arrow” buttons, select the button with the box in the middle and 4 arrows going out.
     
  17. Gee76

    Gee76 Registered

    Joined:
    Jul 20, 2011
    Messages:
    10
    Likes Received:
    0
    Thanks very much for the help, I understand most of it, apart from the above.

    So you mean top left vertex = Vertex 1, top right vertex = Vertex 2, bottom left vertex = Vertex 3, bottom left vertex = Vertex 4.

    I didn't think 3ds Max could display vertex numbers on editable meshes or polys, just splines. Can it be worked out by how its triangulated or do I need a script?

    Also is it possible to use 'Edit Triangulation' on more than one poly at a time? cause there are hundreds in the speedtree exports.
     
  18. mianiak

    mianiak Registered

    Joined:
    Oct 5, 2010
    Messages:
    691
    Likes Received:
    46
    When you select a single vertex, look in the rollout and it will tell you which vertex number it is. I think there is a way to turn on something that will show the numbers in the viewport, but i cant remember off the top of my head what it is.

    Alex made a script to help speed up retriangulating poly's http://www.tltracks.com/2011/09/new-maxscript-polygonface-retriangulation/ see if that can help you.

    I'm working on a max script specifically for fixing up imported meshes for this billboarding system. It will sort all of this stuff out with just 1 click. But my limited knowledge in max scripting is making it hard for me to do anything :D

    You might find out that the vert numbering is back the front, ie lowest on right, highest on left, if that's the case, in poly submode, select all the faces of the back the front triangulation and flip them, then rotate them 180.
     
  19. Gee76

    Gee76 Registered

    Joined:
    Jul 20, 2011
    Messages:
    10
    Likes Received:
    0
    Something like this....

    View attachment 1017

    I also know about Alex Sawczuk's script, not sure it's ideal for the specific task we're trying to do, it's not a one click deal on objects containing loads of sub-objects but could very useful for terrain meshes.

    Unfortunately the speedtree leaves seem to be unusable cause the billboard cards are to distorted, they aren't triangulated the right way plus the vertex numbers are all over the place, am I right in thinking that billboards\stamps need to be completely flat.

    Good luck with the script, that's exactly what I was looking for last night and I hope you are successful.
     

Share This Page