Using CShops Lightmaps Via The PipeLine
by Michael Hense · in Artist Corner · 05/23/2005 (8:22 pm) · 17 replies
From everything that i've been reading, i was under the impression that the lightmaps in CShop wouldn't come across via the PipeLine, but as far as i can see, they actually seem to...
i was playing around a bit... messing up the levels Ken Finney took so much time putting together (removing the terrain, adding models and interiors), trying to get a solid understanding of how Torque works, when i decided to give the PipeLine a try...
here are a few examples from my tests... using a modded version of the Emaga4 level from the Finney book and exporting the Cathedral csm level (originally by Josh Klint, CShop author)...



i relit the scene... set the sun's lights kinda low... and walked around the level a bit...
the lightmaps that i saw in CShop seemed to be coming over via the exporter just fine...
kinda cool... looks like some added possibilities as far as scenery design and such, at least for me...
definitely a departure from the 'typical Torque look' :)
Thanks Guys for what looks like it's gonna be a useful addition to the Torque Toolbox... definitely gonna have to license this...
--Mike
i was playing around a bit... messing up the levels Ken Finney took so much time putting together (removing the terrain, adding models and interiors), trying to get a solid understanding of how Torque works, when i decided to give the PipeLine a try...
here are a few examples from my tests... using a modded version of the Emaga4 level from the Finney book and exporting the Cathedral csm level (originally by Josh Klint, CShop author)...



i relit the scene... set the sun's lights kinda low... and walked around the level a bit...
the lightmaps that i saw in CShop seemed to be coming over via the exporter just fine...
kinda cool... looks like some added possibilities as far as scenery design and such, at least for me...
definitely a departure from the 'typical Torque look' :)
Thanks Guys for what looks like it's gonna be a useful addition to the Torque Toolbox... definitely gonna have to license this...
--Mike
#2
ok... a lil test... if i lower the sun light, it should affect the scene, right...
in the frames below, i set the sun ambience down to near nothing (no terrain, cathedral is sitting on anothr lightmapped import)... relit everything... and i still get the same lightmapped effects in side the Cathedral, but the windows got darker on the side facing the Torque sunlight...


the CShop level has one bright light outside, by the stained glass windows, and one weaker light inside the building near the top... these were Light types, not Omni_Light types in CShop...
ok... now i'm really confused :)
--Mike
05/24/2005 (7:58 pm)
Tom... that's what i thought at first... but (now hear me out :) )... those stained glass windows aren't transparent or translucent... the floor being 'lit' by the 'light' coming in from the windows shouldn't be happening in Torque if the windows don't allow light to pass thru... right...ok... a lil test... if i lower the sun light, it should affect the scene, right...
in the frames below, i set the sun ambience down to near nothing (no terrain, cathedral is sitting on anothr lightmapped import)... relit everything... and i still get the same lightmapped effects in side the Cathedral, but the windows got darker on the side facing the Torque sunlight...


the CShop level has one bright light outside, by the stained glass windows, and one weaker light inside the building near the top... these were Light types, not Omni_Light types in CShop...
ok... now i'm really confused :)
--Mike
#3
Now the lighting maybe baked into the diffuse textures? Are the windows full brushes or did maybe a single sided poly snuck thru the exporter somehow? Are you using a stock version of Torque or did you or your programmer modifiy it to get the lighting to go thru the window?
If you want to know for sure what is going on, email me the CSM file and the textures to tom at sickheadgames dot com.
05/24/2005 (8:06 pm)
Something else must be going on here. When i read the CSM file in the exporter i throw away any lightmaps in the scene. So unless someone hacked my computer and added CSM lightmap export into my code, i highly doubt that is what your seeing.Now the lighting maybe baked into the diffuse textures? Are the windows full brushes or did maybe a single sided poly snuck thru the exporter somehow? Are you using a stock version of Torque or did you or your programmer modifiy it to get the lighting to go thru the window?
If you want to know for sure what is going on, email me the CSM file and the textures to tom at sickheadgames dot com.
#4
05/24/2005 (8:59 pm)
Looks like there are light entities in front of the windows simulating sunlight coming through.
#5
doing a quick search I found a small picture of how I remember it, with a a downloadable demo
there's actualy a cathedral demo, but it doesn't work on my new system so I couldn't see what it looked like full screen.
can grab it off of www.evl.uic.edu/cavern/agave/DB_STEREO_DEPLOY/ if anyone else wants to try.
scroll down it's the 3rd one down.
BTW, was the Cathedral scene public domain? if so I'm pretty certain I can get the lightmap to come out in torque looking like the one in the thumbnail.
05/24/2005 (11:10 pm)
Hmm, it's been a while since I saw Halo's Cathedral lightmaps in cartography shop, I do recal lit in the showcase on another forum a while ago. but I'm almost positive that the original had more subtle lighting, and the stained glass was cast on the floor.doing a quick search I found a small picture of how I remember it, with a a downloadable demo

there's actualy a cathedral demo, but it doesn't work on my new system so I couldn't see what it looked like full screen.
can grab it off of www.evl.uic.edu/cavern/agave/DB_STEREO_DEPLOY/ if anyone else wants to try.
scroll down it's the 3rd one down.
BTW, was the Cathedral scene public domain? if so I'm pretty certain I can get the lightmap to come out in torque looking like the one in the thumbnail.
#6
05/24/2005 (11:13 pm)
Yet another thing that Torque needs in map2dif... light cast thru semi-transparent textures. Gotta keep that in mind.
#7
my guilt... or innocence... at this point i'm not sure which :)
@Adrian - the original might have indeed had more subtle lighting... this could be due to the following...
1- the lightmapping pass was set to render HIGH as opposed to LOW, as in my rendering
2- the lights in my scene are not placed, ranged, or colored the same as the original
here is a shot of my scene in CShop... the stained glass removed before export...

apparent is that there are only 2 LIGHTS (not OMNI_LIGHTS) in the scene...
the one outside of the building, that is responsible for the floor being lit, and a weaker
one near the dome of the building for ambience...
as you can see, it is identical (98% identical) to what you are seeing in Torque...
which is what leads me to believe that somehow, the lightmapping info is being exported...
the stained glass window is exported as a separate DIF, as i found that if i exported it
with the 'window' in place, the entire interior would be dark (as it should be) upon relighting
in the editor...
@Tom - yes... transparent and translucent light attenuation would be a great addition to the
exporter... and, i'll look to see if there is something else happening in the scene... but as you can see
in the frame, i only have a minimal amount of scenery objects... and in the CShop scene, there are only
two lights of the type LIGHT, not OMNI_LIGHT...
--Mike
05/25/2005 (6:28 am)
I plead my case to you, your honors... and enter the following additional evidence as further proof tomy guilt... or innocence... at this point i'm not sure which :)
@Adrian - the original might have indeed had more subtle lighting... this could be due to the following...
1- the lightmapping pass was set to render HIGH as opposed to LOW, as in my rendering
2- the lights in my scene are not placed, ranged, or colored the same as the original
here is a shot of my scene in CShop... the stained glass removed before export...

apparent is that there are only 2 LIGHTS (not OMNI_LIGHTS) in the scene...
the one outside of the building, that is responsible for the floor being lit, and a weaker
one near the dome of the building for ambience...
as you can see, it is identical (98% identical) to what you are seeing in Torque...
which is what leads me to believe that somehow, the lightmapping info is being exported...
the stained glass window is exported as a separate DIF, as i found that if i exported it
with the 'window' in place, the entire interior would be dark (as it should be) upon relighting
in the editor...
@Tom - yes... transparent and translucent light attenuation would be a great addition to the
exporter... and, i'll look to see if there is something else happening in the scene... but as you can see
in the frame, i only have a minimal amount of scenery objects... and in the CShop scene, there are only
two lights of the type LIGHT, not OMNI_LIGHT...
--Mike
#8
05/25/2005 (3:10 pm)
You sure that those "lightmaps" aren't baked into the actual textures?
#9
to send it to the Torque project directory... as i normally would...
i think i was using the 1.3 sdk build of the engine...
funny thing though... this evening i downloaded the HEAD version, loaded the cathedral into a project...
and everything seemed to behave as you guys say it should after being relit...
the interior 'lighting' fromCShop lightmaps disappeared and the Torque lighting took over...
(also, a possible fault, non related to the above... it seems as if the player is inside a interior while it is being moved inside the editor, it causes the engine to crash... replicated it twice)
(also, an unrelated question... did your moving platform code make it into 1.4... )
added
i have to take back what i said about the HEAd release acting right... i get the same effect in the
HEAD as i do with the other versions... the CShop lights seem to persist...
just turn down the sun and relight the scene...
--Mike
05/25/2005 (3:22 pm)
Hiya Matthew... i don't think so... i just did a lightmapping pass in CShop, and used the exporterto send it to the Torque project directory... as i normally would...
i think i was using the 1.3 sdk build of the engine...
funny thing though... this evening i downloaded the HEAD version, loaded the cathedral into a project...
and everything seemed to behave as you guys say it should after being relit...
the interior 'lighting' fromCShop lightmaps disappeared and the Torque lighting took over...
(also, a possible fault, non related to the above... it seems as if the player is inside a interior while it is being moved inside the editor, it causes the engine to crash... replicated it twice)
(also, an unrelated question... did your moving platform code make it into 1.4... )
added
i have to take back what i said about the HEAd release acting right... i get the same effect in the
HEAD as i do with the other versions... the CShop lights seem to persist...
just turn down the sun and relight the scene...
--Mike
#10
That we're on the subject. I think that getting Cartshop lightmaps to work in Torque will be very difficult. The problem being that geometry that has been exported for Torque has been broken up differently via the BSP process than the Cartshop geometry. I will have to do as a post process... match Torque surfaces to Cartshop triangles... figure out which UV belongs to which... then generate tex gen planes to match the Cartshop UVs. It seems highly tricky and depends on not having bad Cartshop source geometry to begin with.
Even then... Cartshop lightmaps may look prettier than Torque's, but they are fairly limited. Only omni lights... no spots or surface based lights. At this point i may just go improve map2dif's lightmapping and make the map2dif plugable in Pipeline than dealing with Cartshop lightmaps.
05/25/2005 (3:48 pm)
I'll go out on a limb here since i wrote the code in question: absolutely 100% no chance that Cartshop lightmaps are exported by our Pipeline exporter. Trust me if it was it would be a feature i would be pimping like crazy.That we're on the subject. I think that getting Cartshop lightmaps to work in Torque will be very difficult. The problem being that geometry that has been exported for Torque has been broken up differently via the BSP process than the Cartshop geometry. I will have to do as a post process... match Torque surfaces to Cartshop triangles... figure out which UV belongs to which... then generate tex gen planes to match the Cartshop UVs. It seems highly tricky and depends on not having bad Cartshop source geometry to begin with.
Even then... Cartshop lightmaps may look prettier than Torque's, but they are fairly limited. Only omni lights... no spots or surface based lights. At this point i may just go improve map2dif's lightmapping and make the map2dif plugable in Pipeline than dealing with Cartshop lightmaps.
#11
ok... one last thing guys... TRY THIS...
get the cathedral file from Here
(626k, checked with NAV and latest defs)
it's zipped, so just copy the towers subdirectory to a data/ interiors subdirectory in
a project you have available... the Realm Wars project, or any of the demos will be fine.
it won't overwrite anything (unless you have an interior called cathedral.dif in there)
now run the project, go to the editor, add the cathedral interior... and relight your scene...
everything looks as it should... no lightmaps coming through from CShop...
NOW.... in the editor, set your sun color values to 0.00xxx and the sun ambient values to 0.00xxx
(the first 3 values) so that in effect you are lowering the sun light effect to near nothing...
relight the scene...
what do you see....
--Mike
05/25/2005 (4:20 pm)
Hahaha... wow... guess i'm really hanging out there now :)ok... one last thing guys... TRY THIS...
get the cathedral file from Here
(626k, checked with NAV and latest defs)
it's zipped, so just copy the towers subdirectory to a data/ interiors subdirectory in
a project you have available... the Realm Wars project, or any of the demos will be fine.
it won't overwrite anything (unless you have an interior called cathedral.dif in there)
now run the project, go to the editor, add the cathedral interior... and relight your scene...
everything looks as it should... no lightmaps coming through from CShop...
NOW.... in the editor, set your sun color values to 0.00xxx and the sun ambient values to 0.00xxx
(the first 3 values) so that in effect you are lowering the sun light effect to near nothing...
relight the scene...
what do you see....
--Mike
#12
05/26/2005 (5:10 pm)
As I said to you by e-mail, really cool stuff Adrian ;)
#13
05/27/2005 (7:18 am)
Hmmm, didn't realise this was in the cartography shop pipeline section... OOPs. Sorry Tom... It was in the Recent Forum theads section of my community page. I'll move them somewhere more appropriate after breakfast.
#14
05/27/2005 (10:33 am)
No prob.
#15
(four posts up) in a Torque level yet...
i'm curious as to your findings...
--Mike
05/27/2005 (12:03 pm)
Tom... did you have a chance to check out the Cathedral i made available (four posts up) in a Torque level yet...
i'm curious as to your findings...
--Mike
#16
05/27/2005 (12:47 pm)
Not just yet... i'm finishing things up on my map importer for Cartshop. Trying to decide how to deal with textures.
#17
coooool...
--Mike
05/27/2005 (1:34 pm)
Oooooooo... a new piece of the Pipeline under construction :)coooool...
--Mike
Associate Tom Spilman
Sickhead Games
It seems to me that alot of people using Torque don't set their ambient light levels down low enough to show how good the lightmaps really are.