ObjReader Community

WIP => WIP => Topic started by: Patrice Terrier on January 31, 2019, 07:54:32 pm

Title: Behance Brabham
Post by: Patrice Terrier on January 31, 2019, 07:54:32 pm
My friend, have a look on this amazing free model
https://www.behance.net/gallery/61490131/Brabham-3D-modelling-(free-model)
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 01, 2019, 12:42:38 pm
Amazing! The model has 13M verts yet renders at 60FPS full screen! :D  (probably that's because there are no textures...)

Thanks a lot!

BTW IIRC the links include the one at the bottom that leads to some additional (possibly HDR) textures. Can you also DL those for me, please?
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 02, 2019, 05:35:41 pm
Looks nice! :)

BTW do you take the original renders as a reference for your WIP? I think the originals look much more glossy as if the car paint were very fresh, lacquered and polished...
Title: Re: Behance Brabham
Post by: Patrice Terrier on February 03, 2019, 09:15:08 pm
I still have a few things to work on, but for sure that one shall deserve a five star rating!
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 03, 2019, 09:40:32 pm
(https://obrazki.elektroda.pl/1983300100_1428394303.png)
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 06, 2019, 12:56:51 am
The car is beautiful, my friend!

And the speed of 60FPS in full screen for 10M polygons is almost unbelievable. :)
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 08, 2019, 07:40:31 am
OK Patrice,

This hotfix seems to eliminate glitches in RamJet, Millenium_Falcon, and your latest bug.obj.

Around line 187 in shaders.h, use the following code:

........
    } else if (pResourceId == SHADER_NORMAL) { // 12-11-2015 ML: multilight
        vs =
            "varying mat3 tbnMatrix;\n"
            "varying vec4 position;\n"
            "varying vec3 lNormal;\n"
            "varying vec3 vertex;\n"

            "void main() {\n"
                "gl_TexCoord[0] = gl_MultiTexCoord0;\n"
                "vertex = gl_Vertex.xyz;\n"
                //"gl_Position = ftransform();\n" // ML: better for OpenGL normal maps
                "gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" // ML: better for DirectX normal maps
                "// Transform the normal into eye space and normalize the result.\n"
                "position = gl_ModelViewMatrix * gl_Vertex;\n"
                "lNormal = normalize(gl_NormalMatrix * gl_Normal);\n"
                "// Setup stuff for normal maps\n"
                //"vec3 t = normalize(gl_NormalMatrix * gl_MultiTexCoord1.xyz);\n"
                "vec3 t = gl_NormalMatrix * gl_MultiTexCoord1.xyz;\n" // fighting RamJet artifacts
                "vec3 b = cross(lNormal, t) * gl_MultiTexCoord1.w;\n"
                "tbnMatrix = mat3(t, b, lNormal);\n"
            "}";
........


The bitangent cross product determines the tangent-space normals' orientation (if they face front or back), and in some cases simple renormalization of tangent before taking its cross product with the normal may cause the unexpected and incorrect flipping of the latter. Some Internet resources do normalize tangents and some others don't. So I omitted the normalization and it seems to have done the trick.

Theoretically the non-normalized tangents could make the normals (and consequently, the specular highlights) somewhat sharper. However the latest models with good metal surface detalization and AO maps (e.g. DreadRoamer, Teal'c, Knight, Nyra, and especially Unreal) look simply excellent with this fix. I don't think we will have to change anything in the existing material files. 8)

Please let me know how the fix works for you, my friend.
Title: Re: Behance Brabham
Post by: Patrice Terrier on February 08, 2019, 10:37:13 am
Thank you so much !!!


Title: Re: Behance Brabham
Post by: Patrice Terrier on February 08, 2019, 06:40:40 pm
Here is the result of a long process…

All UV have been reworked to be AO compatible, several meshes have been created from scratch, a complete texture set has been added.

Enjoy!

Now i shall work on the release of version 2.75.
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 08, 2019, 09:12:02 pm
Thank you! This is probably your best model ever. :)

BTW are you sure the orientation of RPM meter is correct?
Title: Re: Behance Brabham
Post by: Patrice Terrier on February 08, 2019, 09:28:22 pm
Quote
BTW are you sure the orientation of RPM meter is correct?
I asked myself the same question, and the answer is here
https://www.youtube.com/watch?v=ArNhJqQaRJk

BTW, since i posted the model, i found one UV problem, and a few meshes missing…  ::)
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 08, 2019, 11:41:11 pm
... the answer is here https://www.youtube.com/watch?v=ArNhJqQaRJk

:o Unbelievable!  :o

Quote
... a few meshes missing…  ::)

No big deal! Unless those are car body parts, nobody's gonna notice. ;)
Title: Re: Behance Brabham
Post by: Patrice Terrier on February 09, 2019, 10:30:15 am
The final version has been released into the car section, altogether with the latest fixes.
Title: Re: Behance Brabham
Post by: Michael Lobko-Lobanovsky on February 09, 2019, 11:01:30 am
That dark-gray anti-noise compound on the engine is a killer. :)