Jump to content
Sign In to follow this  
GC_Vos

Underground texturing

27 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

I've seen multiple asset creators texturing underground parts of their meshes. Did I miss something completely or is this done thru mod tools?

I'm looking for a way to texture static (Park) blocks, so I cannot use Japanese Garden. The only way I found so far is to make the whole model into a prop, surely there's some other way?

For reference here's what I'm working on:

Screen%20Shot%2010-06-15%20at%2002.33%20

Share this post


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

The only way to texture underground parts is the shader of the jap. Garden (which can be applied to any building template).

Additionally you can check set 2 things:

"flattenTerrain = true" to make the terrain flat.

"max height difference (idk the exact name) =0" to display "slope too steep" warnings when the ground is not flat.

  • Like 1

Share this post


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

    Thank you for the quick response! Is it possible to apply that shader without using that template? I'm very new to mod tools but slowly finding my way around.

    Share this post


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

    I will quickly write a script.

    This script can be used to switch between the different shaders: https://gist.github.com/boformer/752127809ee1b93cefe8
    (Works in both directions)

    You can use these 3 lines to make sure that the terrain is flat:

    var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo;
    // Set max slope to 0
    asset.m_maxHeightOffset = 0;
    asset.m_fixedHeight = true;
    asset.m_flattenTerrain = true;

     

    Enter both scripts in the modtools console (F7) in the asset editor.

    • Like 4

    Share this post


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

    Thanks! I will try this, though I actually don't want the ground to be flat so I assume it can be flagged false? (That's not using Jap to be begin with.)

    Edit:

    It worked! THANK YOU SO MUCH :D I would give you 30 likes right now if I could!

    Now just trying to disable the terrain deformation; no luck yet without using flattening. Tried some combinations of true and false.


      Edited by GC_Vos  

    Share this post


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

    I think you can not completely prevent it, especially when there are roads close to it. That's the limitation of this shader. CO didn't manage to release a "normal" underground shader.

    • Like 1

    Share this post


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

    That's unfortunate, but thanks again for the explanation, it will help a lot in making underground stuff.

    Share this post


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

    is it possible to replace asset.m_requireHeightMap with the one asset.m_requireWaterMap some templates use?

    Share this post


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

    I did try to change the heightmap but I'm not sure it matters to the shader, think it's just for the elevation.

    Share this post


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

    It I required by the shader. Without it, the asset is displayed ~30m below the terrain.

    • Like 1

    Share this post


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

    But maybe that could be used as well to create buildings which are not affected by the terrain, but still have underground parts (just move the mesh 30m upwards).

    Share this post


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

    I allready tested this, unfortunately, I could not see any differences. Once you change heightmaps, the asset is displayed the 30m below terrain, as you said, but when I changed the pivot, and plopped the building, the terrainaffection was still active.


      Edited by Feindbold  

    Share this post


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

    On a related note I have noticed there seems to be a different shader for LODs which does allow underground texturing on static assets. Boformer have you by any chance bumped into this? Been trying to force / trick the game into using that over the base one.

    Share this post


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

    Do you know a building that uses this shader?

    It would be simple to apply it to the detailed mesh.

    Share this post


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

    I've only tested this on the walls, which are in return based regular parks, but from what I've seen it gets applied to every LOD that's using the default one. I will try it on a simple mesh on some different templates to confirm.

    Share this post


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

    Okay, I can confirm this works for any template. Tried it on a bunch all with the same result, full unwraps below 0, no concrete gets applied. I can share some screens if wanted but it should be the default LOD shader (don't know what it's called).

    Share this post


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

    Pretty simple. Use any mesh (your station for example), apply default shader, make sure you set all your lod textures. Here is an example just overlapping red white blocks on the diffuse:

    Screen%20Shot%2010-26-15%20at%2006.48%20

    Screen%20Shot%2010-26-15%20at%2006.51%20

    Screen%20Shot%2010-26-15%20at%2006.49%20Screen%20Shot%2010-26-15%20at%2006.49%20:D

    • Like 1

    Share this post


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

    Problem: As far as I know, the LOD object uses exactly the same shader.

    The solution must be the different rendering functions which are calling the same shader in a different way.

    Share this post


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

    Looks like it skips the foundation / base entirely and draws directly from the lod pool. Wish there was some way to make it do that all the time. Wishful thinking maybe. :P

    Share this post


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

    I'm late to this party and I'm sorry for interjecting you two - but @Boformer-  does this script over ride the asset deforming to match the terrain without having to set the "flatten terrain" options etc.?  I have a pier that keeps deforming and making it "flatten terrain" in the asset editor doesn't really work well with it.  If this script flattens automatically without all that that may be something I could use to help my asset look better.

     

    Although you guys are so f'n advanced with this I was sort of lost at the point where the code comes out.  Sorry for interjecting and I just figured if this information could help me I might as well as ask you guys who are more knowledgeable.


    Thanks in advance for any clarification on this one.  :)

    Share this post


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

    The script that I embedded in my post basically also sets the flatten terrain option. But it also changes two other fields related to flattening.

    The only way to find out if this script is what you need: Try it!

    I don't understand what exactly you want to achieve. Screenshot?

    Share this post


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

    Hey Boformer i'm in a bit of a jam. I cant seem to get the code to texture underground to work. the WTC Reflection Pools i'm making are hard to test when i cant see what is going on. any help you could give would be great.

    Also along the same topic I want the pools to be parks (right now they are using the same template as the default water tower) but i'm not sure if there is a way to remove the road requirement. again any help would be great.

    I also apologize if i'm resurrecting a dead topic but I couldn't find any answers anywhere else.

    2016-01-06_00001.jpg

    2016-01-06_00002.jpg

    Share this post


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

    use the sub buildings enabler for your complex. The sub buildings are using a special template that does not require a road connection.

    regarding the textures: Did you run the script in asset editor?

    Share this post


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

    I got the code to work. now on to perfecting the textures. Thanks a ton.

    With the sub buildings enabler, if I use it will it be required in order for the Reflection Pools to work properly or will people be able to download them without having the sub buildings enabler?

    Share this post


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

    they have to install it, or only the Mai building will be placed. After placing the asset in the city, the mod can be uninstalled without any problems. It is a very simple mod that never destroys any save games.

    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

    Sign In to follow this  

    ×

    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