Jump to content
boformer

Got an idea for randomly rotated trees

11 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

The tree shader of the game does not support the rotation of trees. That's why all trees are rotated in the same way, which looks quite repetitive.

DbegiTZ.png

I think I know a way to fix it with a mod:

The mod just clones the tree asset 11 times and modifies the mesh (rotate in 30 deg steps) of the clones. These clones will be hidden in the menu.

Then the mod modifies the original tree asset: There is a property that allows you to specify variations of the tree model. That means the original asset works as a container for the other assets. When you place the tree, one of the variations is placed by the game (that way you can also create a mixed tree brush). Trees placed on lots will also be affected by this.

I just wanted to share this idea. I don't have the time to write the mod.


  Edited by boformer  
  • Like 9

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Even four rotation points would be a step in the right direction.  Although I would imagine that once you commit to spending the time necessary to create the mod, you might as well go for it.

I am intensely interested in seeing such a mod created.  I am no programmer, but if there is anything else I can do, let me know.

 

David


____________________

D. Edgren

pC7xdO.pngiZbJCf.png

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    It will only duplicate the mesh, not the texture. It will not eat up your memory ;)

     

    • Like 4

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Here is my first try:

    I tried it without asset cloning. The mod applies a random rotation to trees based on the position on the map. And it works for the detailed models! But: Not for the LODs.

    The result can be seen here: http://gfycat.com/MammothWellwornCrane

    You can clearly see the switch between the detailed model and the low-detail LOD.

    I finally understand how the LOD renderer works and why it is not possible to rotate the trees. And also why you don't have to create LOD models for your trees.

    Before a frame is renderered, the detailed models are taken and rendered a single time (from the current perspective). This render is saved in a texture (see black window in the second video)

    The tree LOD renderer takes this "baked" texture and puts it on a simple flat face (like in old 3d games, where trees are just flat objects which are always faced to the player). That drastically improves rendering performance. But it also means that the LOD trees can only be rendered in a single rotation.

    This gif visualizes how the LOD drawing works: http://gfycat.com/RedGracefulGavial

    There are 2 possible solutions:

    • Increase the rendering distance, so that the LOD switch only happens when you zoom out very far (this requires a decent graphics card). There could be a mod option to configure this distance. This will work on existing maps, and you can uninstall the mod without any problems.
    • Use the approach mentioned in the first post: Create 12 clones of a single tree, use the variation feature. This will NOT (easily) work with trees which were placed before the mod was installed. It also makes the mod REQUIRED to load the save (like Traffic++).

     

    2015-11-10_00002.jpg

    2015-11-10_00003.jpg

    2015-11-10_00004.jpg

    2015-11-10_00005.jpg


      Edited by boformer  
    • Like 5

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Bad news again: It is impossible to increase the LOD render distance.

    That's the end of my experiment.

    I will not release this mod because the switch between detailed and LOD model is not good enough.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Bad news again: It is impossible to increase the LOD render distance.

    That's the end of my experiment.

    I will not release this mod because the switch between detailed and LOD model is not good enough.

    Damn !!!!!! 

     

    I think we should ask CO for some more liberty there. 

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Aww..

    I think Shroomblaze contacted CO or someone to see if it was possible to increase the LOD for his container props. They didn't do it for the last update.


      Edited by charlesnew  

    Here is my city Rodenburgh, a realistic and fully detailed European city and region. Come over if you're interested!

     

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections