how to apply solid color on primitives

Started by sokobozz, June 28, 2009, 10:38:51 AM

Previous topic - Next topic

sokobozz

Hi!

Well I am new in java 3d. I look jpct demos and they look fantastic. I want to quick play with jpct but I have problem with applying simple solid color on primitives. I want to avoid creating textures in Gimp or Blender. Is this possible with jpct?


sokobozz

Well I already tried this, but no success on this. I get only black box(without my texture)!

so the part of code  is here:


      Texture red = new Texture(8,8, Color.RED);
      TextureManager.getInstance().addTexture("red", red);
      box = Primitives.getBox(10f, 1f);
      box.setTexture("red");
      box.setEnvmapped(Object3D.ENVMAP_ENABLED);
      box.build();


EgonOlsen

Try in increase the value for ambient light in world. Maybe your scene is just too dark.

sokobozz

I added more light and it's ok now.
Thanks.