Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Lights! Frelling Lights!

Author
Message
Scooby Snack
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location:
Posted: 5th Mar 2004 18:01
I am trying to create a spot light on an object/floor. I have found the post that allows you to do this for a matrix, but is a very choppy circle. I either get the whole object lit or not all, no spot can be seen anywhere!

Also I have tried a lightmap sample from the forums that works well, but when I texture the floor and scale the texture the light map is effected also.

This is the code i got for the spot on the matrix
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Mar 2004 20:58 Edited at: 5th Mar 2004 21:00
Change

make matrix 1,200,200,50,50

to

make matrix 1,200,200,100,100

in order to make the spotlit area more detailed, the problem is with the way that directx calculates lights, the lighting is calculated per vertex, so if you illuminate a low poly object the effect is not so good and the light isn`t as bright, you get the same in some commercial games, noticed how the torch in Halflife is inconsistent when illuminating the inside of air ducts etc???, since they are low poly you get a lit/not-lit effect that looks quite unrealistic, you might also like to play with the vertices on the matrix, but I don`t know about that since the math is more than I can be bothered/able to learn.

Mentor.

1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, 2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
Scooby Snack
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location:
Posted: 7th Mar 2004 20:03
I have already tried changing as advised, but it kills the performance in that small demo alone. The rest of your post has helped as I never realised the way the lights were calculating.

Thanks! I have managed to solve the problem i was having by playing with lightmaps, which I still don't understand yet!

Login to post a reply

Server time is: 2024-11-26 07:44:40
Your offset time is: 2024-11-26 07:44:40