Aller au contenu

Photo

Say no to light!


  • Veuillez vous connecter pour répondre
69 réponses à ce sujet

#51
henesua

henesua
  • Members
  • 3 863 messages
 Allow me to upload a better example. Two screenshots. One with light off. The other with light on. Same placeable. Light is turned on and off via script. 2DA line for the Lamp has not been changed.

Posted Image
Lights Off


Posted Image
Lights On

Modifié par henesua, 27 janvier 2013 - 07:42 .


#52
Master Jax

Master Jax
  • Members
  • 352 messages
Ok, now I am decidedly confused! As I understand, a static placeable shouldn't be able to cast light, am I right? I have been noticing they never cast light on any of my modules, even if there is a flame in them, like a lit brazier or campfire. I double checked lots of things, like them not being the no-ambient light variants. I also made it a point to see this in a non-hak module for testing, and went as far as to remove the override folder files. It was as clean as it goes. And no light on static placeables. So, I made one to be usable and activated it in-game. First off, the flare was present despite the placeable being de-activated (My override was empty, remember? None of the tweaks mentioned in this thread), and when activated, the flame came up in the brazier. However, I didn't notice any dynamic lights or shadows being created. Is this normal in exterior areas, or is something else amiss?

#53
Master Jax

Master Jax
  • Members
  • 352 messages
So, I placed some activated torches in a module. They were not only useable, but also activated. However, when I went in-game, despite the torches being lit, there was no ambient light coming from them until I actually clicked on them. Is this normal? Shouldn't placeables set to useable and activated cast light even if the character hasn't activated them? And, are static objects simply unable to cast any light? I hope someone can throw some light on this. 0__0

#54
NWN_baba yaga

NWN_baba yaga
  • Members
  • 1 232 messages
Placeable light sources not set to "static" seems to be bugged since day one and maybe it´s just something to ignore or to accept. I know these details can be annoying but dynamic lights in general have issues. Believe me i experimented so much with them and once i have it working correctly the next try i lose it again. I´m working on a reworked default placeable collection and light sources are on my list so once i´m there i share them independantly from the others.

#55
NWN_baba yaga

NWN_baba yaga
  • Members
  • 1 232 messages
huzza for the double post ! :innocent:

Modifié par NWN_baba yaga, 11 mai 2013 - 12:04 .


#56
Master Jax

Master Jax
  • Members
  • 352 messages
Thanks for sharing, Baba! Well, I guess I will have to keep experimenting as you have mentioned 0~0

#57
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<blinking...>

Static placeables can certainly cast light. I added light nodes above some of the treasure hoard placeables for the Dec CCC. And they do have bu... Er, quirks.

One is that the player must get close before they turn on, perhaps a function of the radius of the light.

Best thing I can say is to experiment with them, including the dynamic settings.

For your torches, have you tried spawning then off and scripting them on?

<...in the glare>

#58
Master Jax

Master Jax
  • Members
  • 352 messages
Well, I wasn't placing MY torches per se, Rolo, I was just baffled by placeables not casting any light while static. These were form all of the modules I have in my collection, rather than any of my own doing. It just seemed like an odd thing. For example, lightposts do cast light when static, but not braziers or any of the camp-related fires. Not even flames. I just think it looks really odd... 0__0

#59
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<patting his pockets...>

Well, there's lights and there's lights. And even the lights have very different options.
I'd have to dig into them to tell you what's going on, and I don't have time just now :-/ Sorry about that.
But I do know they can cast lights and even shadows. My gut feeling is all those objects you mentioned have pseudo lights to ease the stress on the engine.

Pull out the light node from the medium treasure I mentioned (page 2, I think) and compare it to the light nodes that don't behave. Also look at what the light is linked to. It may be a case of it working only if linked to the base or a dummy linked to the base.

<...looking for a light>

#60
Lord Sullivan

Lord Sullivan
  • Members
  • 560 messages
If I remember correctly, there are three choices...

1- Static < Checked "..means you can do bopkis with them even through script"
2- Usable <Checked ".. means you can do whatever and is usable by players in game"
3- Both Unchecked "..is like static, unusable by players but can be manipulated by scripts"

Hope that helps clear some things. B)

Modifié par Lord Sullivan, 13 mai 2013 - 07:14 .


#61
Master Jax

Master Jax
  • Members
  • 352 messages
So, what you're saying is static placeables don't cast light unless scripted, right? As for the ones I am talking about, they're the regular, vanilla ones, braziers, campfires, and whatnot.

Well, this would definitely solve the mystery then, guys! It just made no sense to me that a placeable with a flame on it didn't cast any light, but this seems to be an issue that comes all the way from the original game! Thanks to you all for helping out!

#62
3RavensMore

3RavensMore
  • Members
  • 703 messages

Digging up this old thread.  I don’t think the question of how to remove flare from tileset lights without killing spell flares was ever answered.  The fx_flame01 fix does remove the tileset light flare, but unfortunately removes spell flares as well.  Is there a fix for this?  Even if I have to edit each tile model, I’d be willing to do that—at least for the tileset I’m working on.


  • Iskadrow aime ceci

#63
Tarot Redhand

Tarot Redhand
  • Members
  • 2 675 messages

Can I also ask if anyone made a version of the standard, large, thick candles that can be 

  1. lit and extinguished via scripting and
  2. Not give off any sort of glow when in the unlit state?

I did find that number 1 is possible if you edit copy to make a custom candle but even when unlit each candle still gives off a glow.

 

TR



#64
Tiberius_Morguhn

Tiberius_Morguhn
  • Members
  • 247 messages

Can I also ask if anyone made a version of the standard, large, thick candles that can be 

  1. lit and extinguished via scripting and
  2. Not give off any sort of glow when in the unlit state?

I did find that number 1 is possible if you edit copy to make a custom candle but even when unlit each candle still gives off a glow.

 

TR

 

Use the 'no ambient' version of those candles.  Toolset has both types.  When using the no ambient version, you'll have to script the on state ambient light though (you can see the diff between the two in the placeables.2da file).



#65
Tarot Redhand

Tarot Redhand
  • Members
  • 2 675 messages

Arrrgh! So that's what the "na" at the end of the name means in the toolset. Thanks for the heads up.

 

TR



#66
Tarot Redhand

Tarot Redhand
  • Members
  • 2 675 messages

Well I've just tried the script earlier in the thread and it would seem that it doesn't completely work for candles. The candle flame lights but there is no ambient illumination. I also tried it with applyeffectatlocation as well and that doesn't work. Perhaps it's because it's indoors. Because the majority of the scripting will be going onto the candles, I don't think it will be safe to use the old destroy "no ambient candle" and create "ambient candle" at that location either. So it looks like I'm going to have to just use ambient candles.

 

TR



#67
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

*uses Animate Dead on this thread...*

 

Has anyone looked at this script? with some modification I think it accomplishes quite nicely the original task of getting rid of the lens flare for placeables and require no model or 2da edits. It might also have applications for tile source lighting with further modification and conversion to an area OnEnter event script.

 

The original script

 

Spoiler

 

By uncommenting the original lines and commenting-out the lines related to the VFX, you can pretty much resolve the flare issue. Using SetPlaceableIllumination() in conjunction with RecomputeStaticLighting turns off the lens flare when the placeable's light is off.

 

This is what the modified script looks like:

 

Spoiler

 

Token Screenshot...lights on (left) versus light off (right). Note the flare with the light on and its absence with the light off...

 

lights_zps126ebf36.png


  • Zwerkules, Frith5, kalbaern et 3 autres aiment ceci

#68
TheOneBlackRider

TheOneBlackRider
  • Members
  • 380 messages

Now that is a good finding! I tested it and it seems to be working.

But I seem to be a bit brick minded regarding the way to achive this... I used the NWN Lamp Post (plc_lamppost). The script is looking for OBJECT_SELF. To test, I gave the placeable the variable "NW_L_AMION" and put the script in OnHeartbeat. Of course now the placeable turns off and on after each heartbeat. There is no OnSpawn to completely turn it off once.

But the lens flare is gon, when it's off! (As written in the posts before: Just manually deactivating the placeable leaves this lense flare effect).

Can you point me into the right direction?



#69
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

The script goes into the placeable's OnUsed event slot. I use a variant for each area that uses GetIsDay() and GetIsNight() to determine if the lights are supposed to be on or off when the PC enters the area. All the script requires is that any light casting placeable by tagged "LightSource" so that the script knows which one to check for.  I also have all the placeable light objects' "Useable" flag checked so that PCs can interact with them; although the script should work with them set to static as well.

 

Spoiler

  • TheOneBlackRider aime ceci

#70
TheOneBlackRider

TheOneBlackRider
  • Members
  • 380 messages

Thank you,  Pstemarie!