Problem with solid color in google sketchup

Hello every one, i have seen other post withe the same question, but none of them were answered. Well my problem is that i made a 3d object with google sketchup, and the part that i painted with a color (no a texture), once it has been loaded are shown white. Are there any solution? Thank you.

In jme2, when your models are all solid white you probably have no light in your scene.

Have you registered the GoogleEarthPlugin with the Collada importer?  Sketchup uses double sided materials, which is supported through the use of that plugin.

sbook said:

Have you registered the GoogleEarthPlugin with the Collada importer?  Sketchup uses double sided materials, which is supported through the use of that plugin.


I have just made with this line:
ExtraPluginManager.registerExtraPlugin("GOOGLEEARTH", new GoogleEarthPlugin());
I put it before the call to colladaimporter.load(s,s); but it does not do anything. Things with solid color, remains white.
sbook said:

Ah ok, I see what you're saying..  If they were four separate pieces in sketchup, then you should be able to find them in jME and apply material states to them of the appropriate colors... It looks like there isn't *any* material applied to that part of the mesh


I tried to create a materialstate and attach to the object and rootnode, but nothing changes.
normen said:

In jme2, when your models are all solid white you probably have no light in your scene.


I added light to the scene but it did not resolved anything.

Dude, I think it's time you provide some code (and best your model as well) otherwise this will last until next year…

ttrocha said:

Dude, I think it's time you provide some code otherwise this will last until next year...

This is my contructor:


public GameState(){
      super("GameState");
      rootNode.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
      MouseInput.get().setCursorVisible(true);
      ExtraPluginManager.registerExtraPlugin("GOOGLEEARTH", new GoogleEarthPlugin());


      compasBox = import3dBox();      
      roomCompas = import3dRoom();
      PointLight l=new PointLight();
      l.setEnabled(true);
      l.setLocation(new Vector3f(0,40,-30));
      l.setDiffuse(ColorRGBA.white);
      LightState ls=DisplaySystem.getDisplaySystem().getRenderer().createLightState();
      ls.attach(l);
      ls.setEnabled(true);

      AxisRods ar = new AxisRods("rods", true, 1f);
      

      compasBox.setLocalTranslation(new Vector3f(0.0f, 0.0f, 0.0f));
      roomCompas.setLocalTranslation(new Vector3f(30.0f, 0.0f, -20.0f));
      setupInputs();
      setCamera();
      rootNode.attachChild(ar);
      compasBox.setRenderState(ls);
      rootNode.attachChild(roomCompas);
      rootNode.attachChild(compasBox);
      rootNode.updateRenderState();
      
   }



And the import3dbox functions is this:


public Node import3dBox(){      
      try {
            ResourceLocatorTool.addResourceLocator(
                  ResourceLocatorTool.TYPE_TEXTURE,
                    new SimpleResourceLocator(GameState.class
                            .getClassLoader().getResource(
                                    "res/")));
        } catch (URISyntaxException e1) {
            e1.printStackTrace();
        }
        InputStream source;
      source  = GameState.class.getClassLoader().getResourceAsStream("res/cajon.dae");
      if (source == null){
         System.out.println("Collada data file not found");
            System.exit(0);
      }

      ColladaImporter.load(source, "compasBox");
      Node n = ColladaImporter.getModel();
      if(n==null){
         System.out.println("Collada node couldn't be loaded");
         System.exit(0);
      }
      n.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.PI/2, new Vector3f(1,0,0)));
      n.lookAt(new Vector3f(0,1,0), new Vector3f(0,0,1));
      return n;

   }

Can you send 'cajon.dae' as well?

ttrocha said:

Can you send 'cajon.dae' as well?


I attach cajon.dae and the texture.

When I understood antu right, the problem was not about the texture but about the round stuff on the other side that appears grey (did that work as well?)


P.S:  I hope you aren't taking the World Cup results too hard, Tom!


Hehe,...nono! After some time past I think it was a great WC. I could support my team until the end of the tournament. Noone could have expected that this young team would play that well and would come so far. Now I can concentrate on my computer-stuff again...

Seeing the box  by his front face this is what it viewed:





Things that are white, must be 4 buttons, red, blue, yellow and green.

Ah ok, I see what you're saying…  If they were four separate pieces in sketchup, then you should be able to find them in jME and apply material states to them of the appropriate colors… It looks like there isn't any material applied to that part of the mesh

I created the same object with google sketchup, but this time i saved it with .obj and .3ds extensions, but when i load the model, despite it shows the colors, several things does not view well. May be the program (sketchup) is not totally compatible with jme?

antu said:

I created the same object with google sketchup, but this time i saved it with .obj and .3ds extensions, but when i load the model, despite it shows the colors, several things does not view well. May be the program (sketchup) is not totally compatible with jme?


Sketchup does have a kind of strange way of dealing with materials as they're double-sided...  I know the COLLADA loader accounts for that though...

If you post the .skp I can try putting it out with Maya while I'm at work tomorrow.

Here you go, the skp file.


This is how i see the object. I have to mention that colors are not like i paint in google sketchup (they really should be darker), and the letters are Compas, and i do not know why appears that lines.

Sorry its taken me so long to get back to you, I have been swamped this week…



I did a conversion to OBJ from within Maya, and came up with the two images you see here.  The one correctly shown is the object in Maya when using the OpenCOLLADA importer.



The other image shown is the model exported using Maya's built-in OBJ exporter and brought into the app I'm working on.  The gold faces showed up as white (I had to select them, which changes the color, in order to move the object into the right orientation to get a screenshot)…



I've attached the OBJ and .mtl files for you to have a look at.  It might be interesting to note, however, that the two bottom circles are now textured.

sbook said:

Sorry its taken me so long to get back to you, I have been swamped this week..

I did a conversion to OBJ from within Maya, and came up with the two images you see here.  The one correctly shown is the object in Maya when using the OpenCOLLADA importer.

The other image shown is the model exported using Maya's built-in OBJ exporter and brought into the app I'm working on.  The gold faces showed up as white (I had to select them, which changes the color, in order to move the object into the right orientation to get a screenshot)..

I've attached the OBJ and .mtl files for you to have a look at.  It might be interesting to note, however, that the two bottom circles are now textured.


So what do recommend to me, import that object, and all i have to do in the future, do it with sketchup and export to obj using maya, or what?. Thank for your help.

If you're comfortable with Maya, then its easy enough to just make a colored lambert for each of those round things…  I know that colored materials from Maya work with both OBJ and Collada (use the FCollada/ColladaMaya exporter on sourceforge… OpenCOLLADA isn't quite compatible with our .dae importer)