[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 10:07 am

Ian wrote:Just upload images to imgur.com or similar :)


Image
Last edited by HarryTuttle on Wed Mar 15, 2017 10:27 am, edited 3 times in total.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby Bart » Wed Mar 15, 2017 10:11 am

HarryTuttle wrote:
Ian wrote:See if you can fix this one ..


No, wait... I've got the fixed one... but with your engine. What's happening here?

(O.T. I'd like to post a picture but it says "Sorry, the board attachment quota has been reached.", if I delete my past attachment from control panel will the one already posted disappear too ?)


There's a global quota and I just tried raising it. Not sure if it'll work though. You can try attaching again and let me know.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: [Patch] 3D Miscellaneous

Postby Shekel » Wed Mar 15, 2017 10:16 am

Bart, could I cheekily ask for the avatar limit to be bumped up to 9KB, please? :)

Harry, you can use the forum's bb code to do this
Image

Edit: Thanks!
Last edited by Shekel on Wed Mar 15, 2017 10:34 am, edited 1 time in total.
User avatar
Shekel
 
Posts: 345
Joined: Wed Mar 16, 2016 12:45 pm

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Wed Mar 15, 2017 10:23 am

Bart wrote:To put it another way: if the normal is flipped for the double-sided translucent polygon in my example, it will *not* be discarded. So the normal must not be flipped in order for backface culling to remove it


I think that's the concept said with proper words.

I've used the term normals (I'd have to distinguish between vertex and face anyway) but maybe I've just misunderstood the whole mechanism, it's my fault, so let's put aside for a moment those normals.

The end result for every translucent poly should be like the one below if Model3 does what is think:
eca3.jpeg
Single-sided transparent poly
eca3.jpeg (240.59 KiB) Viewed 7310 times


Note the balloons with only on side facing to the camera.
Last edited by HarryTuttle on Wed Mar 15, 2017 10:29 am, edited 1 time in total.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby HarryTuttle » Wed Mar 15, 2017 10:24 am

Shekel wrote:Harry, you can use the forum's bb code to do this
Image


Thanks! Didn't think of it...
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby Bart » Wed Mar 15, 2017 10:25 am

Shekel wrote:Bart, could I cheekily ask for the avatar limit to be bumped up to 9KB, please? :)

Harry, you can use the forum's bb code to do this
Image


Sure, I've raised it to 12,000 bytes. Note that the image dimension restriction remains unchanged (and this is for a good reason).
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: [Patch] 3D Miscellaneous

Postby Bart » Wed Mar 15, 2017 10:28 am

HarryTuttle wrote:
Bart wrote:To put it another way: if the normal is flipped for the double-sided translucent polygon in my example, it will *not* be discarded. So the normal must not be flipped in order for backface culling to remove it


I think that's the concept said with proper words.

I've used the term normals (I'd have to distinguish between vertex and face anyway) but maybe I've just misunderstood the whole mechanism, it's my fault, so let's put aside for a moment those normals.

The end result for every translucent poly should be like the one below if Model3 does what is think:
eca3.jpeg


Ok, I think I get what you're saying then. Basically, translucent polygons whether double-sided or not are actually single-sided. Model 3 specifies a face normal in each polygon header and I think this is used for culling (perhaps Ian can clarify, though, because I'm now actually unsure given his quad fix).

In our 3D engines, we of course have to use the normal to figure out how to reorder the polygon winding into a standard form, because OpenGL computes face normals for culling on-the-fly from triangle edges.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: [Patch] 3D Miscellaneous

Postby Ian » Wed Mar 15, 2017 10:34 am

Yeah the face normal is used for culling.
The per vertex normals are used only for lighting.

it is possible that translucent polys are only single sided ..
Harley has glass at the very start which you can see from both sides. Not sure if it's doubled up though.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] 3D Miscellaneous

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

Bart wrote:Basically, translucent polygons whether double-sided or not are actually single-sided.


Yes, that's it. How to do that it's another thing obviously.

Ian, Bart, could this be somewhat related ?

Arcade:
eca4.png
eca4.png (197.33 KiB) Viewed 7303 times


Supermodel:
eca5.png
eca5.png (37.87 KiB) Viewed 7303 times
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] 3D Miscellaneous

Postby Ian » Wed Mar 15, 2017 11:25 am

That's very interesting
Also a great catch

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

In the devguide it has a function called

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.



Never figured out how it works though. It supposed to be something related to the culling nodes.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest