Mon, Feb 17, 5:57 PM CST

Renderosity Forums / Poser Technical



Welcome to the Poser Technical Forum

Forum Moderators: Staff

Poser Technical F.A.Q (Last Updated: 2024 Dec 04 2:47 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.



Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Adding parented lights to a scene - what do I need to modify?


maclean ( ) posted Tue, 10 February 2004 at 3:10 PM · edited Thu, 13 February 2025 at 9:29 PM

I'm using parented lights in a cr2 figure, mainly because I want to add them to the scene along with the figure without changing the existing lighting. But there's a naming problem, especially with the shadowcams. Does anyone know the exact procedure for this? Here's what I have so far. If I edit the cr2 and give the parented lights unique names, they don't affect the lights already in the scene. But for the life of me, I can't get the shadowcams to work. I tried renaming them, but they didn't appear. Any suggestions? mac


mateo_sancarlos ( ) posted Tue, 10 February 2004 at 3:19 PM

Click on the shadowcams in the animation palette until you get the right one?


maclean ( ) posted Tue, 10 February 2004 at 5:10 PM

Thanks mateo, but it's more complicated than that. The problem is that when you create a light, you also create a shadowcam with a corresponding number - Light1 + shadowcam 1, for example. If I have 3 lights in the scene, named 1, 2 and 3, then add a parented light, the 4th shadowcam doesn't seem to work. It should be called shadowcam 4, but renaming the light is doing something funny to the numbers. And I don't know why. mac


lesbentley ( ) posted Tue, 10 February 2004 at 6:23 PM

The actual numbr of the SHADOW_CAM_LITE is not relevent, and offten does not match the number of the camera. In the camera check the line "depthCamera SHADOW_CAM_LITE #", and in the light check the line "parent spotLight #" (or "parent LIGHT#"). Of course if the lights have unique names the SHADOW_CAM_LITE's should also have unique names. I find the best way to proceed when renaming lights (or anything else) is to do a globall search and replace of the name starting from the top of the file, that way you are sure to change every instance of the name in the file.


lesbentley ( ) posted Tue, 10 February 2004 at 7:08 PM

file_97933.jpg

I also delete the "name" lines from the cam and light, these can cause confusion
camera MySHADOW_CAM_LITE 1:1<br></br>   {<br></br><br></br>  off<br></br> bend 1<br></br>      dynamicsLock

if the name line is deleted Poser will insert the real internal name and number, if the name line is left in it can overwrite the real name/number in the dropdown menu, and that can become very confusing.

Attached above as an example is the text of a rather cut down version of a spotLight and SHADOW_CAM_LITE in a cr2, the names have been customised by adding "My" to the front of the light and camera internal names.


maclean ( ) posted Wed, 11 February 2004 at 2:20 PM

Thanks les. That's a big help. And deleting the name GetStringRes is a good idea. I never thought of that. Will try this again from zero and see how it goes, I have a feeling I'm making some stupid mistake. mac


maclean ( ) posted Wed, 11 February 2004 at 3:35 PM

hi les, I fixed it. The usual dumb mistake. I realised as I was looking at your cr2 that I'd forgotten to rename the 1st entry of the shadowcam name (in the actors block). I changed it and I'm good to go. I also discovered that the original confusion over shadowcam names is probably because, for some bizarre reason, my default light setup lists Light1, 2 & 3, along shadowcams 1, 2 & 4. Poser was renaming my parented S cam as #3, which is why I couldn't figure what was where. Ta muchly, mate. mac


maclean ( ) posted Wed, 11 February 2004 at 5:13 PM

file_97934.jpg

Here's the lamp figure + parented light. The shadow cam is also following the movements of the lamp-head (the parent body part), which is good. In a previous version, it wouldn't follow it. A peculiarity. I've noticed that if I switch the parented light off, then on again, it reverts to it's default state. Obviously, I need to use memorize, and change the k values to match the defaults I want, but I wonder why this is? mac


lesbentley ( ) posted Wed, 11 February 2004 at 6:21 PM

You mean when you switch the light the SHADOW_CAM_LITE reverts? I hadn't noticed that till you meantioned it, but your right. Memorize does not seem to help either :( This is very strange, switching the light off seems to zero the initValue as well as the "k" value! Bum, bum, BUM!!! I guess as a workround the Intensity of the light could be set to zero rather than switching it off, but this is not very convenient.


mateo_sancarlos ( ) posted Thu, 12 February 2004 at 12:45 AM

Can we assume, since the spotlite stand casts no shadow, that the shadow-cam is zoomed way too far out?


maclean ( ) posted Thu, 12 February 2004 at 2:29 PM

mateo,

The reason there are no shadows is that I exported the image instead of doing a render. It's an easy way to show things in the doc window, like lights or magnets. I haven't actually set the light up yet anyway. The lamp is an figure I made a while ago, but haven't released yet, so I thought it would be good to try light parenting on. But I'm not going to use it on this. I'm building a roof garden and thought I'd add a couple of lamps to it.

les,

I have another couple of oddities. First, you're right. I tried memorize and it doesn't work. You have to manually change the k values in the cr2, then it's OK. You can switch it on/off and it reverts to the defaults, which of course, are the same settings. I also noticed that the k value in Scale has no effect, but the line

staticValue 0.55

does the same thing. In my case, setting a default of 55% Scale.

Secondly, I made a SET file for this light which seems to work pretty well. Here it is below.

{
        version
        {
                number 4.01
        }
        light mylamp:1
        {
                on
                channels
                {
                        liteFalloffStart Angle Start
                        {
                                keys
                                {
                                        k 0  100
                                }
                                staticValue 100
                        }
                }
        }
}

This was just a simple one to try changing the Angle Start. Again, you must change the staticValue or it won't work. I'm puzzled. I thought static was for animation?

The only other thing is this. When I add a 2nd figure, the same one, with parented light, I don't get a new light. The light migrates from the 1st figure and moves into exactly the same place on the 2nd one. Any idea why? Could it be because I renamed the light in the actor block? Here's what it looks like.

<br></br>
{

version
        {
        number 4.01
        }
figureResFile :Runtime:Geometries:room furniture:lucelamp.obj
actor BODY:2
        {

        }
actor stand:2
        {
        storageOffset 0 0 0
        geomHandlerGeom 13 stand  
        }
actor lamp-head:2
        {
        storageOffset 0 0 0
        geomHandlerGeom 13 lamp-head  
        }
actor cable:2
        {
        storageOffset 0 0 0
        geomHandlerGeom 13 cable  
        }
light mylamp:2
        {
        storageOffset 0 0.3487 0
        objFileGeom 0 0 :Runtime:geometries:lights:spotLite.obj
        }
camera mylamp cam:2
        {

        }

All help appreciated.

mac


lesbentley ( ) posted Thu, 12 February 2004 at 4:00 PM

"When I add a 2nd figure, the same one, with parented light, I don't get a new light. The light migrates from the 1st figure and moves into exactly the same place on the 2nd one. Any idea why?" It's not to do with the renaming. Unfortunatly this is just another case of this is how it works in Poser. There is no solution that I know of (and I have tried very hard to think of one). The problem seems to be that Poser will only tolerate one instance of "light WhateverName:#" in the document, at one time.


lesbentley ( ) posted Thu, 12 February 2004 at 4:35 PM

with regard to the k values having no effect in the scale channel and using "staticValue". That's a great find. I have noticed this same thing in relation to the origen, the 'xOffset' channels in pp2 files, but I never thought of using staticValue in lights.


maclean ( ) posted Thu, 12 February 2004 at 4:41 PM

Thanks les. At least I know that it's poser's fault I can't add multiple instances of a light. The staticValue thing is weird, but it seems to work. I much prefer using SETs to change the lights. An .lt file would replace all the lights in the scene, which is what I don't want. mac


maclean ( ) posted Sat, 21 February 2004 at 9:20 AM

For anyone who's following this topic, I've just discovered a strange thing. When you save a light which is parented to a cr2 figure, it does not - repeat NOT - save the shadow and map size channels. I discovered they were missing from my figure, added them back in in cr2Editor, opened it in poser and there they were. Resaved the figure and re-opened it, and there they WEREN'T. If anyone can figure that out, I'd be much obliged, but I think it's just another poser mystery. mac


Privacy Notice

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.