Another tut in 10 screenshots, My3d crashcourse for 3dsmax

A forum to store posts deemed exceptionally wise and useful
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Another tut in 10 screenshots, My3d crashcourse for 3dsmax

Post by afecelis »

ok, here it goes, a crash course in 3dsmax+my3d:
grab the files+source here:
http://files.wildspad.com/afecelis/irrl ... y3dtut.zip

1.Create a folder inside of your "projects" or "examples" folder in your Irrlicht structure (or use the one in my example "my3dtut"); make sure that all the paths used in the main.cpp file will find the necesary include and lib folders.
http://files.wildspad.com/afecelis/irrl ... oard01.jpg

2.EDITED IMPORTANT NOTE:After Irrlicht 1.0 you don't need to set the texture path; Including this line will make your app crash so if you're getting errors when compiling try removing the set path line.

Check how I placed the texture files (previous screenshot) that we'll be using in the "data" folder.(this is crucial when we define the texture path for the my3d file). Create or use the max file I'm including; it's a room composed of 4 walls, a ceiling, a roof and some solids in it.
http://files.wildspad.com/afecelis/irrl ... oard02.jpg

3.create a material for each of the objects, gray for walls, blue for ceiling-floor, orange for the sphere, red for the teapot and white for the box. Remember, only use the difuse channel to drop the included jpegs (or the ones you use for your materials) and each material should be separate, no multi-subobject materials. Apply them as mentioned:
http://files.wildspad.com/afecelis/irrl ... oard03.jpg

4.Place some lights in your scene; I used a couple of omni lights that cast shadows. Render a scene to check how shadows are showing up before the next step. You may add color, change their intensity, their near and far attenuation, etc etc etc. The experimentation part is up to you.
http://files.wildspad.com/afecelis/irrl ... oard04.jpg

5. Once satti¡sfied, select all of your objects (ctrl+a) and go to to the Rendering-render to texture menu (or just hit zero):
http://files.wildspad.com/afecelis/irrl ... oard05.jpg

6.In the menu that show up, select "add" and then "lighting map"; make it 512x512
http://files.wildspad.com/afecelis/irrl ... oard06.jpg

7. Once done, hit render (from the render to texture menu-not the regular rende rbutton), wait for some time while your lightmaps get created and once it finishes your 3d model will display lightmaps. tip; before doing this I like to save my max file as _lm in case I need to have a copy of the original.
Baked lightmaps:
http://files.wildspad.com/afecelis/irrl ... oard07.jpg

the lightmaps get created in 3dsmax's "images" folder:
http://files.wildspad.com/afecelis/irrl ... oard08.jpg

now we're ready to export to My3d. Go to file, export and select my3d from the export formats; save your exported file as "scene.my3d" in the "data" folder of our application and use the options in the screen:
http://files.wildspad.com/afecelis/irrl ... oard09.jpg

now use the source file I'm including to load it into irrlicht: set the paths accordingly with your system:
http://files.wildspad.com/afecelis/irrl ... oard10.jpg

and that's it!

for more advanced features like transparency and dynamic lights check into Zdmitor's models to see how he handles material names.

hope it helped!
:D

UPDATE April 14,2008: Just fixed all the dead links to a backup version I had. This documentation might be outdated, for instance, (though not 100% sure) setting the texture path is no longer required. Hope it still helps someone out. ;)
Last edited by afecelis on Mon Apr 14, 2008 11:50 pm, edited 4 times in total.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

forgot to say:

If you run the app: WASD for navigadtion, alt+f4 to quit!!! :oops:
zardoz
Posts: 11
Joined: Sat Dec 18, 2004 5:18 pm

Post by zardoz »

Life is getting better :D

Thanks afecelis!!!
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hehehe, I'm glad it helped :D cause life is indeed very cool!
Myth
Posts: 81
Joined: Wed Apr 13, 2005 5:48 pm

Post by Myth »

Thank you!
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.

My fan site: http://www.halo-center.com
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

My pleasure Myth! :D

I know it's very basic, but many ppl were asking for a noob-beginner kind of tutorial. This will make just a start point but shows the basic workflow and how you guys could make it work with any model you got in 3dsmax. :wink:
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

Sweet! Thanks afecelis! :)

w00t! Now my project is going to have lightmapping ^_^.
________
Ipad games
Last edited by disanti on Thu Feb 24, 2011 10:32 am, edited 1 time in total.
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

I'm STILL having very bad luck with this. Is the My3d exporter just not 100% working with Max7?!
________
Weed
Last edited by disanti on Thu Feb 24, 2011 10:32 am, edited 1 time in total.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

let me check disanti. I've tried it in max5 and 6 but not in 7. I'll give it a try tonight and let you know. If I succeed I'll upload my max7 file for you to test them out.

Theasiest version to work with is in fact max5, but the only difference in 6 and 7 is that the render-to-texture menus become a bit more complex, but the workflow shouldn't change.

I'll let you know :wink:
luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

Howdy...(Its been a couple months but I'm back.)
I'll jump in here...I have max7 and really didn't have a problem. The interface has changed a bit since max5, but it is all still there.

@disanti when you say you're still having "bad luck", what exactly do you mean? Is it not exporting the files at all? or is it not being loaded properly in irrlicht?

by the way, MY3D is only for lightmaps? no animation support in there?
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

yup, lightmaps, and materials with transparency (including alpha, for example for leaves) and reflections; also supports dynamic lights so you can mix them both. But it's a static mesh format.

for animation you got .X, ms3d or md2.
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

My "bad luck" is with irrlicht loading the darn thing incorrectly. It completely screws my textures (scrambles them) and puts the lightmap on with incorrect UVs, so one room will have the lightmap of another (and usually makes it pretty ugly).

I found a work around at this point, and that is to export my model as a 3ds file, then import it in DeleD, replace my lights, and then export it as a .dmf. Works fine so far, I just wish DeleD could make bigger lightmaps.
________
Girlfriend Pic
Last edited by disanti on Thu Feb 24, 2011 10:32 am, edited 1 time in total.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

It can, but it'll cost you some bucks :wink:

Diasnti, why don't you upload your stuff so that I can give it a look and try to see what's happening?
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

@afecelis: I sent you an email about the my3d stuff since I don't have a server anymore.
________
Buy Roor Bongs
Last edited by disanti on Thu Feb 24, 2011 10:33 am, edited 1 time in total.
michael520
Posts: 230
Joined: Mon Oct 10, 2005 2:24 am

Post by michael520 »

I am confused........

why i can't get the effect as you did?

I am using 3ds max 7.

and more, when executing the my3dtut.exe, the command line output saying that can't load some textures such as rocky_lf.jpg...

afecilis, would you give some more detailed tutorial please?
Post Reply