External .igm file and UID

General questions about Indigo, the scene format, rendering etc...
Post Reply
3 posts • Page 1 of 1
User avatar
Jay-ko
Posts: 138
Joined: Mon Nov 12, 2012 7:28 pm
Location: Paris

External .igm file and UID

Post by Jay-ko » Wed Dec 17, 2014 4:58 am

Hi guys,

So as you know, I am a 3ds max user.
And as you know I use more Notepad++ to tweak my scenes than indigo or 3ds max I guess :D

I have an issue about the external igm files.

The goal is to use .igm files to be able to use the "others" materials definition than the one writed for indigo for 3ds max.

Like, for example, ISL based materials, specular materials ect...

If you use the specular for exemple, the Material database used available onto that website give you some material, with medium call by a "internal_medium_name" parameter.

But from a while now, Indigo renderer use the "uid".

so if I want to use an external ref for an .igm, as Indigo Renderer re-asign a new UID, despite of the internal medium name, it could create some mistake with the exporter:
  • - the generated igs files does not contain the medium
    - the generated igs file create a medium with the wrong uid
    - the generated igs fils want the use a medium uid, but in fact it a mesh or anything except a medium
    - the igs generated file use a defauls ugly red/violet material. (You are lucky in that case, because you juste have to copy paste the medium at that default material)
Ono-Sendai said that it could be some solutions for that;
Please, be my guest! :)
errare humanum est

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: External .igm file and UID

Post by OnoSendai » Thu Dec 18, 2014 10:56 am

Hi Jay-ko,
I'm not sure *exactly* what you're trying to do, but in general it should still be possible.

If you have a model2 element:

Code: Select all

<model2>
    <uid>28</uid>
    
    <pos>0 0 0.6</pos>
    <scale>1.5</scale>

    <geometry_uid>27</geometry_uid>

    <materials>
      <material_uid>4</material_uid><!-- this is the UID from the included file -->
    </materials>
  </model2>
You can include another file:

Code: Select all

 <include>
    <pathname>included_scenes/include_uid_target_3.igs</pathname>
    <offset_uids>false</offset_uids>
  </include>
Note the 'offset_uids' getting set to false so as to not to change the UIDs.

and then in include_uid_target_3.igs:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<scenedata>
  <material>
    <name>included mat</name>
    <uid>4</uid>

    <diffuse>
      <colour>0.0 0.0 0.7</colour>
    </diffuse>

  </material>

</scenedata>

User avatar
Jay-ko
Posts: 138
Joined: Mon Nov 12, 2012 7:28 pm
Location: Paris

Re: External .igm file and UID

Post by Jay-ko » Sat Dec 20, 2014 2:03 am

The goal is to use .igm files as external files.
the first issue is targeted around the specular material .

If I understand well I have to use:

Code: Select all

 <include>
    <pathname>my_material_with_medium.igm</pathname>
    <offset_uids>false</offset_uids>
  </include>
So I have to open and copy/paste "offset_uid" into the generated igs myself.

Is that possible to include something into the igm itself, instead of the generated result?
The reason is to keep the workflow into my 3d modeling software?
Attachments
PrtScr capture_3.jpg
errare humanum est

Post Reply
3 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 36 guests