Page 4 of 5

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 11:37 am
by HarryTuttle
Ian wrote:That's not what I would expect to be honest from any 3D API. Even if you cull back faces and depth sort you still couldn't achieve that. They must be stencil tested ..

Either that or, maybe, a different blending function using "glBlendFunc", "glBlendEquation" or the "Separate" variants...

Ian wrote:void SetGroupLayerNumber ( long layer_number ) ;
Sets the layer number for group layering. The group layer number sets the drawing priority for all polygons under the culling node.
long layer_number
Group layer number. Zero indicates the lowest priority layer.

On a second thinking... could it be what I've called "multipass render" before, answering to Bart?

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 12:30 pm
by HarryTuttle
Another case, this time with VF3.

vf3_1.png (183.15 KiB) Viewed 3090 times

vf3_2.jpeg (205.68 KiB) Viewed 3090 times

Notice how, in the upper image, the translucent bamboo fence "cuts through" Taka-Arashi's shadow revealing the floor, in the second image, instead, they're blended together.

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 12:56 pm
by Ian
That could be just because the bamboo is drawn first and the shadow is depth tested out

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 5:04 pm
by HarryTuttle
Ian, recently we were talking about polys with translucency level > 32. These are sometime "trash" polys that are not displayed. However in L.A. Machineguns i spotted this (that dark-yellow sort of streak between 2nd and 3rd rank initials):
lam_1.jpeg (235.32 KiB) Viewed 3045 times

It was hard to spot because it's there for a single frame and disappears. Luckily it's part of the demo so is reproducible.

I just updated the poly discard condition to consider also those with translucency level > 32 and fixed that. I'll search for regressions but for now can't find any.

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 5:42 pm
by HarryTuttle
One last thing for tonight that could have something to do with object LOD culling nodes, in SWTrilogy during the death star trench run you can see, in the arcade version, that walls and floor mesh details literally pop out only when at a certain distance, in Supermodel they're always drawn:

Abe's video:
swt5.jpeg (109.34 KiB) Viewed 3037 times

swt4.jpeg (138.76 KiB) Viewed 3037 times

Re: [Patch] 3D Miscellaneous

PostPosted: Thu Mar 16, 2017 2:58 am
by Ian
Yeah that's the built in LOD mechanism. We know where the lower level of detail models are. There's a blend table in the viewport which we've found. But not really sure how to make it work. If you can figure out the subtended view angle ..
Also according to the manual the models are supposed to fade in/out.

Personally I'm happy just rolling always with the highest level of detail :p

Re: [Patch] 3D Miscellaneous

PostPosted: Mon Mar 20, 2017 9:33 am
by HarryTuttle
Ian, I'm going to post by tomorrow, I hope, the specular lightning patch. I've done all the testing last weekend and it works beautifully, however today I'm a bit busy and cannot prepare the usual introduction and screens.

Re: [Patch] 3D Miscellaneous

PostPosted: Mon Mar 20, 2017 10:39 am
by Bart
I'm very much looking forward to the specular findings. I presume Harry Tuttle is not aware of the Model 2 algorithm for specular highlighting. I'm still guessing that there is some sort of simple approximation involved and that it may resemble the Model 2 algorithm.

Specular lighting is such a fundamental thing, it's strange that it is omitted from the API documentation given that it had already been implemented on Model 2!

Re: [Patch] 3D Miscellaneous

PostPosted: Mon Mar 20, 2017 10:45 am
by Ian
I am quite looking forward to seeing it too :)
Specular is a weird one. Bart your implementation for specular I am pretty sure was bang on. Unfortunately the model 3 seems to be doing something else ..

As far as I could make out, specular seems to be related directly to the angle of incidence, instead of the angle of reflection.

Re: [Patch] 3D Miscellaneous

PostPosted: Sat Aug 12, 2017 9:07 am
by Bart
Filing these under misc. for lack of a better place to put them:

1. Daytona 2 USA scroll fog issue. Save state here. Watch especially the bottom of the screen. The problem is most pronounced later on in the replay, in the desert segment.

2. Sega Rally 2 brake lights. The left brake light does not illuminate when the brake pedal is placed because of some interaction with the vehicle shadow. If you turn the vehicle such that the shadow no longer obscures the entire brake light, you will see the un-obscured portion illuminated. I thought brake lights were just some simple alpha texture but I'm not sure what the current method of emulating the layered/stencil shadow polygons is. Are the brake lights also a stencil polygon? I guess this could just be a Model 3 render order issue and it's better to live with this than break shadows in other games.