What's new

Zelda MM point lighting

Gonetz

Plugin Developer (GlideN64)
I want to talk about “point lighting” implemented in RiceVideo 6.1.0. Yes, with this feature ZeldaMM looks much more correct. But is it 100% correct? Since I don’t have N64 console, I can’t answer this question. However, I can analyze Rice’s plugin work. As I see, point lighting means that under some condition all directional lights are ignored and only ambient light is used. Well, may be it must work this way. However, sometimes it looks strange. Look at these screen shots. On the first screen Link is flat lit (no directional lights used). One step aside and he becomes lit by directional light. Why? What is so different in both cases? I think, light sources are the same. So how to explain directional light absence on the first screen? May be somebody can post screens from real system?
 

Rice

Emulator Developer
Gonetz

The implementation in my plugin is just better than before, as you said, it is not way to be accurate. One thing we are sure is that directional lighting, ambient lighting and point lighting are all used in this game.

I would like to see some shots from the real console, too.

I would like to see how Orkin has done with his Direct64 plugin about this.
 

Reznor007

New member
I have my N64 connected to my PC and can take screenshots if you want. Just tell me a place to take them. It has to be in town though, as my MM cart doesn't have any saves on it right now(I beat it on Gamecube).
 

Sirmatto

Member
It's been ages since I beat this game, but I do still have my N64 and game still. If somebody can tell me what point in the game is best, I can find my digital camera and I can remember after sitting through my hydraulics class for a very long time, I'll gladly take a picture and post it if no one else does by the time I get back
 

Orkin

d1R3c764 & g1|\|64 m4|<3R
Point lighting is where the light's direction is computed per-vertex by finding a the normal from the light's position (specified in the light structure) to the vertex. I haven't completely figured it out yet either (still working on how it's supposed to be attenuated), but I don't think my implementation in Direct64 has the problem you mentioned, Gonetz. At least, I never noticed it. I'll check tonight after work...

From what I can tell, directional and point lights can be used at the same time (they can in Direct64 anyway), but MM will usually set the directional lights' colors to black when using point lighting.
 
Last edited:

Orkin

d1R3c764 & g1|\|64 m4|<3R
I was wrong. Direct64 does the same thing that's shown in the screenshots above. However, it's not a problem with the point lighting, as disabling it leaves the same issue.

Could this be the way it was on the N64? Or maybe there's another type of light that we're still missing?

A few shots from the N64 of the bomber tunnel could help out...
 

Federelli

Beta Tester
Not the bomber hideout, but still, point lightning is used here as well at night (shop alley)

screens.html
 

Sirmatto

Member
Ok, here are the pictures I promised. No one told me any place specific, so I just took the bomber's hideout. Seems a lot more illuminated than using and emulator with Rice's plugin. But if you want anymore pictures, let me know the place and the position you want me to stand at. And the last picture is just to show how awesome I am.

And sorry for the grainy pictures, I lost my S-video out cable for the N64 and am left for now with composite only. I will try to take better picture if these actually help and are useful for this topic.
 
Last edited:

Reznor007

New member
Orkin said:
I was wrong. Direct64 does the same thing that's shown in the screenshots above. However, it's not a problem with the point lighting, as disabling it leaves the same issue.

Could this be the way it was on the N64? Or maybe there's another type of light that we're still missing?

A few shots from the N64 of the bomber tunnel could help out...

The lighting on Link does not disappear like it seems to in the emulators shots. It's on him in the entire room.
 
OP
Gonetz

Gonetz

Plugin Developer (GlideN64)
Orkin said:
Point lighting is where the light's direction is computed per-vertex by finding a the normal from the light's position (specified in the light structure) to the vertex.
May I ask, how did you found it? I did not found information about Point lighting in the N64 Programming Manual. Besides, light structure is defined as :
typedef struct {
unsigned char col[3]; /* diffuse light value (rgba) */
char pad1;
unsigned char colc[3]; /* copy of diffuse light value (rgba) */
char pad2;
signed char dir[3]; /* direction of light (normalized) */
char pad3;
} Light_t;
typedef union {
Light_t l;
long long int force_structure_alignment[2];
} Light;
so, where is the light's position?
 
OP
Gonetz

Gonetz

Plugin Developer (GlideN64)
Sirmatto said:
Ok, here are the pictures I promised. No one told me any place specific, so I just took the bomber's hideout. Seems a lot more illuminated than using and emulator with Rice's plugin.

Reznor007 said:
The lighting on Link does not disappear like it seems to in the emulators shots. It's on him in the entire room.

So, Rice did a step in the right direction, but the problem is not fully solved yet. And thanks Sirmatto and Reznor007 for screen shots, they made the situation more clear.
 
Last edited:

Rice

Emulator Developer
Gonetz said:
May I ask, how did you found it? I did not found information about Point lighting in the N64 Programming Manual. Besides, light structure is defined as :
typedef struct {
******
} Light;
so, where is the light's position?


Gonetz

If you read general reference for DirectX or OGL lighting, you will see that a point light does not have a direction. It has a position instead. Lighting direction to a vertex is then calculated from the light position to the vertex position. You can find more information about lighting computation in Microsoft DirectX documents (or other online resources).

Please also check your PM.
 

Gent

The Soul Reaving Gentleman
Administrator
These were taken with a special Jabo Plugin he worked on from 2 years back that supports this.
 
OP
Gonetz

Gonetz

Plugin Developer (GlideN64)
I'd like to know why it was not included in the released version? May be it is that mysterious Jabo LLE plugin?
 

olivieryuyu

New member
Gonetz said:
I'd like to know why it was not included in the released version? May be it is that mysterious Jabo LLE plugin?

hmm it would be very stunning that is Jabo LLE

the LLE functions that exists in Jabo plugins(1.5.1 and 1.4) are only for 2D stuff and i never succeed to get any 3D gfx with it. But well who knows except Jabo ?
 
Last edited:

Orkin

d1R3c764 & g1|\|64 m4|<3R
[sarcasm]That Jabo...always holding out on us![/sarcasm]

It looks like the problem is the point lighting is supposed to be applied to link as well as the world geometry, but the way we're handling it now, it's not?
 

Top