How to creat country 2d flags inside my game(not by blender,photoshop)?

hi everyone!
I am working on a ancient Chinese game project.
In my game, there are many countries.
So I want to make flags for them, and I must create it inside the game(the reason is that in my game, it may appear some new countries so I cannot make them beside the game)
The flags I have designed is very simple, just a color flag + a Chinese character.
Since I am not sophisticated in modeling or rendering, so I need a direction(if there has any similar example is good)
Thanks for any help

Take a look at the ImagePainter plugin, that might help you :slight_smile:

<cite>@zarch said:</cite> Take a look at the ImagePainter plugin, that might help you :)

Thank you very much!
ImagePainter is all I want to have because I saw your example that drawing English character on a cube.
However, when I run a sample code, it appears an error.
here is my code and error information(NoSuchMethodError: com.jme3.texture.image.ImageRaster.getWidth()), can you tell me what’s wrong?
[java]
package mygame;

import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.texture.Image;
import com.jme3.texture.Texture2D;
import com.zero_separation.plugins.imagepainter.ImagePainter;

public class Main extends SimpleApplication {

public static void main(String[] args) {
    Main app = new Main();
    app.start();
}

@Override
public void simpleInitApp() {
    Box b = new Box(Vector3f.ZERO, 1, 1, 1);
    Geometry geom = new Geometry("Box", b);
    ImagePainter ip = new ImagePainter(Image.Format.RGBA8, 50,50);
    ip.paintRect(10, 10, 50, 50, ColorRGBA.Blue, ImagePainter.BlendMode.SET);
    Texture2D texture = new Texture2D(ip.getImage());
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setColor("Color", ColorRGBA.Blue);
    mat.setTexture("ColorMap", texture);
    geom.setMaterial(mat);


    rootNode.attachChild(geom);
}

}[/java]

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NoSuchMethodError: com.jme3.texture.image.ImageRaster.getWidth()I
at com.zero_separation.plugins.imagepainter.ImagePainter.paintRect(ImagePainter.java:360)
at mygame.Main.simpleInitApp(Main.java:26)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:724)

What version of JME are you running?

<cite>@pspeed said:</cite> What version of JME are you running?

Product Version: jMonkeyEngine SDK 3.0RC2
Java: 1.7.0_25; Java HotSpot™ 64-Bit Server VM 23.25-b01
System: Windows 8 version 6.2 running on amd64; MS950; en_US (jmonkeyplatform)

Hmm, that method was added into core for ImagePainter to use. I’m surprised it still isn’t in stable.

Make sure you are running the latest stable version. If that still doesn’t work you might have to switch to nightlies.

<cite>@zarch said:</cite> Hmm, that method was added into core for ImagePainter to use. I'm surprised it still isn't in stable.

Make sure you are running the latest stable version. If that still doesn’t work you might have to switch to nightlies.

Thank you very much!
What does it mean for nightlies?
Does that mean I need to copy the source code of the plugin to my own project just like what I did for particle emitter last time?
But where is the source code of this plugin?

see https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:update_center

I got the source code from code.google.com
But when I try to use it, it appears a lot of error for getWitdth() and getHeigjt()

just like the picture which is attached.

<cite>@TsrKanal said:</cite> see https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:update_center
Thank you very much I am looking on it now

update:nightly works, no question now