Product Chat / messing with illumination mapping

Author
Message
MK83
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 1st Aug 2014 06:46 Edited at: 1st Aug 2014 06:55
Cosmics fire truck is my first. Question, how to make lights blink. Or not possible as of yet.



By the way thanks Jay for the tut.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

Attachments

Login to view attachments
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 1st Aug 2014 06:55
Alttexture would be the easiest, But not available yet. Mesh manipulation would be another way. Do you have a 3D model program?

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

MK83
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 1st Aug 2014 06:56
blender 2.69

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 1st Aug 2014 07:25
You could make a face and map it to the dark color of the texture, Then animate it moving ever so slightly in front of the mesh light then move it back and forth in a pattern, to imitate flashing lights.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 1st Aug 2014 20:54
The easiest way is to hijack the entity_basic.fx shader and modify it to strobe or flash the illumination channel with say the time constant. It's the most performance friendly way of doing it and you get full control of the timing and visual touches this way. Not for the faint hearted though, and for non scripters when we do model packs in the future we will be listening out for feedback on them and if down the road someone wants strobe effects we can add this to the shader as a default, or an option.

PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM

MK83
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 1st Aug 2014 23:21
Awesome, thanks guys.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1

PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 27th Nov 2014 03:29
If I drop an illumination map in (*_I.DDS) would it just naturally work? With entity_basic.fx in use?

This is something I should test. I remember working a bit with illumination mapping in x9.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Nov 2014 07:59
yes it is written now to use the _I map for illumination. Make everything you want to glow white in the _I map. DXT5 compression and your good to go.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 27th Nov 2014 09:46
Pirate Myke - what does the DXT5 compression do?
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Nov 2014 13:42
DXT5 allows the alpha to be interpolated and not pre multiplied, offering a gradient style alpha. The difference in the alpha value in this case determines the amount or illumination brightness. DXT 4 is the same but allow premultiplied alpha. 4:1 compression

DXT2 and 3 are explicit alpha and is a sharp alpha/ Dxt2 offering premultiplied and DXT 3 does not. 4:1 compression

DXT1 is 1 bit alpha/ opaque only. not premultiplied and 6:1 compression for 24 bit sources

Man I hope I got that right.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 27th Nov 2014 14:18
Wouldn't this only apply if the illumination map was in the alpha channel, rather than a separate texture with no alpha channel (the illumination maps that I've created have no alpha channel)? Sorry if it's a dumb question, but I know next to nothing about the compression types. All I know is that you need DXT3 or DXT5 for transparency (because the transparency map is in the alpha channel).
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Nov 2014 15:47 Edited at: 27th Nov 2014 15:49
What the alpha in the _I file does is takes those same positions on the _d map and brighten them a lot. It is just a mask to tell the shader which pixels to illuminate or brighten.



Transparency works the same, Everything in the mask can be seen threw. But it is just not illuminated. You can always combine both as in a glass lamp cover that would be illuminated and also be able to be seen threw.



They added all the features in one multi purpose shader.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 27th Nov 2014 17:18
I think I understand now - even though I haven't specifically created an alpha channel (eg right clicking and adding an alpha layer in GIMP), the illumination map is in itself an alpha channel.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Nov 2014 18:56 Edited at: 27th Nov 2014 18:59
If you don't have alpha on the illumination map then the shader wont brighten anything, now if the whole channel is alpha then the shader will brighten the whole map.



Having shades of white on a transparent background will give you the alpha you need when you save it to dxt5 format.



What I do is in Gimp duplicate the Diffuse layer, hide one of them. In case you make a mistake



Then with the selection tools with addition selection for additional picking, select what I want to glow.



Select the blank layer and paint everything white. You can feather edges or what ever you like to blend what ever.



Export that layer out as your _I map with dxt5 compression. Have all the rest of the regular maps included and test in reloaded.



With the selection still set, I go back to the diffuse level and saturate or lighten those parts a bit. Then invert the selection and save it as a path or channel. You will need to come back to this after testing in reloaded. Use that selection to brighten or dim the color of the rest of the map to give a nice contrast.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 27th Nov 2014 19:21
Blast - just when I thought I was beginning to understand. Up till now, I've selected the parts of the diffuse map I want lit, inverted the selection, deleted it, filled it with black, inverted the selection agin, and filled with white. Exported it as _I.dds, and it works (sort of - if the lit sections of the diffuse map are coloured, sometimes the colours come through, sometimes the light is plain white). I've never bothered with transparency or alpha channels on the illumination map, but the lighting effect still works.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 27th Nov 2014 20:21
Quote: "They added all the features in one multi purpose shader."


Sweet

Now I just have to figure out via my DDS exporter option in photoshop how to maintain alpha channels. I'll have to take a look at any options containing DXT3 or DXT5.

Thanks for your help!

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
MK83
GameGuru TGC Backer
18
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 28th Nov 2014 22:52
I use DXT5.

AMD 9850 black, 6 gigs ram, GTX 260 Win 8.1 x64



PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 29th Nov 2014 05:15 Edited at: 29th Nov 2014 05:17
I tried out DXT5 and it didn't seem to work. I'm using photoshop.



Does the background have to be black? Or just photoshop transparent? and the area you wish to be lit is full white?



Also what fx file should I be using? I've tested it with entity_basic.fx so far.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 29th Nov 2014 05:24
Photoshop transparent for things you do not want to illuminate and white for things you do want illuminated.

All on one layer, save as .dds with dxt5 compression. You will need the rest of the maps also for the shader.

I use the basic entity shader and it works fine.

Make sure that you restart reloaded after you change the textures

Post your textures if you want and I can take a look at them.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 30th Nov 2014 06:59
Quote: "All on one layer, save as .dds with dxt5 compression"

But there are various different options regard to dxt5 in gimp, what's the better option in this case?
And dxt5 is only for diffuse one?
Thanks in advance.

3com
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 30th Nov 2014 13:41
Uses for DXT 5 compression for Direct X in FPSC Classic and Reloaded:
- Dxt5 is for the _I Map for illumination
- Dxt5 for diffused map for transparency if you need more then 1bit Alpha, Other wise use DXT 1 with the background black for full transparency.
- Dxt5 for normal map if the specular is set in the alpha. Used to be segment shaders that had this scenario.

As far as the other option in gimp, I have seen them, they are different compressions IE:

ARGB8 = 8bit Alpha,Red, green and blue. I know one is raw like a tga file.

Not sure exactly what the rest are, But I am sure there are reams of pages on Direct x Bitmaps and why they have all those options.

Hope this explains it a little better. But Start with WIKI and see what else there is. My knowledge of these formats comes from learning them in this engine.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 30th Nov 2014 16:35
thanks a lot

3com
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 30th Nov 2014 22:41
Hmm I've done all of the above so there must be one small component I'm missing.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 30th Nov 2014 23:36
again if you would like to post your texture I will have a look at it.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 4gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Login to post a reply

Server time is: 2024-11-22 19:13:33
Your offset time is: 2024-11-22 19:13:33