View Full Version : MAXScript: E-Light (Environment Light) and the result!
Skyraider3D 01-15-2003, 04:09 AM Usually people post here to get crits on their renders, but I'd like to hear your opinion on the MAXScript I wrote. It's called E-Light (short for "Environment Light") and it lets you create a dome or sphere of lights, that gives you those nice soft shadows. Colours can be controlled with a bitmap and all settings remain editable at any time, allowing great flexibility!
Here's a render I made, lit purely by E-Light:
http://home.wanadoo.nl/r.j.o/skyraider/download/e-light.jpg
I hope you like the effect. The script can be downloaded here (http://home.wanadoo.nl/r.j.o/skyraider/e-light.htm)
Please mail me with any feedback on skyraider3d@hotmail.com!
I forgot to say, the script is for 3D Studio MAX 4 and 5.
Just to show people that don't have MAX (or people that can't be bothered to run the script ;)) what the interface looks like, here's a screenshot of the settings I used on the render above.
http://home.wanadoo.nl/r.j.o/skyraider/download/e-light_settings.gif
I used a bitmap for the light colours, by the way (Bitmap Settings rollup is closed here). The bitmap was a photo that showed some mountains.
Rendertimes are very fast compared to global illumination renderers.
Special thanks go to Alexander Esppeschit Bicalho and Borislav Petrov for their excellent tutorials on MAXScripting!!!
Enjoy the script! :)
Ronnie
|
|
Libor
01-15-2003, 06:58 AM
Hi Sky!!
Definetely looks promissing! I´m just curious about the number of lights and size in Megabytes. Does it mean it needs 350MB of Ram for rendering otherwise it start swapping all night long??
I´m really gratefull for things like that!! Good work, I´m gonna test our script soon:-)
Cheers
Libor (aka Djembe on Maxforums)
Libor
01-15-2003, 07:00 AM
P.S. I meant "your script" not "our" of course.
Just cant type well, you see:-)
:wavey: Hey Ronnie!
Looks like the scripting's coming on fast! Got to get learning myself now.
Skyraider3D
01-15-2003, 04:36 PM
*Great, I just typed a super-long reply with many smileys and then the server complained I used too many smileys and when I went back my message was gone... :annoyed:
So... here's a summary...*
:wavey: Hi Jol!
Yep, scripting is going well! Let me know when you're getting into it and I'll be glad to help you!
Hey Libor!
Long time no see! How's work going?
I wrote a whole long story about memory usage, but anyway what i wanted to say is:
Don't worry about high memory usage. The image was rendered in a few minutes on a not-too-high-performance machine (1250 MHz, 384 Mb SDRAM at 100 MHz).
You can test render using far less lights (E-Light will maintain exposure) and lower shadowmaps. In fact, rendering this image with half the lights and half the shadowmap resolution will give very similar results, at just one-eigth of the memory (44 Mb). I just wanted to get it perfect for my website :rolleyes:
Less lights could give artifacts (blobs of shadows) and lower resolution shadowmaps might not enhance small details well enough. But you can testrender in a matter of seconds!
All settings of E-Light remain editable at any time without losing the overall feel of the image. One "but" though: if you use complex bitmaps, diferent pixel values will be used if you change the number of lights and it could affect your colours. To prevent that, testrender you colour settings with all lights but shadows turned off. Again it will render in seconds! Try it and you'll see!
I hope that helps :)
RusMan
01-15-2003, 05:23 PM
I will download and try it when I get home:cool:
visualboo
01-15-2003, 05:48 PM
Looks cool. I'll check it out after work today.
Entangle
01-15-2003, 05:57 PM
looks nice. Ill give it a try.
Gelero
01-15-2003, 05:58 PM
and there is a way to make the bunch of lights of INSTANCES?
if you can answer, please redirect it to guilherme@sauer.com.br
thank you!
Wolfy
01-15-2003, 06:55 PM
Just did a quick comparison between Brazil and Scanline/E-Light
Brazil:
1 to 2 AA, -3 to 0 GI
http://members.shaw.ca/wolfy/rad_test[brazil].jpg
E-Light:
91 lights, 256 map size
http://members.shaw.ca/wolfy/rad_test[elight].jpg
I've got a couple suggestions for the script, not sure if its just me but a bunch of the forms are overlapping, like mapsize is on-top of density etc. Also, when creating the lights, it would be a good idea to convert all the windows to wireframe, make the lights, then back to whatever they were. A shaded viewport could take a couple minutes to create the lights whereas wire is a couple seconds.
Overall good script :thumbsup:
ZeBoxx
01-15-2003, 07:37 PM
Heya,
The Brazil render has more subtle shading ;)
But anyway.. not here to argue skylighting vs domelight setups.
Just thought I'd offer this.. rather than changing to wireframe viewports and back, use these two :
disableSceneRedraw()
enableSceneRedraw()
before and after the creation of the domelight setup respectively
Cheers!
Richard Annema
MasterZap
01-15-2003, 08:14 PM
Wolfy
Can you mail me that model at z@master-zap.com I like to test it with something.
/Z
Skyraider3D
01-15-2003, 10:29 PM
Thanks for the replies, guys! :)
Very much appreciated!
Wolfy, wow great comparison! :beer:
Me likes! A lot!
As for the problems you encountered, I sorted it out. I didn't get any interface layout problems myself, as I was using MAX4. Being lazy I assumed MAX5 would be the same. Wrong :surprised So now I have two versions - one for MAX4 and one for MAX5.
As for the redraw issue... strange... I didn't get that myself. I hope the changes to the script will solve it.
ZeBoxx, thanks for the suggestion. I already figured it out before you posted, although for me it didn't change anything to the viewport behaviour (which was equal for wireframe and shaded). But then again it doesn't crash the script either, so I put it back in :)
As for the more subtle shadows of Brazil... hey my script doesn't costs $1200!!! ;) With increased bitmap resolution and additional lights, it will look even better, and the rendertimes will still be lots better than Brazil's. You don't get the bounced light though, I admit...
Gelero, to answer your question here too: no, the lights are not instances and won't be. It's probably possible, but I have no interest in doing so. Reasons:
- you can edit all lights at once with E-Light anyway
- when using a bitmap, your light's can't be instances, as they have different colours
I assume you want to edit a particular setting of the lights that isn't available in E-Light. Let me know what setting this is and I could add it to the script :)
Last but not least, a direct link to the updated E-Light script Zip-file (http://home.wanadoo.nl/r.j.o/skyraider/download/e-light.zip).
Cheers,
Ronnie
Skyraider3D
01-16-2003, 02:37 AM
HORROR!
I opened the MAXScript for MAX4 in Notepad, to add the version information to it, without having to start 3DSMAX, and without me knowing it, Notepad messed up my script! ARGH! :argh:
Anyway, all should be fixed now. If you got errors before when changing the Steps, please download it again.
My sincere apologies for this mistake! :blush:
samhodge
01-16-2003, 06:31 AM
You forgot to advocate the other bonus for the light dome
as it doesnt use random smapling images wont flicker and dance
winner!
Sam
Hey, just think, you have a great script there, now if you could only write one for MAYA, Ive used GI Joe, the faking GI script, the radiosity one, etc. It would be nice to have something that renders fast and at the same time create the look a top quality render would allow. Mental Ray is nice, but render time is killer, its also too bad MAYA doesnt have VRAY, the renders ive seen from that are really amazing too.
if you create a script for maya, PM me..
theSEL
jcjimenez
01-16-2003, 10:55 AM
Hi!
I decided to give a try your script and the only I have to say is ¡GREAT!
Thanks
Juan Carlos Jiménez
Next Limit
ZeBoxx
01-16-2003, 11:26 AM
*grin*
Definitely not disputing the usefulness of lightdomes - I've got a script of my own which interprets a HDRi image :)
Does't have quite as many parameters to tweak though - just a fun project to try :)
Richard
Skyraider3D
01-16-2003, 06:26 PM
Wow guys, thanks for the replies and the positive feedback! :)
Makes me really happy! :cool:
TheSEL, I don't have Maya, sorry :hmm:
Samhodge, good point! ;)
Animations with GI software can look really "flickery", you're right!
3dean
01-16-2003, 07:54 PM
hey
great script. couple of things that could help:
1. make all the lights instances. (easier to make changes)
2. if the lights are instances then you can make a group and only have to click on one thing. (of course you only group the lights, the targets are a different group)
3. option to turn on/off affect specular. (when creating multiply lights to act as GI you don't want them to effect specularity, as a general rule.)
some people have mentioned these ideas as well, sorry to be reduntant.
other than that, awesome!
later
dean
LoneLobo
01-16-2003, 08:01 PM
this script looks very cool, thank you for sharing that with us!
Skyraider3D
01-16-2003, 08:29 PM
Dean, I've mentioned before that it's impossible to use instanced lights when using a bitmap for the colours (which is recommendable, as it makes the image more lively) and kind of pointless as the script will change all lights anyway. But I will add a specular checkbox to it soon. Also I'll probably add Include/Exclude buttons, as I could see a good use for that. Any more things you'd like added? :)
What I could do perhaps is to create controllers for all other lights, to have their parameters to be controlled by light #1. in other words, if light #1 changes, all others will too... Better than instances maybe? :)
LoneLobo, thanks, and you're welcome :)
ZeBoxx
01-16-2003, 09:00 PM
Heya,
You could just instance all the controllers (not color, obviously) across the lights - then changing any light in the domelight setup will automatically affect the others.
Re,
Richard
samhodge
01-16-2003, 09:44 PM
If you are into fake sky domes might also be worth looking at the HDR shop plugin
LightGen
http://www.ict.usc.edu/~jcohen/lightgen/lightgen.html
basically it gets over the fact that if you have high contrast in your lightmap you dont need thousands of lights to find the bright spots.
doesnt do pretty shadows though.
There are importers written for all 3D packages
dont freak about no max exporter
there is in importer
max importer (http://www.cgtechniques.com/lightboard/show.php?id=284&PHPSESSID=2ab1ba3a119d97f3b0b1766d87334e34)
Sam
Hexodam
01-16-2003, 09:59 PM
THIS IS FANTASTIC:buttrock: :buttrock:
now a few pointers and bugs
I noticed that when I clicked to choose a bitmap and then clicked canceld it gave me a script error
Also, it would make this perfect if you could group together the dome and lights, or maybe add one parent object to it all, prefer a group though
and again, this is fantastic and someone give this man a gold thingy!:applause:
Hexodam
01-16-2003, 10:01 PM
also one more, I noticed that when I created a default dome of the teapot it was just too dark, had to change the multiplier to 2.0 to get it lit better
Skyraider3D
01-16-2003, 11:56 PM
ZeBoxx, I already mentioned the use of controllers in my previous reply. It's on my to-do list :)
Hexodam, thanks for the bug report. But the bitmap error... that's odd... I fixed it like aaaaages ago. O well, back to the drawing board :surprised Will be fixed soon!
About the parent... the geosphere is the parent. I mentioned it before. It can be moved and rotated and stuff and the lights will follow.
As for the light being to dark- that's intentional. The script is meant as "environment light" - not the only light. It's best in combination with a target light which you create seperately, you see.
Thanks for the "golden thingy" :D
Samhodge, cheers for the links. I'll check them out!
***EDIT***
Hexodam, I got the bitmap error sorted already. Thanks for pointing it out. If you download E-Light again it should continue to work, no matter how much you abuse the bitmap button ;)
erilaz
01-17-2003, 10:52 AM
Looks very impressive! I will try it out to compare to the light tracer.:D
LoneLobo
01-17-2003, 01:10 PM
Oh, I hope, you don't mind, if I post your script on another gfx-page? It's german and I don't want them to miss this great thing :)
Of course, I don't say it's my work, just want to share this piece ;)
[e] here is a link to the news: http://www.gfx-scene.de/
If you want to, I'll take it out again
TIO_MATT
01-17-2003, 01:49 PM
I ALWAYS SAID MALTA...COULD BE POSSIBLE..ONE..DAY...????
NICE SCRPIT...MAN......KEEP GOOD WORK UP!!:applause: :) :p
ThunderTurtle
01-17-2003, 08:54 PM
(Neuromancer from Maxforums) Heya SkyRaider! Havnt seen you around in ages. Script looks great, downloading it now to play with it. Hope life is treating you good. I'll leave some feedback on the script later tonight after I have some time to test.
-Travis
Skyraider3D
01-17-2003, 10:05 PM
I played a bit with E-Light myself and decided to re-render an old low-poly game model I made over 2 years ago:
http://home.wanadoo.nl/r.j.o/skyraider/gallery/leopard_e-light.jpg
I hope you like it! This tank is actually one of my first low-poly models!!
(btw. the grain is added in Photoshop - E-Light is smooth :))
LoneLobo: No worries! :) Thanks for giving my script some more attention! As long as it contains a link to my website, you can post it anywhere ;)
Jaime mate! :) Malta? Nah... too small! (private joke, hehe)
Travis man, how are you doing? That's been ages!! Waiting for your review :) Hey, render it using your ehm... Heinkel P.1076 ;)
RockinAkin
01-18-2003, 12:02 AM
Great work with the plugin!
Heres a little comparison image I whipped up using an old model:
http://users.starpower.net/kamaelec/Picture-Render-Test.jpg
And here are the stats:
Global Scene Specs:
56790 Polygons
2 Bitmaped Textures
Default Max 5.1 Scanline
------------------------
Render Time: 00:04
Brazil 1.0
----------
Image Sampling - Min: 1 Max: 1
GI Sampling - Min:-3 Max: 0
Bounces - 1
Render Time: 01:18
HDR Dome Light 1.5
------------------
Lights - 75
Shadow Map Size - 128
Shadow Sample Range - 4
Render Time: 00:39
E-Light
-------
Lights - 75
Shadow Map Size - 128
Shadow Sample Range - 4
Render Time: 00:35
Great work on the renderer.
You can use the pic and stats on your site if you want.
-DivideByZero-
Skyraider3D
01-18-2003, 12:31 AM
Oooo great test! Thanks a lot for that! :)
Wolfy
01-18-2003, 01:31 AM
That tank's wicked, how many polys / map size?
(btw great script [again]!)
Congrats !!!
seems to be usefull ....
I still don't get your results, but will keep trying ...
I guess the size of the object and the size of the dome have to be in a certain way ... any advise about that ?
anyway thks for this script .
ThunderTurtle
01-18-2003, 11:01 AM
Hey Sky, life is good with me. Extreamly busy though. I have about 9 months left until I graduate from the Art Institute of Dallas, and i'm also working some on an internship at a gaming company here in Dallas. Between that and trying to keep the bills paid I dont have much free time, but I got a chance to play around with e-light some and i'm very impressed with the results and speeds i'm getting. I am by no streach of the imagination an expert and lighting and rendering, and i'm sure I could speed up my Brazil renders if I learned a little more about it, but modeling is my thing, so the rest will just have to come in time. Anyway here a few various test. I can dig up more details on the scene setups and whatnot if you want them. And after some hard searching, I did find that old plane. I really do plan to finish it one of these days, but who knows when that will be. Enjoy.
Heinkel P.1076 (old old project ;) )
http://www.vi2.com/uploader.php?n=56057
My turtle that was on the front page a few months back.
http://www.vi2.com/uploader.php?n=56055
One of my more recent creture models
http://www.vi2.com/uploader.php?n=56059
I'll do more testing this weekend if I have time, and try to get some better benchmarks to really show what it can do.
-Travis Gosnell
ps. Ronnie, If you want to host those images and post where they can be seen in the forum your welcome to. I'm working on my own web space, but stuck with the vi2 uploader for now.
Skyraider3D
01-18-2003, 02:58 PM
Here's an E-Light render of my latest model, the Focke-Wulf Triebflügeljäger (http://www.cgtalk.com/showthread.php?s=&threadid=31863&highlight=scotty) jetfighter/helicopter hybrid:
http://home.wanadoo.nl/r.j.o/skyraider/gallery/trieb_2.jpg
Travis, thanks for the tests! Nice turtle!! Great textures especially!
And please do finish that Heinkel Perhaps with E-Light ;)
Wolfy, thanks! The tank is 1300 polys, with 256x256 texture, if I remember correctly.
Here is another one! (http://home.wanadoo.nl/r.j.o/skyraider/gallery/shrapnel_slayer_e-light.jpg)
CiF, a combination of settings defines the look of your object. Firstly your skydome should be roughly 2-3x as big as your object's biggest dimension. Then you have to adjust your light's hotspot/falloff settings for that (so it's completely covered). Then the bitmap size comes to play. When you get artifacts, increase the number of light or the sample range.
I hope that helps :)
With the render above I had some troubles. The four small outer wheels were not casting shadows well due to their relatively tiny size to the rest of the object. What I did there was to increase the shadow multiplier to about 3.
Also, with both this render and the tank renders, I moved the object and light-targets off-center, so the light gets a direction.
Currently the script is set to re-create lights in the center of the dome. This will be changed soon, so more flexible light setups are possible, with off-center targets :)
holosynthetic
01-18-2003, 03:24 PM
that wheel test is fantastic, in some ways it looks better then brazil, you know if you packaged some custom materials and maybe a camera....you could make some money off of it
but very awesome work on the light, *just downloaded it*
somlor
01-18-2003, 08:33 PM
This looks like a very useful script, skyraider. I will definitely have to find some time to play with it. GI rendering times are horrendous making it nearly unuseable for animation. As for controlling multiple light, there is a nice script in the blurbeta pack at http://www.blur.com/blurbeta/ called "Light Control" that lets you tweak many parameters of all the lights in your scene. The 4.2 version does work for Max 5, btw.
Screenshot:
Skyraider3D
01-20-2003, 02:03 AM
Good news for MAX 3 users! It's been confirmed that the MAX 4 version of E-Light works in MAX 3 as well :bounce:
Cheers for the heads-up, Somlor!
Holosynthetic, money? Nah... there are plenty of freeware lightdome scripts around already that could then do the job for free anyway :)
Hexodam
01-20-2003, 10:19 AM
just looking better and better :)
Skyraider3D
02-06-2003, 01:06 AM
Cheers :)
Forgot to say: works in 3DSViz too, apparently :)
fayndee
02-06-2003, 03:15 AM
That looks so cool, I wanna download it for my works. But forgive me, I don't know exactly where is the link to download the 'main boby' and the 'plug-ins', would you give me an answer? Thanks!:scream:
By the way, it looks like better than Brazil, I hope it will run better than better!!:thumbsup:
Skyraider3D
02-06-2003, 09:21 AM
Fayndee, the link was in the first post. :)
Here it is again: http://home.wanadoo.nl/r.j.o/skyraider/e-light.htm
It's not a plugin really, but a script. The zip-file contains a readme on how to use it.
Tip for people wanting to make a button on their toolbar. Open (not Run) the script, select all text (ctrl-A) and simply drag the text on the upper toolbar. MAX will create a button for you, of which you can edit its appearance. That's all! :)
proteus2002
02-06-2003, 12:38 PM
first i like to say that your script is very usefull. thank you for sharing it.
i have some ideas to improve the script:
- drag and drop bitmaps instances from the material editor
- possibility to use more than one bitmap to get hdri like ranges
- a show cone button to see the "shadow sphere"
- possibility to switch between "direct lights" and "spot lights"
- possibility to use other geometry to distribute the light (cylinders etc.)
- possibility to let the light face outward (to get objects lights)
i know that this is a lot of work, but maybe you like some of the ideas.
again
thank you very much
proteus2002
Skyraider3D
02-06-2003, 05:49 PM
Thanks for your comments!
First priority is an exclude list and some grouping options, and a checkbox for the specular. But I will definately keep your comments in mind next time I work on the script.
fayndee
02-08-2003, 07:12 AM
Thanks! SkyRaider3D!!:bounce:
CGTalk Moderation
01-13-2006, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.