A cool new way of texturing LoD

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

It is just that my 15" monitor can only do 1024x768 so the pic stretches it off the right side of the screen also for our 56k members a smaller pic would be faster . Your idea is a really good one the pic does look great .
Image
User avatar
Sgt KIA
Sergeant
Posts: 67
Joined: Fri Sep 19, 2003 7:32 am
Location: Finland
Contact:

Post by Sgt KIA »

Mj wrote:..... 256 pixels per LoD Square, and saved it as a jpg (when i first saved it is a TGA file, it was 150MB :? ) And ended up with a 700kb file. Make it into a texture, select the LoD in question, and apply the texture....
Excellent idea and it works great in Radiant. However while loading the map MOH crashes. That could be due to filetype (.jpg) or my custom terrain script part.

If you use .jpg for terrain what kind of shader settings you should have?

This doesnt work:

Code: Select all

textures/muna/terrain
{
	qer_editorimage textures/muna/munaterrain.jpg
	qer_keyword terrain
	qer_keyword snow
	surfaceparm snow
	{
		map textures/muna/munaterrain.jpg
		rgbGen lightingSpherical
	}
}
I also tried the one for textures/central_europe_winter/snow_bumpy_1
again with the same result.
Image
Battle for Muna Hill -map
AA version
SH/BT version
User avatar
Sgt KIA
Sergeant
Posts: 67
Joined: Fri Sep 19, 2003 7:32 am
Location: Finland
Contact:

Post by Sgt KIA »

Replying myself:
- I reduced the terrain image size at reasonalble resolution
- resaved it as a tga
- scaled in radiant multiple times to fit the terrain

That works. However the imagesize is still over 3mbs. If any1 knows how to use .jpgs for terrain, ill be more than happy to hear how it must be done.

Thanks.[/i]
Image
Battle for Muna Hill -map
AA version
SH/BT version
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

i'm seeing this old topic and trying to understand it now, did Mj make a huge LOD then port it to a .jpg as a heightmap and then texture that and apply it as a texture? it's good, for sure... but is that what he did? if he did that would make a gigantic picture texture...

i dont think i get it.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Sgt KIA wrote:However while loading the map MOH crashes.
I thought I might answer about this one. The Intel JPEG library (which is used by MoH) does not handle interlaced JPEGs, so the game crashes.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

If the above does not help you, save the jpg as 'baseline' or 'baseline optimized', but never as 'progressive'. :wink:

Anyhow even if you save the file as .jpg I think it would still take up 3 MB of vid memory. That's not necessarily a problem though, just don't expect a performance improvement or mtex decrease.
Image
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

ERROR: LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported

I'm assuming this is the error you're getting. It is quite a misleading error since it's just that MOH always expects a TGA file whenever it reads qer_editorimage. So when your shader's qer_editorimage is pointing to a non-TGA file (because it's a JPG) it thinks the file format is wrong.

In other words the error has to do with this line in the shader:
qer_editorimage textures/muna/munaterrain.JPG
(changing the extension to .TGA won't help because it's a JPG and you don't seem to have a seperate TGA editorimage.)

If you still want to keep the qer_editorimage line in the shader the extension MUST be .TGA and the editorimage itself MUST be a true TGA file. To make it work with a JPG texture there's two things you can do:
- either just get rid of the qer_editorimage line
- or make a (small) separate TGA-editorimage and use the line "qer_editorimage textures/muna/munaterrain.TGA"


(Think of the qer_editorimage as a label. In general you only need this line if you want to use a texture for multiple purposes. (e.g. caulk and blank_lightmap both use the same editorimage). For instance you could have a single texture and write two different shaders for it. The first one could be "textures/muna/terrain" which would be the normal texture. The second one could be "textures/muna/terrain_noshadow" which would have an extra "surfaceparm trans" to stop it from producing shadows. Now to avoid picking the wrong texture you could make two small editor images which won't be used in game; e.g. one with the text 'Terrain' written on it and one with the text 'Terrain_noshade').
Post Reply