weird 3ds mesh problem

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
WickedImp
Posts: 8
Joined: Tue Mar 16, 2004 10:49 am
Location: C=DE/ST=NRW/L=Blankenrode

weird 3ds mesh problem

Post by WickedImp »

hi community,

seems I got a weird problem with a 3d studio mesh I recently created. maybe someone knows a solution to this, cause I do not know where the problem is coming from. To explain what is shown in the image:

I made a custom scene node called cVehicle, holding child nodes for wheels, chassis. I think the center of the wheel mesh is correct. Wheels are positioned around the middle of the vehicle node. My chassis seems to have the pivot (center of the object) somewhere in the back on the left side.

Both meshes (wheel and chassis) are exported as 3ds from 3d studio max. Both meshes have multiple sub-objects. The wheels are made of a rim and the wheel. The chassis got sub-objects like doors, hood, trunk, etc. Before exporting the chassis mesh I centered the pivot to the middle of the object and moved the object to 0.

Does anybody know how to correct this?

Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

The faceted look is because smoothing groups are not yet supported in the 3DS loader, exporting to another format (obj, B3D or X) will fix this.
I don't know about the problem with the wheels though. Can you provide the mesh for testing? If it works in Blender and Wings then it must be Irrlicht, if it doesn't then it must be something to do with how you exported it.

I'm no expert in 3D Studio though, but other people can probably help.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
asparagusx
Posts: 81
Joined: Thu Oct 16, 2008 6:50 am

Post by asparagusx »

I am sure I have had a similiar problem before and Hybrid commented that the issue was within 3DS converter todo with local matrix transformations not supported in the loader.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, we'd need to support group hierarchy and transformations, both are not supported yet.
WickedImp
Posts: 8
Joined: Tue Mar 16, 2004 10:49 am
Location: C=DE/ST=NRW/L=Blankenrode

Post by WickedImp »

ok... I tried as .obj and also exported materials. looks much better. vehicle now has its pivot right. and it seems the mtl file is also used, and the obj file correctly sets material. Even the glass is transparent.

The orientation is mirrored if I use obj files. But that's not a problem at all :)

is there a way to access sub-objects in irrlicht and to also access the material parameters, etc? if I have multiple vehicles with different color I think I have to change the material on a per node basis.

Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

You can change the material settings in your app by using ISceneNode::getMaterialCount and ISceneNode::getMaterial, just change the colours and textures via the SMaterial struct.
Access to the sub-parts aren't available for static meshes like 3ds and obj, but if you use an animated skinned format (B3D, X or MS3D) then you can get the joints and move them around, which means you could have opening doors and turning wheels. You could even have dents and breaking windows if you rig your meshes correctly.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

For obj files and many others you can also access the group structure via meshbuffers. Usually, each group or mesh part is put into its own meshbuffer. You can move them around via the mesh manipulator interface, or simply manually. The only problem with meshbuffers is that they don't have names attached, so it's hard to tell if you got the correct buffer.
WickedImp
Posts: 8
Joined: Tue Mar 16, 2004 10:49 am
Location: C=DE/ST=NRW/L=Blankenrode

Post by WickedImp »

thx for the answers. will try the X format. is there any good exporter for 3d studio max?

as for the wheels, they are subnodes to my vehicle node just like the chassis. and now that I can use my meshes like I want I can start integrate ODE :D

good night, community
Escen
Competition winner
Posts: 167
Joined: Sun Jul 19, 2009 11:27 am
Location: the Netherlands
Contact:

Post by Escen »

is there any good exporter for 3d studio max?
Try Plugin Panda Directx Exporter:

http://www.andytather.co.uk/Panda/direc ... loads.aspx

IMHO one of the best.
LanceJZ
Posts: 23
Joined: Mon Feb 13, 2012 12:46 am
Location: Seattle
Contact:

Re:

Post by LanceJZ »

Escen wrote:
is there any good exporter for 3d studio max?
Try Plugin Panda Directx Exporter:

http://www.andytather.co.uk/Panda/direc ... loads.aspx

IMHO one of the best.
I'm trying to use Panda DirectX Exporter, and I can't seem to figure out why when I import it into Irrlicht, I get a 0 poly count.
if (Try()) Do(); else DoNot();
Post Reply