ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Cube maps in STALKER

« Previous 10 events | 1 2 3 | All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  10:15:47  27 March 2013
profilee-mailreply Message URLTo the Top
messing with code


On forum: 01/21/2010

Message edited by:
03/27/2013 10:17:03
Messages: 1519

I also now realize my dream of having a reflection or refraction shader for scope lenses isn't realistic. Oh well

Hmm, I'm not entirely sure about that. The scope lenses show some (faked) reflection already in vanilla, which is different from the rest of the weapon. That might mean that the lens has been assigned a different shader by default. Although I don't know what shader file that would be. Maybe xlens.s?

Too bad it's that hard and convoluted, would have been amazing to get it working.

What I said before is my current understanding of how those files play together. However, as stated initially, I'm not a pro on that front, so there's still a chance that there's some easier way to do it. The question is, though, who has the knowledge to unveil the way - and is willing to share it.
  20:53:57  9 August 2013
profilee-mailreply Message URLTo the Top


On forum: 04/05/2007

Message edited by:
08/10/2013 7:15:44
Messages: 867
Edited at bottom of post

Sorry for bumping such an old thread, but I've been experimenting with this over the past two days and think I'm finally getting somewhere.

Before no matter what I tried to use for models_weapons.s it would be either transparent or some other glitch would occur.

Now I can get it to appear in the normal place, with one of them looking the way it should look (sorta, I'll explain).

Method 1:
The model reacts to light and appears correctly, but it's very dark.

Method 2:
This version as far as I can tell looks identical to the vanilla version, however there is a graphical glitch in the sky with it enabled.

I obviously don't understand shaders that well so it's probably some simple mistake I made that can be fixed and then models_weapons can finally be modified.

I also sent an email about this to team Dezowave as they've been helpful to me in the past so hopefully they'll help again.

Just posted this since I'd love a better lighting model and reflection map for weapons, but first we need to figure out how models_weapons is handled internally to begin with.


Got it working finally.

In the screenshot the hands and AK74 uses the new weapon shader, the hands are using vanilla (renamed the weapon shader for the ak to models_weapon5 by hex-editing and created corresponding models_weapon5.s file)
Here's the models_weapons.s file used:

Some notes:
1) I don't think it uses a bump map (yet, I need to find a better example to see if it gets read. If it doesn't it shouldn't be hard to fix I imagine)
2) The reason I was getting either the glitch in the sky before or a dark model is because I used the VS shader for accum_volumetric which causes problems.
It looks like the first part of the shader line corresponds to the VS, and the 2nd is PS. I set VS to null and thus it came out correctly.
3) The lighting and shadowing on the model is identical to vanilla weapon shader

Now to improve on it by adding a cubemap, maybe writing a custom lighting file for it instead of using accum_volumetric, etc.

Since I was nice enough to share, if anyone including myself creates some neat results lets share it/keep it open source guys.
Each word should be at least 3 characters long.
Search conditions:    - spaces as AND    - spaces as OR   
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion

All short dates are in Month-Day-Year format.


Copyright © 1995-2022 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.