[Patch] 3D Miscellaneous

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Wed Mar 15, 2017 11:37 am

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...

Edit:
Ian wrote:void SetGroupLayerNumber ( long layer_number ) ;
Description
Sets the layer number for group layering. The group layer number sets the drawing priority for all polygons under the culling node.
Arguments
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?
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Wed Mar 15, 2017 12:30 pm

Another case, this time with VF3.

Arcade:
vf3_1.png
vf3_1.png (183.15 KiB) Viewed 9611 times


Supermodel:
vf3_2.jpeg
vf3_2.jpeg (205.68 KiB) Viewed 9611 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.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby Ian » Wed Mar 15, 2017 12:56 pm

That could be just because the bamboo is drawn first and the shadow is depth tested out
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Wed Mar 15, 2017 5:04 pm

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
lam_1.jpeg (235.32 KiB) Viewed 9566 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.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Wed Mar 15, 2017 5:42 pm

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
swt5.jpeg (109.34 KiB) Viewed 9558 times

Supermodel:
swt4.jpeg
swt4.jpeg (138.76 KiB) Viewed 9558 times
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby Ian » Thu Mar 16, 2017 2:58 am

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
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Mon Mar 20, 2017 9:33 am

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.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby Bart » Mon Mar 20, 2017 10:39 am

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!
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: [Patch] 3D Miscellaneous

Postby Ian » Mon Mar 20, 2017 10:45 am

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.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 3D Miscellaneous

Postby Bart » Sat Aug 12, 2017 9:07 am

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.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest