changing texture/image

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
sivagiri
Posts: 22
Joined: Sat Jun 10, 2006 4:31 pm

changing texture/image

Post by sivagiri »

Hi,

I'm making a project where I put pictures on the blackboard. 4pictures.
You have to choose the right pic.
When you choose the right one a window pops up.

:o :roll:
So my problem is after choosing the right pic I'd like to change this four picture to another four picture. I'd like to get the pics from a directory (because the 4pic combination is defined) and put them on the mesh randomly.


How do I do it?

Another question:
-Do I have to make the pic mesh seperatly from the room mesh and then load it (load the room mesh and then the pic mesh seperatly)
OR
Make the room mesh with texture layer 0, and the 4 pic mesh with layer 1-4 (load the room mesh, then load the textures with different texture layers)?

-In the Editor I select my file from the file open window. Then how can I get the selected file name & its route --> then put it into its editbox?

sivagiri

Image

:o she's just a trial avatar :lol: :oops: :oops:
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

She looks like you recruited her in from a wonderful performance in Braveheart xD

I'm not sure if you can have 5 layers of textures, so i think the easiest way would be to have the 4 pics seperate from your room mesh, so just have a mesh that you can load in to hold one pic, and then make 4 nodes from that mesh and put a different pic on each, it'd be simple to randomly assign a picture from a random directory, you can looks into IFileSystem for that if you haven't already and i'm sure you'll know how to do a random selection of what you get from the directory.

Hope that helps!
Image Image Image
sivagiri
Posts: 22
Joined: Sat Jun 10, 2006 4:31 pm

Post by sivagiri »

thx

Please someone send me a code part. :lol: :lol: :lol: :lol: :lol: :lol:
sivagiri
Posts: 22
Joined: Sat Jun 10, 2006 4:31 pm

Post by sivagiri »

Oh I made here with Poser, then made her textures with uvmapper classic and painted it. Thats why here face is not so good.

Not good at painting.

sivagiri (A Girl Style) :) :D :D
Post Reply