Page 4 of 4

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 862 times

vf3_2.jpeg (205.68 KiB) Viewed 862 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 817 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 808 times

swt4.jpeg (138.76 KiB) Viewed 808 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.