Scene File Documentation-beginner queries

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

Re: Scene File Documentation-beginner queries

Postby jeanphi » Tue Oct 04, 2011 8:47 am

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
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Scene File Documentation-beginner queries

Postby Sheltem » Tue Oct 04, 2011 4:30 pm

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

Postby jeanphi » Wed Oct 05, 2011 1:06 am

Hi,

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

Jeanphi
jeanphi
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Scene File Documentation-beginner queries

Postby Sheltem » Mon Oct 24, 2011 6:12 am

Hi,

I think I solved my transform problem :D
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 model
ObjectBegin 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 file
ObjectEnd Linked file X
#multiple transforms for each instance of the linked file
AttributeBegin
   TransformBegin
      Transform [bla bla...]
      ObjectInstance "bla bla.."
   TransformEnd
AttributeEnd


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

Postby jeanphi » Mon Oct 24, 2011 8:19 am

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
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Scene File Documentation-beginner queries

Postby Sheltem » Tue Oct 25, 2011 3:19 pm

Hi,
Thanks for clarifying!

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

Re: Scene File Documentation-beginner queries

Postby Sheltem » Thu Oct 27, 2011 3:57 pm

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

Thanks for your patience!

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

Re: Scene File Documentation-beginner queries

Postby jeanphi » Thu Oct 27, 2011 5:51 pm

Hi,

Yes, you can issue multiple Transform statements.

Jeanphi
jeanphi
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Scene File Documentation-beginner queries

Postby Sheltem » Mon Oct 31, 2011 5:45 am

Hi,

Making slow progress... Matrix math almost did my head in :oops:
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)

Link_cropped.png
Linked file test


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

Postby Abel » Mon Oct 31, 2011 6:04 am

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! :)
User avatar
Abel
Developer
 
Posts: 1414
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest