PDA

View Full Version : Nightmaps Question



Steve2112
February 6th, 2011, 12:14
Hello Good People -Creating custom objects for cfs2 is so much fun. No seriously I am having a blast.My lighthouse should be ready for beta testing soon.I am just tweaking a few things like "NIGHTMAPS".I am not having any success adding them and getting to show up in game of course flying at night.I have essentially done the following:1: Created both day and night texture bmps for a object.2: Applied them to a custom material in GMAX - 1 to diffuse (Day Map) the other to ambient (Night Map_LM).3: Applied the material to my GMAX object.4: Exported them to MakeMDL.exe SDK and selected "Keep Files", "HasLightMap", and "HasNightMap".But in game no go. No nightmaps show up at all only day map textures and of course in game while flying at night.Any pointers or tips on how one would correct this issue would be awesome.Thanks in advance for your time.Steve2112

Steve2112
February 7th, 2011, 12:20
:kilroy:
Hey Good People - Sorry for the first post being all jumbled together.
Hopefully this second post will not be in the same condition. It must have been a glitch.
OK - So I can see that this question is not an easy one to answer as it clearly is more of a process question then a definition.
So I thought I would cover my current process of how I am trying to add nightmaps "Night Textures" to my current project while following the MS Gmax scenery tutorials FS2002 & FS2004. I will explain why I reference both further in my process.

Step 1: Obviously I create two identical textures, one for use in daylight the other for use at night. Both are 256x256. (In game DXT1).
I name them Mytexture.bmp and Mytexture_lm.bmp.
See Examples:
30616

In Gmax I apply them to my current project following the tutorials listed above.
The FS2002 SDK scenery tutorial doesn’t reference the currently released version of Gmax as far as on how to apply textures with the Gmax Material Editor. So I had to reference the FS2004 SDK scenery tutorial at this stage. There pretty much Identical.

So – following the FS2004 SDK scenery tutorial of using the Material Editor I create a new material and add my textures per instruction.

See Examples:
1. 30617 2. 30618 3. 30619

Now one of the problems as to why I am not seeing the night texture in game may be with the above shown pictures.
Should ambient and diffuse be “LINKED” as shown above and in the tutorials?
Should the ambient and diffuse colors be separated and not linked.
Ambient being 0 in the spectrum and Diffuse is 150 in the spectrum.

Continued next post.......

Steve2112
February 7th, 2011, 12:23
:kilroy:
So after all materials are applied to my project per the tutorials I then export.
Checking the “HasNight” Selection seen in this Example:
30620
Verify it in _0.asm file in this Example:

30621

I load up the game and view my new object in both day and night missions and the texture should change but does NOT!

Any help trying to figure out why would be very much appreciated.

Thanks
Steve2112

Jagdflieger
February 7th, 2011, 12:54
Steve,

I may be in the "dark" here, but I'm not familiar with night textures in CFS 2. The night textures in the CFS 2 > Texture folder are from CFS 1 and FS 2000 and I just don't recall seeing any of them in any CFS 2 scenery, either stock or add on. I'm sure that one of our other scenery builders will soon clairify this.

With either day or night textures, we'll be looking forward to your new light house. Our previous light houses by Usio were actually built as ship models so a good infrastructure type light house will be most welcome.

Here is one of Usio's light houses from several years ago. It uses an effects file for the light at night and as mentioned above, it is actually a ship with its folder in the Ships folder.

Robert John
February 7th, 2011, 13:09
I just tried from 19.00 TO 22.00 GMT and no can do. cheked the asm_0 lm is there dont show up in game more research required. _bright works, I done a searchlight looked ok but thats another story.
Robert John

Robert John
February 7th, 2011, 13:34
30625Hi Steve,

Just a quick answer name material in material editor Bright_name of texture. see picture.
Robert John

Robert John
February 7th, 2011, 14:14
30629Turn of the lights the english bombers are coming to try to blow up our indestructable subpens.

Robert John
February 7th, 2011, 14:25
30630Turn off the lights the English bombers are coming to try and blow up our indestructable subpends.
Is this someting you are looking at doing for the light house.
You can make a cone texture it with material named bright_xxxxxxx clone editable mesh, select all polys flip and attach to first cone.
You can animate gsl models with tick18. to long they become jerky I dont know why at the moment or how to stop the jerkyness.
I have tweeked the asm code and made animations over the time allowed with mkmdl.
Talk to you soon.
Robert John

Steve2112
February 7th, 2011, 16:12
:kilroy: Well,
Looks like clarifying my question worked. That or it was Super Bowl Sunday LOL!
Ultimately I do not think "Night Maps" night textures are functional in CFS2 unless someone knows how to maybe add some code to the cfs2.cfg that would make them active. I don’t believe this is possible.

Its odd how almost every building in the texture folder in CFS2 contains them but they are not applied in game, nor do they function or at least I can not get them too and from the looks of it neither can a few other people who have tried.

So that answers my question. I will move forward.

Look's like RJ is on to something that might work though. I will need a clearer explanation as to how you created and added those light maps RJ if you have the time.

Jag - Looks like the "Cat" is out of the bag. Yes I have all of Usio's work. Great models.
But for years I asked myself "Why didn't he make the lighthouse & buoy’s infrastructure objects".
Well now I know why, you can not turn off the effects "Light House Lights" by simply destroying the objects.
The effects remain still active in the location the objects were placed after you destroy them.
But the plus side of my new infrastructure objects is that you will have more room in your ship's folder to add more ships and not infrastructure objects.
So yes that inspired me to create all new Lighthouse Infrastructure Objects as well as Buoys to be placed any where you want them to be placed.
Down side is that although they will be destructible, the effects "Light Sources" will not turn off.
I have a plan for this as well. I plan on making them look like they have been through hell and back "Damaged" but still function as far as the light sources are concerned. No real options other then this at this juncture.
Anyway like I said “the cats out of the bag”. Expect to see more on the topic of "New Lighthouse Packs and Buoy’s packs" coming soon to a CFS2 game near you.
Thanks for the feedback
Steve2112

rhumbaflappy
February 7th, 2011, 18:09
Hi Steve.

I think you have (re?)discovered a problem with gmax models in that CFS2 doesn't recognize the _LM suffix as a night texture.

I never thought of this before, but I'm sure someone else has stumbled onto it.

The solution may be to use a conditional placement of 2 models... one using day textures and one using night textures. The trick would be coding this into a library object.

Dick

Robert John
February 7th, 2011, 23:46
Hi rhumbaflappy
The trick would be coding this into a library object. Thanking for all your work and help with codeing and your programs, I thought of doing what you said but alas I would not no where to start, I done a long animation using info from yourself and others for cfs2 but after a few frames went jurky. I think I may ask Aron as well.
Robert John

Robert John
February 8th, 2011, 00:15
Hi Steve here is a tutorial for _bright and animation from FSALPHA DESIGN GROUP
Robert John

Steve2112
February 9th, 2011, 10:48
Thanks Guys :mixedsmi: