Areum Posted March 9, 2014 Share Posted March 9, 2014 The new saber i'm doing has some light problem. One side is lighted while the other isn't like this :edit - it is always the same sides, despite of lights. Moreover I don't really know how to do shaders actually. I tried anything with a white image, just for beginning and testing. Then someone suggested me a new code but the issue does remain. There is still only one side lighted... here is the last code i tried : models\weapons2\blazefire\blade{ q3map_nolightmap q3map_onlyvertexlighting { map models\weapons2\blazefire\blade rgbGen lightingDiffuse } { map gfx/effects/envmap blendFunc GL_DST_COLOR GL_SRC_COLOR tcGen environment } { map models\weapons2\blazefire\spec blendFunc GL_SRC_ALPHA GL_ONE detail alphaGen lightingSpecular cull twosided }} Link to comment
eezstreet Posted March 9, 2014 Share Posted March 9, 2014 The q3map_ lines aren't necessary, these keywords are only effective in regards to mapping. I'm speculating here because I don't know shaders very well, but perhaps try getting rid of the "cull twosided" line on the third stage. Link to comment
Areum Posted March 30, 2014 Author Share Posted March 30, 2014 Thank you, but that didn't work. I have the feeling it doesn't come from .shader actually. I saw ja+ katanas don't have the issue even if it hasn't .shader.Well, may be i will know a next day how to fixe that... Link to comment
Tempust85 Posted March 30, 2014 Share Posted March 30, 2014 And what does it look like if you remove the .shader for that weapon? Link to comment
Areum Posted March 30, 2014 Author Share Posted March 30, 2014 Nothing change in this case. Only one side would be lighted again. Link to comment
Boothand Posted March 30, 2014 Share Posted March 30, 2014 Same problem in Modview? Could it be something wrong with the model? Flipped faces on the other side? Tempust85 likes this Link to comment
Areum Posted March 30, 2014 Author Share Posted March 30, 2014 Absolutely no problem with modview. The issue remains only in game with light.Someone told me this is due to quake3 engine... but we don't really know. Link to comment
Asgarath83 Posted March 30, 2014 Share Posted March 30, 2014 mmm, seems like not recognize the textures. they are into the correct path?Here it's a code of one of best vampire sword of my legacy of kain mod. it's a sword with a black blade and a skull in the hilt, very good desing. in game appear very nice and with a good lightning. try that syntax: (my blade is a wraith blade, but in your case i think you not need the glow string ) ( models/weapons2/vampire1/blade{q3map_nolightmap{map models/weapons2/vampire1/bladeblendFunc GL_ONE GL_ZEROrgbGen lightingDiffuse}{map models/weapons2/vampire1/saber_enviroblendFunc GL_DST_COLOR GL_SRC_COLORtcGen environment}{map models/weapons2/vampire1/blade_specblendFunc GL_SRC_ALPHA GL_ONEdetailglowalphaGen lightingSpecular}}models/weapons2/vampire1/hilt1{q3map_nolightmap{map models/weapons2/vampire1/hilt1blendFunc GL_ONE GL_ZEROrgbGen lightingDiffuse}{map models/weapons2/vampire1/hilt_enviroblendFunc GL_DST_COLOR GL_SRC_COLORtcGen environment}{map models/weapons2/vampire1/hilt1_specblendFunc GL_SRC_ALPHA GL_ONEdetailglowalphaGen lightingSpecular}}models/weapons2/vampire1/hilt2{q3map_nolightmap{map models/weapons2/vampire1/hilt2blendFunc GL_ONE GL_ZEROrgbGen lightingDiffuse}{map models/weapons2/vampire1/hilt_enviroblendFunc GL_DST_COLOR GL_SRC_COLORtcGen environment}{map models/weapons2/vampire1/hilt2_specblendFunc GL_SRC_ALPHA GL_ONEdetailglowalphaGen lightingSpecular}}models/weapons2/vampire1/horns{q3map_nolightmap{map models/weapons2/vampire1/hornsblendFunc GL_ONE GL_ZEROrgbGen lightingDiffuse}{map models/weapons2/vampire1/hilt_enviroblendFunc GL_DST_COLOR GL_SRC_COLORtcGen environment}{map models/weapons2/vampire1/horns_specblendFunc GL_SRC_ALPHA GL_ONEdetailglowalphaGen lightingSpecular}}models/weapons2/vampire1/skull{q3map_nolightmap{map models/weapons2/vampire1/skullblendFunc GL_ONE GL_ZEROrgbGen lightingDiffuse}{map models/weapons2/vampire1/skull1_specblendFunc GL_SRC_ALPHA GL_ONEdetailglowalphaGen lightingSpecular}{map models/weapons2/vampire1/skull2_specblendFunc GL_SRC_ALPHA GL_ONEdetailglowalphaGen lightingSpecular}{map models/weapons2/vampire1/skull_enviroblendFunc GL_DST_COLOR GL_SRC_COLORtcGen environment}} Link to comment
Asgarath83 Posted March 30, 2014 Share Posted March 30, 2014 As you can see, need 2 textures: the spec textures are copies of the original with a black chrome effect, yu can make with photoshop or paint shop pro. Combine texture and spec texture into the same shader and yu get realistic light reflection \ refraction efx of the blade Link to comment
Areum Posted March 30, 2014 Author Share Posted March 30, 2014 mmm, seems like not recognize the textures. they are into the correct path? Yes, they are. no problem with recognition. :/ And actually, each opposite side has the same path...I wondered if it is due to that there is only one picture for both sides but i saw ja+ sword we called "jpsg10" has the same thing without problem. Link to comment
Tempust85 Posted March 30, 2014 Share Posted March 30, 2014 Can you please upload the model + textures + shader so we can take a look? Link to comment
Areum Posted March 30, 2014 Author Share Posted March 30, 2014 Here we go https://drive.google.com/file/d/0B89sWiL71Bh3R2UyOTRTdWlQblE/edit?usp=sharing Link to comment
Asgarath83 Posted March 31, 2014 Share Posted March 31, 2014 The model it's okay. SAB FILE have some little missing for a realistic melee blade: In file SAB add the follow strings:noClashFlare 1 (avoid the flash of parry with lightsabers)NoWallMarks 1 (avoid the sword cut the walls like a saber)BounceOnWalls 1 (allows the blade bounce on the surfaces that's make it solid, alto play the HitOtherEffects parameter. )NoIdleEffect 1 (the blade cannot cut by touch the enemies, yu are forced to swing it for cut them.OnInWater 1 (the blade not turn off into water if yu make a wash )----------------------------------IdleinBack it's new for me, what does it do? Can work for all mods? O.o SHADERS: they are okay, so your issue is very strange. I think the problem is the enviroment. try to make a custome enviroemtn textures instead of { map gfx/effects/envmap blendFunc GL_DST_COLOR GL_SRC_COLOR tcGen environment } Also for lightingDiffuse parameter try something like this: "map models/weapons2/vampire1/bladealphaFunc GE192 <-- add that.blendFunc GL_ONE GL_ZEROrgbGen lightingDiffuse" Link to comment
Areum Posted March 31, 2014 Author Share Posted March 31, 2014 noClashFlare, NoWallMarks, BounceOnWalls, are zero. This is intended. On the other hand, i forget onInWtaer and may be NoldleEffect. Indeed. As i said, i don't think that comes from shader finally. It seems ja+ sword like bride katana haven't any problem without shaders... but i'll try.Thank you. Link to comment
Asgarath83 Posted April 3, 2014 Share Posted April 3, 2014 noClashFlare, NoWallMarks, BounceOnWalls, are zero. This is intended. On the other hand, i forget onInWtaer and may be NoldleEffect. Indeed. As i said, i don't think that comes from shader finally. It seems ja+ sword like bride katana haven't any problem without shaders... but i'll try.Thank you.You need to set thats parm to 1 for good work of the saber. 0 is default setting. so it's like yu not add this command. Not change nothing. Link to comment
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