News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Mapping

Reply
 
Thread Tools Display Modes
Old 25th Aug 2009, 06:56 AM   #1
Horror
Registered User
 
Horror's Avatar
 
Join Date: Jan. 27th, 2008
Location: Australia, Melbourne
Posts: 86
Lightmap + dynamic shadow

Is it possible to have a mesh that uses a lightmap and which can also recieve dynamic shadows from nearby InterpActors? I have a windmill and I'm trying to get the blades to cast a shadow onto the tower of the windmill as they rotate. I've converted the tower of the windmill to an InterpActor / KActor along with the windmill blades, but this causes the Static channel to uncheck itself during a build.

Is it one or the other? Or can I have both?

Last edited by Horror; 25th Aug 2009 at 07:01 AM.
Horror is offline   Reply With Quote
Old 25th Aug 2009, 07:12 AM   #2
Bi()ha2arD
Toxic!
 
Bi()ha2arD's Avatar
 
Join Date: Jun. 29th, 2009
Location: Germany
Posts: 2,819
iirc you have to set the blades as interpactor (which will rotate) and the tower itself as static mesh. you then have to enable dynamic channel on the tower and enable dynamiclightenvironment (or however its called, its a section with only 1 checkbox) on the blades. hope that does it.
__________________
Bi()ha2arD is offline   Reply With Quote
Old 25th Aug 2009, 08:02 AM   #3
Horror
Registered User
 
Horror's Avatar
 
Join Date: Jan. 27th, 2008
Location: Australia, Melbourne
Posts: 86
Thanks, definately looking like this is on the right track.

Only problem is that the shadow cast now seems to be coming from the direction of the Skylight (which isn't in the dynamic channel) instead of my primary D/S light source, and the dynamic shadow is also being cast on other meshes that aren't in the dynamic channel (the ground, speedtrees, etc). The windmill blades actually seem to be completely ignoring the lightsource from my D/S light (they've turned black) even though they both share the dynamic channel.

I may have overlooked something. I'll have to take a closer look tomorrow, thanks for the help so far!
Horror is offline   Reply With Quote
Old 25th Aug 2009, 08:16 AM   #4
Jetfire
Registered User
 
Jetfire's Avatar
 
Join Date: Jul. 25th, 2005
Posts: 354
Lightenv shadows will cast over everything.

In editor, dynamic stuff can turn black until you click them, at which point they'll 'wake up' again.

Your primary scene light needs to have bcastcompositeshadows = true (and prolly have the composite dynamic channel enabled if it doesnt already). This will also sort out your character lighting. Make sure the interpactor is also in the compositedynamic channel.

If needs be, just place a small tight spotlight pointing directly at the mesh's pivot point and control it's shadow with that, if it's starting to mess with your main scene too much.

If all else fails, you can also tweak the shadow a little bit by expanding the mesh's lightenvironment settings and fiddling with the shadow souce location vector, but mileage will vary depending on the mesh.
__________________

US
Jetfire is offline   Reply With Quote
Old 26th Aug 2009, 08:03 AM   #5
Horror
Registered User
 
Horror's Avatar
 
Join Date: Jan. 27th, 2008
Location: Australia, Melbourne
Posts: 86
Almost got it!

One problem though. The shadow also appears to be projecting onto the rear side of the mesh. Looks really wierd.

Also, if I can't control what meshes will recieve the shadow from the blades, do I just use ShadowDistance to control how far the shadow can actually get?
Horror is offline   Reply With Quote
Old 26th Aug 2009, 08:50 PM   #6
Bi()ha2arD
Toxic!
 
Bi()ha2arD's Avatar
 
Join Date: Jun. 29th, 2009
Location: Germany
Posts: 2,819
you could use light volumes and set the light to only affect the tower. but it still shouldnt cast a shadow on the backside.
__________________
Bi()ha2arD is offline   Reply With Quote
Old 27th Aug 2009, 05:50 AM   #7
Jetfire
Registered User
 
Jetfire's Avatar
 
Join Date: Jul. 25th, 2005
Posts: 354
That wont affect the shadow and what it casts on at all. Using the same lighting type as is used for characters and guns, the mesh is casting self-shadow on itself, the only way to stop it doing that is to stop it casting shadows at all.

Another totally different solution would be to fake the shadow with a lightfunction, and make the meshes you dont want it to appear on not accept dynamic lights. But then ofc, they wont receive lighting from explosion effects etc ingame. Your call
__________________

US
Jetfire is offline   Reply With Quote
Old 27th Aug 2009, 08:34 AM   #8
Horror
Registered User
 
Horror's Avatar
 
Join Date: Jan. 27th, 2008
Location: Australia, Melbourne
Posts: 86
Damn, UEd wont go down without a fight will it?

Here's a pic. Kinda looks like the shadows are just projecting through everything and making no distinction between front and back faces.
Attached Images
File Type: jpg badshadows.jpg (36.9 KB, 24 views)

Last edited by Horror; 27th Aug 2009 at 08:36 AM.
Horror is offline   Reply With Quote
Old 27th Aug 2009, 10:22 AM   #9
Jetfire
Registered User
 
Jetfire's Avatar
 
Join Date: Jul. 25th, 2005
Posts: 354
Yep, no way around that, dynamic shadowing sucks. In Planetstorm you can see characters running around on the floor above you, the shadows of gunships projecting through roofs etc. We don't want to make every wall and floor 6ft thick, so meh.

Lightfunction then, but it's gonna be a big radius dynamic light so not that cheap.
Or rotate the windmill so the blades are casting onto the floor ^_^
__________________

US
Jetfire is offline   Reply With Quote
Old 26th Aug 2010, 09:20 AM   #10
Horror
Registered User
 
Horror's Avatar
 
Join Date: Jan. 27th, 2008
Location: Australia, Melbourne
Posts: 86
Wow, so one year later and here I am again - resurrecting dead threads and playing with my windmill

I guess I'm just wondering if anyone has found any cool tricks for handling this sort of thing in UE3 since then. I like the way the environment component shadows look, but they project through absolutely everything, so that's not an option. If it were possible to ommit certain meshes from recieving the shadow, then I could break the windmill up and only cast onto the front of the windmill where I want the shadow (guessing that's not an option though).

So my only other solution is to use a light function? In which case I would have to remove parts of the mesh from the dynamic channel which I don't want affected by the shadow, and lose the lighting from gun shots and the like?

If anyone has any great ideas, I'd be most appreciative
Horror is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:10 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer