Author Topic: More WIP on R3PU  (Read 26644 times)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #75 on: August 07, 2018, 05:44:16 pm »
Ahahahahahaha! That's cool! :D

Of course it cannot replace texturized bumpmapping; it is too rough for that because it results in vertex based, rather than per-pixel, rendering. But that's exactly how 3D terrains are generated statically from grayscale terrain "maps" or programmatically in real time in applied 3D game dev.

This method applied programmatically and invisibly to the viewer can also be used to generate ("bake") ambient self-occlusion maps similar to those that were used in genuine R3PU Blender renders. They are available in your texture pack you pointed me to a while ago. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #76 on: August 07, 2018, 06:15:32 pm »
Quote
But that's exactly how 3D terrains are generated statically from grayscale terrain "maps" or programmatically in real time in applied 3D game dev.
That is also almost the same to what i am doing in my Pix3D project here
http://www.objreader.com/index.php?topic=18.0
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #77 on: August 08, 2018, 05:24:50 am »
Dear Patrice,

I'm currently working on why Objector generates better bumps than ObjReader.

As it happens (it's been years so I have forgotten it), Objector uses a different fragment uber-shader that allows for parallax/steep parallax bump mapping for superior quality bumps, especially if shadow and hight maps are used along with the usual diffuse/normal/specular maps. Apart from that, its drawProgrammablePipeline() function is written entirely in assembler to yield the maximum speed possible. It uses five texture units instead of ObjReader's current three.

Since x64 MS VC doesn't support assembly, I can't use Objector's PPL renderer verbatim. I have to port it to C. I wrote it directly in FBSL low-level asm and I don't have any ready-made C prototype.

I'll send you my ObjReader renderer fixes as soon as I'm through with porting and preliminary tests. Please be patient; I'm not feeling myself quite well in this oppressive heat and humidity (up to 90%) we're currently having here in Minsk. :-[
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #78 on: August 08, 2018, 10:14:40 pm »
Quote
I'm not feeling myself quite well in this oppressive heat and humidity (up to 90%) we're currently having here in Minsk
We also have an oppressive heat, like most of the northen hemisphere, fortunatly the nights are cooler by me, because i am living in the country side, and there is no asphalt concrete arround me to keep the heat.

As you can see on the attachment i am still playing with robocop  :)
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #79 on: August 08, 2018, 11:52:36 pm »
Cool! :D


Well,

So far so good. The bumps are now OK visually, both macro and micro ones. And now ObjReader also enjoys parallax/steep parallax bump mapping with up to 5 TU's, pretty much like Objector. 8)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #80 on: August 09, 2018, 12:15:02 am »
Good job my friend!

I have another c4d model (from SketchFab) with AO, emissive, metallic, normal, albedo, and roughness textures.
Is that something you would like to play with (once converted to .obj) ?
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #81 on: August 09, 2018, 12:17:28 am »
Here's a precompiled binary and a couple of steep parallax models for you to play with in the meantime.

I'll be adding the 4th top-down directional light and then we'll merge the mods when completed. 8)

Please check also the other models from your collection and tell me your impression. :)

I have another c4d model (from SketchFab) with AO, emissive, metallic, normal, albedo, and roughness textures.
Is that something you would like to play with (once converted to .obj) ?

Yes please,

And note that a set of original textures is an absolute must. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #82 on: August 09, 2018, 08:57:40 am »
Please see the new Buster Drone model into the WIP section.
« Last Edit: August 09, 2018, 09:40:47 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #83 on: August 09, 2018, 09:57:18 am »
Bump comparison

Top - before

Bottom - after

i can see a huge difference with my personnal set of textures :)

Added:
On some of the existing models it looks a little too strong, do you think it would be possible to use a new meta command to select the new one rather than the (default) old one ?

Doing more test with the existing models...
« Last Edit: August 09, 2018, 10:11:05 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #84 on: August 09, 2018, 10:33:37 am »
Mike

Please try with the RAMJET model.

Added
That's the same problem we had a couple years ago ;)
« Last Edit: August 09, 2018, 10:45:09 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #85 on: August 09, 2018, 10:41:30 am »
i can see a huge difference with my personnal set of textures :)

Yes, and I like it! :D

And now the robocop's plastic leather suit renders more or less veritably.

Quote
On some of the existing models it looks a little too strong, do you think it would be possible to use a new meta command to select the new one rather than the (default) old one ?

Please read my Brief Intro to Simulated 3D Bumpiness in the Tips & Tricks section.

The precompiled ObjReader I sent you uses steep parallax bump mapping, the strongest one of the three even if the hight map isn't available in its disp(lacement) map channel of this particular model's materials. I think we can introduce two alternative params for the map_bump directive and thus have three choices: conventional (old) when no param is used, parallax param for ordinary parallax mode, and steep for enhanced steep parallax mode.

Bent normal maps may be used on default without any specific parameters even without additional height (a.k.a. displacement) map. Sufficient height information is already pre-baked into the bent normals themselves.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #86 on: August 09, 2018, 11:12:58 am »
Mike

Please try with the RAMJET model.

Added
That's the same problem we had a couple years ago ;)

Yes, this model tends to give us some constant PITA.

My observations:

1. The bumps are magnificent, aren't they? :)

2. The model lacks some bump and specular maps.

3. There's absolutely no problem with this model in Objector.

4. I can't recollect now what exactly was causing this glitch in the past and regretfully there are no notes on it in the code. So I'll need some time to re-investigate the matter.

What about other models? Any more of similar glitches anywhere?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: More WIP on R3PU
« Reply #88 on: August 09, 2018, 11:40:39 am »
Check also with FALCON MILLENIUM.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: More WIP on R3PU
« Reply #89 on: August 09, 2018, 11:44:39 am »
Damn! >:(    (Thanks a bunch for the leads though)

I reverted the tangent/bitangent offset in the render proc to what it should be according to the vertex structure prototype, and that corrected the faulty bump mapping we had in ObjReader all this time.

But it again brought about this glitch and I again tend to think that something must be evidently wrong with structure alignment or packing... The C language has some data alignment peculiarities that occasionally bring about similar phantom bugs. But either way, they have nothing to do with Q_fabs or epsilons or any other calc speed enhancers we have throughout the code...

And forget about the FFP Patrice. We're well past the short panties of our immediate mode childhood, my friend. ;)


P.S. Can it be that our tangent/bitangent calc loop generates just one or two per vertex results fewer than it should so that not all the vertices are covered?  ??? OTOH Objector uses the exact same C code and doesn't display such artifacts... :-\

Anyway, I'll be thinking about this problem trying to find the remedy. It must be something so obvious that I can't notice it right under my nose. ;)
« Last Edit: August 09, 2018, 11:58:08 am by Michael Lobko-Lobanovsky »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)