Need help with 3D Trees

Discussion in 'Track Modding' started by vicent-sollana, Dec 11, 2012.

  1. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Hi guys.

    I'm placing the trees in Toban circuit and I'm basing them on the ISI ones. I've noticed in the 3D trees that they are made of 87 different objects, one is the trunk of the tree and the rest are leaves. What I found is that when they are individual objets the leaves move making a rotation. For me it seems like there are to many lines for just that object, taking in account that ussualy there isn't just one tree in a circuit. When I attach them, the leaves doesn't rotate anymore.

    My question is.

    Is there a way to make those 87 objects become one and still mantain the rotation?

    View attachment 5112

    Thanks.
     
  2. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Yes.

    That is new feature in rF2 track technology (compared to rF1).

    You can work with "stamp vertex" shader in element level, which was not possible before.

    In other words... Make one branch leaf rotation fully functional, clone it, move and scale it next to your trunk. When you have finished you object with enough rotating leafs, attach them together and they will work as one object with rotating leafs.

    You can use same tech with spectators too. Make one rotating spectator, clone few dozens of them on your grandstand and attach them together. They will work as one object, but each one of spectator will rotate towards camera.

    Generally, it's more performance wise to have bigger object with many polys than separate gmt for each spectator poly or tree leaf. Game will handle less objects with many polys more effective than hundreds of independent gmt's.

    Cheers!
     
    Last edited by a moderator: Dec 12, 2012
    1 person likes this.
  3. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    I'm not sure but I think in Gmotor Instance in "Screen Aligned Quads" must mark "Stmp" not "BB". Look in Joesville.max
     
  4. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Thanks guys,i'm gonna try
     
  5. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    I've found another problem, I started to put the leaves on the branch and it's seems ok in 3dsmax but at the game appears like they are too high from the branch, anyone knows why this could be?


    Screenshot in 3dsmax

    View attachment 5125

    Screenshot in-game

    View attachment 5126
     
  6. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169

    i never try 3d trees.
    Try to check the Pivot location.
     
  7. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Yep, looks like pivot problem, your leaf plane vertex numbering is wrong or "Screen Aligned Quads" is set wrong in exporter. You might want to try "reset xform" also. It's sometimes worky to get it work as wanted...;)

    Try to create working leaf to origin (coords 0,0,0). When you got one leaf working in game (and oriented correctly), clone it to several leafs, attach them together and export again. If it works, move you trunk same location, start cloning, attaching and building your tree. Remember test it time to time. When it's ready, move whole construction to wanted location and export again.

    It it still works, then it's easy to clone it around the track and make minor adjustments and changes each tree for invidual appearance.

    Cheers!
     
  8. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169

    I see your macro buttons.
    You don't need to create a toolbar for each button just drag the buttons to one toolbar.
     
  9. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Thank you guys like you say it was a problem from pivot exactly from "Screen Aligned Quads", I had selected the wrong set, I had the up arrow selected and now I have selected the arrow from the four sides.

    View attachment 5127

    View attachment 5128

    Thanks for your help.:)

    It's good to know i thought i had every single one separated
     
  10. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Nice

    Post a image of your Instance settings for others see it.


    The leaves quad are to small or add more quads.
     
  11. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Great to see you have it solved. :)

    Cheers!
     
  12. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17

    For the instance settings i use this params:

    I don't know if this is correct, I'm watching the scn from Lime rock.

    Now i need to adjust the specular and the global light of the tree and increase the size of leaves.

    View attachment 5148
     
  13. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    And some variety in leafs would be nice:
    - rotate UV coordinates
    - put more different leafs on one texture and assign different fragments of this texture to individual quads
    - slight (but only slight) variety in vertex color (although I'm not sure if this shader supports it)

    But of course keep it all within one material :) Actually you could have all trees using just two materials. If you don't need texture tiling, you can put more stuff on one texture. You don't need tiling on leafs and you only need tiling of trunk / branch textures in one direction, so it's still possible to have multiple trunk textures put together.
    This would allow combining various trees, that stand nearby, into one object.


    And if you want to go even further with this, I have one more suggestion - for trees with densier coronas, leafs that are more hidden should be darker (since they're less exposed to light) :

    [​IMG]

    Simply making them darker by changing vertex color should do the trick. It's not the proper way, but current rF2 shaders don't allow anything better.


    It's really nice to see people taking advantage of new features, so keep it up :)
     
  14. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Thanks for the tips, is very important for a beginner in 3dsmax that the people who know give us advice.

    Enviado desde mi GT-I9100 usando Tapatalk 2
     
  15. JJStrack

    JJStrack Registered

    Joined:
    Dec 23, 2011
    Messages:
    469
    Likes Received:
    9
    Has someone tried this script yet? http://www.polycount.com/forum/showthread.php?t=93240
    It is a tree generator. Only difference is, that it doesn't use screen aligned quads. But the leaves could be altered to that afterwards.
    I haven't got the time to test it at the moment, but maybe someone will give it a go, so i thought i should post it here :p
     
    1 person likes this.
  16. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    I was wondering... You probably have to assign gMotor material and remap tree after generating mesh with tree generator, right? (not mentioned creating screen aligned quads afterwards)

    That's a whole lotta work for one tree...:confused:

    Cheers!
     
  17. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169

    maybe not :)
     
  18. vicent-sollana

    vicent-sollana Registered

    Joined:
    Jan 21, 2012
    Messages:
    416
    Likes Received:
    17
    Thanks for the script, I will try for sure, i'll keep you informed of results


    Thanks.
     
  19. JJStrack

    JJStrack Registered

    Joined:
    Dec 23, 2011
    Messages:
    469
    Likes Received:
    9
    I'm affraid that yes, you have to remap the texture if you want to have the bark and the leafs on one texture (which seems to be recommended).
    BUT: i have tried the script so far, that it gives you very nice tools to create the Meshes of the main stem and the twigs. And after that, you can still control the exact shape via some CVs.
    Maybe someone with more knowledge then me in making trees for RF2 could contact the maker of that script, and ask him, if he could alter the script to allow for RF2 specific texturing.
     

Share This Page