Hi all,
I have the problem when I load object from DAE file
Follow is the object model that we see from 3D Studio Max
But after I load in to my game. It looks like
The model in 3D Max Studio has reflection light (shade) on the object and looks more real but the model in my game doesn’t have shade. So, the model cannot give to us feeling of its material. I don’t know how to load this Material effect
Try to set the shininess of the material to max: MaterialState.setShinines(128) after you imported the model into jme.
If that dosen't make it look better, i think you have to use a shader to get really nice specular colors.
Hi Core-Dump, I'm working with moonjava. And we have the following snippet:
MaterialState materialState = (MaterialState) model.getRenderState(RenderState.RS_MATERIAL);
if (materialState != null) {
System.out.println("is not null");
materialState.setShininess(128);
model.updateRenderState();
}
The return of materialState attribute is null. So, Is this model without material? If not, how to solve our problem by your way?
P/S: renderStateList attribute is null. Moreover, I tried to use the following solution:
MaterialState materialState = DisplaySystem.getDisplay().getRenderer().createMaterialState();
if (materialState != null) {
System.out.println("is not null");
materialState.setEnabled(true);
materialState.setEmissive(new ColorRGBA(0, 0, 0, 1));
materialState.setShininess(128);
model.setRenderState(materialState);
model.updateRenderState();
}
However, There's nothing changes.
i would have thought that creating a new Materialstate should work.
Set the specular color to white tho.
The specular color of the material and light must be set to high value e.g 1, 1, 1.
Try
materialState.setSpecular(new ColorRGBA(1, 1, 1, 1));