Page 2 of 2

Posted: Sat Nov 06, 2004 11:23 am
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 .

Posted: Sun Oct 16, 2005 11:51 am
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.

Posted: Mon Oct 17, 2005 6:34 am
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]

Posted: Mon Oct 17, 2005 7:43 am
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.

Posted: Mon Oct 17, 2005 1:55 pm
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.

Posted: Mon Oct 17, 2005 5:04 pm
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.

Posted: Mon Oct 17, 2005 6:39 pm
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').