Ugly Parallax Mapping

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
skaarj
Posts: 7
Joined: Thu May 31, 2007 4:17 pm

Ugly Parallax Mapping

Post by skaarj »

Im using parallaxe with my *.bsp map, but i have ugly effect (too big pixels):


Image
Image
Image

Code:

Code: Select all

if (q3levelmesh)
{
   	Parallax Mapping
         smgr->getMeshManipulator()->makePlanarTextureMapping(
               q3levelmesh->getMesh(0), 0.002f);
				
		  video::ITexture* colorMap = driver->getTexture("media/rockwall.bmp");
	           video::ITexture* normalMap = driver->getTexture("media/rockwall_height.bmp");
		
		  driver->makeNormalMapTexture(normalMap, 9.0f);
		
          scene::IMesh* tangentMesh = smgr->getMeshManipulator()->createMeshWithTangents(
		       q3levelmesh->getMesh(0));
			
		  q3node = smgr->addMeshSceneNode(tangentMesh);
		  q3node->setMaterialTexture(0,	colorMap);
		  q3node->setMaterialTexture(1,	normalMap);
		  q3node->getMaterial(0).EmissiveColor.set(0,0,0,0);
		  q3node->setMaterialFlag(video::EMF_FOG_ENABLE, true);
		  q3node->setMaterialType(video::EMT_PARALLAX_MAP_SOLID); 
		  q3node->getMaterial(0).MaterialTypeParam = 0.035f;
		
		  tangentMesh->drop();
}
Thx.
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

That's a problem with using makePlanarMapping, not with parallax mapping. Try to properly UV map your level and avoid makePlanarMapping.
linkoraclehero
Posts: 81
Joined: Sat Sep 09, 2006 6:46 am

Post by linkoraclehero »

Also, you might want to switch to wxDev-C++, it's more up-to-date. Just a thought. Probably wouldn't help here though :P
Post Reply