Author Topic: Saving cube maps  (Read 2988 times)

0 Members and 1 Guest are viewing this topic.

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
The developers of the Shadows of Lylat team decided to drop the old ambient light system and go for diffusely convolved cube maps.

While the changes in the shaders are no problem, there is a bit of extra work needed for the cube maps.


Of course I'd like have the final cubmaps as close to the original background as possible.
I'm not 100% sure, but I think there was a way to export the currenly used cubemap from FSO, or grab it somewhere.


Could somebody point me in the right direction? ;)

--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Aardwolf

  • 211
  • Posts: 16,384
If I'm reading this correctly...

You want programmatic access to the automatically generated cubemap? Or do you just want to export?

Also, diffusely convolved cubemaps FTW!

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
I just want to export it.  I'll do the blurring myself.




It looks pretty awesome. :)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Step 1: Enable the "save render targets to file" command line/launcher flag.
Step 2: Start FSO.
Step 3: Load a mission.
Step 4: Alt-Tab away from game.
Step 5: Go to /yourmod/data/cache and copy "cubemap.dds" to wherever you want.
Step 6: ???
Step 7: Profit!
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
That sounds promising!


Thanks, I'll try that. :)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Fury

  • The Curmudgeon
  • 213
The developers of the Shadows of Lylat team decided to drop the old ambient light system and go for diffusely convolved cube maps.
I'm curious as to what exactly does this mean? What kind of changes are needed in shaders and how exactly the two differ in-game?

 
  

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Yep, that pretty much covers it.

You don't need a special shader. In fact it would be better to edit all specular maps. We're just taking the easy way.

As far as the visual difference goes:


This is the old ambient light system:



This is a shot without ambient lighting (and no emissive light either), but with a diffusely convolved cube map:



I'd recomend waiting for the material system before you use it though.
You loose all sharp reflections and you'll probably have to edit most if not all specular maps.

On the plus side, it doesn't cost any performance and it doesn't kill the normal maps anymore, like the ambient light does.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Sexy ship.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Does the ambient lighting change according to the normal map, or only according to the per-vertex normals (model smoothing)?

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
The "lighting" changes according to the normal map with per-pixel precision.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Win.

 

Offline Angelus

  • 210
  • The Angriest Angel