Forum Moderators: Staff
Poser Technical F.A.Q (Last Updated: 2024 Nov 13 12:50 am)
Welcome to the Poser Technical Forum.
Where computer nerds can Pull out their slide rules and not get laughed at. Pocket protectors are not required. ;-)
This is the place you come to ask questions and share new ideas about using the internal file structure of Poser to push the program past it's normal limits.
New users are encouraged to read the FAQ sections here and on the Poser forum before asking questions.
Attached Link: Doger's "Reading Geometry (How Poser Does it - Mini Tut)"
The term "definition block" came from a tutorial by Doger, linked above. I have since gone back to using the term "channels block" for this section of a file, this is less technically correct.Here is a short quote from Doger's tut:
The term 'definition block' is used to name the code block of a Poser file that sets up the channels and other properties of an object.
The term 'declaration block' is used to name the block in which an object is declared and at which point its geometry, if any, is read in.
So DEFINITION BLOCK = CHANNELS BLOCK.
By "channels block" (or "definition block") I mean the part of the file following the "declaration block" where you set out the channels, for example;
prop box_1<br></br> {<br></br> name box_1<br></br> on<br></br> bend 1<br></br> dynamicsLock 1<br></br> hidden 0<br></br> addToMenu 1<br></br> includeInDepthCue 1<br></br><br></br> channels<br></br> {<br></br> xOffsetA originX<br></br> {<br></br> name originX
Before a light (or anything) can be parented in a cr2 the parent has to be declared, if the parent already exists in the cr2 then it will already be declared, but if the item(s) that the light(s) is to be parented to will be loaded sepratly then you must put a declaration for it in the cr2. For example:
version<br></br> {<br></br> number 3.0<br></br> }<br></br><br></br>actor hip:2<br></br> {<br></br><br></br> }<br></br><br></br>prop box_1<br></br> {<br></br><br></br> }<br></br><br></br>actor head:2<br></br> {<br></br><br></br> }
Now you can parent lights that follow later in the file to any of these 3 "declared" items. Actually it's better to use use "actor" for the prop as well so in the above you would have "actor box_1".
Q: "But the major problem with parenting to a cr2 is that certain channels are stripped out, so the user has to manually adjust the shadow value and map size every time. Is there any way round this?"
A: Try saving a pz3 then copying the lights out of the pz3 and pasting them into the cr2. Alternativly just copy and paste the missing channels into the cr2. CR2Builder is a good tool for doing this and it's free, but any good text editor will do.
hi les, Thanks for the reply. I know what the definition and declaration blocks are. What I was asking is where did it appear from in your example? You said, add the doc statement to the file, but afterwards, you mentioned it again. I mixed up what you were saying. Been working too hard I think. Anyway, I'll try it again when I get some time. I need to get this fixed for future use. Re the stripped out channels - I've already tried pasting them back in. A resave just strips them out again. Bummer. cheers mac
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Attached Link: http://www.renderosity.com/messages.ez?ForumID=10139&Form.ShowMessage=1318136&Form
les, A while ago, you posted some stuff on parented lights as props (see link). Well, I'm having some minor problems maybe you can help with. First off, I've already tried parenting the lights to the cr2, which is a terrace with 2 lamp-posts on it. I had 2 lights parented to each lamp-post. But the major problem with parenting to a cr2 is that certain channels are stripped out, so the user has to manually adjust the shadow value and map size every time. Is there any way round this? I'd really prefer to stick with the cr2 parenting. Anyway, if not, I could make the lights props, but I'm not quite getting it. You said 'A light saved to the light pallet keeps its parenting intact, but if you convert it to a pp2 or cr2, an extra step is necessary to preserve the parenting, the parent item must be declared, for example if the light is parented to the MAIN_CAMERA the start of your file would look like this: { version { number } camera MAIN_CAMERA { } This is in addition to the normal "parent MAIN_CAMERA" line in the definition block.' What definition block? You said to add a doc statement to the lt2 file, so where does the difinition block come from? Maybe I'm misunderstanding you. Also, how would I declare the parents if there are two of them? TIA mac