Mon, Dec 23, 5:53 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 23 1:20 pm)



Subject: stewers excellent Lightgen script!


Treewarden ( ) posted Thu, 09 October 2003 at 11:19 AM · edited Mon, 23 December 2024 at 5:51 PM

file_79386.jpg

Here is what I have been tinkering with for two weeks now. This image is a Firefly render with no post work. The lighting comes from stewers Python script that reads Lightgen output files from HDRShop.

I at first used available HDRI lightprobe images for testing. However for this image I created my own lightprobe right in Poser5. Since it can do raytraced reflections, I figured why not? While not at all a true HDRI image, the Lightgen plugin still worked very well for pulling the lightset from the image.

The probe was in a scene with 3 lights. I used Lightgen to create 20 lights to replicate the original 3. This is possible due to the gradients created during the raytrace.
I then used LightPanel to set all of the lights shadow maps down to 64. Since the only imagemap is the background, Poser5 rendered this in less than a minute. All other materials are material nodes tweaked out.

Needless to say, there were about 50 renderings before this one.


Treewarden ( ) posted Thu, 09 October 2003 at 11:20 AM

file_79387.jpg

Here is image of my lightprobe.


Treewarden ( ) posted Thu, 09 October 2003 at 11:22 AM

file_79388.jpg

Here is the panorama created by HDRShop. It is also used on a the inside of a sphere surrounding the scene. These I have'nt yet figured out how to make sharp.


quinlor ( ) posted Thu, 09 October 2003 at 11:23 AM

Cool!


Treewarden ( ) posted Thu, 09 October 2003 at 11:28 AM

Content Advisory! This message contains nudity

file_79389.jpg

Here is a quick render I made using this technique. I used Photshop to brighten a bit, but this is pretty much a straight Poser5 render. Using Andi3d skull standard and V3, and a stock Poser5 hair, and a public domain tree. A little weird scale wise, but just to show what soft shading can be got.


Treewarden ( ) posted Thu, 09 October 2003 at 11:33 AM

Oh yea, I did some post on V3's shoulder. Hee Hee! Also, I should note that this technique creates lights that can still be altered or tweaked to one's taste. That is all... caravaggio


c1rcle ( ) posted Thu, 09 October 2003 at 11:41 AM

how did you get the image maps from the hdri files into poser? I've been playing with the script myself for a while (wish there was a way of speeding the generation part of it) but I've not gotten anything as good as these so far :)


Orio ( ) posted Thu, 09 October 2003 at 11:56 AM

Hi Caravaggio (feels weird to say that... lol) any chance of a tutorial on this? I mean for those who don't know anything of the subject... from step 0 to final. Thanks in any case Orio


Treewarden ( ) posted Thu, 09 October 2003 at 12:28 PM

I'll start on a tut when I get home from work (I'm home at lunch now). If you want to get started more quickly, just search the forum for HDRI. This will take you back to a thread from 9.20.03 or so. Stewer started all of the HDRI type lighting idea. It involves downloading HDRShop, Paul Debevec's Lightgen plugin. You have to print out a couple of web pages for getting the idea. Basically, 1)create 360 degree poser scene. 2)place hi-res sphere into scene set to 100 reflection. 3)light scene as desired. 4)render sphere close up. (Don't worry, it won't bite. (Poser's photographer is quite invisible!) 5)take into Photoshop. 6)perfectly crop image so that it's square with the sphere perfectly fitting. 7)open HDRShop. Open image. 8)convert to a large panorama. Save as a jpeg. (this will be useful if you want to include the image in the scene for reflection purposes.) 9)reopen the first image and convert it again to a small panorama, just 128 wide. (you're just kiling your Lightgen output wait if you do a larger image.) 10)select lightgen under plugins. Use default settings. Check scale light output. It is o.k. set at one. .7 or so makes a more rainy day type image. Browse the output to the desktop. The plugin will report an error. It's o.k. it's still running. When you see two temporary files on the desktop, and one with the name you gave it, the program is done. You can close out of it. (note: start with number of lights set at 20 just to see what happens.) Go put the light file in a folder you will make for keeping lightset files. This is the file that stewer's script uses to make the lights. 11)open poser and create your scene. 12)open Python window and load in stewer's script, delate lights script (ockham) and Light Panel (ockham). 13)click on delete lights to eliminate all original lights. 14)click on hrdi (stewer's). and when it asks you for a file, navigate to the Lightgen output. Open this. Poser5 will now insert 20 lights into your scene. 15)of course now the fun begins. I streamlined my workspace for rendering lots of times. I start with no textures so that shadow maps render fast. Textures will dramatically increase rendering time. Also you can use Lightpanel to set the shadowmap value for all the lights simultaniously. I set them low for even better softness and faster rendering. Well, got to go back to work. I'll get back to this tonight. If you have any questions, please just ask. This might get you started, but I took a while to get the gist myself. Just be patient and you'll be able to do this stuff also. It's actually a fine surefire way to throw 20 (note or more) lights into a scene that have soem ryhme and reason to them. It's very fast to do too once you get the hang of it. Also, I have Poser5 with SR3 installed. Later, caravaggio


c1rcle ( ) posted Thu, 09 October 2003 at 12:58 PM

AHA that's why it takes so long to generate the lights :) thanks caravaggio, I'm gonna save this somewhere safe for future reference.


MungoPark ( ) posted Thu, 09 October 2003 at 3:05 PM

Content Advisory! This message contains nudity

Attached Link: http://www.renderosity.com/viewed.ez?galleryid=510363&Start=1&Artist=MungoPark&ByArtist=Yes

Very nice, I tried the procedure several weeks ago on a complete photo scene, and the result is not bad. There is still a lot of improvement possible - the main problem is the reaction of a texture to the light set. The renderer sometimes gives unpredictable results - and you have to play with ambient light of the texture. I will post all of my nine lightsets and backgrounds in freestuff, when I have tested them. Mungo


stewer ( ) posted Thu, 09 October 2003 at 3:43 PM

Glad to see you're having fun with my script!


PabloS ( ) posted Thu, 09 October 2003 at 7:06 PM

.


Orio ( ) posted Thu, 09 October 2003 at 7:42 PM

Thanks much Caravaggio, I'll give your precious tip a try, and I'm looking forward to the full tut. Cheers!


Treewarden ( ) posted Thu, 09 October 2003 at 7:51 PM

Ok, now I have a little more time. If you haven't yet looked into utilizing stewer's script for translating the LightGen, the very first thing you should do is head over to: http://www.keindesign.de/stefan/poser/ This is stewer's website. Read the FireFly FAQ he made and print it out! This is important documentation for Poser5. Then investigate the links there under HDRI python script. You gotta get three things from here. Stewer's script, HDRShop, and the LightGen plugin. While on the HDRShop and LightGen links read about HDRI research to understand what the idea is, and understand that the LightGen plugin is an adjunct to HDRShop. It will be reading the intensities of light coming in at all 360 degrees from a source image. Read and follow all instructions for installing HDRShop and creating the plugins folder for the LightGen plugin. VERY important note, the downloads are clearly marked for academic/non-commercial use, and to contact the creators if you want to use these commercially. You also need to register to download. Go ahead and print out the web link instructions for Light Gen. You will need these instructions later. Now, being ready to go, fire up P5 and open or create a 360 degree scene. You want a clear area in the center of the workspace. You need a ground, a skydome, and some props you want to be reflected in your lightprobe (which you are going to make.) There is a lot of room here for experimentation. I used hmann's excellent 3D world builder packs to whip up a 360 ground and sky combo. I put in some other props by !TE. Light the scene. Just do what you know on that. Stewer's suggestion to get Jeremy Birn's Digital Lighting and Rendering is worth taking to heart. A great book. Don't be too worried though, place some lights to light up the sky dome, ground and the surrounding objects. This process is extremely forgiving so don't sweat the lighting too much, cuz its going to be boiled down later anyway. Now select the hi-res sphere from the props menu. It comes into the center of your scene. You will probably need to raise it and increase the scale. Here is where P5 beats the crap out of sampling a real life scene with a probe. You can make the scale of the probe whatever you want! (It does not weigh 10,000 pounds! Hee Hee.) Use your eye for this. Important to remember too... you are going to be "taking a picture" of the 3D scene as seen by the camera looking into the probe only. You want sufficient detail in this so scale accordingly. Center the camera you are using to level with the ground, pointing directly at the light probe. Zoom in so that you have the ball centered in the frame. Use a square image window and make sure the ball is almost touching the four sides of the image. Now set the render settings to raytracing on, shadow casting on, bla, bla, basically you want the best image P5 can produce, so go for broke. (Using stewer's FireFly FAQ that is). If you only have a handful of lights in your image, it won't take that long to render anyway. Lastly, set yourself up a render to a new window and set it to match document window. Go to the materials room and select the probe with the eyedropper tool. Go down to Reflection Color and add a raytracing reflection node. You can leave this at default, if you like. Now, without leaving the materials room, render your scene. Since you have it set for render to new window, it will appear and still render just like you were in the pose room. Experiment here. Your image is supposed to look like the "mirrored ball" images you saw (and hopefully downloaded, cuz you can use these with LightGen and stewer's script.) Notice that there is black around the "ball". This will not be so in your render. You will simply make the black areas in Photoshop. Don't be afraid to render lots of times to get a cool image. Also, remember to up the bucket size. I use 200. This makes experimentation less lengthly. After you are happy with the image, open it in your image editing program and circle select/lasso the ball. Be as careful as you can here, make sure that your circle is a hair' breadth (pixel distance) to the inside of the circle. Hold down shift to make sure you've got a perfect circle. Reverse the selection and fill with black. (I'm not sure if this step is needed, but it looks cool.) Finally, crop the image with the square selection tool so that it is perfectly touching the edges of the square image. Save the image as a .bmp where you want to find it. Whew! Now the quick part! Open HDRShop. Open your image. (Note: HDRShop supports a special HDRI format which you can get source files for from the net. Here we are opening LDR Low Dynamic Range image in .bmp format.) You will see a box warning you that your image must be converted. For now use the defaults. Use the LightGen instructions you printed earlier. Read the section marked Usage. This describes the process for converting a sphere map to a panoramic map. Create a large panoramic image, such as the default setting generates. Save this as a .bmp. This will only be used if you want to use it for making a background with it on the inside of a large (50000 scale) prop ball, with the normals flipped in the group tool. This image should be 2:1 format. Twice as wide as tall. See the above images in this thread for what I did. Now redo the same operation and set the output width to 128, just as the instructions say. Under the plugins menu, select LightGen. A box opens and has options. Check "scale light output". Set this value accordingly. .1=dark and 1= as bright as the scene is as you wanted it to look when you made your light probe image. Browse your result to the desktop instead of a folder you can't see when HDRShop is open. Name and remember the name of the file. This is for working around a known bug. Finally you can adjust the number of lights you want LightGen to generate. The default is 20, so I just stuck with that. It is said that you can go more on this. You want a lot of lights for nice gradiated shadow maps, but not so many that the effect is muddied. LightGen creates a mean for light output that simulates the whole total light of a panoramic image. Click on execute. Wait a bit, and a warning box will appear. This is the bug. Wait til you see two temp files and the one you named earlier appear on the desktop. Only now click on the warning box and close out of HDRShop. Delete the two temp files and move the new text file to a directory you will use for LightGen output files. Now open P5 and now you can go different directions here. All the grunt work has now been done. If you haven't got ockham's excellent light Python scripts, search Renderosity for them and get them. Install them and stewer's Python script in your Python P5 directory. At minimum you need ockham's DeleteLights and LightPanel in additon to stewer's hdri script. Here I created a new scene with a sphere and a cylinder and a clothplane. I placed a sphere around the scene set at 50000 scale. On the large sphere I inverted the normals (which side holds the texture node info) so that the surface renders inward instead of outward. The camera must be inside this sphere, with cast shadows turned off on the sphere. Create, open a new scene, or open the very scene you started with (delete the probe or set it to invisible). When you are all done, open your Python window and and load up the three Python scripts by navigating to the P5 Python folder and evoking them one by one. Now, click on DeleteLights to get rid of the default scene lighting. Click on hrdi and then open your lights file. P5 will add 20 (or however many you asked for in LightGen) lights to your scene. Render. You should see quite an improvement over P5 default lighting. Use LightPanel to experiment here with setting all light parameters at the same time. I turned down the shadow map size to make softer blending and faster rendering. Note: you can easily turn up one light and increase it's shadow map size for a crisp and defined shadow that corresponds to what appears to be the main light source on your image. You can even raytrace that shadow (click raytraced shadows in the light properties tab). Now you are ready. Known problems: strange reactions of surface material settings to light sets. This I think can happen anyway if you are lighting in P5. I found that altering the angle of the camera can alleviate this problem, at least for stills. Also, your lights will cast shadows of the subject objects back onto the globe background. You must turn the shadow casting off on these lights as needed. There are alot of lights casting shadows, turning off a few does not really hamper your final image. If you are using reflection in the image, (as I have done above) then you must make sure your Background sphere is large enough to make the resulting "dots" small. I have not found a way to make an object cast shadows and not have their shadows find their way to your reflected object's rendered surfaces. Also, the degradation of the panoramic image on the background sphere I would like to know how to correct. My thinking here is that you want to substitute 3D geometry for this by using the original source file that you derived your lightset from. Hope this helps... Regards, caravaggio


Treewarden ( ) posted Thu, 09 October 2003 at 8:16 PM

P.S. Stewer's intimation in an earlier thread that one must become proficient with P5's material nodes should not be underestimated. How an object looks can be dramatically improved by attending to the material nodes and taking time to understand what they do. I would like to raise a world-wide community glass to stewer for his tireless efforts in the realms of lighting and rendering.! Thanks, stewer!


Treewarden ( ) posted Thu, 09 October 2003 at 9:15 PM

file_79390.jpg

"Smithers, have you finalized all the arrangments in securing the property of the chicken hatchery?"

"Ah, hen house?, yes Sir."

"Eggs-cellent..."


bodiroga29 ( ) posted Fri, 10 October 2003 at 12:52 PM

I'm not sure, if it could also be used for animation, or is it for stills only? Too much work for animation I quess. I wish Stewer could write the Ambient Occlusion shader for Poser also. That would render fast for animation too.


stewer ( ) posted Fri, 10 October 2003 at 1:02 PM

You can use it for animation, no problem. In the end, it's just a regular light set, nothing more. About ambient occlusion: I too wish I could write that shader, but AFAIK there is no public API for writing shaders for Poser 5.


Treewarden ( ) posted Fri, 10 October 2003 at 1:39 PM

Yes I've managed animation as well, just have to set the computer to render prior to going to sleep! Hee Hee.


muralist ( ) posted Tue, 09 November 2004 at 5:23 PM

I have the most recent Python installed, made my text file with LightGen, and all the maps are ready. I have Poser 4.03 -- not PP. How do you run the Python script to convert the text file to a light set in just Python?


ynsaen ( ) posted Tue, 09 November 2004 at 5:38 PM

I don't think you can, actually. But I'm not a particularly savvy programming type...

thou and I, my friend, can, in the most flunkey world, make, each of us, one non-flunkey, one hero, if we like: that will be two heroes to begin with. (Carlyle)


muralist ( ) posted Tue, 09 November 2004 at 5:45 PM

Do you know of any way to efficiently convert a list of light colors and directions into a lt file?


Treewarden ( ) posted Tue, 09 November 2004 at 5:48 PM

I quit using Poser while ago, but I think you can't run the script outside of Poser. Stewer might be able to help here. From what used to be true, Traveler had made some free lightsets and they were over at RuntimeDNA I think. By the way, it appears from your gallery that you might be located in Ohio. Are you near Columbus?


muralist ( ) posted Tue, 09 November 2004 at 6:01 PM

The hdr for this is from a specific terrain and environment - Traveler's sets are great but this scene has to use local light. Near the Big Darby.


Treewarden ( ) posted Tue, 09 November 2004 at 6:17 PM

Oh. Uhm, maybe someone could translate it for you. I was wondering if you were close by because I have ProPack and don't really want it anymore. I've decided to abandon Poser because of it's rendering problems.


muralist ( ) posted Tue, 09 November 2004 at 8:18 PM

Ok. I have to convert them myself. There are too many environments for me to consider asking that of anyone else. Where are you located? As for your Poser files, I'll put them to good use: do you want to upload them over the net, or burn them to disc?


Treewarden ( ) posted Thu, 11 November 2004 at 7:21 AM

Sorry it took me a while to get back on this. I have the ProPack disc in the box, I think all I have to do is sign the liscense transfer thing and send it to you in the mail. I think it has it's own serial number, I'll have to dig the box out, I recently moved, and I have the disc stored in a safe place, but the box and serial # are another matter. I know I saved it tho. I'll locate the box tonight, and if you IM your address to me I'll put it in the mail tommorrow. This I understand, is a completely legal transfer of the liscense. Then you can use Python all you want.


muralist ( ) posted Thu, 11 November 2004 at 8:25 AM

Thanks. What do you use for rendering? The lighting in your gallery images looks good.


Treewarden ( ) posted Thu, 11 November 2004 at 1:05 PM

I use Cinema4D. I got the version C4D6CE free from an online class, I was going to tell you more about it, since I think it will suit you better.


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.