XML and Instancing

General questions about Indigo, the scene format, rendering etc...
User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Mon Feb 19, 2007 5:33 am

j_07 wrote:And I guess Ono has serious reasons for implementing the instancing function as given - but this belongs to indigos internal code structure which I don't have any idea of.
I don't get it what's wrong with instancing as it is now :roll:
It's extremely logical :lol:

Suvakas

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Tue Feb 20, 2007 7:47 am

Back to the topic, what is the actual basic code for instancing please ? Could someone post that ?

Thanks

j_07
Posts: 23
Joined: Thu Feb 15, 2007 1:45 am

Post by j_07 » Tue Feb 20, 2007 8:19 am

You can an instance of an object by using the <model> element.

<model>
<rotation>
<matrix>
1 0 0 0 0 -1 0 1 0
</matrix>
</rotation>
<pos>0 0 0</pos>
<scale>1</scale>

<mesh_name>hand</mesh_name>
</model>

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Tue Feb 20, 2007 8:53 am

Thank you j_07, thats logical after all...

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Tue Feb 20, 2007 10:38 am

...and which is the same usual way we place every model into the scene :lol:
Instancing just means, that you don't have to define the geometry each time you use the same model in the scene. No special syntax for it or anything. :lol: :lol:

Suvakas

j_07
Posts: 23
Joined: Thu Feb 15, 2007 1:45 am

Post by j_07 » Tue Feb 20, 2007 12:32 pm

:D

I never said that the current implementation of instancing is not logical.
And you wouldn't need a "special syntax". It would be the same syntax as for the already implemented rotation matrix, except it would have four more numbers. That's all...


Let me give you an example:

<rotation>
<matrix>
1 0 0 0 0 -1 0 1 0
</matrix>
</rotation>
<pos>1 2 3</pos>
<scale>4</scale>


You could describe the above transformation as
<matrix>
4 0 0 0 0 4 0 0 0 0 4 0 1 2 3 1
</matrix>

This includes individual scaling for x, y and z!

See what I meant?


Basically instancing data is meta-information generated by your exporter and is not meant to be hacked in by hand. It wouldn't make sense for more then ten instances, really.

Still this is just a proposal. Something I'd love to have as a feature.
I wouldn't mind to keep the current structure as an alternative anyways.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Wed Feb 21, 2007 2:17 am

I don't really get, what you mean, but:
Why can't be there available both?
Then, Indigo gets more flexible...
Also, those complicated tags, mentioned in an other thread, would be nice to have them in different versions:
<caughy_b_coeff>
<Caughy B Coefficient>
<cbc>
i.E. ...

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Wed Feb 21, 2007 4:00 am

Kram1032 wrote: Also, those complicated tags, mentioned in an other thread, would be nice to have them in different versions:
<caughy_b_coeff>
<Caughy B Coefficient>
<cbc>
i.E. ...
Why? To mess up the xml and make it more hard to read and follow? :lol:

Suvakas

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Wed Feb 21, 2007 4:05 am

I mean, all the three tags for the same funtion...

<Caughy B Coefficient> <- "beautiful" (correct)
<caughy_b_coeff> <- standard
<cbc> <- fast and easy

Post Reply
24 posts

Who is online

Users browsing this forum: No registered users and 30 guests