Something like a mirror

Posted By: Captain_Kiyaku

Something like a mirror - 02/15/05 07:58

I have a little shader question :>

Is it possible to project a texture on a tga sprite with alpha mapping? Umm the texture should be the one which is reflecting in the sprite. so you can use it like a little wet part on the bottom, it doesnt have to mirror entitys. just one texture, (well entitys would be great, but i think it will just work with Pro)

I have the Com version, DX9 and PS 1.4 and VS 1.0.. i think lol

So is there something like this? maybe the same reflection from a water shader..

sorry if my english is bad, its late.
Posted By: Sebe

Re: Something like a mirror - 02/15/05 08:11

Maybe environment mapping would be something for you?

You can apply it to any model you want (just make a small model instead of the sprite) and it looks like an almost real reflection; perfect for something wet.

The problem is that now the environment mapping shader uses the alpha channel of your tga (to control where there should be the shader cubemap and where the skin visible), so you can't use it with transparency. Steempipe once made an environment mapping shader with transparency, but I'm not sure if it works with your graphics card (the standard environment mapping should work). Hope it works
Posted By: Captain_Kiyaku

Re: Something like a mirror - 02/15/05 08:30

Okay thank you a lot ^^
i think that will work. I will just try it.

Umm so the shader uses the alpha of my skin to "mirror" the envrionment?
then i could give the rest of my model the bottom texture, maybe that will work ^^'

Well i will just try it. Thanks again :>
Posted By: Sebe

Re: Something like a mirror - 02/15/05 08:38

In Antwort auf:

Umm so the shader uses the alpha of my skin to "mirror" the envrionment?




Yes, he does. With the alpha channel you control how much shader and how much skin you want to see (white => 100% shader, black => 100% skin)

You can even try to make it look like a real mirror: Using this script you can make a +6 cubemap directly from your level. The only disadvantage is that it doesn't work with animations or anything that moves (this is a pro feature).
Posted By: Captain_Kiyaku

Re: Something like a mirror - 02/15/05 08:40

Well since i have the Com, i cant use it then i guess ^^''

Okay it works fine with models :> But Sprites really dont work. They just make weird colors when i move lol. Umm then i have to use a Model, but there's tga possible too, right?

*trying*

EDIT: Okay when i use the tga skin on a model, its the same like the sprite ^^''
Posted By: Sebe

Re: Something like a mirror - 02/15/05 08:54



That's how it could look... as you can see; I've made a cubemap from the level (with the cubemap script) and then I've changed the sky. => The cubemap isn't realtime (I've only com too), but when you don't see it exactly, and make some experiments, you don't see that (if the cubemap is made properly )
This is a model with a tga skin, in the middle, tha alpha map is white, and around it's more or less black.
Posted By: Captain_Kiyaku

Re: Something like a mirror - 02/15/05 09:28

@_@ how did you made it? I think the alpha channel makes problems ^^'
do you just use the Environment mapping shader?
Posted By: Guido_Richter

Re: Something like a mirror - 02/15/05 09:33

That's what I also would like to know!
Nobody answered how top realize an alpha masked env. shader for my car because not all parts or made of metal...
Also the windows should be a little bit reflective + nearly 100% transparent so it's a mix of alpha masked skin and alpha masked env. shader but knowbody answered by now!
Posted By: Sebe

Re: Something like a mirror - 02/15/05 09:40

I'll make a small tutorial how to use environment mapping with alpha channels. Should be finished in some minutes, maybe in some hours, maybe tomorrow (I've to go to school tomorrow, and it's 2:00 am :P)
But I'm sorry, as much as I know it's impossible to use a environment mapping shader + transparency + only some parts of the model are "shadered" at once.

p.s. The tutorial will be german, because my english isn't very good
Posted By: Captain_Kiyaku

Re: Something like a mirror - 02/15/05 09:41

That's nice

maybe you could give me your model and the texture before you go to bed, so i might see whats different with mine o_O?
Posted By: Pixel

Re: Something like a mirror - 02/16/05 02:01

@Lord Sebe

Wenn du das tatsächlich machst, küsse ich dir die Füße. (Was jetzt niemand wörtlich nehmen sollte)

Ich suche schon seit Wochen nach dem, was du da fabriziert hast.
*nach oben deut*

Das wäre grandios, fantastisch, formidabel, superb, der helle Wahnsinn.
Ich ändere meine Religion und bete dich an, ja?
Bittebittebittebitte, schreib uns so ein Tutorial. Und wenn's 5 Zeilen sind die aussagen:
'Sieh dir das Modell an, arbeite das verdammte Script durch und freu dich!'

Mir wäre das egal.


Btw.: Könntet ihr, euer Durchlaucht, noch einen Teil eurer kostbaren Zeit dazu vergeuden, einen Link auf das ominöse 'Cubemapscrit' zu posten? Ich würde aus den Socken explodieren. ^__^


For english speaking people:
I think it's pretty nice.
Posted By: Sebe

Re: Something like a mirror - 02/16/05 02:10

Hehe, ich habs soeben gemacht...

Allerdings hab ich damit derart gestresst, dass ich froh wäre wenn einige es durchlesen könnten und mir Feedback geben würden bevor ich es in der Tutorial Abteilung veröffentliche.

Im Tutorial geht es darum ein Schwert mit Envmapping auszustatten sodass es glänzt, doch für diejenigen unter euch die gerne nen Spiegel Fake hätten, hab ich unten als p.s. noch kurz was zum wundervollen RenderCubeScript geschrieben

Also, hier ist das Tutorial. Hoffentlich klappts bei euch, viel Glück!

P.S. Anfängliches Bilderproblem behoben
Posted By: Pixel

Re: Something like a mirror - 02/16/05 02:29

Ich check's gleich mal durch.
Großen Dank.
Posted By: Pixel

Re: Something like a mirror - 02/16/05 03:15

Funktioniert bestens.
Das wird sicherlich äußerst brauchbar!



DANKE!

P.s.: Hat leider gedauert, weil dir 'Malcom mittendrin' und 'Die Simpsons' dazwischen gekommen sind. ^^
Posted By: Pixel

Re: Something like a mirror - 02/16/05 03:54

I don't know, if it was mentioned somewhere before but:

If you use the cubemap capturing script (Use the 2nd one!) you HAVE to set
var video_mode = 6; unless you change the script.

I had set it to 7 and wondered, why I got a black Cubemap.

Ah.. btw.: Lord Sebe, did I thank you allready? ^__^
Posted By: Sebe

Re: Something like a mirror - 02/16/05 03:59

I'm glad it works

I've put the tutorial here, you could write the cubemap capturing / video_mode 6 thing there, this seems to be important for the other users of the capturing script.

And yes, you did thank me... but to thank me twice is always better than just once
© 2024 lite-C Forums