Irrlicht and 3ds material type for different walk sound fx

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
miha
Posts: 32
Joined: Tue Jun 26, 2007 9:27 pm
Location: Serbia

Irrlicht and 3ds material type for different walk sound fx

Post by miha »

Hope i don't bore you with my questions, but i gotta ask what are the
possibilities for geting the material from my models determining
for example if my floor is metallic or wooden or any other mat.
I need to load 3ds file as level, and then figgure out which material
is used for one part of the floor (which my player is colliding with),
so that i can play different walk sounds.How can i accomplish that
anyway, which model format, functions, methods ?
?maybe this topic belongs to beginner forum?
I have some ideas based on non 3ds and non irr capabilities
(based on my game code that determines which part of game
the player is in and which 'level' is loaded),but it's a bit of a f9ck-up
since i gotta have different materials in one level/room and don't
know if i can implement it without 10.000 Lines Of COde (LOCO).
LOCO - crazy (spanish).I don't want 1 more billion of bounding volumes.
ClownieTheMalicious
Posts: 28
Joined: Sun Sep 17, 2006 3:59 pm
Location: iraq

Post by ClownieTheMalicious »

hey, im pretty sure you can go about this a couple ways.

First, you could use a modified .x file with a new property in it (since .x files can be altered by you without changing the loading properties... unless you alter it alot) so you can put info in the .x file suchas weight/bouyancy/ material type, etc. But you might need to write your own loader for that file, or write your own loader to get that property out of the .x file.

Or you could alter the scenenode and the irrlicht material systemto take in new properties, that shouldn't be too difficult, you could prolly do it without breaking anything.
Like to the scene node class you could add a couple new variables to handle that. then all you would need to do is add a couple methods to get that info and use it.
Either way, its going to be a nice amount of work.
miha
Posts: 32
Joined: Tue Jun 26, 2007 9:27 pm
Location: Serbia

Post by miha »

I thought about modifying the scene node by adding one more property,
in this case it can be integer that represents id of the material.It's very
tough though, since i wanted to implement several different materials
in one .3ds or .x or .ANY file.I see that i will have a lot of problems with
this part.Does anyone know of anything imported by any 3d model
format that isn't normaly used,but can be edited in max or other softw?
I need to edit some attribute in max that can later be loaded in irrlicht
to represent material id.Anyone?
miha
Posts: 32
Joined: Tue Jun 26, 2007 9:27 pm
Location: Serbia

Post by miha »

I guess noone cares.Well if anyone wants to know how i solved this
here's the thing:
I'll use Tummle or IrrNewt for my physics (which i generaly don't need)
and as i remember one of them gives an option to set the material of a
node,so my snd play func will take input from that.
ClownieTheMalicious
Posts: 28
Joined: Sun Sep 17, 2006 3:59 pm
Location: iraq

Post by ClownieTheMalicious »

yeah im pretty sure your best bet would be to use Newton's Material system.
From what i've seen of it, it's very flexible and has everything you SHOULD need for exactly what you're asking.
But , I'm almost positive you can just edit a leaf on an .x file and put whatever properties you want. It wouldn't be too hard to retrieve the properties either. That way you wouldn't have to worry about specifying any of the properties in the code, it would just be with the proper file already, so it would simplify things for you.
But once again Newton has a nice material class, and since it's a physics engine it's built for exactly what you want. good luck
miha
Posts: 32
Joined: Tue Jun 26, 2007 9:27 pm
Location: Serbia

Post by miha »

Yeah, i'll go with Newton.
Cheers mate.
Post Reply