Tiling a texture

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
Frobaz

Tiling a texture

Post by Frobaz »

I load an object created with a 3d editor. In the editor, I have the texture tiled across the object so it isnt stretched out. After that, I exported it to .3ds but when I load the image into my game, the texture is stretched out. How do I keep the texture mapping created when I made the object?
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

I'd suggest exporting to .X
It retains it's texture coordinates.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Frobaz

Post by Frobaz »

I had tried that but I couldnt get it working right. Ill try a different method this time. Thanks for the help.
luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

What are you using to model?

You need to add a UVW map modifier to your objects in order to tile the texture so it exports with a 3ds file. Easy to do in 3Dsmax, not sure how with anything else.
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

could you set me right a bit? Is it possible to import a mesh to irrlicht, but not textered, and then call a irrlicht function for setting a material (setMaterialTexture()) and it will set the texture to the coordinates that had been set on a model in the 3d modeling program? can I do that somehow?
what is this thing...
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I have the opposite problem, the .x file i've created myself manually tiles textures when i don't want them tiled... any ideas on that?
Image Image Image
SmOrliwiz
Posts: 30
Joined: Thu Jan 01, 2004 10:39 pm
Location: CH
Contact:

Post by SmOrliwiz »

Maybe you could post your code?
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

Code: Select all

 possible to import a mesh to irrlicht, but not textered, and then call a irrlicht function for setting a material (setMaterialTexture())
i use anim8tor and uvMapper both freeware
u need to export as wavefront obj from the modeller
imprt obj file in uvMapper
chose a texture map type (like box)
u may like to rearange the objects -or not
save the map
SAVE THE MODEL!!!
import the resaved model in the modeller
export as .3ds
paint the map
....irrlicht part *phew*

Code: Select all

 
	scene::IAnimatedMesh* mesh0 = smgr->getMesh(
		"../media/model.3ds");

	smgr->getMeshManipulator()->makePlanarTextureMapping(
		mesh0->getMesh(0), 0.008f);

	scene::ISceneNode* nodePt = 0;

	nodePt = smgr->addAnimatedMeshSceneNode(mesh0);
	nodePt->setMaterialTexture(0,	driver->getTexture("../media/modelTexmap.bmp"));

---
jan 10-06 Jazz-E posts an addon specific for MAX users and *.x model files. This can be found here:
http://irrlicht.sourceforge.net/phpBB2/ ... 3765#63765
Last edited by bearSoft on Tue Jan 10, 2006 12:42 pm, edited 1 time in total.
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Frobaz

Post by Frobaz »

It worked. I was using anim8r to make it but I was just having some problems with some settings.
high
Posts: 1
Joined: Sun Oct 09, 2005 9:02 pm

share it plz

Post by high »

if you managed to keep the texture tiled after importing it in irrlicht, plz post the way cause i have the same problem.
Post Reply