lfnetwork.com mark read register faq members calendar

Thread: Terrain
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-22-2004, 05:32 PM   #1
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Terrain

Terrain texture blending. What are the specs for that?

textures/endor/groundd
{
qer_editorimage textures/endor/groundd
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
q3map_material ShortGrass
cull twosided
{
map textures/endor/groundd
rgbGen vertex
alphaGen vertex
tcmod scale 0.167 0.167
}
}

Will this work? I made my own custom brushwork terrain and I want to know if this will blend the verts.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-22-2004, 05:51 PM   #2
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
http://www.splashdamage.com/index.ph...ewtopic&t=8276


GothiX is offline   you may: quote & reply,
Old 06-23-2004, 04:33 AM   #3
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Wholly MEATY shaders BATMAN! I have a lot to learn...

Thanks Gothix but, this is going to take some time and trial and error.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-23-2004, 02:46 PM   #4
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Apparently there was some confusion about the alpha channels. As to whether you need them or not. But I think it makes sense to have them. So I'm going to try both jpgs and PNGs. Now they use PNGs that hold Alphas for JA. Maybe I should stick with TGA. I'm paranoid about shaders working properly.

The LINK Gothix gave me has other links in it to help out with terrain blending. Apparently they are trying to throw together NOOB tutorials for terrain blending. These methods are for custom terrains without using the old method of bitmaps and PCX files as far as I can tell.

Here are the files you need for terrain blending:

alphascale

Just put them in the appropriate folders.


GOTHIX, I'm not entirely sure but I think Q3map_surfaceModel is enabled still. It's just no one is using it that I'm aware of. So I emailed Ydnar just incase regarding that feature. I would like to experiment with this feature if I can get the shader correctly laid out.

q3map_surfaceModel modelpath density odds minscale maxscale minangle maxangle oriented

A surface with q3map_surfaceModel in its shader will randomly place a specified model across it's face. This is designed to place grass or tree models over terrain.
modelpath : The path to the model file (any supported format).

density : The density of the models, in game units.

odds : The odds of the model appearing (normalized?).

minscale : The minimum scale of the model from its original size of 1.0.

maxscale : The maximum scale of the model from its original size of 1.0.

minangle : The model's minimum angle of rotation.

maxangle : The model's maximum angle of rotation.

oriented : This is a flag, either 0 or 1, and sets whether the model gets fitted to the orientation of the surface.


Is this what we are looking for:

textures/endor/groundd
{
qer_editorimage textures/endor/groundd
q3map_surfaceModel models/map_objects/endor/tree 800 2 1.4 2.6 0 270 1
surfaceparm nolightmap
q3map_novertexshadows

{
map textures/endor/groundd
}
}

Anyone? Does this look like it will work? I guess I can do a TEST map and see if it works.


My kung fu is also very weak

Last edited by lauser; 06-23-2004 at 06:55 PM.
lauser is offline   you may: quote & reply,
Old 06-23-2004, 10:17 PM   #5
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
I just got a reply back from Ydnar. He says the function works. WOOT! This should make mapping much easier if let's say you want a scene with lots of detail on the terrain. He did not say anything about performance loss. He did say that he only recommends using small items as the CLIP feature for this is buggy.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-23-2004, 10:44 PM   #6
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
O_O


Man I wish I understood shaders. Im going to stick with easy gen...
shukrallah is offline   you may: quote & reply,
Old 06-24-2004, 02:30 AM   #7
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
It's like anything else Luke. Just takes practice and a little patience. I have a hard time with shaders too. But if you read the shader manual it helps. Have a look at other shaders and see what they do also helps.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-24-2004, 04:28 AM   #8
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
Q3map_surfaceModel has never been taken out, actually. It's a lovely feature, but you'd better have some decent models to go with it.


GothiX is offline   you may: quote & reply,
Old 06-24-2004, 05:03 AM   #9
WadeV1589
Veteran
 
WadeV1589's Avatar
 
Join Date: Sep 2003
Location: Leeds, UK
Posts: 952
It's one of those I've used and absolutely love it, it makes things like random rocks in a desert an absolute breeze.


StargateMods.com - collaborating all the Stargate mods out there.

SG4RealJA - get a bit of SG realism!
SGEgyptJA - flying and dialing a gate only to be killed by it!
WadeV1589 is offline   you may: quote & reply,
Old 06-24-2004, 06:25 AM   #10
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Okay cool. There was a thread a ways back that said it was not enabled..anyhow.....

How much does it affect performance? Anyone know?


My kung fu is also very weak

Last edited by lauser; 06-24-2004 at 06:37 AM.
lauser is offline   you may: quote & reply,
Old 06-24-2004, 09:32 AM   #11
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
Quote:

Here are the files you need for terrain blending:

alphascale

Just put them in the appropriate folders.

Ok, I DLed it, and I assume the shader goes in the shaders folder, and not the script folder? Also, Ive added it to my shaderlist.txt file, and put the textures in textures/common/alpha.... etc. This should work right?

I think I get it...
shukrallah is offline   you may: quote & reply,
Old 06-24-2004, 10:03 AM   #12
Jedi_Vogel
Forumite
 
Jedi_Vogel's Avatar
 
Join Date: Jan 2004
Location: Leeds, UK
Posts: 663
Quote:
Originally posted by lukeskywalker1
I assume the shader goes in the shaders folder, and not the script folder?
Yeah, SOME things in mapping are easy, but I think I can count them on one hand


Jedi_Vogel (aka {KoH}Zandir{JK})
Website: www.resource-centre.net
Do or Do Not. There is no Try.
Jedi_Vogel is offline   you may: quote & reply,
Old 06-24-2004, 09:38 PM   #13
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
Aye, but texture blending is not on that one hand. Im going to keep trying, and if I cant get it, ill post back here.

EDIT: OK

I made 2 shaders for 2 textures. Here are the textures:

textures/compress/rock.jpg
textures/compressgrass1.jpg

Here are the 2 shaders:

shaders/rock_blend
shaders/ground1

Rock_Blend.shader

Code:
textures/compress/rock_blend
{ 
   qer_editorimage textures/compress/rock
    
   q3map_forceMeta 
      q3map_nonplanar 
      q3map_shadeAngle 179 
   surfaceparm nolightmap
   { 
      map textures/compress/rock
           rgbGen identity 
   } 
   { 
      map textures/compress/rock
      blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA             
            rgbGen identity 
            alphaGen vertex 
      } 
      { 
            map $lightmap 
            blendFunc GL_DST_COLOR GL_ZERO 
            rgbGen identity 
      } 
}
grass1.shader
Code:
textures/compress/grass1
{ 
   qer_editorimage textures/compress/ground

       q3map_forceMeta 
       q3map_nonplanar 
       q3map_shadeAngle 179 
   surfaceparm nolightmap
   { 
      map textures/compress/ground
           rgbGen identity 
   }    
      { 
            map $lightmap 
            blendFunc GL_DST_COLOR GL_ZERO 
            rgbGen identity 
      } 
}
In radiant I took rock.jpg and put it on a square in the middle of a room. All around the square was covered with grass1.jpg. In radiant they had the white thing around it, so I know it was a shader. I put the alpha 0 (or something) in the rock.jpg square. I made those two into a func_group, and all of it was detail.


http://home.ripway.com/2003-11/40395/radiant_blend.JPG

:-/ Anyways, looks like a normal map inside JA.

Last edited by lukeskywalker1; 06-24-2004 at 10:06 PM.
shukrallah is offline   you may: quote & reply,
Old 06-25-2004, 12:56 AM   #14
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
So Luke, the blending did NOT occur ingame? You just had normal textures without any blending?

Okay try making the ALPHA brush much smaller. You don't need it that high, just for neatness purposes. And make sure that alpha brush is level at the bottom with all the other brushes. Try extending the Alpha beyond the vertices of the large brush encompassing the verts of the smaller brushes and post back here.

Did you use Q3map2 2.5.14? You need the latest compiler to make it work. Actually 2.5.15 is the latest I believe but I use the latter....works just fine.

Also your shader needs work. Look at the examples in the tutorials. Your textures need to be TGAs with a white alpha channel also. You need AlphaBlend to blend the layers so that part of your texture will actually be see through. Understand? If you can see through a portion of the texture that is the illusion of blending.


My kung fu is also very weak

Last edited by lauser; 06-25-2004 at 01:14 AM.
lauser is offline   you may: quote & reply,
Old 06-25-2004, 09:35 AM   #15
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
Alright, I see, Ill give it another shot.
shukrallah is offline   you may: quote & reply,
Old 06-25-2004, 11:44 AM   #16
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
Eh, Lauser, you're wrong. Alphamod blending is based on vertexpoints, so dropping the alpha_0 brush in the middle of a plane isn't going to work. Also, if you'd put it at all 4 points, it wouldnt work, since you're then marking the whole surface as a 0% fade. Cut the brush up into four brushes using an X-shape, and use the alpha_0 brush in the middle, surrounding the center vertex.


GothiX is offline   you may: quote & reply,
Old 06-25-2004, 10:43 PM   #17
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Hmm..that makes more sense now Gothix. If I have a hill with 3 different textures at different heights, I'll assume I just have to manipulate multiple brushes to get the fade effect. Because I never got the whole trisouping thing. I'll assume trisouping is making a brush into 4 triangles...or...what I do is just vertex edit and then I have 2 different triangular surfaces but one brush. I will assume this will still work. If not then I have to cut up the brushes where I want the terrain to blend.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-25-2004, 10:51 PM   #18
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
hmmm, ok... 4 brushes, yeah, in the tutorial that dude had 4 brushes for his blend area.

About the channel thing. You mean that my texture will need something like a layer on it.. ? You know like with photoshop (I use gimp) to add transperency, and other layers?

Or are you talking about the actual alpha shader (that 0%) thing?
shukrallah is offline   you may: quote & reply,
Old 06-26-2004, 01:35 AM   #19
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
I'm talking about adding an alpha channel and saving it as a TGA. Since JK based games only support TGAs and PNGs.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-26-2004, 10:11 AM   #20
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
Ok. Hmmm... so does anyone know if photoshop elements does this? Or how to do it with Gimp. If not, dont worry about it. I tried it, and the whole TGA turned black. :-/
shukrallah is offline   you may: quote & reply,
Old 06-27-2004, 05:55 AM   #21
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
PS can do it, add a new channel in the channels tab (bottom-right), and make it completely white, save it as a 32-bit TGA. (FYI: Each channel uses 8 bits, and you're using four channels: R, G, B, and an alpha channel. A 24-bit TGA will only use RGB channels)


GothiX is offline   you may: quote & reply,
Old 06-27-2004, 07:28 PM   #22
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
hmmm... ill install the demo I have of it (i got it on a cd, that came with a book)
shukrallah is offline   you may: quote & reply,
Old 06-28-2004, 01:34 AM   #23
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Sorry Luke. I forgot to mention Paint Shop Pro has this feature enabled in all versions.


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Old 06-28-2004, 04:05 PM   #24
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
should the layer window look like this:

http://home.ripway.com/2003-11/40395/layer.jpg

The background is a ground.jpg and i clicked to add a new layer. But the thing is, I cant get the new layer on the screen to color it white.
shukrallah is offline   you may: quote & reply,
Old 06-28-2004, 04:09 PM   #25
GothiX
Ocean Soul
 
GothiX's Avatar
 
Join Date: Aug 2003
Location: Just a journey away
Posts: 1,906
Looks like you're using an old version of PS - my version has a "channels" tab there..


GothiX is offline   you may: quote & reply,
Old 06-28-2004, 04:30 PM   #26
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
well, im using photo shop elements...

ill try paint shop pro
shukrallah is offline   you may: quote & reply,
Old 06-28-2004, 05:08 PM   #27
mslaf
 
mslaf's Avatar
 
Join Date: Apr 2002
Location: Poland
Posts: 125
Maybe you should try this one:

http://www.mslaf.com/tutorials/ps1.jpeg


ms.-
mslaf is offline   you may: quote & reply,
Old 06-29-2004, 06:19 AM   #28
Codja X
Junior Member
 
Codja X's Avatar
 
Join Date: Mar 2004
Location: South Wales, UK
Posts: 445
I've read somewhere that the tga exporter in Photoshop 7 is corrupt and doesn't save the alpha channel properly.

Try updating that plugin and see if makes a difference.
Codja X is offline   you may: quote & reply,
Old 06-29-2004, 10:48 AM   #29
mslaf
 
mslaf's Avatar
 
Join Date: Apr 2002
Location: Poland
Posts: 125
Quote:
Originally posted by Codja X
I've read somewhere that the tga exporter in Photoshop 7 is corrupt and doesn't save the alpha channel properly.

Try updating that plugin and see if makes a difference.
The TGA plugin was buggy in PS 7.0 and PS 7.0.1 - alpha channel was not exported.

Adobe has fixed this problem over a year ago.

http://www.lucasforums.com/showthrea...hreadid=128473


ms.-
mslaf is offline   you may: quote & reply,
Old 06-29-2004, 11:12 AM   #30
Codja X
Junior Member
 
Codja X's Avatar
 
Join Date: Mar 2004
Location: South Wales, UK
Posts: 445
Quote:
Originally posted by mslaf
http://www.lucasforums.com/showthrea...hreadid=128473
That's probably where I read it. Still, it's worth look if all else fails.
Codja X is offline   you may: quote & reply,
Old 06-29-2004, 11:33 AM   #31
shukrallah
White Dragon
 
shukrallah's Avatar
 
Join Date: Nov 2002
Posts: 3,250
Im not using photo shop 7, im using photo shop elements 2, its like a cheaper photoshop i guess.

Maybe ill use png? In the shader, instead of .tga at the end, i would put .png right.. sort of common sense i guess.
shukrallah is offline   you may: quote & reply,
Old 06-29-2004, 12:28 PM   #32
Codja X
Junior Member
 
Codja X's Avatar
 
Join Date: Mar 2004
Location: South Wales, UK
Posts: 445
You can get the latest version of the targa (TGA) exporter here:

http://www.adobe.com/support/downloa...jsp?ftpID=1544

It should work with Photo Elements 2 as well.

It shouldn't matter about the extension too much. As long as the file is saved as myimage.png and that is where you point it, then yeah, should be okay
Codja X is offline   you may: quote & reply,
Old 07-01-2004, 05:17 PM   #33
lauser
 
lauser's Avatar
 
Join Date: Jan 2003
Location: CANADA
Posts: 428
Here are some RADIANT shots of ENDOR terrain. Some 450 custom trisouped brushes with rgoers alpha 0 brushes.

http://www.unitedjedi.com/radiantmin....php?p=507#507


My kung fu is also very weak
lauser is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Mapping > Terrain

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:28 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.