Improved Material Editor

Hey monkeys!



I improved the material editor for jMP, AdditionalRenderStates are now supported as well as flipping and repeating of textures, visually its improved as well, giving a better overview:







Should be in the update center in some hours, and of course in alpha-4 in a few days :slight_smile:



Cheers,

Normen

1 Like

Good stuff!

WOW!! Cool! But now I’ve got problems with custom MatDef.



http://hub.jmonkeyengine.org/groups/graphics/forum/topic/custom-matdef-parameters-do-not-work/

It’s really a brilliant and nifty improvement for Material Editor, Normen!

in Lighting material: now Shininess looks like integer(1,2,3…10…). As i know it should use float (0,1 for instance).

mifth said:
in Lighting material: now Shininess looks like integer(1,2,3...10...). As i know it should use float (0,1 for instance).

ah? whats that for?





Uploaded with ImageShack.us



I mean to use Float for such variables. For instance, 0.5 is a shader without any specular. In the editor we cannot set 0.5.













Uploaded with ImageShack.us

Also, I cannot understand how to load Cubemaps. I suppose they should be loaded as images (like a diffuse map, for example).

Cube maps are special dds images, that contain all 6 sides. There are photoshop gimp ect plugins for.

I know what cubemaps are. :slight_smile: I cant understand how to load them in the editor… Just write a path? For example, Textures/map.dds? It would be cool to assign as an image just like DiffuseMap.

mifth said:
I mean to use Float for such variables. For instance, 0.5 is a shader without any specular. In the editor we cannot set 0.5.

Yes you can set floats like 0.5 by simply entering them with the keyboard. I cant premeditate what value increments would be good there, I could lower it to 0.1 but that would maybe be too few for other stuff.. The fact that you cant select a dds texture is because of the new texture selection panel.. maybe we have to improve that.. you can always directly edit the texture source.

ah, now i get you. I figured out how to change source. Thanks!

mifth said:
ah, now i get you. I figured out how to change source. Thanks!

Np, note that the source is saved and the material reloaded with each little change in the source, you might want to disable "save immediately" when you are not just copy&pasting but extensively editing the source.

Hmm.

With the new material editor, it seems all of my textures are up side down (when browsing images after having clicked “set…”), and using flip doesn’t actually seem to do anything.

This isn’t apparent when using objects that have the materials from before the switch, since they keep an instance of the material(?).

The material editor only edits the j3m files and the format didn’t change, so I doubt this is due to the material editor?

Double clicking a png in jmp “Projects” view, displays it correctly.

Browsing textures in the material editor shows them up-side down. They’re also up-side down in the sceneviewer and in game.



I know i’ve encountered textures being displayed up-side down before, but then they were ok as long as they were applied through the material editor.

Hm… “DiffuseMap : Flip Repeat Texture/Name.jpg” should be the right format… Maybe the flip function is broken? Can you flip the texture via code?

I’m not sure how to do it programmatically.



This is getting even weirder…

In another of my project, the models look ok (even though textures are still flipped when browsing them in the material editor. It seems as long as i don’t change anything, they’re fine).

So i compared a “correct” material with a flipped one, and they are identical.

I copied a “correct” material to the project where they they’re flipped, and the textures got flipped.

I copied a “correct” model to the new project, and the textures got flipped.

So perhaps the problem is somehow in the Texture, rather than the Material.

Yeah, in the engine :slight_smile: I think there were some modifications to flipping by default etc…