Shading Help -1 reply

  • 1
  • 2

Please wait...

Guest

I didn't make it!

0 XP

 
#1 10 years ago

I've including some screenshots to help determine what my problem is. I've been trying to figure this out for weeks now, so please someone help :(.

My main problem is trying to get my custom texture to work with the custom shader I made (in this case, a banner 'waving' in the wind to make it more realistic). I hope that once I figure out what I'm doing wrong with this, I can start making my shaders in other areas do cool things as well - such as shiny marble and such. Screenshots follow.

This first picture shows what I'm trying to do in the editor. I'm trying to turn that into a waving banner using a shader. http://img.photobucket.com/albums/v57/Streen15/JKA%20Mapping/JKAhelp1.jpg

This next one here shows the size of my tga that I'm trying to turn into a shader. http://img.photobucket.com/albums/v5...ing/image2.jpg

This one shows my shader file. It is located in my base/shaders place thingee. http://img.photobucket.com/albums/v5...ing/image3.jpg

This last one shows you the program I used. I also have to admit, I copied this shader from a different source and applied it to my own texture. It seems to have worked according to this, but can anyone tell me the flaw? http://img.photobucket.com/albums/v5...ing/image4.jpg

Thanks guys! Really look forward to hearing from you!




Guest

I didn't make it!

0 XP

 
#2 10 years ago

I'm trying to get better pictures for you guys, one moment.

UPDATED! :)




iswer

Mapper, Modeller, Musician

50 XP

18th April 2004

0 Uploads

1,601 Posts

0 Threads

#3 10 years ago

The map path in the middle is wrong, and that's why it doesn't show up ingame. (change the mappath to "map textures/Testmap/jor_joe1.tga" and it will probably work)

Your image does not have to be in 300 pixles per inch - lower it to 72 and gain alot of space (since you're using *.tga). If you do not want it to be transparent (which I understood it as you do not), change fileformat to *.jpeg.

I'd use this code instead, even though your might work, 'cause you had alot of lines that I don't understand why you put there: textures/Testmap/jor_joe1 { qer_editorimage textures/imp_mine/lava2 surfaceparm nomarks cull disable deformVertexes wave 30 sin 0 2 0 0.2 deformVertexes wave 100 sin 0 2 0 0.7 tesssize 64 { map textures/Testmap/jor_joe1.tga rgbGen Vertex depthWrite } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } } Good luck! :D




iswer

Mapper, Modeller, Musician

50 XP

18th April 2004

0 Uploads

1,601 Posts

0 Threads

#4 10 years ago

Can't edit: D*rn, I just realized that the "qer_editorimage" in my shader is wrong. Change its path to "textures/Testmap/jor_joe1.tga". ;)




Guest

I didn't make it!

0 XP

 
#5 10 years ago

Thanks! It seems to be working perfectly now. I just need to make that texture look a lot more like a banner now...wish I was better at making textures :(. Oh well.

While I have you, could you suggest a nice shader for 'shiny' textures? I want to use this for marble and such. Thanks again, great stuff!




Isla Kamamee

Awkward? You bet!

50 XP

28th August 2006

0 Uploads

1,179 Posts

0 Threads

#6 10 years ago

you could try enviroment mapping, or if you feel up to it, masked enviroment mapping. Another thing you could try is specular mapping, but Im not sure how you do that with a shader. To do enviroment mapping, just add tcGen enviroment to the shader in the textures stage that you want to be the enviroment map. To briefly describe masked envmapping, it uses a mask texture and a base texture and an enviroment map texture.




Guest

I didn't make it!

0 XP

 
#7 10 years ago

Here's my next problem: FX_runners

I'm running GTK radient 1.5, and it seems that when i right click and go under fx, I am very limited in what to choose from. I want to make fire, and since no textures are available with fire / shaders, I am forced to use fx runners...but how does this work, being that I click fx, and i only get snow, rain, etc.?




MagnaDoodle

Fear teh kittens!!!

50 XP

26th February 2008

0 Uploads

104 Posts

0 Threads

#8 10 years ago

// entity *whichever* { "classname" "fx_runner" "origin" "*wherever*" "fxFile" "env/fire" "spawnflags" "4" } U can find other effects in assets1.pk3/effects/ and even make ur own ones. ..spawnflags 4 makes it hurt u.. ;)

"mp_entities.def"[SIZE="1"] /*QUAKED fx_runner (0 0 1) (-8 -8 -8) (8 8 8) STARTOFF ONESHOT DAMAGE Runs the specified effect, can also be targeted at an info_notnull to orient the effect

STARTOFF - effect starts off, toggles on/off when used ONESHOT - effect fires only when used DAMAGE - does radius damage around effect every "delay" milliseonds

"fxFile" - name of the effect file to play "target" - direction to aim the effect in, otherwise defaults to up "target2" - uses its target2 when the fx gets triggered "delay" - how often to call the effect, don't over-do this ( default 200 ) "random" - random amount of time to add to delay, ( default 0, 200 = 0ms to 200ms ) "splashRadius" - only works when damage is checked ( default 16 ) "splashDamage" - only works when damage is checked ( default 5 ) "soundset" - bmodel set to use, plays start sound when toggled on, loop sound while on ( doesn't play on a oneshot), and a stop sound when turned off */ [/SIZE]




Guest

I didn't make it!

0 XP

 
#9 10 years ago

Regarding the shiny textures:

I attempted to make my green marble texture shiny by just simply adding a tcgen environment attribute, like you stated. I used the same program you saw above. However, when I loaded up gtk, while my texture did have a white border around it indicating it was a shader file, it also was a "Shader Missing" texture...meaning the red/black checkerbox. What did I do wrong? Here's the file:

//----------------------------------------------------------------------------------// // Shiny_Marble //----------------------------------------------------------------------------------// textures/Testmap/green_marble { qer_editorimage testmap/Green_Marble.jpg { map testmap/Green_Marble.jpg tcGen environment } }

If you can't tell by now, I'm a beginner when it comes to shaders, and therefore any explanations should be given in noob format if possible. :)




iswer

Mapper, Modeller, Musician

50 XP

18th April 2004

0 Uploads

1,601 Posts

0 Threads

#10 10 years ago

Again, your paths seems to be wrong. Your textures is in the "textures/"-folder , right? Then your editorimage and map-path should be "textures/testmap/Green_Marble" instead of just "testmap/Green_Marble" ;)

EDIT: And by the way, I think your shader will look quite weird. It would look better if you had two maps. where one is the marble texture, and one is a fake reflection-texture with "tcGen enviroment" on it.

I'd use something like this: textures/testmap/Green_Marble { qer_editorimage textures/testmap/Green_Marble q3map_material Rock { map $lightmap tcGen lightmap } { map textures/testmap/Green_Marble blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } { map textures/testmap/marble_reflection blendFunc GL_ONE GL_ONE_MINUS_SRC_COLOR rgbGen identity tcGen environment } }

And the reflection texture would look something like this:

Spoiler: Show
reflective3zj4.jpg



  • 1
  • 2