Daylight etc.

Blitz3D Forums/Blitz3D Beginners Area/Daylight etc.

simcenter(Posted 2006) [#1]
I would love help on just creating simple lighting for scenes.


simcenter(Posted 2006) [#2]
Whoops, this is my first time posting a question or anything. I hope I'm doing this right.

I've been searching for just simple lighting codes or techniques. I've been using ambiant lighting, spotlights, and other lights to try to create a scene with lighting similar to Default modes in Max/viz viewports.

But in Blitz, everything either seems extremely dark, or extremely washed out.

I'm basically importing 3ds objects (without textures) straight into Blitz, and just using paintMesh for simple colors, and the problem is finding a lighting solution to move through a well lit scene...Am I being vague? Any help?


puki(Posted 2006) [#3]
Well, for simple stuff - use the 'AmbientLight' command - if you mean sort of day/night stuff in a simple way.

Play around with it.

EDIT:
Ah, he posted again while I was posting and then updated his question


jhocking(Posted 2006) [#4]
Am I being vague?

Kind of, yeah. I mean, you refer to "a well lit scene," but you also refer to "lighting similar to Default modes in Max viewports." I wouldn't consider Max's default lighting to be "well lit." Still, if that is the look you're going for then note that the default lights aren't based on a static light source. Rather, the default lights in Max move around with the camera, so that the model is always lit no matter what angle you are viewing it from. To replicate that in Blitz, you would parent the lights to the camera.

Unless you want the lighting to change (and even if you do, it'll just require additional tricks) I would recommend lightmaps. Use gile[s] to lightmap your scene.


simcenter(Posted 2006) [#5]
Thanks Joe.
Yes, my definition of "well lit" meant that I can see everything that I personally want to see, nice and simple like. Next time, I'll choose better words.


jfk EO-11110(Posted 2006) [#6]
Probably the most simple solution is this:

light=createlight()
rotateentity light,45,45,45

I use this for quick geomtry checks etc.


Tho 3dsMax is using 2 default lights for shading the preview, one like the one I mentioned and the second one from the visavis direction: rotateentity 225,225,225.

Of course, if you want real light (and shadows) you should use a Lightmapper, preferably one that uses Global Illumination, for the static world and some kind of shadow solution for the dynamic parts.


simcenter(Posted 2006) [#7]
Okay, I just found what I was looking for: I guess the word I was looking for was "shading". And I couldn't figure out how to make a cube's sides differentiated from one another, without those horrible triangulation effects... the answer was by:
Big&
http://www.blitzbasic.com/Community/posts.php?topic=34076#367790

And the small portion I used was
;The bit that does the effect
LightColor(lig,-255,-255,-255)
AmbientLight(128,255,64)

Although, I used different numbers and added the line mentioned above from jfk EO-11110 about rotating the light:

light = CreateLight(1)
RotateEntity light,45,45,45
LightColor(lig,-150,-150,-150)
AmbientLight(250,250,250)

Thanks for everyone's help, and thanks for the patience with newbies.