## Scene File Documentation-beginner queries

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

### Re: Scene File Documentation-beginner queries

Hi,

It's a long time I haven't looked at it, but you might nedd to specify the inverse transform, in this case use 2 instead of -2. Or use a wider angle camera (or even an environment camera) to check what's going on.

Jeanphi
jeanphi

Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

### Re: Scene File Documentation-beginner queries

Hi,
I just re- read the wiki again and I think I might have found the problem: I had the original matrix used by row rather then by column. I will double check tonight.

Sheltem
Sheltem

Posts: 122
Joined: Sun Jun 15, 2008 11:06 am

### Re: Scene File Documentation-beginner queries

Hi,

Yes, I've always found the Transform format to be somewhat weird, but it seems to match RiSpec...

Jeanphi
jeanphi

Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

### Re: Scene File Documentation-beginner queries

Hi,

I think I solved my transform problem
Next thing is support of linked files: If I have the same file multiple times linked into my model ( think of hundreds of semi detached houses) can I use a nested format like this:

Code: Select all
#object containing the entire linked modelObjectBegin Linked file X# an object in the linked file   ObjectBegin object in Linked File x   ObjectEnd object in Linked File x   AttributeBegin      TransformBegin         Transform [bla bla...]         ObjectInstance "bla bla.."      TransformEnd   AttributeEnd#end of linked fileObjectEnd Linked file X#multiple transforms for each instance of the linked fileAttributeBegin   TransformBegin      Transform [bla bla...]      ObjectInstance "bla bla.."   TransformEndAttributeEnd

I get errors ObjectBegin called inside of instance definition and ObjectEnd called outside of instance definition which seem to indicate that I cant nest objects? Or is there a syntax error somewhere?

Cheers!

Sheltem
Sheltem

Posts: 122
Joined: Sun Jun 15, 2008 11:06 am

### Re: Scene File Documentation-beginner queries

Hi,

You can't nest ObjectBegin ObjectEnd blocks, those define instantiable objects but don't include the object in the scene, you need to use an ObjectInstance statement for that.
If you don't need instancing, you can create your objects directly in the scene with an AttributeBegin/AttributeEnd block, those can be nested.

Jeanphi
jeanphi

Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

### Re: Scene File Documentation-beginner queries

Hi,
Thanks for clarifying!

S
Sheltem

Posts: 122
Joined: Sun Jun 15, 2008 11:06 am

### Re: Scene File Documentation-beginner queries

Hi,
I am having some difficulties:
When working with linked files i need to transform instanced objects twice:
From the locale coordinate system of the object to the world coordinate system of the model
If that linked model got moved in the host file I then need to transform again

If I understand things right in theory all I have to do is to multiply the two 4 x 4 matrices representing each transformation...?
In praxis I end up with problems objects are located all over the shop.

To double check what is going on can I issue multiple transforms like this

Attributebegin
Transformbegin
Transform[....]
Transform[....]
objectinstance....
transformend
Attributeend

S
Sheltem

Posts: 122
Joined: Sun Jun 15, 2008 11:06 am

### Re: Scene File Documentation-beginner queries

Hi,

Yes, you can issue multiple Transform statements.

Jeanphi
jeanphi

Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

### Re: Scene File Documentation-beginner queries

Hi,

Making slow progress... Matrix math almost did my head in
Instancing now works pretty well and the exporter now includes linked files as well...Although it looks like a few items have dropped off in the sample pic below.
(Foreground: host model, 3 other houses is one linked file copied and rotated around a bit)

I will see whether I can fix the last issues with the linked files and will then hopefully move onto implementing a very basic GUI

S
Sheltem

Posts: 122
Joined: Sun Jun 15, 2008 11:06 am

### Re: Scene File Documentation-beginner queries

Sheltem wrote:I will see whether I can fix the last issues with the linked files and will then hopefully move onto implementing a very basic GUI

At the risk of repeating myself, it's great to see your progress and perseverance!

Abel

Posts: 1433
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

PreviousNext