• Welcome to SC4 Devotion Forum Archives.

mrbisonm needs help with gmax

Started by mrbisonm, May 04, 2008, 06:18:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrbisonm

After a few weeks of searching I haven't found much on nightlight tutorials. I was wondering if it is possible to explain to me how to make a simple spotlight step by step? I will figure out the rest by myself.
I started BATing again, but am in the need this time to learn nighlights. I already have figured out by myself to illuminate a window the Maxis way, not very hard.

I read the phillipo tut about making a basic bat building and I followed his instructions (3 times) for nightlights, but they don't show up once rendered. Hm.......wsomething missing in his tut for sure!

It would be greatly appreciated if someone could help me to learn the basics of making lights. Thanks in advance.

mrb/ Fred


....Uploading the MFP 1.... (.........Finishing the MFP1)

SimFox

Well I guess you're missing something, cause there is nothing missing from the tutorial...
in a nut shell there is nothing to make nitelites. Just make any light you wish and name it with prefix nitelite (spelled exactly like that!!!) and voilá you've got your nitelite!

mrbisonm

Well Simfox, there must be something missing or it hasn't been well explained. I have tried everything possible with gmax lighting, believe me, and I even srewed the program up one time and had to re-install it.....lol.....but nothing seems to work properly.
The best thing I came up with was this below (picture). There seems to be some light, but very fade althought the light strength was set at a reasonable strength, but also there seem to be light in the day render....hm....although I did name the freaking light to nitelitespot01.

So, what is wrong? Is it me, my program or the tut? Thanks.







mrbisonm ;)


....Uploading the MFP 1.... (.........Finishing the MFP1)

SimFox

I'm sorry to point out it but... mrbisonm, it is a typical situation - people just don't pay attention and then blame it on someone/something else...

I have stressed that light has to have nitelite prefix. I specifically pointed that is has to be nitelite EXACTLY.

You in your reply say that you did name them nitelite... but look at your screenshots. Now tell me how EXACTLY your lights are named?
Just humor me, type one above another the way I told you to name it and the way you have named it...

I believe the answer will jump at you right away...

$%Grinno$%

Diggis

Capital N? Is it really that tempramental?

cogeo

Wow, I have faced just the opposite situation. It took me ages to learn how to BAT, but never had any problem with nightlighting. While concepts like mesh, splines, extruding etc looked black magic to be, I always found nightlighting easy, as all terms are quite self-explanatory.

Spot lights are somewhat more complicated, as they also have a target, and you need to set the angles between the hotspot and fallof carefully in order to achieve a realistic effect. I mostly use Omnis, they act as a bulb emitting light, and are ideal for achieving an "ambient" effect.

I'm attaching a sort of tutorial I had sent long ago to a friend, together with some images. Hope you find it useful.



Lighting a BAT may prove challenging. The best you can do is to well understand how lighting works, and apply your knowledge as needed, and experiment, experiment, experiment... There are no general rules - each BAT is unique and has its own requirements - and lighting may be a thing of personal preference.

You have not posted any pics in your thread so I can't commend or suggest anything. Maybe you could send me the BAT to have a look or try to improve it a bit.

Some bits from my experience:

1. Try setting the attentuation and maybe the decay parameters. This way you can limit the area a nitelite affects. The light does not light the area outside the far attentuation limit at all. The area close to the far attentuation limit is very little lit (almost unlit), while the area between the near and far attentuation limit is half-lit. The angle the light falls on the surface also affects the lighting. For example have a look at the Incinerator pic. It has two Omni lights at 6.0 and 10.0 meters above ground. As the incinerator has a cylindrical shape, the light falls at a different angle on each point on the surface, and this results in an uneven effect (like a "gradient"), which is quite realistic. In such a case setting the attentuation parameters is not needed. However, for a level surface (wall) you should set them, unless the light is quite close to the wall. This way you can also avoid having the light lighting objects you do not want.

2. Don't forget setting the Casts Shadows parameter, the default is off, and many BATters forget it. The Exclude option does not work in Gmax/BAT, so don't bother with it.

3. Don't hesitate to use as many lights as you need for your BAT. A few strong lights may not light the whole BAT correctly, so you may end up having many "small" lights, lighing a specific area of your BAT. Setting the attentuation parameters limits the lights to confined areas, so that you won't get an overall "overexposed" effect. My stations have many different types of lights, for the platforms, the pillars, the light globes, the entrances, the roof arcs even special lights for the revolving door as well as external "ambient" lights (Omnis). There are 164 lights in total, each one lighting a specific area.

4. First have a look at the total lighting in RailStationLargePlan.jpg. This may look confusing, but as said above most of them light only a specific area. Image RailStationRoofPlan.jpg shows the lights of the roof only. It's simpler, and you can see two kinds of lights, the ones that light the roof arcs, and four large Omnis for the external lighting. Notice the attentuation settings. The roof arc lights light only a small area and don't go far. The external ones give an "ambient lighting" effect. I have set the attentuation parameters so that the walls are mostly within the far attentuation limits. You should also experiment with the distance as well as the multiplier parameter (intensity). A small change may make a great difference in the final result. Try values between 1.0 and 1.5 for the multiplier, but also have in mind that this relates to the material/trexture lightness as well (a darker material generally requires a higher value).

5. Light bulbs or globes are especially hard to light, this took me almost two days! First I tried using nitewindows for the lightglobes, but this didn't work well, they always looked dim though I tried even Goldiva's "Almost White" windows. So I used 3 special lights (from the left, right and front side) for each globe! These are spotlights and have very high multiplier settings (30) but only light up the globes. Have a look at the pillar photos, the green box is the pillar, the blue cylinder the light fixture and the purple spheres the globes (the lower globe was placed a bit lower than it normally would, cause otherwise the fixture hides it, as all views are actually captured sideways from the top). You can see the three lights for the globes. The two inclined lights in PillarSide.jpg are for lighting the pillar itself (the effect of the light emitted by the lightglobes on the wall). As you can see the difference between the "Hotspot" and "Falloff" parameters is broadened so as to achieve a more gradual effect.

6. The lights settings also relate to the material(s) you use (light or dark), as well as the specular parameter.

Other tips:

1. If you need to make multiple identical lights use the array tool with the "Instance" or "Reference" method (don't use "Copy") so that when changing a parameter for one of the lights all others are changed automatically.

2. It's quite easy to test nightlighting in Gmax/BAT, first save your BAT and make a preview render at Draft quality, the result you get does not look good, but nightlighting is very similar to what you will get in the final render, and it's too fast, even for large BATs. Then, if you want to try a different setting reload the BAT from the least-recently used BAT list, change the parameter and render again. Repeat this procedure until you get a satisfactory result.

3. Before exporting you can some steps to clean-up your BAT:
a. Open a fresh instance of Gmax/BAT.
b. In your empty scene put a new Omni (or any other) light. Then delete the light.
c. In the file menu select "Merge", choose your bat file, and in the dialog that appears select everything except TB2CameraHandle.
d. Save the new scene under a different (or why not, the same) filename (overwrite).
e. You may also need to refit the LODs, they may be mangled.
This results in a new, error-free scene, your unused (forgotten) materials will not be imported, and the camera handle reset. You should also take the above steps if your BAT has problems, like materials getting lost in renders (getting gray objects). You may also do this as a precaution before exporting a large BAT, so that you don't have to export again if some materials are lost.


Hope the above have helped.

Regards





callagrafx

#6
Quote from: Diggis on May 05, 2008, 11:36:08 AM
Capital N? Is it really that tempramental?

Fraid so...

This is the part of BAT that initialises nightlight renders:

Quote----------------------------------------------------------------------------------------------------

-- Function:   FnEnableNightLigts

-- Param:      doEnable (true - enable; false - disable)

----------------------------------------------------------------------------------------------------

fn FnEnableNightLigts doEnable =

(

   if ($lights.count > 0) do    -- scene has local night lights

   (

      for lt in $lights do

      (

         -- $lights collection includes targets & targets don't have 'enabled' member

         if (lt.classID[1] != 4128) do

         (

            local namePrefix = (substring lt.name 1 8)

            

            if (namePrefix == "nitelite") then

            (

               lt.enabled = doEnable

            )

            else

            (

               lt.enabled = not doEnable

            )

         )

      )

   )

)
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it

mrbisonm

#7
Geeez......lol........now I feel like a jacka** with a Capital *J*. I didn't think, nor did I pay attention to the Capital N in nitelite. Well, one always learns.....lol. I tried it with *nitelite* and it works....thanks.

cogeo, thanks for the help and the tut, I will surely have a look at this, but only as long it is simple. I don't want to learn how to make comlicated lighting, just a spot light that lights up a statue or a sign on a wall. That will be just fine to start of with.

One thing....is there a way to make simple lighbulb without cover? I mean a simple light (no spot) that lights up on top of a buoy and then make it green and red. Or is this complicated? It doesn't take much to be complicated for me.....lol.

Thanks for the help everyone.

mrbisonm


....Uploading the MFP 1.... (.........Finishing the MFP1)

Pat

#8
Mr B by far are you are not a jacka**  $%Grinno$%  you are learning and wanting to learn that I think is Awesome!!!!!

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

Zaphod

#9
now you know, in the plugin manager you have to make sure nitelites are enabled...

I had the same issue and did everything by the tutorial then realized something was missing :D
War Kittens !?

mrbisonm

Quote from: Pat on May 05, 2008, 09:07:50 PM
Mr B by far are you a jackass  $%Grinno$%  you are learning and wanting to learn that I think is Awesome!!!!!

lol.......did I say I am a Jacka**?....no, I said I feel like a Jacka**....I hope there's a difference, otherwise I'm gonna have a problem....lol ;)


Quote...now you know, in the plugin manager you have to make sure nitelites are enabled...

Wait a minute Zaphod I have never seen an enable nitelites in the Plugin Manager...don't confuse me here.....is there?

mrbisonm ;)



....Uploading the MFP 1.... (.........Finishing the MFP1)

Pat

Its OK there Mr B and I knew if I did that you would see it lol.... I've heard there is a way to turn on nightlites threw Reader but not in PIM.... in reader it turns out looking like ummmm yea.....

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

Swamper77

Quote from: Pat on May 05, 2008, 10:42:06 PM
Its OK there Mr B and I knew if I did that you would see it lol.... I've heard there is a way to turn on nightlites threw Reader but not in PIM.... in reader it turns out looking like ummmm yea.....

Buildings automatically by default turn on their lights at night. Props (or buildings that are props ;)) have a property in their exemplar called "Light", which is set to either "True" or "False". This property can be set in the Plugin Manager under the "Advanced" tab when you are making a prop from a SC4Model file.

Most people seem to forget about it since they are in a hurry to make their props, or they don't look for the "Advanced" tab in the Plugin Manager. The "Advanced" tab is also where you set which zooms your prop will be visible at, among other settings.

-Swamper
You can call me Jan, if you want to.
Pagan and Proud!

callagrafx

Quote from: mrbisonm on May 05, 2008, 07:32:16 PM
One thing....is there a way to make simple lighbulb without cover? I mean a simple light (no spot) that lights up on top of a buoy and then make it green and red. Or is this complicated? It doesn't take much to be complicated for me.....lol.

Use an omni-directional light as your source.  However light sources are invisible so you'd also need to model a sphere with a self-illuminating texture and place the omni directly above it (not inside, it's a solid object). Make sure you use inverse square falloff or the light will go on forever.
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it

mrbisonm

Great callagrafx ,thanks that worked fine. I tried and it came out pretty nice. It was almost too easy....lol. But what do you mean by this: "Make sure you use inverse square falloff or the light will go on forever." Is there a box to check for the inverse square falloff? And a light going on forever is that it always is lit up? Thanks, much appreciated, now I know how to make a lightbulb......yahooo!

Swamper77
, I think we don't have the same PM (SC4PluginManager) since I have no "Advanced" tap on mine, unless I have to say some magic words.......lol. Honestly I tried every tab without finding it. Where did you get your PM?


....Uploading the MFP 1.... (.........Finishing the MFP1)

Diggis

#15
Quote from: mrbisonm on May 06, 2008, 07:10:46 AM
Great callagrafx ,thanks that worked fine. I tried and it came out pretty nice. It was almost too easy....lol. But what do you mean by this: "Make sure you use inverse square falloff or the light will go on forever." Is there a box to check for the inverse square falloff? And a light going on forever is that it always is lit up? Thanks, much appreciated, now I know how to make a lightbulb......yahooo!

The light going on forever means it will light all your model equally.  So if you had it 100m or 100000m away from the model you would get the same amount of light.  There should be a check box in the modify panel for the onmi.

Quote from: mrbisonm on May 06, 2008, 07:10:46 AM
Swamper77[/b], I think we don't have the same PM (SC4PluginManager) since I have no "Advanced" tap on mine, unless I have to say some magic words.......lol. Honestly I tried every tab without finding it. Where did you get your PM?

I assume by PM you mean the Maxis Plugin Manager? or PIM as the rest of the SC4 community call it?

BarbyW

Mrbisonm: I dragged a model to the prop tab in PluginManager and this is the Advanced tab in the prop desc box:

Inside every old person is a young person wondering what happened. TP



Barbypedia: More alive than the original

Pat

Mr. B I was re-reading my first post and I meant to say your're not I was tired and me brain wasnt functioning right lol....  sorry about that lol

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

mrbisonm

Quote from: Pat on May 06, 2008, 08:48:21 AM
Mr. B I was re-reading my first post and I meant to say your're not I was tired and me brain wasnt functioning right lol....  sorry about that lol

Hey don't be sorry, I was only kidding anyways. ;), besides I know I'm not.....lol

Diggis , Thanks for explaining the forever light, makes sense, and yes, I found the checkbox.
By PM I mean the SC4Pluginmanager (official name) and yes it is available from the Maxis site, so I suppose it is the same.

Oh thanks Barby, I found it afterall, that is about the only place I didn't check. I never bothered with the tabs on top before. Maybe I have to check them out and see what these are for.......««starting to feel like a Jack again........lol (I know I'm not)»»

mrb ;)


....Uploading the MFP 1.... (.........Finishing the MFP1)

mrbisonm

Hope you don't mind me bumping this......... &mmm

Have a question about nightlights again, now that I'm starting to know how to make them.
When I refit the LODs, once the model is done, including the nightlights, it makes an awful bigger box (LODs, see picture) than without the lights. Now is it necessary to include the lights into the LODs before rendering or can I just refit the LODs like before without bothering wwith the lights?
Also, do I need to prename the parts *nitelite* that I want to light up at night the Maxis way like I do with the gmax lights?



Now, how about my fist nightlights, how do you like them? Still have to fool around with all the possibilities (darn, there are soooo many), shapes, colours, disributions, ambiance, spots and etc.......This is fun!......lol :thumbsup:

.......ingame night picture of one of my new BATs. I might as well mention that I use the darknight mod............



.........and the gmax renderpreview...




Thanks you all
            Fred/ mrbisonm



....Uploading the MFP 1.... (.........Finishing the MFP1)