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 | Next 10 events »| All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  18:02:33  20 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519
Ok, thanks for the explanation. Not yet sure if I fully understood everything, will try to sort it out. Will report if I manage to figure out what's going wrong here.

Hmm, if this works under DX8 it might be a pure shader issue, not sure about that, though. But if so, I wonder why nobody has ever ported this from DX8 to DX9 before...
  13:25:30  21 March 2013
profilee-mailreply Message URLTo the Top
Millenia
(Senior)
 
On forum: 04/04/2007
Messages: 130
Here's a couple of pics because I accidentally removed the one from the first post, heh.

Cubemap effect with a custom cubemap as sky_13_cube#small.dds and a weather to use sky_13_cube.dds, looks okay but the effect is not masked and gets applied to every single object in the world (not good)

http://puu.sh/2llun

With the shader code I posted, applied only to the weapon. Hard to see but there is a masked cubemap effect in there (controlled by diffuse alpha). Also seems to control opacity at the same time.

http://puu.sh/2lluO
  14:14:01  21 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
03/21/2013 14:15:13
Messages: 1519
Hmm, the second looks really weird. There's definitely something missing.

How did you come to that specific content of the .s file you made? Have there been any special decisions to have it exactly this way? As it's way not the simplest .s file I've come across. Have you tried different settings there (e.g. leave some portions out)?
  14:25:07  21 March 2013
profilee-mailreply Message URLTo the Top
Millenia
(Senior)
 
On forum: 04/04/2007
Messages: 130
I have, removing almost everything makes it entirely transparent. I copied that stuff from some vanilla .s model file, models_xmonolith.s I think.
  12:24:34  25 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
03/25/2013 12:25:54
Messages: 1519
Ok I checked that. The problem here are the assigned pixel and vertex shaders. They must be written the way you wanna have the result. By copying an existing .s file you assigned the "wrong" shaders, resulting in the weird rendering you got.

The question is, however, which shaders would be best here. If you would want the very same as with all other game objects, plus the additional cube map application, I'm afraid you'd have to write a specific vertex and pixel shader for that, because you can only assign one of each whereas for the other game objects various shaders are involved in the rendering pipeline in order to create the final result. So you'd probably have to write a new shader doing all those things in one file as the engine does during the entire rendering process (i.e. process geometry, create and fill depth buffer, apply lighting calculations, bump mapping, environment mapping, post processing and the like).

Might become heavy, if even possible. However as said before I'm not a pro in this field, so can't say for sure whether there's a better way to go.
  15:53:57  25 March 2013
profilee-mailreply Message URLTo the Top
LoNer1
Настоящий Cталкер, Русская Версия
(Resident)

 

 
On forum: 10/23/2009
Messages: 1890
Try contacting K.D? He seems to be knowing what he's doing
  16:36:11  25 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519

---QUOTATION---
Try contacting K.D? He seems to be knowing what he's doing
---END QUOTATION---



Yeah, might be helpful. I'd leave that up to Millenia as the thread launcher
  13:27:00  26 March 2013
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
 

Message edited by:
Meltac
03/26/2013 13:28:22
Messages: 1519

---QUOTATION---
Anyways, are we sure we'd need to specify bumpmap and all that kinda crap in the .s file? I'm pretty sure stuff like that gets loaded automatically as long as it exists.
I'm new to all this, but it would seem to me that you simply need to start by finding a more neutral .s file as a base and removing transparency.

I don't know for sure, but doesn't "aref" control transparency? Maybe removing that from the .s file would help.
---END QUOTATION---



I've checked that. Try copying different existing .s files and renaming them to "models_weapons.s" and see what happens. The transparency is NOT the issue! It just came from having assigned the wrong shader files in the .s files.

That's the problem: You have to assign a specific shader file within the .s file, regardless of the rest of the settings there. What means that the engine (aka X-Ray) calls that specific shader for the task of rendering (or better, shading) the object in question (in our case, a weapon model). Doing so breaks the entire rendering pipeline as X-Ray just promotes all the shading work to one single shader, instead of processing a chain of subsequent shader calls as it's the case without using the .s file. It's a replacement of the normal rendering we do here.

That means, as soon as you have a .s file for something you are responsible yourself that all the rendering/shading stuff is done properly (by writing a shader doing so). Doable, but pretty some handwork.
  19:28:40  26 March 2013
profilee-mailreply Message URLTo the Top
Jketiynu
Swartz
(Resident)

 

 
On forum: 04/05/2007
Messages: 867

---QUOTATION---
Anyways, are we sure we'd need to specify bumpmap and all that kinda crap in the .s file? I'm pretty sure stuff like that gets loaded automatically as long as it exists.
I'm new to all this, but it would seem to me that you simply need to start by finding a more neutral .s file as a base and removing transparency.

I don't know for sure, but doesn't "aref" control transparency? Maybe removing that from the .s file would help.

I've checked that. Try copying different existing .s files and renaming them to "models_weapons.s" and see what happens. The transparency is NOT the issue! It just came from having assigned the wrong shader files in the .s files.

That's the problem: You have to assign a specific shader file within the .s file, regardless of the rest of the settings there. What means that the engine (aka X-Ray) calls that specific shader for the task of rendering (or better, shading) the object in question (in our case, a weapon model). Doing so breaks the entire rendering pipeline as X-Ray just promotes all the shading work to one single shader, instead of processing a chain of subsequent shader calls as it's the case without using the .s file. It's a replacement of the normal rendering we do here.

That means, as soon as you have a .s file for something you are responsible yourself that all the rendering/shading stuff is done properly (by writing a shader doing so). Doable, but pretty some handwork.
---END QUOTATION---



I see, I think I get it now. Thank you for explaining it.

I also now realize my dream of having a reflection or refraction shader for scope lenses isn't realistic. Oh well
  05:15:50  27 March 2013
profilee-mailreply Message URLTo the Top
Millenia
(Senior)
 
On forum: 04/04/2007
Messages: 130
Too bad it's that hard and convoluted, would have been amazing to get it working

Thanks for looking into it, Meltac.
 
Each word should be at least 3 characters long.
Search:    
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-2021 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.