Update on importing '.g' files with colors.
First of all, I made little improvement in converting to obj. Instad of
passing all parts to g-obj it now passes only top-level objects (tops).
Then I started wokring on importing color from .g to .mtl file (Materials
file for .obj). Picking colors from .asc file was bad idea because handling
color inheritance was difficult. Instead I used mged's tree command with -a
argument which provides detailed tree of an object. Then converted it into
JSON tree (which is also can be used to do make a tree menu in OGV like in
Archer) and generated .mtl file from it. Also inserted ident-based colors
from "prcolor" command. Next steps are combining it with shaders (which
should be fairly easy with JSON tree) and making edit menu where user can
edit each part separately (while having single .obj file).

You can compare results here
<https://blog.esde.name/importing-colors-from-g-file/>
JSON tree of axis.g
<https://gist.github.com/sniok/2770285f7c4f8dc1fcf108509fcec7d0>
Github branch <https://github.com/sniok/OGV-meteor/tree/eslint>

Did I miss something? Are there any other color/material settings?

On Sun, Oct 9, 2016 at 1:00 PM Gauravjeet Singh <gaurav.ishwer...@gmail.com>
wrote:

> On Sun, Oct 9, 2016 at 4:23 PM, Oleksandr Dubenko <odybe...@gmail.com>
> wrote:
> > That is the same error you mentioned before, isn't it?
> >
> https://www.mail-archive.com/brlcad-devel@lists.sourceforge.net/msg05983.html
>
> Yeah, Earlier on facing this error, I made an assumption that my
> merging approach is wrong, so I started finding other ways to merge
> them.
>
> > Sure. Before it converted every part of the object like this:
> > g-obj -o out1.obj in.g PART-1
> > g-obj -o out2.obj in.g PART-2
> > ...
> > g-obj -o outN.obj in.g PART-N
> >
> > Which resulted in N obj files. But g-obj can convert multiple parts at
> once
> > like this:
> > g-obj -o out.obj in.g PART-1 PART-2 ... PART-N
> > So g-obj is responsible for merging.
> >
> > The dangling faces error was present before changing the convertion
> logic.
>
> @Sean or any g-obj developers
>
> Any comment here ?
>
>
> --
> Fear is wisdom in the face of danger. It’s nothing to be ashamed of
>
> Gauravjeet Singh
> http://github.com/gauravjeetsingh
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to