Enviroment Maps? -1 reply

Please wait...

Shadow10k

Meepity beepity BONK!

50 XP

27th March 2007

0 Uploads

76 Posts

0 Threads

#1 11 years ago

So over the past week I have been teaching myself scripting and shaders. It's coming along but I have a question.

I'm making a lightsaber hilt, and I want the texture to be a shiny black-chrome. I want it to be reflective, I understand I do this with an enviroment map? Can someone just briefly explain this? Also, can lightmap be explained?




Dantrag

Shaders, usefull yet trouble

50 XP

30th July 2007

0 Uploads

46 Posts

0 Threads

#2 11 years ago

I too would appreciate good tips on making the shaders. The Qbrach tutorial, atleast IMO wasn't really helpfull




Shadow10k

Meepity beepity BONK!

50 XP

27th March 2007

0 Uploads

76 Posts

0 Threads

#3 11 years ago

I can offer some advice on transparent shaders etc. Firstly you make the texture in photoshop, then you want to click the CHANNELS tab. Now select the whole image, and click on the "Select" tab, and then Save Selection as "Alpha 1" then click on the "Alpha 1" anything you want COMPLETELY transparent, make COMPLETELY black, anything in between, you want different shades of grey, but make sure you stick to the LEFTHAND side of the color picker, and anything to be completely visible, make pure white.

Then you want to open your shader program, I prefer Q3ASE, selete the PK3 for the texture you wish to change, and then select the texture you wish to use. I would then suggest saving, and opening up ShaderEd as it is easier to use, fiddle around with different blending modes, if it has no lightmap, then specifiy, so, the best way to learn is to fiddle around and see what you get.

EDIT!!! DONT FORGET TO SAVE AS .TGA and you want 32bits!




Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#4 11 years ago

Environment maps are not reflective. They simply overlay an image that 'flows' over the surface of the mesh.




Shadow10k

Meepity beepity BONK!

50 XP

27th March 2007

0 Uploads

76 Posts

0 Threads

#5 11 years ago

Ah, so [how] would I go about reflection? =\




Inyri Forge VIP Member

[Insert User Title Here]

55 XP

15th March 2005

0 Uploads

25,940 Posts

0 Threads

#6 11 years ago

You'd have to ask a mapper. I've only ever seen true reflectiveness in maps, and as such it may not be possible for models.




Guest

I didn't make it!

0 XP

 
#7 11 years ago

When I make mirrors, if that is what you modeling guru's are on about, I use a shader, or borrow one, and apply it to the surface I want to be reflective. (I also add some other stuff, but I think that those things are unneccesary for modeling.)

And I have only ever seen reflective surfaces in maps, too.




Jose Carlos

Why? Cause normal is boring.

50 XP

29th March 2006

0 Uploads

2,118 Posts

0 Threads

#8 11 years ago

I do believe true reflections can't be done on models. The closest you can get is a render of an area used as an environment map, but then it'd look out of place on other maps.




Innocent Hawk

Not so innocent?

50 XP

18th July 2005

0 Uploads

207 Posts

0 Threads

#9 11 years ago

Ask a mapper? Inyri, don't go confusing people now. :P

Well I may as well respond seeing as I'm a mapper then hehe.

No character shader has ever been truly reflective (so Inyri, you were right, no model that is not part of the map itself has ever been truly reflective). All of them use environment maps, which give the appearance of a reflection, but instead of seeing the actual environment reflected in the metal, you see whatever is in the environment map. Many people typically use a env map that is simply a dark texture with some bright lights spotted around it, or a swirling grayscale kind of chrome-looking texture. Sometimes people like to step out of the box though, and put actual pictures in them to see if people notice (in JK2 there was a Mandalorian Model that I remember was all red and had an environment map made of red flowers, possibly roses, I think I have also seen some people use pictures of mountains and stuff).

Anyway, there are quite alot of ways to do an environment map, so I'll just start you off with something basic:

models/players/yourskin/skintexture { q3map_nolightmap q3map_onlyvertexlighting { map models/players/yourskin/skintexture.jpg (or .tga if you use that instead) blendFunc add rgbGen identity } { map file/path/of/your/environment/map (many basic ones can be found in base JA if you don't want to make one) blendFunc blend rgbGen identity tcGen environment } }

That is a very basic shader that should get you off the ground. Go ahead and try this one, and if it works (which it should, but let me know if it does not) then you can use it if you like, or you can tweak it to try to get a different look. I suggest reading the Q3 Shader manual for info about all the different blending methods you can use with an env map. Yes, it is a very long read, but it is worth it.

Note: if you use a JA env map, don't worry about putting it in the skin .pk3 when it is done, as it is already in your base. If you make your own though, be sure to include it!




Immenor

Pie incoming

50 XP

27th June 2004

0 Uploads

93 Posts

0 Threads

#10 11 years ago

important things to note about environmentmaps: the texture is mearly putting reflective properties to a single image that is going to be partialy transparent ontop of the base texture (in the shader). Also, if there are more tris, the way the environment wraps itself in the shader will varey. For example, water effects like in darth normans arevass map use a environment map, but only look good because it is able to produce a "ripple" in the environment map each time it encounters another triangle. so, flat surfaces that are shiny will look more realistic with a environmentmap if there tris count is higher, even though a flat surface can be made of just two tris (the one with 20 tris and a environment map will look superior).