Corrado
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|
Corrado
Member
|
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 |
|
Corrado
Member
|
Re: Line between Terrain Parts
the image
|
|
04-14-2009 09:04 PM |
|
Corrado
Member
|
Re: Line between Terrain Parts
again
|
|
04-14-2009 09:04 PM |
|
Esenthel
Administrator
|
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 |
|