TransformBegin/TransformEnd

General discussion regarding exporter development in general.

Moderators: Ratow, coordinators

TransformBegin/TransformEnd

Postby pciccone » Wed Mar 24, 2010 10:37 am

Hi.
I'm working on the documentation for Lux's file format and I noticed that LuxBlend outputs non-sun lights inside the geometry file and by including them between a pair of

TranformBegin
TransformEnd

Commands. I have two questions: what is the stated purpose of the TransformBegin/End command and why the lights are exported in the geometry file instead of using the scene file?

TIA

--
Paolo
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: TransformBegin/TransformEnd

Postby tomb » Wed Mar 24, 2010 11:31 am

Because they usually are mesh emitters, hence geometry? Or perhaps I misunderstand you.
User avatar
tomb
Developer
 
Posts: 1919
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: TransformBegin/TransformEnd

Postby pciccone » Wed Mar 24, 2010 11:39 am

That makes sense except when using spots, I see that the same logic is used for spots. Any information about the TransformBegin/End commands?
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: TransformBegin/TransformEnd

Postby jeanphi » Wed Mar 24, 2010 12:04 pm

Hi,

TransformBegin/TransformEnd creates a new subcontext so the Light property doesn't apply to subsequent objects and the base transform is restored.

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

Re: TransformBegin/TransformEnd

Postby pciccone » Wed Mar 24, 2010 12:10 pm

Thank you Jeanphi. So, let me try to translate it to "human" for us poor souls who don't eat 3D transform for breakfast :)
If I were to add the "Transform []" command to the file, without enclosing it in the TransformBegin/End pair it would affect the position/rotation of all subsequent objects declared from that point on. Is that correct?
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: TransformBegin/TransformEnd

Postby Lord Crc » Wed Mar 24, 2010 1:48 pm

Lux has a "current" transformation, which is the top item of the transformation stack. All objects have this transformation applied, and the Rotate/Translate etc commands modify this "current" transform. The TransformBegin duplicates the current transform and pushes it back onto the stack. The TransformEnd pops the stack, so that the second item in the stack becomes the new "current" (and the top item is thrown away).
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4455
Joined: Sat Nov 17, 2007 2:10 pm

Re: TransformBegin/TransformEnd

Postby pciccone » Wed Mar 24, 2010 2:10 pm

Thank you again. Can you give me some details on the "CoordSysTransform" command that I see in the example code posted at the beginning of the file format docs?
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: TransformBegin/TransformEnd

Postby jeanphi » Thu Mar 25, 2010 3:14 am

Hi,

CoordSysTransform allows you to recall a named transform. You should try to get familiar with the Renderman interface as LuxRender file format is very close: https://renderman.pixar.com/products/ri ... pec3_2.pdf
LuxRender isn't renderman compliant but getting familiar with renderman will help you understand the main concepts.

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

Re: TransformBegin/TransformEnd

Postby pciccone » Thu Mar 25, 2010 8:53 am

Hi Jeanphi.
I am familiar with Renderman, a little bit, but I disagree with your suggestion here. Any piece of software that stands on its own, like LuxRender, should be approachable by the average user without the need to learn another program. There are exceptions but, for example, you don't need to learn Maya in order to learn Blender. The concepts necessary for 3D modeling are common but it is necessary to have comprehensive documentation that the user can approach without making her go back and forth between LuxRender and other packages.
Brilliant developers like you went through a learning process that includes many, many different softwares and concepts, and it's natural that you desire that everyone would learn the same, but, to make LuxRender popular, we need documentation that is complete, even to the point of re-introducing concepts that are not unique to LuxRender. I firmly believe that software is only as good as its own documentation. When I was working on projects like dBase and JBuilder we had a maniacal attention to documentation, including having the developer work side-by-side with the tech writer. You can imagine how much we like that ;) but Borland was famous for the quality of its own docs. And at the time we were actually printing them!

At the end having good documentation is as critical as having a given feature. If you don't document it, and document it well, it's almost like it's not there.
So, please excuse the continuous questions of this writer but I want to make the LuxRender docs a shiny example of how things have to be done and I want to have LuxRender one hell of a popular render and see an exporter for every single 3D modeler available. You guys write the killer features and I will make sure that they are fully understood by everyone.

Best!
User avatar
pciccone
Developer
 
Posts: 686
Joined: Wed Jan 13, 2010 11:02 am
Location: California

Re: TransformBegin/TransformEnd

Postby jeanphi » Thu Mar 25, 2010 11:15 am

Hi,

Sorry if I sounded a bit harsh. I fully agree with you however we don't always have time to work on documentation while preparing new features so I was just trying to give you some hints to help you get familiar with LuxRender faster.
We are preparing for v0.7RC1 release: ie useable features with Blender integration, once it is out we'll be able to dedicate more time to documentation updates. Actually there's a dedicated thread for documenting new features in v0.7 that I tried to keep up to date, but the v0.6 documentation wasn't perfect so there's a gap to fill.

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

Next

Return to General

Who is online

Users browsing this forum: No registered users and 0 guests