Karkadann wrote:I tried dynamic shadows and everything slows down, the lag is something awful,
...
Yep! :)
This is why I suggested trying to use simpler geometry for casting shadows, if possible, in the same way we do for collisions. Don't know whether it is feasible.
Karkadann wrote:...as far as baked shadows are concerned unless their baked on export cuz I never baked any shadows
...
Oh... I seemed to recall a thread where shadowmap screenshots were posted, for the age, during its early development...
I have frankly no idea about anything that touches Max, so I'm of zero use there, I'm afraid. :7
Karkadann wrote:I tried using two lights one on and on off and switching between them which does effect the shadows but I cant figure out how to turn the lights on and off in-game.
I have to log off open up Max toggle between lights export convert and then log back on
Ah, must be auto-baked on export, then, I believe.
In that case, it will not help to switch the lights in game - you'll need both shadowmaps and toggle them as well.
Karkadann wrote:I cant seem to get the
xPoweredLightSwitch python to work for me I guess I need help filling it out Its not that cut and dry for me
and this Python
- Show Spoiler
- Code: Select all
from Plasma import *
from PlasmaTypes import *
actClickableObject = ptAttribActivator(1, 'Act: Clickable Object')
ObjectMsg = ptAttribString(2, 'Object String')
class LightButton(ptModifier,):
def __init__(self):
ptModifier.__init__(self)
self.version = 'your version here'
def OnNotify(self, state, id, events):
if ((id == actClickableObject.id) and state):
if (not PtWasLocallyNotified(self.key)):
return
if (ObjectMsg.value == 'LightButton01'):
ageSDL = PtGetAgeSDL()
LampOn = ageSDL['Lamp01Vis'][0]
if LampOn:
ageSDL['Lamp01Vis'] = (0,) #switch lamp off
else:
ageSDL['Lamp01Vis'] = (1,) #switch lamp on
I found
here does not show up in Max
Thats assuming the shadows will turn on and off with the in game light switch.
Hmm, that looks like an example in the form of an excerpt from a script, rather than a complete one (It has the relevant parts, but not the "glue", and no ID, which is probably why it doesn't show up).
It has the name of a SDL variable hardcoded into it. You'd need this varible for your age and the actual showing and hiding of the light would be done by an OnSDLNotify function.
I'm rusty, but for simply enabling and disabling scene objects, I believe you'd want to declare a SDL flag to hold what the current season is, which you then use with xAgeSDLBoolToggle.py and the "light switch", to make player interaction change the flag; and then xAgeSDLBoolShowHide.py with the two lights, to make them toggle on and off, whenever your flag changes (this script takes an argument that determines whether it takes a "1" or a "0" to show the object, so you should be able to use the same script for both suns (and associated objects) and just pass "true" to the one and "false" to the other).
You could also put all winter and summer assets on their own pages and load/unload as relevant.
It could be kind of fun if you made the book the "season switch", so that you'd start reading, pass out, and when you come to, the solar system has changed. :P
I can easily see why you'd rather have the slow animated transition than an instant flip; Much flashier :), and actually easier to do, in many ways, but I don't believe you can get clean away, doing that, without using dynamic shadows (Teledahn doesn't really do shadows, at all).
(What sort of... hmm, "orbit" are we talking about, btw? :7
Karkadann wrote:Also I can not seem to get the light to animate, they wont fade or move at least not with the traditional methods
Hmm, that's odd... They certainly should. Have you tried fading the light by animating its colour, instead of its strength?