About Store Forum Documentation Contact



Post Reply 
Line between Terrain Parts
Author Message
Corrado Offline
Member

Post: #1
Line between Terrain Parts
Hello,

about the Terrain : i have a Terrain : i build it with the following :
I have used a 1024x1024 height map
Mesh createPlane(512,512, ...) , displacez, ...
MeshGroup create(mesh, VecI(3,1,3)) 3x3=9 : Parts Number

I have no problems if i use one material only, but i need more materials : one each part like this :

for (int np=0 ; np<TerMesh.meshs() ; np++)
{
TerMesh.mesh(np).setMaterial(m);
TerMesh.mesh(np).texScale(VEC2(3.0));
}

The problem is that there is a line (if i build the plane (256, 256, ..)) or stranges triangles (if i build the plane (512,512, ..))
between the parts of the Terrain GroupMesh. Maybe the texture is not scaled perfectly ? Or : i have to build the Terrain in a
different way ?

Corrado
04-14-2009 08:06 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
Re: Line between Terrain Parts
could you attach a screenshot of how the terrain looks like?
So I could see
Quote:The problem is that there is a line (if i build the plane (256, 256, ..)) or stranges triangles (if i build the plane (512,512, ..))

Do you want to achieve smooth blending between two materials?
This is done by using multiple materials in a part and vertex weights for each material, this was mentioned here - <!-- l --><a class="postlink-local" href="http://www.esenthel.com/forum/viewtopic.php?f=10&t=1084">viewtopic.php?f=10&t=1084</a><!-- l -->

For the simplicity I suggest to use the World Editor.
even if you'd like to manage the game objects later by yourself, you can just use the Game::World for the terrain only.
You can also dont use the Game::World at all, because when the World Editor builds the ouput world data, it generates multiple mesh files for the terrain which you can use manually (they're in World\world name\area\x,y\terrain.mshg)
04-14-2009 08:21 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #3
Re: Line between Terrain Parts
1) I try several times to attach the screenshot, but dont send, you have an e-mail ?

2) No, i dont want mix two materials, but i have big texture 11264x11264 i want to divide in smaller texture and assign to the parts of the terrain
If i use one sinlge big texture (maximum size on your EE is 8192x8192) i have no problem, but if i assign with :

for (int np=0 ; np<TerMesh.meshs() ; np++)
{
TerMesh.mesh(np).setMaterial(m);
TerMesh.mesh(np).texScale(VEC2(3.0));
}

a line appears between the terrain meshgroup parts.

Corrado
04-14-2009 09:03 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #4
Re: Line between Terrain Parts
the image
04-14-2009 09:04 PM
Find all posts by this user Quote this message in a reply
Corrado Offline
Member

Post: #5
Re: Line between Terrain Parts
again
04-14-2009 09:04 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
Re: Line between Terrain Parts
I've seen the screenshot from the e-mail, I see the line
however I don't really understand the thing about material/textures combination that you're using.

Is it one material for all parts?
How does the texture look like?

8192x8192 is a limit of DirectX/Video Card (not EE)

You should have all your textures in a size of a power of 2 (1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192)
04-14-2009 09:29 PM
Find all posts by this user Quote this message in a reply
Post Reply