You are here

Placeables with light - how to do it ?

17 posts / 0 new
Last post
VeilOfShadows
Placeables with light - how to do it ?

I've been making a few simple placeable models but wanted to produce some street lights and lit-up ads-boards. Unfortunately I've yet find a good step-by-step tutorial on how to add lighting. Though I've studied some already produced torch and lamp models, so far I've come up short trying to figure out how it works. Is there anyone knowledgeable out there who wouldn't mind posting a step-by-step tutorial in how to create such a placeable ? I've worked with both Gmax and 3dsmax.

  • up
    50%
  • down
    50%
BlueMatt
  • up
    50%
  • down
    50%
VeilOfShadows
Thanks for the reply. Unfortunately though the links you've posted is about how to turn a placeable with a lightsource on/off using scripts. Usefull alright but not what I needed. My question is how to add the lightsource to the placeable 3d model itself, in 3d max or Gmax.
  • up
    50%
  • down
    50%
BlueMatt
I thought that was what you meant, but hoped you didn't... pretty good question. What about this tutorial: https://neverwintervault.org/article/tutorial/neverwinter-nights-1-misce... AuroraDlight. Light Nodes in NWN 36 It's the only thing specifically near that subject.
  • up
    50%
  • down
    50%
VeilOfShadows
Thanks for the link ! I'm not sure the AuroraDlight works the exact same way as the AuroraLight though. But I'll probably have use for the tutorial in the .doc you linked, any way. With a bit of luck it might prove to be just what I need regardless :-)
  • up
    50%
  • down
    50%
VeilOfShadows

Guys !

I really need your help with this one. There must be at least one modeler out there that knows how to do this stuff. Perhaps someone of the CCC team ?

What I'm trying to make is a neon sign that can be turned on/ off.

I've tried to do it with both an AuroraDLight/ AuroraLight node and with two "window panes" as utilized in the process of making tile windows change from dark to lit during the day-to-night cycle (as described here: http://www.harvestmoonconsortium.com/forums/viewtopic.php?f=59&t=1787&sid=7426f765050409c81551cf66e4e1797a )

But for some reason the animations doesn't work in game, and importing the model into 3ds max after having exported it, messes up the animation keys and the effects applied to them.

 

So first the technicalities:

I'm using 3ds max 8

I have the latest version of NWmax Plus (6.11.28) installed.

I've studied the LOK Tutorial #5, but it didn't help.

I've googled and searched youtube for tutorials on how to achieve what I want, but have come up short so far.
I'm really at a loss right now.

Does the classification of the model (AuroraBase) matter ? And if so, which one to use for a placeable ?

Do I need to have all the animations of: On, On2Off, Off, Off2On in order for the placeable to work ?

How many frames does an animation need to have to function properly, could it be done with just 0-1 frames for off/ on state ?

Am I supposed to set "Keys" for both the AuroraBase as well as the object/ light node that's having the animated effect ?

Maybe I'm a bit daft but, I'm really new to the more "advanced" aspects of modeling.

Please help ! 

  • up
    50%
  • down
    50%
Michael DarkAngel

Send me your files and I'll see what I can do.

tbotr at tbotr dot net  (replace at with @, and dot with .)  but you probably already know that ;)

 

I make no guarantees and I can't say it will be fast, but I am off work on Tuesday and will have some extra free time between some errands I need to do.

 

--MDA


 MDA



"I intend to leave a memory of myself in the minds of others."
Leonardo da Vinci,
disciple of experience

 

  • up
    50%
  • down
    50%
VeilOfShadows
Thanks for the offer sir ! I'll send the files, but an even greater help would be a detailed, yet simple "do-this-then-this" kind of tutorial on how to make the placeable myself. I'd really like to learn this kind of stuff.
  • up
    50%
  • down
    50%
ShadowM

LINK

I think you mean light nodes? in the link above.

I look into some more.

  • up
    50%
  • down
    50%
VeilOfShadows
Yes the link I added handles both lightnodes as well as animations. The issues I have with the light nodes are: how to turn them on/ off (animations) and how to move them around (if that's possible), the light source (glowing thing) in game seem to have a set position different from where the light node is positioned in 3d max.
  • up
    50%
  • down
    50%
ShadowM

To turn them on and off you will use the activate / deactivate script calls to (on/off) animations in the dropdown in nwnmax. Sample script below.

This for basic placable states, for lights you will also have to call SetPlaceableIllumination and RecomputeStaticLighting function(which I have added to this script) Sorry forgot about the illumination part.

The placable cannot be static also.

Ooops: Yes the light position it determined by the LightOffsetX ,LightOffsetY, LightOffsetZ in the placable.2da

to get around this you would need to make a light placable, that you could move and place anywhere.

void main()
{
object oPond =GetObjectByTag("PondBig");
 if (GetLocalInt (oPond,"PLC_Deactivated") == 0)
    {
        SetLocalInt (oPond,"PLC_Deactivated",1);
        AssignCommand(oPond,ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
        SetPlaceableIllumination(oPond,FALSE);
        RecomputeStaticLighting(GetArea(oPond));
    }
    else
    {
        SetLocalInt (oPond,"PLC_Deactivated",0);
        AssignCommand(oPond,ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
        SetPlaceableIllumination(oPond,TRUE);
        RecomputeStaticLighting(GetArea(oPond));
    }


}

  • up
    50%
  • down
    50%
VeilOfShadows

Aaaaah the irony !

I got the on/off state of the neon sign to work. Possibly the animations had been working all the time but I had accidently misspelled the

on/off script. The one thing I never bothered to check before posting because I thought '..naah, can't be that one', ..right. :p

 

@ ShadowM

Thanks for the info, but what do you actually mean by a "light placeable" ? And how does one go about making one of those ?

If they still make use of an AuroraLight node, wouldn't they end up suffering from the same static light node issue just like any

other lamp/ torch/ whatever ?

  • up
    50%
  • down
    50%
ShadowM

Sorry I forgot some stuff, I updated some of the information.

With a standard placable light you can spawn-destroy it through loop scripts to move it where ever you want and use default animations to have circling effects etc... and have flexibility with adding it into other placables, needs testing though. I think cep and/or project q also made a softer light effect, do not know what file it is. Might ask them. I going to make some in my next update, now that I looked at this some more. Sorry it been awhile since I messed with light.

  • up
    50%
  • down
    50%
ShadowM

The light position in the 2da is in relation to the base of the placable, if it was not you could not move a placable at all  (the light would stay at the x,y,z location and look weird) When a placable is destroyed/created the light effect is destroyed/created also RecomputeStaticLighting is automatically called. Also by making the light there own placable you can select all the light color types. I have a script in my base that can move placables in all axis by destroying /creating really fast and the lighting is recalculated automatically. It busy holiday season, working on my enchanting system, but I see if I can get a sample done with a video.

  • up
    50%
  • down
    50%
VeilOfShadows

Alright, sounds good. I'll be looking forward to have a look at that sample video if ever you get time to make it.

But from what I gather, it's either to go into the 2da file and make the necessary adjustment to the LightOffset entries to put the

node into the desired position, or simply make an AuroraLight node attached to the AuroraBase, and then save it as a free-standing

model (did I get that right ?).

  • up
    50%
  • down
    50%
ShadowM

Yep :)

  • up
    50%
  • down
    50%
VeilOfShadows

Wünderbar !

Thanks for all the help, much obliged :)

  • up
    50%
  • down
    50%