• Moose
  • Announcements

    • Dirktator

      Please help us for July   06/30/2017

      This month we're hoping for a little bit of a boost this month or next, in addition to covering the regular bills, we could benefit from some hardware upgrades. STEX Collector's Set gifts can now be sent to you via digital download as well as regular mail if you wish! Every donation dollar goes toward keeping Simtropolis online and humming along. Your contribution counts! Hardware Upgrades As our website community software improves with more and more features, and as we bolt on additional features such as chat, the increased load to handle all these new toys is taking the server a bit to task. You may have noticed that we'd been forced to temporarily disable the chat as we worked out allocating resources for more optimal performance. Following this, we've applied a number of 'soft' changes such as caching options and experimented with server configurations (nginx as proxy, for example), so the hardware aspect is also an area we'd like to focus on. The last time we upgraded hardware was back in 2012, prior to the release of SC13. Your contribution means a lot! Your donation will go toward helping us to 1.) migrate to a newer server or 2.) at least get some ram/cpu/storage updates and any other infrastructure hardware or services. Donate and Get a Gift or Donate Any Amount Thanks so much! - Dirktator & The Admins
  • Sign in to follow this  
    Followers 0

    Custom building foundations in 3DS Max


    andisart

    Custom building foundations in 3DS Max

    Tutorial level: Intermediate; general knowledge of BAT creation and modding required.

    There are two effective methods to create custom building foundations in 3DS Max.

    The first is creating building foundations the traditional way in the same fashion they work in the game (assigning a foundation model as a foundation in the Pluginmanager (PIM)), the other is using building and foundation as props.

    Both methods have their pros and cons:

    Traditional method

    + automatic matching of building and foundation in game

    + convenient to use in PIM when creating the lot

    - nightlights not possible for foundation (which then can create abrupt breaks if lights in scene illumine both building and foundation)

    - not suited for cases where LODs of building and foundation differ (impossible to match foundation to building in Lot Editor (LE))

    - possibility of a bug occuring requiring manual texture ID fix

    Method using props

    + nightlights on the foundation possible

    + foundation can extend beyond building as both can be matched manually in LE

    - matching process not 100% clean if LODs differ

    - extra step in lot creation needed: since building and foundation work as a prop, an empty object needs to be assigned as the actual building

    - if slope is too steep, slope can move into building because it functions as a prop. More finetuning in slope settings of lot required

    ___________________________________________________________________________________________

    Traditional method

    Create building and foundation as separate geometry.

    Make sure foundation geometry does not exceed ground level (0 on Z axis).

    tut_simple_zpsfd1ee990.jpg

    Render seperately. When creating the LODs, make sure they sit on top of each other and have the same width and length (height can differ).

    If they don't building and foundation will not line up later in the game.

    Foundation LODs may not exceed ground level (0 at Z axis).

    tut_LODs_zps6651c4ec.jpg

    When rendering the foundation LODs in gmax, make sure to select the option for "Foundation" in the BAT options tab:

    tut_BATparameters_zps388c879a.jpg

    It is not necessary to render the nightview of the foundation, since nightlights don't work with this method anyway.

    Render building as normal.

    After rendering, assign the foundation model as a "Foundation" in the PIM:

    tut_pim_zpscc9b024c.jpg

    Afterwards assign the building model to a building type of your choice.

    In the properties options under the Advanced tab you can now select the building foundation you created before:

    tut_pim_fndt_zps723014a8.jpg

    When creating the lot in the LE you can just create your lot normally, the building foundation is already assigned to your building through the PIM.

    There is an option to change the foundation within the LE, however, when I tried that it didn't work properly, so better leave that option alone.

    Lastly, you need to make sure the lot can actually have a slope in the game. As an orientation: for the example model with a foundation of approx. 3m depth a good value for the threshold is 8. This is subject to fine-tuning.

    In the game it should then look like this, left on flat and right on slope with foundation:

    tut_flatslope_zps8b81a5eb.jpg

    You should be done!

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Possible bug:

    If you don't see the foundation but instead just green, blue and red colors then the beforementioned bug hit you.

    In this case the material IDs of the foundation model need to be corrected. They need to say 0x00030xxx, and not 0x00031xxx or anything else.

    You can find the ID's in the Reader in the "Mats" tab of the S3D files of the model.

    Note: Every S3D file has to be fixed.

    tut_s3d_zpse791f6a3.jpg

    ___________________________________________________________________________________________

    Method using props

    The two advantages of this methods are nightlights and the possibility of having differing LODs between building and foundation.

    The following model has a foundation that is wider than the building and a nightscene which illumines the foundation as well. So this method is the prefered choice.

    Foundation extends beyond building:

    red_single_fdt_zpsd2766ffc.jpg

    Nightlights shine on the foundation (stairs going down), windows lit on foundation:

    tut_rednite_zps4f1623bf.jpg

    LODs of foundation and building have different footprint:

    tut_2LODs_zps2ed84930.jpg

    You start off as with the traditional method above with separate geometry and LODs for your building and foundation.

    However, the foundation LOD and geometry must be slightly below ground level, otherwise there will be glitches with the base and overlay textures on the lot. A value of -0,01 meters on the Z axis will work (values below that don't seem to work without glitches).

    During the rendering process there are the following differences:

    - you render the foundation LODs in gmax without the "Foundation" option ticked, that is as a normal model.

    - if foundation extends beyond the building footprint: when rendering the foundation leave the building in the scene to avoid false lighting of the extened foundation parts (if building not present the correct shadows cant be cast onto foundation parts).

    - if applicable, also render the nightscene of your foundation. As with for the dayscene inlcude the building as well, especially all lights shining onto the foundation

    In the PIM assign both models as props with the necessary options. Important here are to set IsGroundModel and QueryAsMainBuilding to true for the building model.

    (Note: Options changed for foundation were only Lights and AppearanceZoomsFlag. Changing other options hasn't been tested for foundation.)

    Now, because our building is a prop, we need a blank model that serves as the acutal building exemplar.

    For example create a small cube with LODs, then before rendering delete the cube and render LODs only.

    Use this blank model in the PIM to assign to the building type you want your lot to be.

    In the LE replace building with the blank model:

    tut_LE_zpsa18b9613.jpg

    Then add foundation and building props.

    tut_LE2_zps250d19f7.jpg

    In order to be able to allign the props you need to remove the base and probably the overlay textures as well.

    It's a bit tricky to match the two, if not impossible to perfectly allign. What helps is to not emphasize vertical elements between building and foundation. So it's advised to make the design so that the foundation is more independent from the building, i.e. without vertical elements reaching from building down to foundation.

    On the other hand, if your LODs have the same width and length the matching process is very simple in LE, just allign them on top of each other and it will look perfect in game.

    After adding base textures back, the foundation should be completely covered like this:

    tut_LE3_zps4eff13e3.jpg

    When you're done with the LE you can mod your lot as usual.

    Important here:

    • in order to avoid any Maxis foundations from showing change the foundation ID in your lot to 0x194B1000.
    • as with the above method you need to finetune the values for maximum lot slope. Again, a good starting point is threshold value 8. This is the more important since with the building as a prop the slope can reach into the building if it's too steep, which will not like so nice

    You should be done!

    In the game it should look something like this:

    tut_rednite2_zps4338f2b6.jpg

    ___________________________________________________________________________________________

     

    Special thanks to Aaron Graham, c.p., callagrafx for their help


      Edited by andisart

    SimCoug, rsc204, CT14 and 2 others like this
    Sign in to follow this  
    Followers 0


    User Feedback


    rsc204

    Posted

    Thanks for posting this detailed tutorial, I'm sure it will come in handy.

    andisart likes this

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an Account  

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


    Register a New Account

    Sign In  

    Already have an account? Sign in here.


    Sign In Now