ObjReader Community

WIP => WIP => Topic started by: Patrice Terrier on May 09, 2019, 06:34:06 pm

Title: gltf
Post by: Patrice Terrier on May 09, 2019, 06:34:06 pm
I am challenging myself with this
https://sketchfab.com/3d-models/battle-damaged-sci-fi-helmet-pbr-b81008d513954189a063ff901f7abfe4

Rebuilding everything from scratch in C4D R20...
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 09, 2019, 08:21:54 pm
Cool! :D But where did you get the model? It isn't downloadable from SketchFab, and Babylon.js gives a clue to only the .glTF itself but no associated .BIN and textures... ??? all the assets! :D

I think the JPEG that goes under the name roughness.jpg is in fact a multi-layer map with more layers to it than just "roughness". It should have one more layer called "metalness". The green-blue coloration proves it.

Photoshop it into two grayscale images of blue and green channels and call them "roughness" and "metalness". Use SketchFab's Model Inspector to determine which is which. 8)
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 09, 2019, 08:41:53 pm
Hehe, actually I was able to snatch all of the glTF model assets from Babylon.js! :P ;D 8)
Title: Re: gltf
Post by: Patrice Terrier on May 09, 2019, 08:42:18 pm
The source is available of GitHub glfl models.
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 09, 2019, 08:54:42 pm
BTW here's the link (https://github.com/KhronosGroup/glTF-Blender-IO) to the modern glTF importer/exporter plugin for Blender.

It's nice to have it in store just in case.
Title: Re: gltf
Post by: Patrice Terrier on May 11, 2019, 09:39:08 pm
I have completed the basic meshes, now i shall start to work on textures…

Added:
And here is my damaged texture.
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 12, 2019, 12:56:53 am
WOW! That fracture looks beautiful! :-* 8)

Are we going to have a glowing holographic plastic visor or anything of the sort?
Title: Re: gltf
Post by: Patrice Terrier on May 12, 2019, 11:01:06 am
Quote
Are we going to have a glowing holographic plastic visor or anything of the sort?

YES  ;)

See the wip attachment.
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 12, 2019, 06:29:19 pm
Awesome work! :)
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 12, 2019, 06:48:41 pm
Got it!

Can I have the blue HUD too? I overwrote the old one while copying... :-[
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 12, 2019, 06:59:29 pm
Can you try and get this entire crease a little better tessellated (subdivided to be more circular but with the crease preserved)? This one looks too crude and angular for a model of such quality. ::)
Title: Re: gltf
Post by: Patrice Terrier on May 12, 2019, 07:17:47 pm
This is WIP isn't it…

Here is my original circular HUD (i don't know if we are speaking of the same)



Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 12, 2019, 07:41:21 pm
Thank you! I just liked the original bluish one better than pure green. :)
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 13, 2019, 09:23:38 am
Hive a nice day, my friend! :D
Title: Re: gltf
Post by: Patrice Terrier on May 13, 2019, 08:28:10 pm
Here is the release candidate version…

Added:
I think that the "black.png" wallpaper is better for that model.
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 13, 2019, 09:36:19 pm
Very impressive! :)

And yes, this is a "technical" piece of gear so a full black or night wallpaper might be better in order not to distract the spectator's attention.

Thank you!
Title: Re: gltf
Post by: Patrice Terrier on May 13, 2019, 10:45:02 pm
Here is the emissive lighting i have been playing with:

#Light frontAmbient 1 0 0
#Light frontDiffuse 0 0 1
#Light frontSpecular 8 8 9

#Light leftAmbient 0 0 0
#Light leftDiffuse 139 69 19
#Light leftSpecular 127 127 121

#Light rightAmbient 0 0 0
#Light rightDiffuse 139 69 19
#Light rightSpecular 127 127 121

#Light topAmbient 44 44 45
#Light topDiffuse 0 0 1
#Light topSpecular 44 44 45

#multilight
#straylight 50
#wallpaper black.png

Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 14, 2019, 07:33:49 am
This helmet looks to me as if made of leather.
Title: Re: gltf
Post by: Patrice Terrier on May 14, 2019, 06:55:13 pm
HUD Helmet has been released in the "Object" section.

This is the end of long C4D work process, i added a few more details in the official release.

BTW, did i told you that i love your "Reset view"!
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 14, 2019, 11:44:19 pm
The model looks faultless to me, thank you very much for this outstanding piece of work! :)

BTW, did i told you that i love your "Reset view"!

Actually, you didn't; you are generally very sparing of praise. But thank you anyway, better late than never! :D

I'm thinking of adding some blend effect when changing the wallpapers so that the transition is smooth rather than abrupt.

I'm now adding a whole library of PP effects including many classic ones like brightness/contrast, hiew/saturation, unsharp mask, etc. All are rather lightweight and fully customizable through their respective tool windows.
Title: Re: gltf
Post by: Patrice Terrier on May 15, 2019, 08:54:58 am
My friend, i am looking forward for your PP effects.

Does real shadow, and glow effect will be part of them?
Title: Re: gltf
Post by: Michael Lobko-Lobanovsky on May 15, 2019, 10:17:01 am
I have been real upset by my recent failure with the 3D DOF effect (too slow if a MSAA FBO is used), and especially with the 7 day long mess to roll back the FBO setup to what it was before my 3D exercises started.

Now that the setup is restored, I've decided to go slowly but steadily. First, I'm implementing simple 1-pass 2D post-processors that need only one color FBO (if used one at a time) and are compatible with the current MSAA settings -- so that you have something to play with too.  (FBOs are new to me, and I develop as I learn them)

The next step will be figuring out how to chain them one after another in an arbitrary order to introduce compound post-processing without a dramatic drop in the FPS rate. GLSL allows real time recompilation of shaders based on C-stylish #ifdef directives in the shader code. So, I think we can use this feature to dynamically recompile a dedicated compound PP shader for each model at its load time based on what PP exactly the model needs.

It will allow us to avoid multiple conditional branching in the shader(s). Note that there are ca. 2M screen pixels to process in each of our render frames. Note also that the entire shader is run not just once per frame but rather 2M times in each frame, once for every pixel. Now if there are even as few as only 5 if-clauses in the shader, then the GPU will have to process over 10M conditional branches in each frame with all the associated misprediction latencies and stalls. And this is real heavy even on the most modern hardware! If real time recompilation proves feasible and effective, then similar recompilation optimization should be introduced in our main rendering uber-shader, too.

Dynamic soft shadowing and bloom/glow effects require juggling with several FBOs at once in several passes. That's why I'll proceed to work on them only after I'm through with the simple 1-FBO 1-pass 2D post-processor chain.
Title: Re: gltf
Post by: Patrice Terrier on May 15, 2019, 12:12:12 pm
Ok, thanks for the heads up!