From 3dsmax 2009 to Irrlicht/What is the best way?

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
Alper_Bilgehan
Posts: 6
Joined: Wed Mar 04, 2009 9:17 pm
Contact:

From 3dsmax 2009 to Irrlicht/What is the best way?

Post by Alper_Bilgehan »

Hi all,
As a team we are developing an incredibly funny 2d-3d mixed adventure game.
At this moment we are able to use 3dsmax 2009 for modeling but we have problems; the images here will be explaining:

What we have in 3dsmax:
Image
Using Panda .X exporter we get this:
Image
I've been searching through the forums for a long time.
The most popular solution to this was to use B3D exporter for Max 9, BUT that stuff doesnt support max 2009...
So we cant go B3D way... (At least for now)

Lightmapping/Dynamic Lighting/Texture Baking ... lots of confusing stuff...
What I need is a very "step-by-step how to" get your model from 3dsmax 2009 to your irrlicht game and keep it as good-looking as possible.

I've tried things like;
From 3dsmax 2009 -> Milkshape -> Irrlicht ... no satisfactory results achieved.
From 3dsmax 2009 -> IrrEdit -> Irrlicht ... no satisfactory results achieved. . . . . as far as combinations of methods i've tried

ANY HELP/SUGGESTION IS DEEPLY APPRECIATED
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The only difference I can spot is that your model in Irrlicht isn't lit, or maybe that your normals are not properly exported.
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

Agree with hybrid.
And you know, when you work in game it's recommended to work your model diffuse in 100% Self Illumination (see you 3ds material) then put it to 0 before export.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

also it seems you're not using textures (only colors), but I think textures will make it look much better... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

fmx

Post by fmx »

I use .X files through the Panda plugin to export out from Max09.

It looks to me like you are using 3DS files right now, which give messed up normals (or sometimes none at all) in irrlicht.
Has nobody actually pointed out this bug with the 3DS loader? Or is there a fix for this on the SVN or something?

IMO, the 3DS loader could also do with an upgrade to handle keyframes (another little irrlicht project on my plate I suppose, oh joy :roll:)
Alper_Bilgehan
Posts: 6
Joined: Wed Mar 04, 2009 9:17 pm
Contact:

Post by Alper_Bilgehan »

Guess i need to clearify myself a little bit
1- I've given up exporting to .3ds files ... it's no use
2- I go file -> export selected -> export as .X file (works best)
3- Itseems that .X file has only 1 channel for the texture, which as you see doesnt include any information about light or materials.
4- I either have to shadowmap/lightmap this guy(probably via render to texture dialog) or I have to add an active light in the code and, have to set the models parameters to receive light and shadow (Like "Read only materials" checkbox does in IrrEdit)
5- Or I need to set the 3dsmax settings so that it really does a better job exporting the .X file
------------
If you ever loaded the dwarf.x to IrrEdit ... well that is what im trying to get from 3dsmax "A perfect model with perfectly aligned textures in a jpg or tga file whatever..."
------------
If anyone knows a flawless workflow please,, we are in need.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

when your light is supposed to be at the same position relative to the character at all times then u probably can get good results using a shader.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

b3d exports scene and materials but those have to match irrlicht in someway. DirectX format doesn't save those into the X file so you need to add those by hand into your application using irrlicht, could be done through a scene file like .irr or you can add it directly into the code.

For wrong texture alignment on your model use a different UVW mapping in 3dsmax
Alper_Bilgehan
Posts: 6
Joined: Wed Mar 04, 2009 9:17 pm
Contact:

Post by Alper_Bilgehan »

Thanks indeed; but that is the very part i'm stuck at...
You see, to get to this point as seen on the picture; all i did was to load the .x file inside the code (i.e. i didnt use the setmaterialtexture/gettexture function)

Now I know that I'm supposed to use the " Render to texture" dialog box to achieve a tga(or whatever) file and then use that file for setmaterial/gettexture function to dress up our little buddy correctly. But the problem is:
- I cant find the right configuration for "render to texture" dialog box that would give me the desired result.
There are many suggestions for max 9(previous version) but in max 2009 things are somewhat different and yet i cant figure out what exactly to do by myself.

And another weird problem is that when i load the .x file inside the code and run it, well, it works fine as seen in the picture. But when i try to load the same .x file inside IrrEdit, the model looks corrupt (it appears like the sub objects become independent and the disintagrates all over the place)
--------
So still needing suggestions...
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

no thats not what i meant.

If you asign a texture to a face or mesh you need to do a proper UV / UVW mapping.

The X file does support more textures but only one per face not per model.

Make sure you are using the newest irredit and some previous irrlicht versions had some problems with different X files

As seen on the screenshot you have some textures for the face?
Alper_Bilgehan
Posts: 6
Joined: Wed Mar 04, 2009 9:17 pm
Contact:

Post by Alper_Bilgehan »

OK Everyone I solved the thingy..
First I had to use the Attach command in 3dsmax to attach everything to get one single object. I reset all the materials to their defaults, then i tried exporting:(you see, the problem was: i was selecting 12 individual polys and then i was trying to export via "export selected" option) By doing this, the jumbling in IrrEdit was solved and i got one nice pure gray but correct .x model.


And then coming back to 3dsmax, i textured and colored it up by adding SelectMesh modifier, and then selecting the parts of the body one at a time and adding a Material modifier again one at a time. Took some time yeah, but guess what, it correctly gave me what i exactly wanted. (so i didnt use any UVW mapper or unwrapper modifier)

Well once i got the model nicely textured and everything, the rest is to light up the scene in IrrEdit and voila!

Image

Now today's question is just because i'm a quicky:
- The one on the left comes from irr scene, the brighter one is directly imported via code and set emflighting True..
But it is a little too bright.. how do you think i make it like the one on the left??
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Maybe the imported one is scaled? Try enabling the material flag NormalizeNormals.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I'm not sure if the normals are automatically scaled by irrEdit. But you can definitely check which material settings in the irr file have changed from default and you can alter them on your mesh.
Alper_Bilgehan
Posts: 6
Joined: Wed Mar 04, 2009 9:17 pm
Contact:

Post by Alper_Bilgehan »

jEES .. You guys are awesome, i did enable the normalize normals stuff and it works perfect. Thanks indeed.
Post Reply