• Welcome to SC4 Devotion Forum Archives.

Underground BATs Problems

Started by mrbisonm, May 08, 2014, 06:07:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrbisonm

I am styill working on my MFP1 Project and slowly drawing to an end, but as usually, I always face new problems as I continue to expand propset. Here I realized that some BATs that are fully or partially underground have a strange shadow problem as shown in the picture below. It seems that double shadows appear on these models, opposite of each other.
Now, I did the very tight LOD modeling, so tight you wouldn't be able to slide in between a papersheet, then making several different renders and nothing changed. As soon as something gets underground it has 2 shadows, and when I keep the LODs only above ground, I loose a lot of details of the inside of these liquid manure tanks.

Is there anything else that I could do that I haven't tried? Turning off the shadows with the Reader doesn't look good at all.
Using gmax.

Thanks
Fred





....Uploading the MFP 1.... (.........Finishing the MFP1)

Rayden

I can't remember very well but I think you can tackle that on the prop properties under the isGroundModel section. I think you have to put false on that or the opposite, can't remeber very well. Just give it a try, I'm at work so I can't do anything to help you more.

memo

I honestly am not a BAT expert (not even an amateur), but maybe this post by Jasoncw is of some help in clarifying the problem.

FrankU

Quote from: Rayden on May 08, 2014, 06:14:07 AM
I can't remember very well but I think you can tackle that on the prop properties under the isGroundModel section. I think you have to put false on that or the opposite, can't remeber very well. Just give it a try, I'm at work so I can't do anything to help you more.

If you change the "Is Ground Model" property to "false" all shadows are put off. So indeed, th undesired shadow disappears, just like the desired one.  :(

c.p.

If you slice the model in half, so the above-ground section and below-ground section are separate models, then you can use IsGroundModel=true for the part above ground, and IsGroundModel=false for the part below ground.  In 3dsmax this is easy to do by selecting all the objects that cross the ground-plane, and adding a slice modifier.  I assume you could do the same in gmax, as it also has a "slice" modifier.

FrankU

Brian,

That might work, but it ruins my habit of making prop variation sets for my lots, because of course in most cases the upper half will not match the underground half....

c.p.

Good point.
I haven't experimented with it, but it's possible to put multiple models into one prop, using an RKT4.  When flora use an RKT4 with multiple models, the game will only use the shadows from one of the models.  I don't know what happens with shadows when you show multiple models simultaneously, via RKT4, in a prop.  Does it only show shadows for one of the models?  If so, that might be one possible solution.  (OK, that's a longshot, and probably more trouble than it's worth, but I thought I'd throw it out there).

Rayden

Quote from: c.p. on May 08, 2014, 07:50:41 AM
If you slice the model in half, so the above-ground section and below-ground section are separate models, then you can use IsGroundModel=true for the part above ground, and IsGroundModel=false for the part below ground.  In 3dsmax this is easy to do by selecting all the objects that cross the ground-plane, and adding a slice modifier.  I assume you could do the same in gmax, as it also has a "slice" modifier.


Thx for the info Brian, I didn't know how to solve that issue in one of my models. And as I work (modelling) with sketchup, I didn't want to go back to it and then had to retexture and lighten everything again in Max. ;)

mrbisonm

Thanks Rayden, but like FrankU says, it also cuts off the "wanted" shadow. I tried this before and it didn't solve the problem, but creating another. :(

memo, nice try, but this didn't help me much neither, big Thanks though. ;)

c.p. ,I found the slice modifier in gmax, but I can't figure out how the darn thing works....and I am not sure that it will bring up a good looking 2 part model, since the inside of the tank may well get distorted because of the slice unless, there'a a "right way" to do the slicing, which I haven't found yet. Some detailed help on this would be appreciated. This is VERY new to me. ;)

Btw, what is RKT4?

Thanks sofar, everyone

Fred





....Uploading the MFP 1.... (.........Finishing the MFP1)

MandelSoft

RKT4 = Resource Key Type 4. It's a object descriptor in SimCity 4 that allows multiple objects to appear as a group, e.g. streetlights. I think there are some tutorials on ST to cover that (can't explain it myself at this very moment).
Lurk mode: ACTIVE

xannepan

Not much time for sc4 these days :(

Don't use the slice modifier on your model. Use it only on your LODS. Then render twice, once for the upperpart, second time for the lowerpart (use different names). Create props for both models, turn off shadows for your lowerpart. Then combine the props on your lot. You can also instead of props create a building exemplar for the upper part and a foundation exemplar for the lower parts and make sure the building exemplar points to the foundation exemplar (can all be done in maxis pim)

Good luck!

c.p.

If you were willing to make that particular model a "building", xannepan's idea would be the easiest solution.  Also, he's probably right about slicing only the LODs.

Anyway, here's a little slicing tutorial for Fred.  The procedure would be the same, whether you are slicing LODs, or the model itself.

This is the foundation for a small elementary school.  Let's say I want to slice off the bottom at 8m, for some reason.
First I select everything that crosses the 8m depth.  Then I select "Slice" from the modifier list.
That gives me this:


Then, I click on the + to the left of "Slice" (circled in red).
Then I click "Remove Bottom"

However the slice plane is not exactly where I want it, so it slices off too much of my model.

So I highlight "Slice Plane" (in the modifier list), I make sure the Move button is selected (circled at upper left), and then I can move the slice plane up or down to where I want it in the model views, without moving the model.



When done, you might want to click on "Slice" in the Modifier List, to unhighlight the "Slice Plane".


If you are slicing the model itself: the above-ground portion of your model might have pieces that need to cast shadows on the below-ground portion of your model.  What I do for the below-ground model is to keep some or all of the above-ground pieces, but assign them an invisible texture.  (0 opacity).   You can see in the above pictures that there is the ghost of a schoolhouse on top of the foundation.  It is there to cast shadows on the foundation.

One last consideration: when modding the below-ground portion, you should set the AppearanceZoomsFlag to 0x0000001c (or choose Zooms 3, 4, 5 if using the maxis PIM).  This is because BAT makes simple box LODs for zoom 1 and zoom 2, and it is likely to look worse than if you simply don't show the below-ground portion at that zoom level.

Later today, I might experiment with my RKT4 idea, to see if that will work or not.  (If it works, it might help me with some of my projects too.)  I'll let you know what I find.

cogeo

First off, the LODshell does not need to span underground. It can start at ground level, even if the scene contains object below ground level. Take a look at my Spirulina Farms pack, it contains a very similar model (the large tubs). Check the model in the reader, you will see that all vertical coordinates (Y) are at or above ground level (≥0). First check if this fixes the problem.

I have found a way to remove this effect, which I have named "negative shadow" (the "correct" shadow is always cast left to right as you view the model, for all four rotations). I have used it for some custom models for RTMT (subway entrances). Take a look at the pics I have posted in Frank's thread here. The white model is the fixed one. The procedure is very tedious unfortunately. Requires slicing out the parts of the model that do not overlap with the area defined as the projection of the LODshell on the (2-D) texture. These are different for each rotation, so the above procedure might be needed to be repeated up to four times for each model, and each one is exported separately; then parts of the exported models are combined into one (the final/fixed) model.

c.p.

lol, you're right.  I didn't look at that picture close enough. :-[  (Fred: Ignore everything I said in the previous posts).

I was successful with my RKT4 test though (i.e. one prop consisting of two models, with one of them casting a shadow, and one of them not.)  If that's of any use, I can post more info, but I think it's not what you're looking for here.

Rayden

This just come into my mind, we all know how to render offset models, what about render offset vertically, does that will solve the shadow issue? Say you offset the supposed underground part 8 meters, then on the LotEditor or PIMx pull the prop 8 meters down so the model would get underground, would that cast the weird shadow or not?

c.p.

I think it would.  Those shadows show up on an entirely above-ground model if the model is on a steep slope
and the LOD is cutting into the slope.

mrbisonm

Why in the world didn't gmax fix that problem in the first place.....? Does 3DS Max have the same problem? And what if I import a 3ds model like this into gmax to render it, will it show that false shadow too?

Anyways, I don't really have the time right now to do all what you folks mentioned, but I surely will this weekend and back here with my results. I also will try some different ways that I have thought off in the last days, just maybe......although I am far from a 3d expert. ;)

Hope I 'll find a way to get rid of the "negative shadow" effect easily.

Fred


....Uploading the MFP 1.... (.........Finishing the MFP1)

NCGAIO

#17

Because this "false shadow" has nothing to do with any 3D editor or BAT ... this is not a bug but just the way the shadows were implemented to minimize the cost of processing that was vital at the time of the release of the game ( No commitment 3d) as well as all the other tricks that were used for the graphical part .


The post of Jasoncw (by memo link above) gives a hint of what is considered a bug also examined by Simfox on this other post HERE but could be better understood by reading of what says the Andrew Willmott  in link below.

"$Deal"$   - Height Map Shadows


Anticipating what this is about

Quote
Back in the SC4/TS2 was weren't powerful enough GPUs to the proper depth-tested que handled shadows self-shadowing. Projective (cookie-cutter) shadows were it, and even pricey Those Were ....

......
Another hack on SC4 was that building shadows were generated by warping sprite alpha masks from the lower LODs, which meant in terms of generation or additional storage, they were free.

So I think that can not be treated as a bug what one tries to do  skirting the way the game was coded to operate ... alias very common thing to many creators!

mrbisonm

Call it a bug or whatever suits you, I don't care, but I think that the creators of gmax should have corrected this "thingie" which is quite annoying, but like many computer programs, unfortunetly nothing is perfect and functioning at 100%..........

I will be trying out a few things mentioned above tomorrow and get back.......

Fred


....Uploading the MFP 1.... (.........Finishing the MFP1)

FrankU

Hi Fred,
Of course there is the option of making the models in such away that nothing is undergound, meaning that all silos and basins should be filled to just above ground level. Or you can just ignore the issue. We are used to several disadvantages of the game.
If you take a look at seaport lots and models you will certainly find several props casting shadows the same way. I know of several Pegasus seawall props. And there certainly are more.