How to create a 3d mesh only with emissive color?

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
KevinLuo
Posts: 23
Joined: Sat Apr 15, 2017 6:08 am

How to create a 3d mesh only with emissive color?

Post by KevinLuo »

Hello!
I want to load a 3d model from a .ply file. First of all, how to load the model's material
in the irrlicht environment? The model doesn't look like the look designed in 3dmax.
Besides, how to disable the lighting of this IMeshSceneNode while it still has the user
designed color, not just a full white model. I'd like that the model's color is changed
by my code and won't be changed by the light.

Thank you!
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to create a 3d mesh only with emissive color?

Post by CuteAlien »

Import of material settings depends on the mesh-format - different formats handle that differently (also depends on exporter and importer additionally). I never worked with the .ply format, but from what I can see on a quick look at the loader-code it seems to only load geometry. No material support at all.
So for materials you need another format like .obj for example.

If you don't want your models affected by light at all you can disable lighting in the material of the mesh or the node (nodes usually have their own material copy). For the effects which you get with different light/material setting best play around with the materialviewer example (sorry if it's not the most user-intuitive, if you have any questions about it ask me).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
kornwaretm
Competition winner
Posts: 189
Joined: Tue Oct 16, 2007 3:53 am
Location: Indonesia
Contact:

Re: How to create a 3d mesh only with emissive color?

Post by kornwaretm »

if i may add. i suggest to bake materials to texture, i'm pretty sure 3dsmax has this feature (not a 3dsmax user). there might be some material property from 3dsmax which are not supported by the mesh file format or not yet implemented (especially procedural ones). by doing this, it is much easier to "preserve" the look, the behavior towards light might be different, but you can get a good starting point before customizing irrlicht's material settings.
Post Reply