GLBasic forum

Main forum => Bug Reports => Topic started by: BdR on 2013-Feb-09

Title: Convert3D doesn't handle colors of .obj files as expected.
Post by: BdR on 2013-Feb-09
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.

(http://i49.tinypic.com/2sbphmv.png)

[attachment deleted by admin]
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: matchy on 2013-Feb-10
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.

Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: mentalthink on 2013-Feb-10
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...
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: MrTAToad on 2013-Feb-11
The converter program wont unfortunately convert textures and what.  3D objects will take the colour/material of the last set colour/material.
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: BdR on 2013-Mar-05
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. ;)
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: matchy on 2013-Mar-06
What about the X_SETSHADER command?
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: mentalthink on 2013-Mar-06
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...
Title: Convert3D doesn't handle colors of .obj files as expected.
Post by: Kitty Hello on 2013-Mar-06
Don't usecolors on gles. Use a texture instead.
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: BdR on 2013-Mar-17
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.. (http://www.glbasic.com/forum/index.php?topic=8984.msg76690#msg76690)
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: BdR on 2013-Mar-17
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?
Title: Re: Convert3D doesn't handle colors of .obj files as expected.
Post by: kanonet on 2013-Mar-17
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.