David Gary Posted January 20, 2004 Share Posted January 20, 2004 Post from Jason -> recent changes in OdWiki -> Mantra -> IFD IFD! I just discovered there was a scene description language for Mantra just like Renderman RIB. ( maybe i'm gonna understand how instancing works). But i didn't find any info on how to write(program?) in IFD. Just opened a IFD file with my textpad. It's structure is very similar to RIB. Is there any info about the .ifd file structure? or IFD programming? George Stevens wrote Since the ifd language is a sub-set of the hscript scripting language, there are other possibilities that aren't used by Houdini. For example, any commands will expand variables and allow expressions to be evaluated using the back-quote (`) mechanism. As well, it's possible to code for loops, foreach loops, if/endif blocks etc. Quote Link to comment Share on other sites More sharing options...
Jason Posted January 20, 2004 Share Posted January 20, 2004 Hi there, Actually, it's more a command structure than RIB, which really defines a scene and lets PrMan render it once its defined. The IFD is a sequential command structure and so you can do some interesting things, like For loops and such. I'll try to find the document I have on the IFD commandset and post it up somewhere. I think its got some HTML formatting that won't post to od[wiki] so well, but I'll let you know. Quote Link to comment Share on other sites More sharing options...
David Gary Posted January 20, 2004 Author Share Posted January 20, 2004 Actually, it's more a command structure than RIB, which really defines a scene and lets PrMan render it once its defined. -> So is RIB ! ( not .rib but RI Api, which directly sends commands to the renderer, or writes them down into a .rib file) The IFD is a sequential command structure and so you can do some interesting things, like For loops and such. -> Yes, exactly what i was looking for ! I'll try to find the document I have on the IFD commandset and post it up somewhere. I think its got some HTML formatting that won't post to od[wiki] so well, but I'll let you know. -> Many Thanks ! Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 20, 2004 Share Posted January 20, 2004 So, if I'm writing a shader and want to test it without having to start Houdini, how do I do that? Quote Link to comment Share on other sites More sharing options...
Jason Posted January 20, 2004 Share Posted January 20, 2004 Here is some information for you: IFD Format Document @Stremik: If I was you, I'd generate a quick scene to test my shader and write the IFD file out. (Generate Script File). You can then invoke mantra on this file: mantra < myscene.ifd If you are editing VEX .vfl files in an external editor, you can then just recompile it and it should work. All the shaders are referenced externally of the IFD by default. You can compile directly to .OTL files using the vcc commandline options. Hope this helps, Jason (You could make a small tcshell script that invokes mantra on your test IFD if the compile was successful.) Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 20, 2004 Share Posted January 20, 2004 Big Thanks Jason. I've dug up one of your old posts and posted a question there but now you've answered that by pointing me to this great page on od[wiki] so, just ignore it. Thanks again! Vladimir. Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 21, 2004 Share Posted January 21, 2004 All right. I need some help here. I can't figure out how to move around the geometry, camera and light objects. and how to point the last two in different directions. The whole idea of matrices used in ray_transform totally escapes me. For example, what the heck is going on in this line of code? ray_transform 1 0 0 0 Quote Link to comment Share on other sites More sharing options...
David Gary Posted January 21, 2004 Author Share Posted January 21, 2004 Thank you for the posts at OdWiki. Very helpful ! :) So, all the procedural renderings ( Sprite, Instance...) are based on that? Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 21, 2004 Share Posted January 21, 2004 Dang! I feel like I'm talking to myself here. I figured how to move the geometry around. Can someone please help me find out how to rotate the objects? Quote Link to comment Share on other sites More sharing options...
FrankFirsching Posted January 21, 2004 Share Posted January 21, 2004 The idea behind matrices is, that you can express an arbitraty transformation using just these 16 numbers. This is a much better way than to tell the program that you move the object in x-direction 2 units, then rotate along y-axis 45 degrees, translate now in y-direction 1 unit and at last scale in z-direction by 2, etc. You can go on with that sequence as many times you want (and get an unlimited sequence of numbers), but you can always collapse the transformation into these 16 numbers. But they can even more: You are able to express a shear or the perspective distortion, that happens during the projection into a 2D image with the matrix. All these possibilities made matrices a nice entity to express a generic transformation. Points are transormed by multiplying them with a matrix. (Take a look at What is a matrix? by MCronin on od[wiki]). Here comes another trick into play: homogeneous coordinates. Simply spoken the homogeneous representation of a point in 3D-space is |x y z 1|. You just add a one in the 4th dimension. Exactly there can be any number in the 4th coordinate, which is called w. For example the vector |x y z w| has the three-dimensionlal representation |(x/w) (y/w) (z/w)|. You need to do this to be able to express a translation with a vector-matrix-multiplication. You know how to translate a point by the vector |tx ty tz|: ray_transform 1 0 0 0 0 1 0 0 0 0 1 0 tx ty tz 1 In matrix form this is written as: | 1 0 0 0| |x y z 1| * | 0 1 0 0| = | (x+tx) (y+ty) (z+tz) 1| | 0 0 1 0| | tx ty tz 1| A rotation matrix looks different. For example a rotation around the x axis: | 1 0 0 0| |x y z 1| * | 0 cos(alpha) sin(alpha) 0| = <rotated vector> | 0 -sin(alpha) cos(alpha) 0| | 0 0 0 1| Assume alpha=30 Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 21, 2004 Share Posted January 21, 2004 Holy shmoly. And I've been trying to do the rotation by sticking these sin() and cos() stuff in to a fourth set of numbers, dumbass! Thank you, Frank! I really appreciate you taking your time and explaning this thing to me. Thank you, very much! Quote Link to comment Share on other sites More sharing options...
edward Posted January 22, 2004 Share Posted January 22, 2004 Frank should really add this stuff to the odforce wiki: http://www.odforce.net/odwiki/index.php/Wh...hatIsAMatrix%3F Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 22, 2004 Share Posted January 22, 2004 You right! There is a future chapter at the bottom of the page called "Matrices in Houdini". Frank's little lesson fits right in there. Quote Link to comment Share on other sites More sharing options...
FrankFirsching Posted January 22, 2004 Share Posted January 22, 2004 Ok, if MCronin doesn't have anything against this (because it's his page), I could do this next week (too much to do 'til monday). Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 23, 2004 Share Posted January 23, 2004 Well, my IFD saga continues! Now, when I apply an shader to a geometry and render away I'm getting a black frame. The only shader that works is a "constant". Any other, is being loaded but not being rendered or something else. here is whatI have in my IFD file: ray_verbose 4 ray_picture ip ray_resolution 512 480 ray_zoom 1 ray_clip .01 100 ray_detail -s geo1 $HOME/houdini6.1/geo/pointlight.bgeo ray_object light1 geo1 ray_transform 1 1 1 0 Quote Link to comment Share on other sites More sharing options...
David Gary Posted January 30, 2004 Author Share Posted January 30, 2004 Hem, It seems that the GenerateScriptFile option in MantraROP parameter page is not available in Apprentice (6.1). So, no IFD generation from scene Is it true ? Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 30, 2004 Share Posted January 30, 2004 Yes. It's true. Nevertheless, if you need to, you can write an IFD by hand. Here you can find some more usefull info on how to do that. Quote Link to comment Share on other sites More sharing options...
Jason Posted January 31, 2004 Share Posted January 31, 2004 The reason is to prevent people from abusing the Apprentice plan and generating IFDs and circumventing the NonGraphical license requirement. Just be assured that an IFD is being fed into mantra invisibly. Having access to this file can be useful on very intricate systems where it may be more efficient to do things like shader replacements and such on very heavy scenes. For example; we had a system that had 40 high-resolution cars all instanced around a scene (up to 8000 instances in one scene, actually), each car compromised of a number of shaders. It worked out to be more efficient to replace and vary the shaders inside the IFD on the way to render then to generate the IFD's many times and battle with our own UI problems. Steve Blakey here now wakes up in the middle of the night burbling IFD commands.. much to the horror of his poor girlfriend. Quote Link to comment Share on other sites More sharing options...
Stremik Posted January 31, 2004 Share Posted January 31, 2004 I don't see why someone would do such thing. Even if you render by feeding IFDs to mantra without actually starting Houdini, the image resolution is still limited. I'm not talking about RIB here. That's a different story, but IFD... I think it would be ok to be able to save out an IFD. Quote Link to comment Share on other sites More sharing options...
Jason Posted January 31, 2004 Share Posted January 31, 2004 Imagine a shop with 10 licenses of Houdini and 100's of render machines. They will very probably have a site-license of mantra due to the number of Houdini licenses they own. They will have a rendering bottleneck because they cannot generate IFDs fast enough from their 10 licenses of Houdini. If they could output IFD from a whole bunch of Apprentice cuts and then process IFD and change the output resolution and then they could feed these IFD's to the licensed mantra versions for render. This is because on intensive, complex, highly procedural scenes, Houdini cooking out an IFD can take a long time - even nearly as long as a render. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.