zeph2
Member
|
Inesis Heightmap issue
Ive been using the tutorial to add heightmaps to Inesis source.. My maps are not looking right, and Ive been trying to figure out whats wrong. The heightmaps look fine in the default EE... Any Ideas??
This is how My Heighmaps look when the world is loaded:
http://imgur.com/zB2SiPw
Heres the Source:
Code:
void LoadEditorWorld(C UID &world_id)
{
Net.World &world = *Net.Worlds(world_id);
//Game.ObjMemx<CustomStatic> Items;
Game.World.mode(Game.WORLD_MANUAL);
Game.World.New(EditorWorld);
//Game.World.setObjType(Items, OBJ_STATIC)
//.New(APEWorldID);
int areas=Areas+1;
for(int x=-areas; x<areas; x++)
for(int y=-areas; y<areas; y++)
{
VecI2 a(x, y);
Memc<Game.WorldManager.AreaState> areastates;
areastates.New().set(a, Game.AREA_LOAD);
Game.World.areaSetState(areastates, true);
Game.Area *the_area = Game.World.areaLoaded(a);
Area *data= GetArea(world, VecI2(x, y));
Image &temp_image =the_area.getData().height;
Image &temp_image2 =the_area.getData().material_map;
RectI ah= RectI(VecI2(0, 0), VecI2(HmRes+1, HmRes+1));
for( int hy=ah.min.y; hy<=ah.max.y; hy++)
for( int hx=ah.min.x; hx<=ah.max.x; hx++)
{
data.heightmap.setHeight(hx, hy, (the_area.data().height.pixelFLinear(hx, hy)+128));
//data.heightmap.setMaterial(hx, hy, (the_area.getData().materials[temp_image2.pixel(hx, hy)]));
}
// if(Items.elms())
// {
// REPA(Items)
// {
// VecI local(Items[i].pos().x, Items[i].pos().y, Items[i].pos().z);
// SetObj(&world, local, Items[i].matrix().angle(), Items[i].get_ID());
// }
// }
}
Game.World.del();
}
void InitWorld()
{
Net.Worlds.replaceClass<World>();
SetWorldAreas();
LoadWorld(MainWorldID);
LoadEditorWorld(MainWorldID);
}
(This post was last modified: 12-21-2014 02:14 PM by zeph2.)
|
|
12-21-2014 02:10 PM |
|
Esenthel
Administrator
|
RE: Inesis Heightmap issue
You could check if your heightmap resolution (source and dest) are of the same value. I think Ineisis codes are set for 32/33, but World Editor default worlds operate on 64/65 resolutions.
|
|
12-25-2014 12:03 AM |
|
zeph2
Member
|
RE: Inesis Heightmap issue
Sorry for the late response was MIA for a year real life issues.. Im back now but to follow up on this issue.. The heightmaps were working fine for one height map but when I tried stitching multiple height maps together this was happening. I will check into the resolution but i dont see how that would apply in this situation.
|
|
05-02-2016 01:37 AM |
|