• Welcome to SC4 Devotion Forum Archives.

Can prop shadows be turned off in the Reader?

Started by dedgren, August 09, 2011, 04:46:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dedgren

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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

smoncrie

#1
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.

dedgren





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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

smoncrie

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.

dedgren

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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

Girafe

#5
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
The Floraler

This is the end, hold your breath and count to ten, feel the earth move, and then...

*   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *    *   *   *   *   *    * 

Lowkee33

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.

dedgren

#7
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.



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



So off to fiddle with S3Ds...


David
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

smoncrie

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.

cogeo

@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:



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:



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.

Lowkee33

@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. 

dedgren

#11
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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

Lowkee33

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.


Model 3: Peg's rock


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

The blue model is attached, maybe useful.

dedgren

#13
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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

nbvc

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

Lowkee33

@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.

dedgren

@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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

nbvc

You are right. I set it to "true" to have shadows for all my MMPs, but they also have shadow with "false".

Lowkee33

@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.  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.   A file is attached to that post (This File) which has Maxis trees planting themselves automatically pre-mayor mode.

dedgren

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
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren