Asgarath83 Posted April 25, 2015 Posted April 25, 2015 Hello, sorry for disapperaing.I got a lot of computer trouble and i have formatted these days. >.<however i recover all data so i not lost nothing.I am ending the shadering of my cathedral map and i am testing shader of the MD3. i have some plants shadered, and it's all okay, the problem is the textures. : \on game, the leaves of that plants are with all transparent raster area of PNG file completely black instead of translucent. I really not know how to make transparent leaves. : \
Asgarath83 Posted April 26, 2015 Author Posted April 26, 2015 @@Langerd @@Cerez can give me some tips? D:@@Szico VII my question are:1: how can i make a image of leaves with raster trans level on Jasck Paint shop pro 9?2: what is the perfect shader for the leaves?
Cerez Posted April 26, 2015 Posted April 26, 2015 Welcome back, @@Asgarath83. Are you using Photoshop or GIMP for texturing? You need to add an "alpha" layer to the texture image, and paint the leaf white on that layer, while everything else surrounding it should be black. That way the game will know to show only the leaf, and make everything else completely see-through. Note that the "alpha" layer is added to the RGB (red, green, blue colour) channel layers, not the actual image layers. Edit: You basically need to turn your RGB PNG image into an RGBA TGA image. https://www.youtube.com/watch?v=_T5utHSSu5w NumberWan likes this
Asgarath83 Posted April 26, 2015 Author Posted April 26, 2015 So... i uise paint shop pro 9 and i can manage the layers with key F8 .so what i need is:- make a black background- add a raster layer- add the leaves copy \ paste into the raster layer.Save as... which format??? D: Tga? Png? Jpg is not supported by engine for trans (but strangely work for lines of the sabers)@@Cerez My leaves shader is correct?models/map_objects/Plants/oakleaf{ qer_editorimage models/map_objects/Plants/oakleaf q3map_material GreenLeaves q3map_nolightmap q3map_alphashadow cull disable deformvertexes wave 256 sin 0 0.5 0.2 0.6 { map models/map_objects/Plants/oakleaf blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA depthWrite rgbGen vertex detail }} i use deformvertexes for simulate wind movement of the leaves. work also for flags and fabric tent. @@Langerd about that: if i edit a texture of a misc_model, the edit is taken reload JKA, and the map, or i need to rebuil MD3 with blender mister wonko md3 exporter and rebuild the map with the new MD3 file? sometime my engine conserve MD3 old texture also if i have edited the texture and i need to re-export model and re-build map. : \
Cerez Posted April 26, 2015 Posted April 26, 2015 No no no. Not a raster layer. An RGB channel alpha layer. Find the window in Paint Shop Pro that shows you the red, green, and blue channels for the leaves raster layer, then add an alpha channel to it.
Langerd Posted April 26, 2015 Posted April 26, 2015 @@Langerd @@Cerez can give me some tips? D:@@Szico VII my question are:1: how can i make a image of leaves with raster trans level on Jasck Paint shop pro 9?2: what is the perfect shader for the leaves?1. WOW what is that? O_O (iu will google)2.About shaders i am not an expert... i have some troubles with them too. Maybe check the shader files fro original assets and see how they made them.
Asgarath83 Posted April 27, 2015 Author Posted April 27, 2015 @@Cerez@@Langerdhello you two. ROTFL, Langerd, what i mean is that i haven't photoshop, i use paint shop pro 9 for that work. I am following this tutorial abount paint shop pro, because i not have photoshop, but i make something of wrong. http://www.axialis.com/tutorials/tutorial-misc002.htmli make a tga file exactly has told by tutorial but as result... leaves backbround is white on engine.@@Langerd can you pass me again the link of your hosting image site? i lost firefox browser chronology with formatting >.<
Cerez Posted April 27, 2015 Posted April 27, 2015 http://www.axialis.com/tutorials/tutorial-misc002.htmli make a tga file exactly has told by tutorial but as result... leaves backbround is white on engine. That's because that tutorial is teaching you the wrong thing for this work, @@Asgarath83. You need to create a TGA (not PNG!) image, and it needs to have an alpha channel. It doesn't matter what colour the background is, whether transparent or not, as long as you colour the invisible area on your alpha channel totally black. Black on the alpha channel tells the game to make that part of the image invisible, and white makes it fully rendered/visible, while the gray shades in-between will give you a semi-transparent look.
Asgarath83 Posted April 27, 2015 Author Posted April 27, 2015 @@CerezSo i need to- paste into a black background alpha channel the image- save the file with the black alpha channel and the image as .tga
Asgarath83 Posted April 27, 2015 Author Posted April 27, 2015 Nothing, or is white, or is black... and for some models i got a large ampunt of Jpg with black screen that SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA blendfunc make trans in the black parts.... really i need a good writed tutorial about that. >.<
Langerd Posted April 27, 2015 Posted April 27, 2015 http://wrzucaj.net/ - here is this siteAbout the transparent shaders it can be only 3 ways (they can be more i know only these) :-shader with using the TGA which just is saved by transparent image-shader with using the PNG which is saved by transparent too but in JK3 i think it works with white-Jpeg works with black. Using this You can not only make an transaprent overlay but whole texture transparentI dont know about shaders and i dont have photoshop... I just see how the default original shaders are made i just copy the lines and paste them into my shaders. In 70% times this method works but it is kinda noobish... (i dont care about HOW i care about finished result btw )
Asgarath83 Posted April 27, 2015 Author Posted April 27, 2015 @@Langerd thanks for site.mmm, white png, black jpg, alpha chan trans tga ... i am not good with tga... :\well, i think at this point i see the shaders of original leaves of tree of yavin4 model and how are the original textures of that leaves and i edit this texture into the path of my models with same format image and same shadering, hoping this works. >.<
Asgarath83 Posted April 27, 2015 Author Posted April 27, 2015 @@Langerd rotfl, also copying and renaming withous paint shop, simply copy and paste file, the leave of yavin4 "fern3" with shader ofyavin4 about the fern3, and renaming with same name of texture of bamboo plant leave that still black as screen, also if the textures is changed.that's is really mad and odd... i can send you the models with blender file and textures so you can fix it? can you give me this great favour? >.<I hate to ask this, but bamboo branches was only a test, my true objective is an elm model that i really need for my cathedral, that still again got leaves with black screen >.< and i am become crazy on that, also using as image and editing the image of my custom gfx damage marks with png transparence that works perfect into the game as image i edit with paint shop with deleting image and copying as traansparent selection the leave image i got the same trouble. really i not know how to fix these 2 plants. they are really mad.at this point i am asking if there is something into models MD3, for that i ask you if you can give a look about that.>,<
Langerd Posted April 27, 2015 Posted April 27, 2015 @Asgarath83 You can send me the models today i have some time
Asgarath83 Posted April 27, 2015 Author Posted April 27, 2015 @@Langerd you got the message box full, i cannot send message. :\well here is the folderhttps://www.sendspace.com/file/3q5771. the texture incrimated are just two: the bamboo_branchb and the elmleave01 i try to make different version of MD3 changing the path of the textures too, but not work. i really not understand if the problem is on MD3 or into the images. >.<the MD3 i need with trans are bamboo, bamboo_tall, bamboo_tall2 (all bamboo plant) and the elm plant with his different version, some are diseased, some are full of leaves and life and one is just a dead bark.good luck >.<
Langerd Posted April 27, 2015 Posted April 27, 2015 Hmm i forgot to ask - Did You add your shader to the shaderlist?HOLY SHIT SOOO MANY FILES O_O
Langerd Posted April 27, 2015 Posted April 27, 2015 Ok @Asgarath83 listen i checked Your models and one of them is HUUUGE amount of verts. But this is not the topic here The textures on the models looks fine. I will make a quick shader and just place this plants in my small test map and i will try find the best way to make it right . (I am sure that it could be a problem because of the shaderlist)
Langerd Posted April 27, 2015 Posted April 27, 2015 (edited) Is this what You wanted?The shader for PNG AND I FOUND OUT THAT IT WORKS WITH TGA TOO : models/map_objects/plants/bamboo_branchb{ surfaceparm nonsolid polygonOffset { map models/map_objects/plants/bamboo_branchb alphaFunc GE128 depthWrite rgbGen identity } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO depthFunc equal rgbGen identity }} Edited April 27, 2015 by Langerd
Langerd Posted April 27, 2015 Posted April 27, 2015 i found this sitehttp://irrlichtirc.g0dsoft.com/kat104/3D/Radiant/transparency.html Cerez likes this
Asgarath83 Posted April 28, 2015 Author Posted April 28, 2015 DAAAAMN! THE SHADERLIST!!! you right!!! I am an idiot! strange thatfor some of these plants trans works without shaderlist and rebuilding.Okay, now i fixing shadering of all plant with this parameters, i add the file into shaderlist and radiant base folder and i rebuild all withthe png white trans textures Langerd likes this
Ramikad Posted April 28, 2015 Posted April 28, 2015 Deformvertexes with those plants? It may be pretty heavy. In case it is, you can change the code a little like this: models/map_objects/Plants/oakleaf{ qer_editorimage models/map_objects/Plants/oakleaf q3map_material GreenLeaves q3map_nolightmap q3map_alphashadow cull disable { clampmap models/map_objects/Plants/oakleaf blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA depthWrite tcMod turb 1 0.01 1.0 1.0 rgbGen vertex detail }} That turbulence will emulate the leaves and branches moving (play around with the parameters for slower or faster turbulence), without causing as much FPS-drop as Deformvertexes likely will. Good luck! Langerd likes this
Asgarath83 Posted April 28, 2015 Author Posted April 28, 2015 I fixed one plants, the sequoia.md3, that give me troubles. the backbground of his tga file was BLACK.i got already problems with bamboo and elm leaves... really strange, however, i found the original font of these plants models: they are by the castlevania mod of JKHUD, the original bamboo_branch leaves got a green background, and appears green also in the game. >_> the elm instead i know it's high poly, @@Langerd , it's a model maked by a my friend. i detached in many parts for avoid the cap of vertex of misc_modelsnow, for fix bamboo and elm leaves, i am trying to:1: copying the "treeparts.tga" and resize it to 512x512 and rename it as bamboo_branchb and elmleave01 after i backupped original bamboo_branch and elm_leave.2: removing the treeparts.tga image and replacing only with black background3: copy and paste only the plants selected texture parts into the black background of tga as "paste as transparenct selection".now i rebuilded the map with new plants shader (i found the original into castlevania, they are like the your shader, they use alphaFunc GE128 but they are without the $lightmap stage.now i am testing... >.<
Asgarath83 Posted April 28, 2015 Author Posted April 28, 2015 Really madness, now the background of bamboo are green and the elm leaves continue to stay black. okay i am surrounding for moment, sure it's something of strange about my engine or q3map2, in md3view i see the models with the new tga image black background, on radinat, bamboo are with green background and elm leaves with black background, on game, it not change, is like radiant. >.<thanks for all however. : \
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