Daedra Posted January 2, 2016 Posted January 2, 2016 I need some help to get a texture to work using a shader. It's the K-3PO mod I made, I tried to give him glowing eyes by texture editing but it just doesn't show as bright as it should. Here is the texture file I am trying to get it to work with: Can anyone help with this? I'm not very good with shaders.
Daedra Posted January 2, 2016 Author Posted January 2, 2016 Post your current shader. There isn't one. I need help creating a shader for the eyes to glow (all the files I currently have are in the mod download).
Kannos'v Lightdust Posted January 2, 2016 Posted January 2, 2016 models/players/protocol/k3po_face { q3map_nolightmap q3map_onlyvertexlighting { map models/players/protocol/k3po_face rgbGen lightingDiffuse } { map models/players/protocol/k3po_face_glow blendFunc GL_ONE GL_ONE detail glow } }It should work.
Omicron Posted January 2, 2016 Posted January 2, 2016 There isn't one. I need help creating a shader for the eyes to glow (all the files I currently have are in the mod download).Ahh, I assumed you had one but it wasn't working (cause the texture looks fine). What @@Kannos'v Lightdust said but without the q3map_ bits (they won't do anything).
Daedra Posted January 2, 2016 Author Posted January 2, 2016 models/players/protocol/k3po_face { q3map_nolightmap q3map_onlyvertexlighting { map models/players/protocol/k3po_face rgbGen lightingDiffuse } { map models/players/protocol/k3po_face_glow blendFunc GL_ONE GL_ONE detail glow } }It should work. For some reason it doesn't work, I have 2 NPCs setup, so if I spawn k3po, it spawns with non glow eyes (this is normal does not need altering), and when I spawn k3pog , it should have the glowing eyes but for some reason they do not glow. Here is the current .pk3 http://www.mediafire.com/download/iku1qp1b9qtp99e/zz_K3PO.pk3 If anyone can fix this I will give credit. I find it strange how the default game doesn't contain the shader code for the original c3po face glow, yet they still provide the texture.
Circa Posted January 2, 2016 Posted January 2, 2016 I find it strange how the default game doesn't contain the shader code for the original c3po face glow, yet they still provide the texture.It sure does. In players.shader. models/players/protocol/c3po_face { { map models/players/protocol/c3po_face blendFunc GL_ONE GL_ZERO rgbGen lightingDiffuse } { map models/players/protocol/c3po_face_glow blendFunc GL_ONE GL_ONE rgbGen identity } { map gfx/effects/chr_inv blendFunc GL_DST_COLOR GL_SRC_COLOR detail tcGen environment } { map models/players/protocol/c3po_face_s blendFunc GL_SRC_ALPHA GL_ONE detail alphaGen lightingSpecular } } Daedra likes this
Kannos'v Lightdust Posted January 2, 2016 Posted January 2, 2016 It works. Here's a screenshot. Protocol without glow and your version of protocol with glow. And here is a link ^^' https://copy.com/2SO6KpuPVetCrk8p/zz_K3PO.pk3
Daedra Posted January 2, 2016 Author Posted January 2, 2016 <script pagespeed_no_defer="">//=d.offsetWidth&&0>=d.offsetHeight)a=!1;else{c=d.getBoundingClientRect();var f=document.body;a=c.top+("pageYOffset"in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);c=c.left+("pageXOffset"in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+","+c;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.e.height&&c<=b.e.width)}a&&(b.a.push(e),b.d[e]=!0)};p.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&q(this,b)};h("pagespeed.CriticalImages.checkImageForCriticality",function(b){n.checkImageForCriticality(b)});h("pagespeed.CriticalImages.checkCriticalImages",function(){r(n)});var r=function(b){b.b={};for(var d=["IMG","INPUT"],a=[],c=0;c=a.length+e.length&&(a+=e)}b.g&&(e="&rd="+encodeURIComponent(JSON.stringify(s())),131072>=a.length+e.length&&(a+=e),d=!0);t=a;if(d){c=b.f;b=b.h;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(k){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(u){}}f&&(f.open("POST",c+(-1==c.indexOf("?")?"?":"&")+"url="+encodeURIComponent(b)),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(a))}}},s=function(){var b={},d=document.getElementsByTagName("IMG");if(0==d.length)return{};var a=d[0];if(!("naturalWidth"in a&&"naturalHeight"in a))return{};for(var c=0;a=d[c];++c){var e=a.getAttribute("pagespeed_url_hash");e&&(!(e in b)&&0=b[e].k&&a.height>=b[e].j)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b},t="";h("pagespeed.CriticalImages.getBeaconData",function(){return t});h("pagespeed.CriticalImages.Run",function(b,d,a,c,e,f){var k=new p(b,d,a,e,f);n=k;c&&m(function(){window.setTimeout(function(){r(k)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','http://jkhub.org/index.php?s=dd2f2353af6821f9082e0c0e81d616e7&app=forums&module=ajax§ion=topics&do=quote&t=6760&p=98291&md5check=fd2eb572a9c2e34b6bd4ac92cb9f56a1&isRte=1,WBVWiKOfFl,true,false,vXVQj_aTTOY'); //]]></script>&&0 It works. Here's a screenshot. Protocol without glow and your version of protocol with glow. And here is a link ^^' https://copy.com/2SO6KpuPVetCrk8p/zz_K3PO.pk3 But you have changed the npc file completely.. There was supposed to be 2 versions.. one version is regular k3po with no eye glow, then a second npc with eye glow.. you removed it I don't know why, but when you make 2 versions, like what I provided, the glow eyes does not work with "k3pog" npc. I only need that fixing thanks
Kannos'v Lightdust Posted January 2, 2016 Posted January 2, 2016 Put at least a little effort in this. We gave you working shader and proved it works. Now it's your turn to combine this into what you want. No hard feelings - i just try to encourage you into modding itself. Just try, mess araound with shaders, discover new things.
Solution Daedra Posted January 2, 2016 Author Solution Posted January 2, 2016 Put at least a little effort in this. We gave you working shader and proved it works. Now it's your turn to combine this into what you want. No hard feelings - i just try to encourage you into modding itself. Just try, mess araound with shaders, discover new things. Not your fault, I just had to re-install my JKA game. There was some bug forcing the glows to no show on screen, I got it working now so I can continue debugging. Thanks Kannos'v Lightdust likes this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now