SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => General Custom Content Discussion => Topic started by: dedgren on August 09, 2011, 04:46:23 PM

Title: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 09, 2011, 04:46:23 PM
I guess the title says it all.  Is there a property (or two or three) that can be adjusted in the Reader to turn prop shadows on and off?

Thanks in advance for your responses.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: smoncrie on August 09, 2011, 05:53:47 PM
Hi David,

If the prop exemplar property "Is Ground Model" is set to false, the prop will not cast shadows. An example of this, is the street lights used on bridges.

[Edit] Opps, I meant to say if the property is removed, it will not cast shadows.  Setting it to false probably works, but I have not tested it.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 09, 2011, 06:14:23 PM
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg84.imageshack.us%2Fimg84%2F5300%2Fshadow11080901.jpg&hash=4454f0120d6dff2af87069eb9d88b8f8d2e016b6)

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg685.imageshack.us%2Fimg685%2F9943%2Fshadow11080902.jpg&hash=886ab169162a5a97ddded7f00d797372f0c2a3f7)

Got these together before I saw your update, Stephen.  These PEG boulders have the "Is Ground Model" property set to "0"/false.  I'm going back to take the property out now.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: smoncrie on August 09, 2011, 06:31:03 PM
I don't know if this is relevant, but I suspect that the game uses the S3D U,V values to generate shadows.  This may be why BAT transforms textures the way it does, and why shadows for true 3d props are usually so bad.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 09, 2011, 07:14:24 PM
Nupe.  Removing the property does not make any difference.  Can I manipulate the S3Ds in the Reader, perhaps?

As an aside, one would think adding and setting to "true" the "No shadows" property would help.  Well, it doesn't.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Girafe on August 09, 2011, 07:23:35 PM
If I well remember when I developped the cablecars the mix of the properties:

- orient to slope true
- is ground model true

didn't cast shadow but I am not sure it was long time ago...

It was at this time a problem for the cables which look a little bit odd in the game  &mmm
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on August 09, 2011, 08:55:58 PM
Did you re-plop the lot?  Changes like this don't effect existing props.

This problem is happening because the rock is below the surface of the ground.  You might be able to fudge it, but that is one well placed rock right there.

Quote from: dedgren on August 09, 2011, 07:14:24 PMCan I manipulate the S3Ds in the Reader, perhaps?

Try making the 5th rep of all of the S3Ds an 8.  This might make the game think the model is a foundation, and have it not cast shadows.  It may work to PIMX the rock as a foundation, and lot a blank model high above the ground that uses it.

You can get pretty deep with the S3Ds.  Potentially, you could move the vertices and make the bottom of the rock the slope of the cliff, making the ground issue go away.

Quote from: smoncrie on August 09, 2011, 06:31:03 PM
I don't know if this is relevant, but I suspect that the game uses the S3D U,V values to generate shadows.

I really have no idea, but I wouldn't think so.  From what I know about S3Ds, they only form vertices and triangles (and not nearly as high definition of the shadow).  The U/V settings are the percentage of pixels to go into the FSH (a U of .5 and a V of .25 on a 128x128 FSH would be point 64,32).

The lighting exemplar has a fair amount of properties that deal with the behavior of the sun.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 09, 2011, 09:40:12 PM
Hey, Carl- I was hoping you'd chime in here.

Couldn't re-plop, because it's not a lot.  It is an offset ploppable PEG boulder- the big one that looks like Darth Vader's helmet with lichen on it.  I have this idea that embedding them into cliff faces might be a good thing.

The thing that really bugs me about the shadows is that they can be easily turned off globally in the game settings menu at the region view screen.  I guess f I want this to work I'll be playing either at high noon or midnight.

Here's the boulders with the shadows off.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg202.imageshack.us%2Fimg202%2F9819%2Fshadow11080903.jpg&hash=15c77f70c5b008970ac4aa2c3a21ce26eff1da2b)

This is quick and dirty what I'd like to accomplish.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg14.imageshack.us%2Fimg14%2F3934%2Fshadow11080904.jpg&hash=f61564aee68576264210c7275fe0b0652be7d5af)

So off to fiddle with S3Ds...


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: smoncrie on August 09, 2011, 11:17:35 PM
David,

The "Is Ground Model" property works for lot props and for T21 props.  The "Is Ground Model" property may only work in prop exemplars, and, if I recall correctly, mayor mode plops specify the model directly and don't use a prop exemplar.

Lowkee33,

I have made many complicated S3D models from scratch by hand, but I have not looked into connection with shadows, except to notice that hand built models and transportation models cast shadows that don't seem to have anything to do with their shape.   This led to my speculation that U,V values, or possibly the texture alpha map was used to specify the shape of the shadows.  It may be caused by something else, but consider:  For many different (linear) transformations of the texture, you can compensate with the U, V values and get a model that looks exactly the same.   Textures created by BAT may be related, in some way, to what you would see if you were looking from the same angle as the sun. Anything behind what you see from that angle is in shadow. It's pure speculation, but this was what I was thinking of.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: cogeo on August 10, 2011, 01:54:03 AM
@david: As the other posters have mentioned, setting the "Is Ground Model" property to False (or removing it) should be enough to make props casting no shadow. And no re-plopping is needed, as this property is not stored in the city file, it's simply read from the prop exemplar (either the original, or a modified or overridden one). And it has nothing to do with the model. Maybe the exemplar you are modding is not the right one. Or these may not be really "props" but technically implemented as "flora". I don't know what can be done in such a case. There is a property called "No Shadows", which makes the building model (of a lot) not to cast shadows. I don't know if it works for flora as well, but you can try it.

@smoncrie: I have examined the shadows mechanism more in-depth, trying to make some subway models for RTMT. Take a look in the pic below:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg26.imageshack.us%2Fimg26%2F3218%2Frtmtssprvw09.jpg&hash=af7b06dec95ec1cba9722cc36c425742661fba1b)

As you can see, the shadow is always cast from the left to right direction (as you view it), as is the case with all other (normal) props. That is I have eliminated the "negative shadow" effect, common to most subway props (except - what a surprise! - for the Maxis one), which is caused by the underground section of the model.

For comparison, take a look in the following pic:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg855.imageshack.us%2Fimg855%2F1015%2Frtmtssprvw10.jpg&hash=9ce53e26a3dd70f7c5150cc6a12138784ab7f48f)

The negative shadow here is present (these are the pics before modifications).

To determine the shadow shape, the game uses the model of the "previous" rotation view, eg the shadow for the south view is calculated using the model (the opaque parts of the texture, literally) of the west view, the shadow for the east view is calculated using the model of the south view, etc. And this is quite normal, as the shadow is always cast left-to-right, as I mentioned above.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on August 10, 2011, 07:46:28 AM
@Dedgren:  I can't get shadows to turn off for flora, no matter the settings (other than the in-game shadow setting).

  If you open up Ingred.ini in your Deluxe\Apps folder with notepad and  "find" "properties related to lighting", you will find the properties that Maxis uses to make shadows.  The list is sectioned off, and there is a section that deals with properties that can be put right into an exemplar. All very promising, Shadow Strength/Color/Texture ID/etc.  However, every property there appears to be non-functional.  The TextureID points to a FSH in SimCity_2, but even an override of this texture has no effect. 
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 10, 2011, 12:35:33 PM
So the chances would appear to be good that flora generically generates "shadows"; i.e., because it is flora and not based on any particular property in any particular BAT object that makes it up.  I'm going to demonstrate my complete ignorance of the BATting process here and ask if the LOD for the object could be involved.  I have a perception of an LOD as kind of a "bounding box," but don't hesitate to let me know if I'm all wet.  I take it, in any event, that when a content creator BATs a tree, for example, that the creation of the shadow is not part of the BAT process.

I appreciate all the comments up to this point, it seems we maybe, if not learning something new, at least confirming something that has been suspected by some.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on August 10, 2011, 06:35:44 PM
Somethings up with your post David.  Seems you format didn't take.

How did you get his rock in there so well?  :)

How about this:  Peg's rocks as the third model in a seasonal flora set.  First rep set at 0, and 5th (or whichever one is the duration) set to 1000000 (about 3000 years).

Model 1&2: Very small, but noticeable.  It is a guide for where your rock will be, so can be offset as needed.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg89.imageshack.us%2Fimg89%2F7564%2Fimg1qt.jpg&hash=32de8885de3243d61bd05c6310a8e347f70d6ce9)

Model 3: Peg's rock
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg3.imageshack.us%2Fimg3%2F1341%2Fimg2ziu.jpg&hash=3064de2e9c1a16e656e79b7017e58ea41b679704)

Since the rocks have kept the blue shape's nearly invisible shadow, no shadow issues occur.  Of course, one day that blue object will be back, but only for a month or two every 3000 years.  :)

If something like this interests you, you can also offset the Rock model from within the RKT4.  Here's a tutorial - Link (http://sc4devotion.com/forums/index.php?topic=13351.0)

The blue model is attached, maybe useful.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 10, 2011, 07:22:00 PM
A most excellent kludge, Carl.

...headed for the Reader...

I'll be back.

UPDATE1:  Phase 1 (the little blue thingie as the first state of an RKT4 "infinite" sequence to eliminate the shadow) works like a charm, Carl!  Now to check out the offset.

UPDATE2:  Disregard Update 1.  That did seem too easy.  Who knew that the first iteration of an RKT4 plop "on the ground" is the third object referenced in the property?


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: nbvc on August 10, 2011, 09:21:54 PM
Mayor menu ploppables have their own "Is Ground Model" property. It can be set for each Exemplare file in the mod and should override the property of the prop.
See here for mayor menu ploppables. http://sc4devotion.com/forums/index.php?topic=185.0
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on August 11, 2011, 05:17:34 AM
@nvbc:  In my testing, that property has no effect on flora.

Quote from: dedgren on August 10, 2011, 07:22:00 PM
UPDATE2:  Disregard Update 1.  That did seem too easy.  Who knew that the first iteration of an RKT4 plop "on the ground" is the third object referenced in the property?

Is this something you just learned, or does it make my idea not work?  I may have made the RKT4 of my exemplars more confusing than they had to be.  RKT4 is basically sets of 8 reps.  Each set is a different state, defined by the first rep (of each set).  My exemplars go "2, 1, 0" in these reps, but I don't think they have to.  The set that starts with "0" is what you will plop.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 11, 2011, 11:48:50 AM
@nbvc- I'll ditto Carl's (Lowkee33) response.  I've not seen that to be effective when dealing with MM ploppables.

OK, so here's the state of things.  I spent several hours last night playing with the KSC4FloraParametersProperty and RKT4 properties and only got in deeper.  What was happening seems to invalidate some of the conclusions, in particular, we had reached concerning reps 1  and 5 of the KSC4FloraParametersProperty.

I have RL stuff to deal with today and tomorrow, so will attach the dat file I've been playing with to the lower left corner of this post for anyone interested to take a look at.  Remember, you need PEG's PegPond TAHOE Boulders and Carl's little blue thingies (attached several posts back) as dependencies.  Good luck!


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: nbvc on August 11, 2011, 12:49:12 PM
You are right. I set it to "true" to have shadows for all my MMPs, but they also have shadow with "false".
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on August 11, 2011, 01:55:01 PM
@NVBC: Also to note that the property can be removed without any effect on shadows.  Guess I'll have to aim some automata at some trees to see if the property is needed at all.

Quote from: dedgren on August 11, 2011, 11:48:50 AMRemember, you need PEG's PegPond TAHOE Boulders and Carl's little blue thingies (attached several posts back) as dependencies.  Good luck!David

Introducing LK_MEGA_Pack_Vol01  :D.   But seriously, you will also need: Seasonal Flora Patch (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2612).  For this, it really doesn't matter which terrain mod you choose.

I'm not sure what you are trying to show with those files.  I meant to say rep 6 for the duration, sorry.  But your files work pretty much as expected:  The first two models share 359 days, and the duration is 360.  Models only switch on the month, so we never see the third one.  Perhaps I missed something?  What I propose is that the first rep is 0, and the 6th is something longer than you think you will ever play.

  As far as I understand, rep 4 and rep 5 are related, and deal with the self planting ability of flora.  The furthest I ever got with flora can be found in this post: Link (http://sc4devotion.com/forums/index.php?topic=12294.msg374067#msg374067).   A file is attached to that post (This File (http://sc4devotion.com/forums/index.php?action=dlattach;topic=12294.0;attach=8434)) which has Maxis trees planting themselves automatically pre-mayor mode.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 11, 2011, 02:29:33 PM
Carl, meant to say rep 6.  Got in a hurry.

In any event, what is happening for you with this.  In order for the shadow to be based on the small blue thingie, it must be called in rows 22-24 of the RKT4 property, which is where it is located in my attached file.  This, for whatever reason, is the first object plopped.  Attempting, however, in reps 1 and 6 of the KSC4FloraParametersProperty to use values...

...any values...

...that allow the little blue thingie to be plopped and then never seen again have only resulted in complete frustration.  359 and 360 were simply the last two  tried just before I started chewing on my laptop, and that's when I know it's past time to stop.  If you have a combo that works for you, attach it back and I'll be suitably awed.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on August 11, 2011, 05:00:11 PM
Quote from: dedgren on August 11, 2011, 02:29:33 PMIn order for the shadow to be based on the small blue thingie, it must be called in rows 22-24 of the RKT4 property, which is where it is located in my attached file.

This is actually my fault.  RKT4 is set in 8 rep sections, and each section represents a different model state.  For these flora, there are three states, 0, 1, and 2.  The first rep of each 8 rep section defines the state.  State 0 is the plopped model.  My mistake was to put that section last (from the template I used, thought I had to).

Anyway, that's fixed now.  Forget everything you have learned :).

Quote359 and 360 were simply the last two  tried just before I started chewing on my laptop

Hurts just reading those numbers.  I only hope you hadn't tried 357 and 358 before that   &mmm.

Check these out.  The standard version places the rock right where the blue thing is.  The "Moved Down" version places it 16m below.  I did some playing, and the results are pretty close to your picture.  Maybe needs to be moved down some more, or you could have different versions with different offsets.  The move down accomplished by negative values in the 11th and 20th reps.

(Now I just need to make some rocks to match my cliffs... oh but wait, my cliffs aren't close to done...)     
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 11, 2011, 08:53:12 PM
@Carl:  You've learned far more than I've ever forgotten, my friend.

One K-point, coming up.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: smoncrie on August 12, 2011, 03:53:49 PM
I don't know if this helps, but it does show some unusual shadows.  The lot shown contains a prop based on a Maxis Train car, a viaduct created from scratch, and the TP tree with a vertical offset in the RKT4 (rep 3).  Note how the TP tree is shifted, but its shadow does not shift.


(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi291.photobucket.com%2Falbums%2Fll299%2Fsmoncrie%2FShadows.jpg&hash=153e9094a9b5743a39efc9e8912cd97f1f5d87ee)
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 14, 2011, 10:32:38 AM
Thank you, Stephen- yes, there certainly are some odd shadows out there.  The whole motivation behind my original inquiry was to get rid of the shadows cast by PEG's boulders, which are merely awful, and by Steve's (Sorchin) large rock outcroppings, which are truly awful.

I'm amazed at the speed with which the issue was worked through.  Learned a few things, to boot.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: cogeo on August 14, 2011, 11:13:03 AM
The RKT4 not shifting the shadow along with the model, is a known bug. If you need to shift the model, better use my SC4 Model Tweaker (copy the model(s) and assign them new TGI IDs - no need to copy the textures (FSH), they can still be using the original ones).

Also models with 1 Z/R view may cause shadow problems. Automata, for example, don't cast shadows, instead they have the shadow modeled as well.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: dedgren on August 14, 2011, 11:20:35 AM
cogeo, thanks for the info.

QuoteIf you need to shift the model, better use my SC4 Model Tweaker

That's what I'd always done in the past- great tool.  I was wondering if it now works happily under Win 7 (64 bit)?  I have an elderly XP machine I use to run the Tweaker on, but it is showing its age.


David
Title: Re: Can prop shadows be turned off in the Reader?
Post by: smoncrie on August 14, 2011, 03:02:32 PM
Cogeo,

I was just illustrating strange shadows that might give insight into how shadows work.  I was not claiming that these kinds of shadows were unknown.

One reason I showed the RKT4 shadow bug, was that I was thinking that one could remove the shadow by shifting the model and its shadow underground, and then use RKT4 to shift the model back to the surface.  I did not mention this because I thought that Lowkee33's solution was better.

The train prop shown uses RKT0 (1 S3D), and the viaduct to use RKT1 (20 S3Ds).  Both were modified from the originals.
Title: Re: Can prop shadows be turned off in the Reader?
Post by: Lowkee33 on October 22, 2011, 09:31:47 PM
My turn for help :)

I've made this model and I want it to only use one FSH.  As the image shows, my topic is trash.  I've made the individual trash cans to only use one FSH, and I didn't have this shadow issue:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg855.imageshack.us%2Fimg855%2F6724%2Fshadowissue.jpg&hash=6e5d8d34179f75974b09486e8b8521f12817b52c)

Up top is the ingame image, and below is the Reader UV mapping.  All of the other mapping is just as tight for the other rotations, and I don't know why the shadow is crossing over.  You can see I've rotated and shrunk part of the FSH, and this does seem to confirm what Cogeo said about shadows coming from the rotation before it.  Any help with this?  Thanks.