Jump to content
Raymond7cn

Light and Animation from newbie

15 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Dear specialists of BAT

I have some questions about the lighting and animation,

1. lighting, with my limited understanding, the Light is also 2d picture of the model, with some prefixes, the SimCity could recognize them and show those night scenes at the night, It's just like when I was modeling with GMAX, I need to name the night windows with nite prefix, then about the BAT4MAX of 3ds max, Dear simfox probably add those steps into his great script, But I couldn't understand the Light comes from the maxis's lighthouse, it seemed like it could illuminate other Lots and has animate effect, Furthermore, I don't know if it's possible to make Lot lighting just with the 3ds max's self-luminous textures. and also when I discussed with Terring in this thread, I have no idea if it's possible to accomplish that let the model and road light up at the night.

2. About the animation, as far as I knew, there are mamy kinds of animation in maxis, Frankly, this question comes from an idea when I want to model a Old Trafford Stadium, I want to create more realistic soccer playing animation instead of the Maxis's, then i searched and found out many kinds of them, 1), bitmap animation. 2), by adding period lotconfiure properties of prop amd building, such as seasonal tree. 3), 3D animation, looks like by organizing the Anim pages of S3D to make it. 4), REGP animation, I don't know what is it exactly. 5), effectDir animation, also have no clue of this one.

Then my question is that where could I get more tutorials or relevant posts about how to create animation? I only knew there is a tools called BAB, it looks like that could only be used with GMAX, so how to do animate props or lots with 3da max?

I'm sorry to bother you professional here as below,

@rsc204,@mattb325, @Jasoncw, @WolfZe, @Goldman Sachs, you are all I know about this issue, since you had helped me before, but I do hope other experts could also help me with these questions, Please forgive my rudeness due to still a quite Newbie.*:D

Yours Sincerely,

-- Raymond

  • Like 4

What is impossible with men is possible with God…!

5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

I've contributed some to Simtropolis

My Emotion

Share this post


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

In the game, night is made out of three layers.

- The bottom layer is the regular day mode.

- The middle layer is a blue tint. The Dawn/Dusk cycle in the game is made by changing this color throughout the day. Darknite mods are made by editing this color to be darker.

- And the top layer are the nitelites of buildings.

The nitelites on Maxis buildings only contain the lit up parts of the building. The parts of the building which are not lit up are transparent, so that the day render shows through underneath. Using BAT4Max, TruNite/MaxisNite/DarkNite is used, where instead of only the lit up parts of the building being in the nitelites layer, the entire building is included, so that none of the day render is visible underneath it. The nitelites layer will completely cover up the day layer. This lets us use better lighting for night, and it also lets us use a different/better image compression type for the night layer. To see examples of the nitelite layer, you can open a .SC4Model in the reader, and look at the .FSH files that look like they're for night.

But anyway, there is no actual lighting in the game. Nitelites are all just brighter pixels that are parts of renderings. The shadows that buildings cast are also not true shadows, they are 2d building renders which have been twisted and rotated to have the appearance of shadows.

The lighthouse light, and streetlights, are 3d objects with textures on them, and they are set to a blending mode, to make it look like a beam of light.

But I don't know how to make 3d props or animations, or anything except normal nitelites on BATs.

  • Like 5
  • Thanks 1

02Sxlbs.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

Share this post


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

    Dear Jason, @Jasoncw Thanks a million, Now I see the theory of night light, I believe that I could make more beautiful lights by your thorough explanation.*:thumb:

    About the animation, I have learnt some from denham2010 's thread and his great tutorial in STEX, Now I understand how to use BAB to create bitmap animation, What I'm still don't know is S3D's animation, it seems like the canal boat which I want to create is a S3D animation, Then I googled but couldn't find out enough information about that, There was only one clue from a thread, it mentioned that use 3ds max to collapse the whole model (I guessed maybe also include every frames) to one object and name it with LOD3, but I do want to know more details about the whole process.*:???:

    Anyway, Thank you very much, Jason, You help me again, I do appreciate it.*:thumb:

    Yours Sincerely,

    -- Raymond


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    I think S3D animations will give you better results, because the image compression type that bitmap animations use in the game are really low quality (maybe it's possible to use a better format, although that would make the filesize large, especially for a giant soccer field). S3D animations will be sharper and will have a smaller filesize.

    You already know more about S3D animation than I do. It also helps to try to find what you want to make and look at it in the Reader.

    Even though this is an automata and not a prop, I think this might be insightful:

     

    • Thanks 1

    02Sxlbs.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

    Share this post


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

    Dear Experts,

    After a hard day of searching, I make some progresses, 

    https://www.sc4devotion.com/forums/index.php?topic=3917.msg122193#msg122193

    This is the first post I found which wrote by Tarkus, Before this discovery, I modified the can-am mod, here below is the result of my test,

    vk79jpL.jpg

    nEqNtab.jpg

    It just looks good from this angle, But from others it's wrong:

    Cxg1Rs6.jpg

    Since I just used normal way to create model and replace it with the transit exemplar's model resource key from here:

    Mqi1R78.jpg

    So I searched and found that post, where Tarkus had said :

    3.  The model must be rendered/exported in True 3D. 
    As you may know, the standard BAT export procedure reduces the model to a series of isometric faces, which are assembled in composite by the game to form the building/prop/etc.  However, the game does not handle transit models in the same manner, and when exported as per the normal BAT process, they will look correct from one angle, but will look incorrect from any others. 

    So I used the method B which Dear @Tarkus mentioned, b) Export the model as a .3ds mesh file, which can be directly imported into the Reader, skipping the rendering process altogether.  This is more difficult to do with Gmax (since it cannot export this format), but it is possible from 3DS Max, Milkshape3D or from the free, open-source program Blender.

    Then I created a new blank dat file with iliveReader, Copied and pasted the canal's boat s3d and fsh file, imported a 3ds file which I experted from 3ds max, rearrange the material, thenI got this one,

    TACMhez.jpg

    You can tell that the teapot behaved normally at every direction now, And also thanks by @Jasoncw 's tips, I opened the @justforfun's mod and canal boat's S3D model, I found that there was only one FSH texture there, Then I was just aware that I still don't know how to create a FSH texture (looks like using the unwrap uvw modifier) just include one map, I tried and used Tarkus‘s A method:

    a) Temporarily replace the BuildingMill.ms script (for gmax, this will be found in your gmax\gamepacks\BAT\scripts folder) with the one attached to this post, which will force the BAT to export in True 3D instead of isometric composites. 

    But the output file export by gmax still was the same as before, I opened the BuildingMill.ms script and cross-check against the gmax's BuildingMill.ms, I found out they looked exactly the same with every lines.

    After that I tried to use unwarp modifier of 3ds max, flatten mapping and simply edited it with ps, import it with GOFSH, but can be observed that the cordinates was wrong.

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

    That's all, Frankly, I'm still a quite newbie of BAtting, I don't know if there were other methods to do that, I know there is a Bender tool made by Dear @rivit, it looks like has these function, whereas i don't know how to use it. Now i’m kind of stuck here, I really hope and appreciate anyone who can help me with this issue, Or share some links of post to me as a reference, Thank you !!!:}

    Yours Sincerely,

    -- Raymond

    • Like 2

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    I'm very sorry to @ Tarkus and Rivit here, it must be a rude behavior, Please forgive a newbie's suddenly bothering, I do hope it wouldn't waste your precious time with your great works.

    Sincerely,

    -- Raymond


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    I also noticed that in Tarkus's thread, Jeronij mentioned a method:

    I was wondering... surely a dumb question ::) ... the transit pieces usually point to a Resource Key Type 0 exemplar ( which is a real 3D model as you very correctly pointed ;) ), and this is the reason why you get wrong views when you rotate a standard GMAX/MAX model. I have made many tests with other game exemplars types, and many times (but not always) you can change the RKT type without problems. In fact bridge transit pieces point to RKT1 (MAX/GMAX models) and are quite basic transit exemplars.

    So, the question is, does it not work with RKT1 ? If it does, you can avoid all the discouraging re-skinning, and directly render complex models with optimized LODs...

    And the answer is YES ;D . I decided to make a test, and I changed the RKT0 from the NAM Puzzle Piece PedMall tile Grass, and I placed an RKT1 model, group BADB57F1 of course, which I released some time ago with my Street side mod. I could have used a bridge piece instead, but the result would have been the same ;)

    He seemed changed the RKT0 to RKT1, then he could use the normal exported model, but it didn't work for me, I have no idea where's the difference between there. I thought this Jeronij's method seems could make the transit models more beautiful, since as Tarkus said, the True3d's model couldn't has more than 500 polygons.

    Then I also learnt how to bake render map, but with the baked map I still couldn't coordinate it to the model precisely, Anyway, I still need to learn more about it to see if I could tweak the verticals or bake the map with a low poly model first.

    Sincerely,

    -- Raymond

     


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    Well, by diving deeply into this issue for another day, I simply got a conclusion, all i need to learn now is unwrap uvmap, not others such as Effectdir or RKT, most of tutorials in simtropolis or Devotion didn't include this parts, Especially 3ds max, I guessed it's because of it's not a big deal to them, Anyway, I got to learn this part immediately.

    Also I saw these words said by giraffe:

    I have a question concerning this field. The most complex step in automata modding is to register x,y,z,u,v of each vertex and we do it manually so more we have vertex longer it is. However I asked me if there is no possibility to export directly an array with all these coordinates from 3dsmax and to paste it in the reader

    And also as a record of myself, I'm still curious about Jeronij's method, but unfortunately, haven't found out her posts about that yet.

    Best,

    -- Raymond

     


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    The most important differentiation here is to understand why and when either 2D or 3D models are used in SC4. A normal BAT, such as a building, will be in 2D, the 3D game word is created by lining up the viewing angles, such that the effect of 3D is given. I've seen you state BAT's are single-sided, this is not strictly true, the LODs are, because unlike in a 3D game, the LODs are the model. By rendering each of the 20 possible view combinations, covering zoom levels 1 through 5 and the four different rotations (N/S/E/W), using the fixed Isometric views makes the game incredibly efficient. It needed to be back in 2003 frankly doing this in full 3D wouldn't have worked on home computers of the time.

    The big limitation of such models, which are often referred to as 2.5D, being 2D but appearing 3D, is that outside of those fixed 20 views, nothing looks right. That's why SC4 can simply never allow for different ways to look at your cities in terms of angles/rotations, the data doesn't exist to show any of that correctly.

    3D models are used in-game, but to limit the hardware requirements, there is a limit of 500 polygons for a transit model. Actually, it seems that limit is per "group" inside the S3D file and it's totally possible to use more than 500 polys provided each group doesn't exceed that number. Both Moonlight's El-Rail and BTM overrides use S3D models which are over these limits. Which brings me to why and where such models are used, mostly full/true 3D models are used for the following:

    • Transit Models, such as the El-Rail / Monorail / Maxis Highway from the base game.
    • Automata, since they need to be able to change angles as they move.
    • Some transit related props.

    So if you are making Automata, you should have a single S3D file with a full 3D model. A BAT model uses the LODs, which is a 2D flat box, and pastes the rendered texture upon it, the rendering is done in the 3D modelling program. But full 3D models need to be rendered in real-time by the game engine, which is why it's so resource intensive. It also means a 3D model must have a texture/textures that completely wrap around the model, it needs to be able to move with the model. Indeed this means you will need to get the U/V mapping in Reader to have the correct values to line up the texture and model properly. Frankly, doing this manually or with math is stupid, that's exactly the sort of thing computers are good at doing for you.

    Just know that whilst you can use RKT0/RKT1 objects interchangeably, i.e. a Transit Model could be an RKT1 model. You can't link a 2D model as RKT0 or a 3D model by RKT1, at least and have it actually work. The definition of RKT type instructs the game on the type of model it expects to find and dictates how the game can interact with it.

    It's absolutely possible to set the U/V mapping settings in 3DS max, then export that as part of the .3ds model, which then gets imported into Reader. The exact specifics of this have alluded me so far, mostly because I have too many other projects and could not really find good instructions on how. Since I never needed complex 3D models for my purposes, I automated the calculations using Excel formulas as a workaround. But outside of my S3D "textures", which are simple geometric shapes, it's neither a useful or timely solution and I'm certain those who've done this for SC4 models, did NOT work out the UV mapping manually. I'm certain there is a method to get this data imported when importing the S3D model in Reader, I just never found out how. Anyone who's made custom Automata (not just reused existing ones with new textures), should know.

    On 17/04/2020 at 4:05 AM, Jasoncw said:

    The lighthouse light, and streetlights, are 3d objects with textures on them, and they are set to a blending mode, to make it look like a beam of light.

    But I don't know how to make 3d props or animations, or anything except normal nitelites on BATs.

    Trust me, getting into animations is really, really complex stuff. Quality is a massive problem, since the limitations using BAB are very strict. This is only practical for very small items and likely without too much detail. I too looked at the Maxis animations, people mostly, looking for a way to make them at least not pixelated and blurry. I have an idea where you make everything using SC4 BAT / BAB, then create the same setup in 3DS max to render higher-quality textures, replacing those from the BAB export. In theory it should work, but I've a very simple model I plan to use to test the theory one day.

    You really want to dig into posts by both Jondor and Mandelsoft over on SC4D, who together have explained how this works better than anyone else. That said, you are not going to find step-by-step tutorials and both those members are no longer active, nor likely to return. I've been itching to get into this area, but just as I was finally getting a clearer picture on how, RL hit and all my modding stagnated. Everything of significance I learned came from conversations between these two members. Jondor made animated replacement Crossing Barriers and Mandelsoft made animated Stop Lights, but the level of understanding needed to follow is very high.

    Lightcones, such as used on the LightHouse are reasonably simple at their core, although having them constantly move is a whole different story. In fact, EffectDIR modding is one of the least documented areas of modding, so adding effects is probably going to be out of the question, unless you can work it all out yourself.

    Honestly, if I were you, I'd get a good handle on making basic models with 3DS Max before going down the path of animating them. When you are more familiar with that, it's going to be much easier to get a handle on the processes needed to potentially succeed.

    • Like 2
    • Thanks 2

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


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

    Dear Robin, @rsc204

    Today I plan to post some results which I just made, but I want to post them later, by reading many many posts of Devotion and simtropolis in these days, I learnt a lot, some of them even are not relevant to this topic, however I just couldn't take my eyes off them, I saw Jonathan LK vester and Swamper77 and even you :}'s great tutorials and works there, Frankly, I still feel excited by now.

    https://www.sc4devotion.com/forums/index.php?topic=22.msg103#msg103

    Your kind words are absolutely right, I couldn't agree with them more, Actually, I just understood some of them recently, so please forgive my ignorance, I do appreciate your tips, Thank you.

    Anyways, In-short, After some tests, I have made two automata vehicles, one was a low-poly model, another one was just as you said, I made two groups and each of them was less that 500 polygons, about the textures, IMO, I thought even though the mapping tools which in this case used by vester and Swamper77 were not 3ds max, But by reading the words between the lines. I thought 3ds max could do that as well, since I have made one with unwrap uvw, though not very beautiful than the normal BAT, but it's enough for a transit automata, and since the 3ds also include the uvmap coordinates infos, so most of them seems needn't to be tweaked with the verts in reader. 

    I may will.be disappeared a short time to learn a net course of this part, and I believe that I could be back with a more satisfied futurist blimp.:} @Terring

    BTW, @Cyclone Boom Thanks a million CB, But it seemed like the script you help me to find out, it wasn't the one I was looking for, it's just the same as the script of gmax's BAT script, however without your helps, I still would be entangled with it, Thank you, I also wanted to write a simple.script which can be used to export a whole map without too many stenuous works, But when I opened it I found that it's just another daydream, Cori may could do that, Not me.*:D

    Thank you for all of you helped me here or through PM, I do appreciate you, I will be back.:}

    Yours Sincerely,

    -- Raymond

    • Like 3

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 19/4/2020 at 1:47 PM, rsc204 said:

    I'm certain those who've done this for SC4 models, did NOT work out the UV mapping manually.

    I actually did. In my case though it's different, as I made the models from scratch in S3D without importing anything.

    @Raymond7cn If you succeeded in making automata models, animation is only a step further. 

    • Like 1
    • Thanks 1

    Share this post


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

    @rivit Dear rivit, Please forgive my rudeness, I was just stuck in adding the light to the automata model, 

    18urIDT.jpg

    You can tell from the picture above, the colour of the light is solid, however this is not what I want, 

    woLzcki.jpg

    WOPHbp0.jpg

    TBa5gFr.jpg

    rYIMsIg.jpg

    The FSH file was normal (IMO) when i checked with reader, but whatever I change with the A0.bmp, even all black, the light still was solid with full colour, but I want it's more realistic with some gradual changing inside, Or maybe I was wrong with the Encoding Settings? Anyway, I have no idea where the problem is, I need your or other experts's help, Thank you very much.

    Sincerely,

    -- Raymond


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


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

    @raymond - You make the FSH with DXT3 settings and an alpha that graduates from white to black, so that it has some gradual transparency. That looks like what you have done. They don't need to be very big - 64x64 is usually more than enough.

    The textures to compare with are

    default headlights  - 0x09c6cc22_headlight_vehicle

    and tail lights  - 0x49cfcfc7_rearlight_vehicle                       (both in SImcity2.dat I think. which are there for automata really) 

     

    Then part2 of the trick is that these textures must have specific settings in the S3D Mats tab so that they are overlaid on the scene rather than painting the scene - in particular these are to be blended after everything else is rendered so the background shows through.

    You must test in game - reader doesn't always render these properly.

     Lights.png.03ca25ed85d74ef55657238f1d03e34a.png

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, rivit said:

    @raymond - You make the FSH with DXT3 settings and an alpha that graduates from white to black, so that it has some gradual transparency. That looks like what you have done. They don't need to be very big - 64x64 is usually more than enough.

    The textures to compare with are

    default headlights  - 0x09c6cc22_headlight_vehicle

    and tail lights  - 0x49cfcfc7_rearlight_vehicle                       (both in SImcity2.dat I think. which are there for automata really) 

     

    Then part2 of the trick is that these textures must have specific settings in the S3D Mats tab so that they are overlaid on the scene rather than painting the scene - in particular these are to be blended after everything else is rendered so the background shows through.

    You must test in game - reader doesn't always render these properly.

     Lights.png.03ca25ed85d74ef55657238f1d03e34a.png

    Thanks a million Dear Rivit,*:thumb: I got it, Your tips is very important to me. I will give it a try soon. Thank you very much.

    Sincerely,

    -- Raymond


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    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