Texture problem.

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
FleshCrawler
Posts: 108
Joined: Fri Aug 22, 2003 1:04 pm
Location: Kerkrade, Netherlands
Contact:

Texture problem.

Post by FleshCrawler »

i'm searching for the following solution.

got a screenshot from it.
http://home.wanadoo.nl/batavier.kerkrade/untitled.jpg

now i need to get that texture stretched. the idea was to create a flag.

this is the code i'm using:

Code: Select all

    mesh1 = smgr->addHillPlaneMesh("myHill",
		core::dimension2d<f32>(1,1),
		core::dimension2d<s32>(40,40), 0, 0,
		core::dimension2d<f32>(0,0),
		core::dimension2d<f32>(10,10));

    
    // Create a Flag Like effect with the WaterSurfaceSceneNode.
    
    flagnode1 = smgr->addWaterSurfaceSceneNode(mesh1->getMesh(0), 1.0f, 100.0f, 10.0f);
	flagnode1->setPosition(core::vector3df(0,100,0));
	flagnode1->setRotation(core::vector3df(90, 0, 0));
	flagnode1->setScale(core::vector3df(0.5,0.5,0.5));
    flagnode1->setMaterialFlag(video::EMF_LIGHTING, false);
    flagnode1->setMaterialTexture(0,	driver->getTexture("data/flag/limburg.bmp"));

	flagnode1->setMaterialType(video::EMT_SOLID);
so, now i have the question, how would i be able to use a texture coord. manipulation so i can set the right coordinations using the complete watersurfacemesh? (if possible in a piece of code, seems that i understand code better then a how-to without code)

Thnx in advance
I've been absent for really long, but i'm ready to reign my terror on you once again, mwuahahahahaha
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

One solution....

Post by DarkWhoppy »

You'll need to do it with an editor.. download MilkShape and import your model... then open up the Texture Coordinate Editor and scale the mesh accross the texture...
FleshCrawler
Posts: 108
Joined: Fri Aug 22, 2003 1:04 pm
Location: Kerkrade, Netherlands
Contact:

Post by FleshCrawler »

would've done something like that if it was a model, check out the specialFX-tutorial, then you might know what i mean :) with the addWaterSurfaceSceneNode.
I've been absent for really long, but i'm ready to reign my terror on you once again, mwuahahahahaha
Post Reply