Paging Landscape v2 - Comments / Questions / Suggestions

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Locked
MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Hi jmm,

try it like i do. First go to Plugins/PagingLandScape2 dan run make. After it is build go to Samples/PagingLandScape2 and run make. And last go to Tools/MapSplitter and run make.
This is the way i do it and works fine for me.

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

# And for shader (needed to get slope)
VertexNormals=yes
But iNormal.y always return 1 (

Code: Select all

clamp (1.0 - iNormal.y, 0.0, 1.0)
=

Code: Select all

clamp (0.0, 0.0, 1.0);
):?
Follow la Moustache on Twitter or on Facebook
Image

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@jmm : try make -k (doesn't stop at first error.)

@madlion : no errors in logs ? (texture errors ?) which textureformat ?which heightsource ?

@Crashy : mmm, re-get cvs code today, to get last bugfixes (including normal calculation bugfixes. if it doesn't work, tell us if the initial shader in splatting5 does work ?

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

Ok, works fine!
There is still some shocking things (transition between pages, and pixellisation of the lower detail texture), but globally, it is pretty.

Image
Image
Image

The cg file.

Code: Select all

// Vertex program for automatic terrain texture generation
void main_vp
(
    float4             iPosition           : POSITION,
	float4             iNormal             : NORMAL,
	float2             iTexcoord           : TEXCOORD0,

	out float4         oPosition           : POSITION,
	out float4         oTexcoord           : TEXCOORD0,
	out float4         oCoverage           : TEXCOORD1,
	out float4         oSlope			   : TEXCOORD2,
	out float4         oScaled             : TEXCOORD3,
	//out float4         oFog              : TEXCOORD4,

	uniform float4x4   worldViewProj,

	uniform float4     configSettings,
	uniform float4     fogSettings,
	uniform float4     fogColour
)
{





    float no_rock_factor = clamp (iNormal.y, 0.0, 1.0);

    // GRASS  < configSettings[0]
	oCoverage.x = (iPosition.y < configSettings[0])?
                    clamp ((1.0 - (iPosition.y / configSettings[0])) * no_rock_factor, 0.0, 1.0)
                :
                    0.0;
					
	oSlope.x = clamp ( iNormal.y, 0.0, 1.0);


    //  configSettings[0] < ROCK < configSettings[0]
	oCoverage.y = (iPosition.y < configSettings[0])?
                        clamp ((iPosition.y / configSettings[0])  * no_rock_factor, 0.0, 1.0)
                    :
                       ((iPosition.y < configSettings[1])?
                            clamp ((1.0 - (iPosition.y - configSettings[0]) / (configSettings[1] - configSettings[0])) * no_rock_factor, 0.0, 1.0)
                        :
                            0.0);

	oSlope.y = clamp (1-iNormal.y, 0.0, 1.0);
    //  configSettings[0] < SNOW < configSettings[0]
	oCoverage.z = (iPosition.y > configSettings[0])?
                        ((iPosition.y < configSettings[1])?
                            clamp (((iPosition.y - configSettings[0]) / (configSettings[1] - configSettings[0])) * no_rock_factor, 0.0, 1.0)
                        :
                            clamp ((1.0 - (iPosition.y - configSettings[1]) / (configSettings[2] - configSettings[1])) * no_rock_factor, 0.0, 1.0))
                    :
                        0.0;

	oSlope.z = clamp ( iNormal.y, 0.0, 1.0);
  

    float rock_factor = 1.0 - no_rock_factor;
    oCoverage.y = clamp (oCoverage.y + rock_factor, 0.0, 1.0);

    
    // Calculate the output position and texture coordinates
	oPosition  = mul(worldViewProj,iPosition);
	oTexcoord = float4(iTexcoord.x, iTexcoord.y, 0.0, 0.0);
    oScaled = oTexcoord *200.0f;
}

// Fragment program for automatic terrain texture generation
void main_fp
(
    float4              iTexcoord	: TEXCOORD0,
    float4              iCoverage	: TEXCOORD1,
	float4              iSlope	: TEXCOORD2,
    float4              iScaled	    : TEXCOORD3,

	out float4          oColor		: COLOR,

	uniform sampler2D   textureUnit0,
    uniform sampler2D   textureUnit1,
    uniform sampler2D   textureUnit2,
    uniform sampler2D   textureUnit3
)
{
oColor = (tex2D(textureUnit0, iScaled.xy/200.0f) ) + (((tex2D(textureUnit1, iScaled.xy) * iCoverage.x*iSlope.x) + (tex2D(textureUnit2, iScaled.xy) *  iCoverage.y*iSlope.y)) - (tex2D(textureUnit3, iScaled.xy) *  iCoverage.z*iSlope.z));




}

the material script.

Code: Select all

vertex_program normalsplatVP cg
{
	source normalSplat.cg
	entry_point main_vp
	profiles vs_2_0 arbvp1

}
fragment_program normalsplatFP cg
{
	source normalSplat.cg
	entry_point main_fp
	profiles ps_2_0 arbvp1

}



material PagingLandScape.0.0
{
	

	technique
	{
		
		pass
		{
			lighting off

			 //coverage
			
			vertex_program_ref normalsplatVP
			{ 
				param_named_auto worldViewProj      worldviewproj_matrix

               	// Config settings are;
               	//     grass-rock
               	//     rock-snow
               	//     rock
               	//     snow
               	param_named configSettings float4 8000.0 10000.0 31000.0 0.0 
	
                // Fog settings are;
                //     start
                //     end
                //     scale (e.g. 0.0 to switch off)
               	param_named fogSettings float4 500.0 1000.0 1.0 0.0

                // Fog colour
               	param_named fogColour float4 0.93, 0.86, 0.76 1.0
				}
			fragment_program_ref normalsplatFP
			{
				
			}
			// coverage
			
			texture_unit
			{
			
				texture colourMapT.0.0.png
			}
			
	
			texture_unit
			{
			tex_address_mode mirror
				texture grass2.jpg
				
			}
			texture_unit
			{
			
				texture rock.jpg
				
			}
			texture_unit
			{
				tex_address_mode mirror
				texture splatting_snow.jpg
				
			}
			
		}
	}
	
}
About last CVS: when MaxAdjacentPages and MaxPreloadedPages are greater than 1, the terrain don't load vey well , and is sometimes vanishing.
Follow la Moustache on Twitter or on Facebook
Image

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@crashy : So finally it's not normal splat, but much more detailSplat.
-You can use iTexcoord.xy instead of iScaled.xy/200.0f for textureunit0 in FP.
- your details are RGB or just gray ?
- I'll check for the page transition normal bug (surely comes from normals calculation)

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

So finally it's not normal splat, but much more detailSplat.
In fact I tried to do detail splatting as some softwares (terragen, T2, etc) do to generate the main texture. With this, we can have detail texture which are corresponding to the main texture and terrain geometry.
-You can use iTexcoord.xy instead of iScaled.xy/200.0f for textureunit0 in FP.
Mh, thanks, I'm still not friendly with the shader langage.
- your details are RGB or just gray ?
Grayscales.
Follow la Moustache on Twitter or on Facebook
Image

jmm
Gnoblar
Posts: 9
Joined: Fri Oct 15, 2004 12:43 pm
Location: Bremen, Germany

MapSplitterBug bug report

Post by jmm »

Hi,
when trying to split a 512x512 with MapSplitter I'm getting the following error message:

Error #: 4
Function: PagingLandScapeData2D_HeightField::_load
Description: Error: Invalid heightmap size : 512,512. Should be 2^n.
File: ../../../PlugIns/PagingLandScape2/src/OgrePagingLandScapeData2D_HeightField.cpp
Line: 300

According to my math 512 is pretty much a power of 2. The exception in question is triggered by the following check:

bool PagingLandScapeData2D::_checkSize( const int s )
{
// ispow2 - 1
const int p = s - 1;
// ispow2
return ((p & (p - 1)) == 0);
}

This looks fishy. (p & (p-1)) ensures that the condition is only true if only one bit is set in the number, but if you decrement if by one your check only ensures that int s ist a number of (2^n)+1, so either the decrement should be removed or the comment fixed.

Cheers,
Moritz

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

The heightmap used to need to be ^2+1, but now only pages need to be ^2+1.
But This limitation has no more sense, as we make sure pages are splitted to be ^2+1... so heightmap could even be any size... mappsplitter would anyway splittmap to this, filling with blanks (if you don't want blank filling, use ^2+1 maps. )

kabutor
Gnoblar
Posts: 18
Joined: Thu Mar 18, 2004 1:50 am
Location: Spain and Olé

Post by kabutor »

I think (as by some tests I done) that if image is smaller than 1025 it didnt works properly the Mapsplitter (complains with the 2^n size problem even if they are for example 513x513)

At least it happens to me until I resize to 1025x1025 and it works almost fine..

And one question, I already managed to make works an small app I done with the gcanyon_height_4k2k.png but the texture splatting didnt work, or to be more precise Im not sure if it was working.

I get a nice canyon, as in the first screenshots in this monster thread, but all of them were gray execpt some smalls "patches" of green in the base of some canyons (I wish I did an screenshot)

I tried with both options below uncommented, but I dont get any difference.. did I have to use BaseTexture if I dont have it texturized previously?

## realtime splatting
TextureFormat=BaseTexture
## (need to generate maps with mapsplitter)
#TextureFormat=InstantBaseTexture
---------------
Also I tried changing the % in MaterialHeight1=25 MaterialHeight2=75 and so.. but nothing so Im making now my own heightmap lets see if that works :)

barnabe42
Gnoblar
Posts: 10
Joined: Fri Nov 05, 2004 12:08 pm

Post by barnabe42 »

Hello

I'm trying to upgrade my ogre3d and now I can't figured it out how
to get ride of this errors.

Im using VC6++ SP5
If somebody can help me .. I will be glad

I found out that the bsp in the CVS snapshot had some header missing
PagingLandScapeData2D_HeightField.h
PagingLandScapeData2D_HeightFieldN.h
PagingLandScapeData2D_HeightFieldRAW.h

I had them but I have still those 3 errors left.

Code: Select all

--------------------Configuration: Plugin_PagingLandScapeSceneManager2 - Win32 Debug--------------------
Linking...
   Creating library ..\bin\Debug/Plugin_PagingLandScapeSceneManager2.lib and object ..\bin\Debug/Plugin_PagingLandScapeSceneManager2.exp
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::firePagePreloaded(unsigned int,unsigned int,float *)" (?firePagePreloaded@PagingLandscapeListenerManager@Ogre@@QAEXIIPAM@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: static class Ogre::PagingLandscapeListenerManager & __cdecl Ogre::PagingLandscapeListenerManager::getSingleton(void)" (?getSingleton@PagingLandscapeListenerManager@Ogre@@SAAAV12@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::firePageLoaded(unsigned int,unsigned int,float *)" (?firePageLoaded@PagingLandscapeListenerManager@Ogre@@QAEXIIPAM@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::firePageUnloaded(unsigned int,unsigned int,float *)" (?firePageUnloaded@PagingLandscapeListenerManager@Ogre@@QAEXIIPAM@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::firePagePostunloaded(unsigned int,unsigned int)" (?firePagePostunloaded@PagingLandscapeListenerManager@Ogre@@QAEXII@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::firePageHide(unsigned int,unsigned int,float *)" (?firePageHide@PagingLandscapeListenerManager@Ogre@@QAEXIIPAM@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::firePageShow(unsigned int,unsigned int,float *)" (?firePageShow@PagingLandscapeListenerManager@Ogre@@QAEXIIPAM@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::fireTerrainReady(void)" (?fireTerrainReady@PagingLandscapeListenerManager@Ogre@@QAEXXZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::fireTileDeformed(unsigned int,unsigned int,unsigned int,unsigned int)" (?fireTileDeformed@PagingLandscapeListenerManager@Ogre@@QAEXIIII@Z)
" imported
LINK : warning LNK4049: locally defined symbol ""public: void __thiscall Ogre::PagingLandscapeListenerManager::fireTileLoaded(unsigned int,unsigned int,unsigned int,unsigned int)" (?fireTileLoaded@PagingLandscapeListenerManager@Ogre@@QAEXIIII@Z)" im
ported
OgrePagingLandScapeSceneManager.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::PagingLandscapeListenerManager::PagingLandscapeListenerManager(void)" (__imp_??0PagingLandscapeListenerManager@Ogre@@QAE@
XZ)
OgrePagingLandScapeSceneManager.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::PagingLandscapeListenerManager::~PagingLandscapeListenerManager(void)" (__imp_??1PagingLandscapeListenerManager@Ogre@@QAE
@XZ)
..\bin\Debug/Plugin_PagingLandScapeSceneManager2.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Plugin_PagingLandScapeSceneManager2.dll - 3 error(s), 10 warning(s)

thank
Barnabe

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@barnabe42 :
Hurray a vc6 owner !
If you can send me you *.dsp, I'll commit them to CVS.

You need to add paginglandscapelistener.cpp to paginglandscape2 project.
You'd have to link to paginglandscape2.lib (with relative folder position) the demolandscape2 project, in linking tab.


@kabutor : thx for bug reports, I'll check that.
Real-time splatting => splatting (needs DX9) and splatting5 (need shaders)
Real-time Coloring => basetexture.
% in plsm2.cfg is for Real-time textureformat and deformable (instantbasetexture, splatting5) only
under linux, and therefore opengl, it's splatting5 (shaders) or splatting3 (for old cards)
others needs pre-genereated textures.
pre-generating is a good idea, if you want to minimize loading times.

I'll try to make cfg comments clearer...

chakie
Gnoblar
Posts: 5
Joined: Fri Dec 10, 2004 1:07 pm

Re: Build process fails on Linux when building the pc files

Post by chakie »

jmm wrote:I just tried to compile current CVS on Linux and it does not build completely:

make[3]: Leaving directory `/home/jmm/tarballs/ogreaddons/paginglandscape/Tools'
make[2]: Leaving directory `/home/jmm/tarballs/ogreaddons/paginglandscape/Tools'
make[2]: Entering directory `/home/jmm/tarballs/ogreaddons/paginglandscape'
make[2]: *** No rule to make target `Plugin_PagingLandScape2.pc', needed by `all-am'. Stop.
make[2]: Leaving directory `/home/jmm/tarballs/ogreaddons/paginglandscape'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jmm/tarballs/ogreaddons/paginglandscape'
make: *** [all] Error 2
There is no such file in CVS at least. I just commented out the line in ogreaddons/paginglandscape/Makefile.am:

Code: Select all

#pkgconfig_DATA = Plugin_PagingLandScape2.pc
This lets it at least build on my system, not yet had time to test it. I assume it's just a file that should be "cvs add":ed to the repository.

kabutor
Gnoblar
Posts: 18
Joined: Thu Mar 18, 2004 1:50 am
Location: Spain and Olé

Post by kabutor »

Im stuck, I tried a lot of different options and I cant get to work fine with pregenerated textures.

I have one heightmap_1k1k.png and a land.png (wich is the texture) so I just run Mapsplitter with this options (this I think are the ones that lets you make the preg. textures)

Code: Select all

ColorMapName=land.png
ColorMapSplit=yes
LitColorMapSplit=no
BaseMap=yes
LitBaseMap=no
AlphaMaps=no
I upload maptool.cfg here just if you wanna have a look.

Later I open that in the app, with this options in paginglandscape2.cfg:

Code: Select all

TextureFormat=Image
ImageFilename=land
Rest of options to no, as you can see here: here

So after all this boring introduction I only get a scene with the textures dark, like this Image

I try adding some lights but keeps the same.. I tried changing values in .cfgs and if I choose the splatting I get all grey, and the 0 height land yellow.. I can post some screenshots..

Any advice :? :P

philvanzu
Gnoblar
Posts: 3
Joined: Fri Dec 17, 2004 11:47 am

Post by philvanzu »

Hi. I have recently messed up my ogrenew dir and sent it to trash, then downloaded the newly updated CVS HEAD. At the time I wasnt aware it would'nt compile due to the recent merging of the unstable branch. I spent a few ours setting up the new dependencies right and finally got the Debug config to compile. All the regular demos are working without problem.

I thought the compile log of the PLSM2 plugin might interest you, though I'm aware starting to work on it may be a bit premature...

Code: Select all


Last edited by philvanzu on Tue Dec 21, 2004 11:45 am, edited 1 time in total.

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

@Kabutor: you must add the lign "TextureImageformat= " and specify the format of your colourmap.
Follow la Moustache on Twitter or on Facebook
Image

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@philvanzu : sinbad just commited the major source break resource manager changes... let me some times to adapt plsm2 to it !
I'm on it.


@kabutor :
there's strange tilesize, pagesize, widht height setting here..(both cfg)
you'd better have something like if your map is 1024x1024

Code: Select all

#			Height and Width of the landscape in number of pages
Width=4
Height=4

#
#			Size of the Heightfiled in pixels (must be (power of 2) + 1)
PageSize=257
#
#			Size of the Heightfiled in pixels (must be power of 2)
TileSize=64
#
For example, if map is 2048x1024, with pagesize=257 and TileSize=64,
It gives 32 pages in total (8 pages width, 4 pages width), each pages containing 16 tiles so it's 512 tiles on the whole map.

Sorry but only 2 materialheight supported for now (4 base color.) but more are planified.

in an imageviewe the mappspltitted files are ok ?
any error in ogre.log ?

kabutor
Gnoblar
Posts: 18
Joined: Thu Mar 18, 2004 1:50 am
Location: Spain and Olé

Post by kabutor »

Ouch.. Ogre.log, thats it...

Code: Select all

Error #: 7
Function: Codec::getCodec
Description: Cannot find codec for extension . 
File: OgreCodec.cpp
Line: 46
Stack unwinding: Image::load(..) <- <<beginning of stack>>
15:44:32: Error loading texture land.2.1.. Texture layer will be blank.
15:44:32: An exception has been thrown!
It makes the tiles ok, I mean from a 4x4 size, I have the heightmap.x.y.png an the land.x.y.png where X,Y is from 0 to 4 so it seems ok, but as you see the log, its missing the extension of the image (png in this case) should be land.2.1.png

I tried, just in case where missing ImageExtension=png in paginglanscape.cfg but no :D

I try to have a look and post a fix :roll:
Thx
-----------EDIT---------

Now works fine.. thxs again

Code: Select all

patchpaging.diff 
59c59
<                 commonName + "." + PagingLandScapeOptions::getSingleton().TextureImageFormat + "png";       
---
>                 commonName + "." + PagingLandScapeOptions::getSingleton().TextureImageFormat;
EDIT2: I realize that is a crappy patch, sorry, I suppose the proper one is add another option in cfg (or leave this way and force the format to be png). :roll:

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

@kabutor : Crashy's suggestion didn't work ?
add another option in cfg
that's TextureImageFormat=png in paginglandscape2.cfg is supposed to do. Does it work ?

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

I confirm that with the error you mentionned, you must specifiyTextureImageFormat=png
Follow la Moustache on Twitter or on Facebook
Image

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

tuan kuranes wrote: @madlion : no errors in logs ? (texture errors ?) which textureformat ?which heightsource ?
Didn't see any erros in logs, no texture errors too. But will check this if it's runnig again.

Tried diffrent textureformats BaseTexture and InstantBaseTexture.
Could not test splatting because of my ati driver problem.

Heightsource was LandScapeFileName=ps_height_1k.
I used mapsplitter before.

I also have the same error as kabutor. Add TextureImageFormat=png doesn't have any effect.

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

About last CVS: when MaxAdjacentPages and MaxPreloadedPages are greater than 1, the terrain don't load vey well , and is sometimes is even not loading
Follow la Moustache on Twitter or on Facebook
Image

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

Both are 1.
Here is my paginglandscape2.cfg.

Code: Select all

#                       Base file name for the landscape heightfield data
#                       The file name MUST be LandScapeFileName.x.z.LandScapeExtension (ex: landscape.0.0.png)
#                               and MUST be squared.
#LandScapeFileName=gcanyon_height_4k2k
LandScapeFileName=ps_height_1k
LandScapeExtension=png

#LandScapeFileName=terragen16bits
#LandScapeExtension=raw

#                       Height and Width of the landscape
Width=16
#Height=8
Height=1
#
#                       Especialized 2D data loader.
#                       Currently the only available loaders are 'HeightField', 'HeightFieldTC' and 'SplineField'.
#                       More to come.
#

#
#Data2DFormat=HeightFieldTC
Data2DFormat=HeightField

#Data2DFormat=HeightFieldNTC
#Data2DFormat=HeightFieldN

#Data2DFormat=SplineField
#
#
#                       Memory Initial Usage Values
MaxNumRenderables=200
IncrementRenderables=200
MaxNumTiles=200
IncrementTiles=200
#
#                       Pages Load Factor
#                               Pages will be load/unload when they are about PageSize^2 * ChangeFactor
ChangeFactor=1.5
#
#                       Visible renderables
#                               This is the number of visible renderables from the current camera position
#                               to the border of the visible terrain. (The radius of renderables)
VisibleRenderables=50
#
#                       Distance LOD
#                               This is the number of renderables in the higher LOD.
DistanceLOD=15
#
#                       Camera Threshold
#                               If the last camera position minus current camera position is >= CameraTheshold
#                               then the scene is trasverse to check LOD.
CameraThreshold=5
#
#                       FPS Processing limit
NumRenderablesLoading=15
#
#
#                       Num of adjacent loaded landscape pages.
MaxAdjacentPages=1
#
#                       Num of adjacent preloaded landscape pages.
#                               Must be bigger than MaxAdjacentPages + 1, the textures are loaded in a separate thread.
MaxPreloadedPages=1
#
#                       Size of the Heightfiled in pixels
PageSize=65
#
#                       Size of the Heightfiled in pixels
TileSize=64
# if not set, it's precomputed to the max possible at this TileSize.
# Must be (2^MaxRendervel < TileSize)
MaxRenderLevel=3
#
#
#                       The HeightField TC is a compresed format and need to know the value range from where the
#                               heightfield file was compresed
MaxValue=3000
MinValue=0
#
#                       Especialized texture loader.
#                       Currently the only available loaders are 'Image', 'BaseTexture' and 'Splatting'.
#                       More to come.
#
#TextureFormat=Image
#ImageFilename=gcanyon_texture_4k2k
ImageFilename=ps_texture_1k

TextureImageFormat=png

## realtime splatting
#TextureFormat=BaseTexture
## (need to generate maps with mapsplitter)
TextureFormat=InstantBaseTexture

# Shader Splatting
# Needs pixel shader
#TextureFormat=Splatting5

#need DIRECTX
#TextureFormat=Splatting

## precalc static splatting
## (need to generate maps with mapsplitter)
#TextureFormat=BaseTexture2

#need DIRECTX
#TextureFormat=Splatting2
# Need Multitexturing Hardware DIRECTX
#TextureFormat=Splatting7

### Experimentals splatting techniques
#need DIRECTX
#TextureFormat=Splatting4

### Experimentals splatting techniques
#need OPENGL
#TextureFormat=Splatting3
#need DIRECTX
#TextureFormat=Splatting6

#
#                       For splatting3 and perhaps a pass less in splatting2 and splatting4
VertexColors=no
#                       For splatting3
CoverageVertexColor=no
#                       Forsplatting4
BaseVertexColor=no
#
BaseVertexShadow=no
#
BaseVertexInstantColor=no
#
#                       Splatting
#                               We are allowing 4 textures to build the terrain texture
#                               MaterialHeight to change alpha weights ( using percentages )
MaterialHeight1=25
MaterialHeight2=75


#needs to be in Search Path directory (resources.cfg)
SplatFilename0=splatting_snow.jpg
SplatFilename1=splatting_sand.jpg
SplatFilename2=splatting_grass.jpg
SplatFilename3=splatting_rock.jpg

# if deformation is no use gain fps by saying no here.
Deformable=no

# experimental VRAM saves. need instant base texture and vertex shader support
VertexCompression=no

#
#                       Scale values
ScaleX=9000
ScaleY=9000
ScaleZ=9000

#
#                       For lighting
#          And for shader (needed to get slope)
VertexNormals=yes

Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 997
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 48
Contact:

Post by Crashy »

Very strenge, indeed :?
Follow la Moustache on Twitter or on Facebook
Image

kabutor
Gnoblar
Posts: 18
Joined: Thu Mar 18, 2004 1:50 am
Location: Spain and Olé

Post by kabutor »

I recompiled PLSM2 and it works perfect with Crashy's option "TextureImageFormat=png" but that option wasnt before in the defaults cfgs files :?

So that do the trick no patch needed :) thx to all

@Madlion

I have it working uncommenting this line form your cfg

Code: Select all

#TextureFormat=Image
I just upload a small file (370k) here with both cfs and a directory with the two images needed, just add the directory to the resources list and exec Mapsplitter, that should be enough.

The heightmap and texture is fast one I did for testing purpouses so no screenshot :oops: :oops:

EDIT: fixed the uncommenting code..

MadLion
Halfling
Posts: 97
Joined: Wed Aug 25, 2004 8:14 am
Location: Germany

Post by MadLion »

@kabutor i'll take a look at your files.

I got the trick for the Error #: 7 problem.
If i'm using TextureFormat=BaseTexture no problem but if i'm using
TextureFormat=InstantBaseTexture i git the Error #: 7.

But i'm sorry to say that i don't see anything. :(
Maybe i have to wait for a working ati driver to get "real" 3d acceleration.

Thanks all for the help so far.

Locked