Env_Map from Wiki , Help

Posted By: MentalAbyss

Env_Map from Wiki , Help - 11/14/05 23:53

Hey,
I need some help setting up the env_mapping shader out of the wiki. I have been working with this for two days and have tried everything I know but still nothing useable has come from it. What I have is a coin. I want to control the reflections of the env-map with the alpha just like the information on the shader says you can do, but I知 not having any luck. What I get is a darkened overlay on my model. Her are some pics.

No material on the coins.



Env_mapp shader with a 50% alpha



Env_mapp with 100% white alpha



As you can see I知 not getting the desired effect, all I get as I change the alpah percentage is a draker coin and not a coin with an env_mapp

Here is my env-mapp that I知 using



And the texture and it's alpha



Can anyone offer any pointers? I want the coins to reflect the env map as they turn about. Also, I am rotating them with the c_rotate command. Judging from the color that my coins are with full blown alpha it looks like the top section of the env_map is being used all over the coin. Is that possible? If so, what is causing it to do that instead of projecting the entire env map? All help is appreciated. Thanks

edit**FYI: GeForce 6600**
Posted By: Helghast

Re: Env_Map from Wiki , Help - 11/16/05 07:40

here's what fixed mit for me... sounds weird... but if you use phtoshop make the texture itself (not the alpha) transparent, that makes it give the shinyness.

regards and hope it works,
Posted By: Matt_Aufderheide

Re: Env_Map from Wiki , Help - 11/16/05 09:39

I dont know why it doesnt work, but for sure the above suggestion cant be right..

One possible reason is that that cubic env mapping , at least doen in this way with the auto gen cood camrea space reflection vector, doesnt work right on flat areas.. so maybe the side of the coin, being flat, doesnt reflect in the expected way.

Also, did you make sure to make the texture a cubemap in script? use bmap_to_cubemap(yourbmap);
Posted By: AAM

Re: Env_Map from Wiki , Help - 11/16/05 11:50

If your seeking a metalic effect then the shader from Steempipe (WaterShader)
would come in handy i used it , turn of the water effect by setting :
float RippleScale = 0.28;
To
float RippleScale = 0.0;
and:
float cos_x=cos(vecSkill41);
float sin_y = sin(vecSkill41);
To
float cos_x=1;
float sin_y = 1;

didnt try it but i it should wright.
and you can control the opacity by :

PixelShaderConstant[0] = {0.80,0.80,0.92,0.88};

the 0.88 is the alpha value .
all what i mentioned are in the .fx file.

search for it.

& thanks Steempipe for a greate shader.
Posted By: MentalAbyss

Re: Env_Map from Wiki , Help - 11/17/05 04:05

Thanks for the ideas and responses guys,! I got that shader working, well I shouldn稚 say that, but rather I got it doing what I needed. Which was more of a shine map than a true env map. I made a new cube map to resemble gold shine and highlights. But the main thing that seemed to get it working was I moved the second shader function, the one that sets up the matrix and placed it in a starter. I put some debug stuff in that function to test to see if it was getting called and it was not. So I moved the matrix setup into the starter and it works fine now. Thanks for the help though.

I have got interested in shaders now so I値l be lurking in this thread more often I hope, of course I知 not sure I can offer much help atm, but for some reason shader code interests me. I read the wiki stuff earlier and that got me going, now in the HLSL workshop. So keep up the good work you guys are a terrific source of knowledge. Later
Posted By: Steempipe

Re: Env_Map from Wiki , Help - 11/17/05 23:59

@AAM: Glad you find it useful!
© 2024 lite-C Forums