BASIC

Author Topic: Convert3D doesn't handle colors of .obj files as expected.  (Read 3597 times)

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
I'm trying to get an animated 3D model into GLBasic, but the problem is that the Convert3D tool seems to remove all colors. In GLBasic when I load my objects with X_LOADOBJ, they are just plain white.

I wanted to make a simple animated object with 2 keyframes. So I've made 2 keyframe models and I export them to .obj and then use Convert3D from the GLBasic\tools\ folder to put them together as one .ddd file with animation frames.

It looks like the .obj files use a separate .mtl file that describes the materials. The content of the .obj file uses a mtllib and usemtl keywords, I assume material library and material usage, so for example the .obj content is like this:

Code: GLBasic [Select]
mtllib blue_cube.mtl
g g0
v -5 -5 -5
etc..
usemtl acmat_0
..

Maybe this is a new feature of this file format and Convert3D doesn't support it yet?

I've attached an example project, also see screenshots below.



[attachment deleted by admin]

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Without going into detailed reason for your actually objective, the only time I have been able to export the material colors what via 3ds and not obj with any program export.


Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Hi BdR, really I don't think it's a great trouble this... basically when you do something more worked in 3D, you work whit textures...

When I use 3ds Max and export, I have to use standard materials, and all the nice Shaders are Kaput... Reallythis doesn't matter too much... and if you want only basic colors, rebember my library or Kano Library... In mine you can change the colors...

The really important it's see the objects whit Specular Light and good looking.

PS: But yes I think we have a bit more support in 3d, I think too much people want do 3D, but if the render quality by default it's a bit poor...

MrTAToad

  • Guest
The converter program wont unfortunately convert textures and what.  3D objects will take the colour/material of the last set colour/material.

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
The converter program wont unfortunately convert textures and what.  3D objects will take the colour/material of the last set colour/material.

Yes I know, that's the bug I encountered and that's why I reported it here. ;)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
What about the X_SETSHADER command?

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
x_setshader it's a problem in mobile devices... at least I try a couple of times and don't works, I suppose it's beacuse open GlES 1.0 or 1.1 don't accepts shaders...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10715
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Don't usecolors on gles. Use a texture instead.

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Don't usecolors on gles. Use a texture instead.
You keep saying this, but what is the reason? Could you please clarify or reply in this thread? -> Colored 3D models are faster on mobiles. My findings..

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
And btw, if you forget mobile for a moment.

My real question in this thread is; How can I create a simple animated .ddd object with just colors for pc or mac? This is not possible with the Convert3D tool, but are there other tools to do this?

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
There are not many .ddd tools that can convert, honestly the GLB one is the only one that I know. You could try one of the ddd exporters for other 3D software, but i think they may be old and dont work with the latest version of the programs.
Only other ways that I can think of is to try to export to an other format from your software and import with that in the converter. I toticed that different file formats get different ddd objects, maybe you are lucky and find one that works with colours. Or you need to write you own tool/file format that does the job, or hard code and create your model at program start in GLB.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64