Forum: Poser - OFFICIAL


Subject: "Adding" a Light Set to a scene WithOut replacing existing lights?

igohigh opened this issue on Oct 15, 2003 ยท 12 posts


igohigh posted Wed, 15 October 2003 at 12:01 PM

I seem to remember a conversation on this a year or so ago and kinda remember someone who had managed to edit a light set into prop format. Can't find it, anyone remember this? I would like to add Sam's3D HauntedHouse 2 lights (wich are parented to a square) WithOut loosing the existing scene's outside light set, can this be done??


Jaager posted Wed, 15 October 2003 at 1:36 PM

This is not tested, but until the advent of the shader nodes with P5 Materials, a pose file or light or camera - only affected the parts that the pose file addresses. For most things, the rules is: If you don't want to change it, leave it out of the pose file. If there is nothing in the file about light 1 then light 1 should stay as it is. Try this: open the light set in a text editor delete all sections about the lights you want to leave alone both the geometry calls and the actors/channels. Lights and their cameras. If the two new lights duplicate the names of lights you wish to keep, change their numbers to the next open numbers.


Jaager posted Wed, 15 October 2003 at 2:41 PM

Well that does not seem to work. I can get new spots in, but the existing ones act like they stop working. Bummer.


igohigh posted Wed, 15 October 2003 at 4:20 PM

(at school, can't work with it now) I've seen some downloaded sets that do that, new set comes in and old set only 'turns off' but can be turned back on. Only problem is that original set also changes their positioning in the scene. I am sure I remember someone who had managed to get lights to save into the Prop or Character library With the parent item...I downloaded it but can't find it to play with it... Guess the 'hard way' will be the only way: Bring in one set and manually set up and manually duplicate the rest (only some 25 lights with associated settings! YUK!)


lesbentley posted Thu, 16 October 2003 at 3:28 PM

Attached Link: http://www.renderosity.com/messages.ez?ForumID=10139&Form.ShowMessage=1318136

Igohigh, This may be the thread you are thinking of.

lesbentley posted Thu, 16 October 2003 at 4:34 PM

The text file linked above is an example of adding lights via a pp2, I have only tested this technique in Poser 4.0.3.126, but I expect it will probably work in Poser 5 as well. Save the file to a props folder and give it a pp2 extension. This is how I made the file: I loaded a pz3 that did not contain any lights into Poser, loaded 2 spotlights via the Light Controls, I renamed the lights via their properties box (this only changes the name displayed on the dial), then saved a light set to a Lights pallet as "MyLights". I opened the resulting MyLights.lt2 in a text editor, I then did a global search and replace of the internal name of the first shadow camera "SHADOW_CAM_LITE 4" with "MySHADOW_CAM_LITE 4". I then did a global search and replace of the internal name of the first light "spotLight 1" with "MyspotLight 1", I did the same thing for the other shadow cam and light just adding a "My" to the start of their names. Then I added a "doc" section to the file just before the closing brace, listing the lights and cameras to be loaded, it looked like this;
doc
{
addCamera MySHADOW_CAM_LITE 4
addLight MyspotLight 1
addCamera MySHADOW_CAM_LITE 5
addLight MyspotLight 2
}

The file was then saved to a props folder with a pp2 file extension and tested in Poser 4. The key to all this and the only essential bit is adding the doc section. The renaming of the lights and cameras is only to prevent the posibility of overwriting an element in the Poser document window. While you have the file open in a text editor you might also like to change the dial names of the cameras from "name GetStringRes(something)" to somthing that makes sense to you, like "name MySHADOW_CAM 1". Hope this helps, Les.


lesbentley posted Thu, 16 October 2003 at 5:35 PM

Igohigh, I just reread your original post, and realised that the lights you want to load are probably already in a pp2 (unless they are loaded by a readScript call), if they are already in a pp2 then you should only need to change the internal name of each light and cam to somthing unique (so they don't overwrite other lights when they are loaded), but make sure you cach every instance of the names.


igohigh posted Thu, 16 October 2003 at 6:12 PM

Thanks Lesbentlet, this is exactly the thread I was trying to find! Actually the lights I want to use are Soth's lights for Sam's 3D's Haunted House 2 (availible at www.sams3d.com) They are currently standard Poser light set that are saved Parented to a square prop stored in the Props library. unfortunatly I am at school today but I will work with it tonight. THANKS!!


Jaager posted Thu, 16 October 2003 at 7:57 PM

It dawned on me that my test failure may be due to what I used, not that the method will not work. I hacked the test file from a P4 .lt2 and used it in P5. Being that it was spots with parenting and point at, I think P4 .lt2 with these settings will fail in P5. Or may fail, I am not sure that the reason for the incompatibility has been fully explained. I should make a P5 .lt2 and test this.


igohigh posted Fri, 17 October 2003 at 1:39 AM

Almost got it but I started with 6 lights and ended up with only 1? But it leave the existing lights in the scene alone! I started by: 1) opened an empty scene and trashed lights 2) added Soth's specialy preped HH2 Cube from Props 3) added Soth's pre-parented HH2 Lights from Lights 4) saved as PZ3 5) edited the PZ3 using your (Jaager) light prop as a model; removed ground, camera (except shadow_cam's), and Universe perams. Then edited the { doc } portion also removing those items. 6) saved into Props library as PP2 Result: got the box but with only 1 parented light instead of 6 However the existing lights in scene did stay in place and stayed on! Now if I can just find my error so the other 5 lights don't get lost!?

lesbentley posted Fri, 17 October 2003 at 3:15 PM

Perhaps what your aiming at is somthing like the file attached above. It has 6 spotlights parented to a Mag Zone (so it becomes invisible when rendered), the geometry for the Mag Zone has been replaced with the standard poser box.obj.

The lights have been set with the Angle Start and Angle End at 160, the max for these paramiters has been set to 180, and the depthMapSize size has been increased to 1024, apart from those changes they are prety much standard spotlights.

What your doing, starting with pz3 and deleting the parts you don't want is a good way to go, I find using CR2Builder rather than a text editor speeds up the deletion a lot, as you can just highlight the first element to delete then keep pressing the delete key till you get to somthing you want to save.

If you like you could save you file as a text file and post it as an attachment in this thread perhaps we could spot the problem that is causing only one light to display.


igohigh posted Fri, 17 October 2003 at 10:55 PM

Thanks lesbentley. Relic spotted my problem, I got sloppy in my renaming within the { doc } portion and started adding an extra 's'. I like the idea of using the Mag Zone, I was just using the Cube that Soth had set up for easily positioning lights with Sam's3D's haunted house. Being able to add lights in the form of props is great!