3rd Party Models/Media Chat / Entity Shaders

Author
Message
srealist
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location: Orlando, Florida, USA
Posted: 4th Nov 2013 22:27
I see that the basic entity shader is only using _D, _N, and _S and doesn't actually process an _I texture (though the comments at the top of the shader would lead one to believe otherwise).



Am curious to know what's the plan. Does the alpha channel on the specular texture give us illumination? Is that currently supported?



Also can we use other PS3 shaders right now or are the existing shaders hard coded? I noticed the following comment about the water plane for entities: "VALUES PROVIDED FROM FPSC - NON TWEAKABLE". Which makes sense for the water plane just wondering if we are limited to only using the provided shaders (which are very nice).



Thanks!!
srealist
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location: Orlando, Florida, USA
Posted: 5th Nov 2013 02:51
Also, is this the right sub-forum to post in? Maybe the general would be better for this...dunno.
Green Gandalf
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 6th Nov 2013 20:30
Quote: "just wondering if we are limited to only using the provided shaders (which are very nice)."




No, you can use your own shaders - but they must use the same naming conventions for fx filenames, tweakables, non-tweakables and textures. So you can use your own shader instead of "terrain_basic.fx" for example. But you must study the code carefully and make sure you match your filenames, etc, correctly.



That seems to be the situation at the moment. Shaders for entities might be a little different since you might be able to specify the fx filename in a script somewhere - but I'd guess you still need to use variable names which the engine will recognize.



That's my understanding of the current state of play and is probably incomplete.





Powered by Free Banners
srealist
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location: Orlando, Florida, USA
Posted: 6th Nov 2013 21:00
Thanks, GG. Do you happen to know if illumination is handled in the current entity shaders? And if so, is it based on the alpha channel of the spec texture?



I'm limited right now to kinds of testing I can do. Thanks!
Green Gandalf
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 6th Nov 2013 21:24
Quote: "Do you happen to know if illumination is handled in the current entity shaders?"




I've looked at the "entity_basic.fx" shader and as far as I can tell the only "illumination" is the combination of lighting and shadows. The shadows require internally computed depth maps. Perhaps you are thinking of "emissive" lighting where objects have their own illuminated areas - such as a glowing rock or a monster with glowing green eyes?



I'm sure Bond1 can advise you more accurately but I guess he's busy with all this.





Powered by Free Banners
srealist
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location: Orlando, Florida, USA
Posted: 6th Nov 2013 22:12
That's right. It's usually either it's own texture _I or put into the alpha channel of a texture that would otherwise not make use of the alpha like the _S texture.



I believe in the past FPSC has used the alpha from the spec but I do remember some _I textures perhaps for weapons.
Green Gandalf
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 6th Nov 2013 22:48
There's nothing to stop you putting it into an unused alpha channel and amending the shader accordingly. But you won't be able to control the illumination in-game since there isn't a tweakable associated with it. In other word the eyes would always be glowing. If that's what you want then fine.





Powered by Free Banners
srealist
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location: Orlando, Florida, USA
Posted: 10th Nov 2013 20:46
I finally got around to putting it to the test and unfortunately illumination does not work by using the alpha channel in the spec. Even with a totally white spec, it just looks very shiny but not illuminated. If you turn down the ambient light it just gets dark like anything else.



So anyway, I'm guessing they haven't worried about that yet since they are doing the sort of outdoor military scene right now and not sci-fi. I'm sure they will add an illumination shader eventually. They have to.



I've also noticed that changing the .fx file in the editor does nothing. It has to come from the fpe specs. Little things I assume will get addressed at some point.

Login to post a reply

Server time is: 2024-04-26 11:16:35
Your offset time is: 2024-04-26 11:16:35