Page 3 of 5

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:07 am
by HarryTuttle
Ian wrote:Just upload images to imgur.com or similar :)


Image

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:11 am
by Bart
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.

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:16 am
by Shekel
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!

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:23 am
by HarryTuttle
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.

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:24 am
by HarryTuttle
Shekel wrote:Harry, you can use the forum's bb code to do this
Image


Thanks! Didn't think of it...

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:25 am
by Bart
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).

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:28 am
by Bart
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.

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 10:34 am
by Ian
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.

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 11:06 am
by HarryTuttle
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

Re: [Patch] 3D Miscellaneous

PostPosted: Wed Mar 15, 2017 11:25 am
by Ian
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.