Author Topic: Early WIP on v2.55  (Read 132762 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #225 on: November 22, 2018, 09:46:36 pm »
The new "Mesh info tips" is very handy to inspect a model!
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #226 on: November 23, 2018, 01:42:34 am »
Yes Patrice,

Mesh info tips are one of my most favorite features in 3ds Max. It is pixel-perfect and extremely handy when you're inside a complex model in the vertex editing mode surrounded by thousands of vertex points looking all the same to you, and you need just one of them to mark for deletion or drag around to an appropriate place, and there's literally no other means to tell them from one another.

And since it uses 24-bit color coding, the number of meshes in the model can be virtually unlimited. (actually up to 16M of them)

A similar color coding approach may further be used for pixel perfect detection of an unique vertex point under the cursor in the mesh editing mode. 8)

(Yes, I'd like to live long enough to see quite a number of model editing options implemented in ObjReader itself. There's nothing better than to be able to fix the model in real time directly in the renderer you're using to visualize it. :) )
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: Early WIP on v2.55
« Reply #227 on: November 23, 2018, 05:44:09 am »
Re: Vertex normals shader implementation

Real time visualization of vertex and/or polygon normals is of great help to quickly evaluate the expected quality of normal mapping in a particular model.

But as it happens, drawing something that's not part of model geometry is no easy task for the pixel shader without much of ray tracing mumbo-jumbo. That's where geometry shaders may come to the rescue.

ObjReader is claimed to run under OpenGL 2.0 and higher. OTOH geometry shaders (GS) first appeared as an ARB extension in GLSL v120 alongside OpenGL 2.1.

So, if the user's current OpenGL driver still doesn't support GS and shader compilation fails at app start, I'm going to just disable the vertex normals visualization option in the Design mode popup menu but let ObjReader launch itself for execution anyway.

Is such tactics OK with you?

Note there may be yet some more tricky visualization modes like e.g. shader drawn (rather than draw listed) wireframe overlays that would also require some OpenGL 2+, which I'm going to simply disable as well under similar conditions.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #228 on: November 23, 2018, 07:56:25 am »
Code: [Select]
Is such tactics OK with you?Yes, that makes sense to me.  :)
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #229 on: November 23, 2018, 01:52:16 pm »
Oh, and I forgot to mention:

Mesh info tips are one of my most favorite features in 3ds Max.

infotip.h is my own ground-up re-implementation of this 3ds Max functionality first developed in FBSL for a closed source game engine editor dated 2012. I'm hereby covering it with a permissive MIT license for use in open source projects like ObjReader.

A corresponding blurb is added at the top of infotip.h attached below. Please use it instead of the file I sent you in the 11-22-2018 patch.
« Last Edit: November 25, 2018, 12:41:23 pm by Michael Lobko-Lobanovsky »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #230 on: November 23, 2018, 01:58:35 pm »
Mike

The tooltip should shows up under the cursor rather than above it (just like for regular tooltip)
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #231 on: November 23, 2018, 02:36:59 pm »
Patrice,

Firstly, a Windows "regular tooltip" has its own logic to determine where to pop up depending on the space available between itself and the screen margins, pretty much like a Windows regular popup menu window would do, overriding your custom placement commands.

Secondly, a Windows regular cursor icon is 32x32 px large. In the most general case, its visible content's size is unpredictable (i.e. arbitrary, like in an arrow, cross, bar, hand, etc), and the only thing we can determine for sure is the exact location of its hot spot. With this in mind, how would you suggest we place our custom tip with respect to the cursor's visible content so as to neither obscure the cursor or tip text nor make the gap between the cursor and tool tip way too large unless we also provide the window class structure with our custom cursor icon whose visible content size is guaranteed to be known in advance?

And lastly, that said, I see no problem in placing the info tip according to the same rules your WinLIFT "regular custom tooltip" uses to pop up on the screen. I just wanted to stress those rules are not fool proof.

Will do in the next patch. :)
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: Early WIP on v2.55
« Reply #232 on: November 25, 2018, 12:39:56 pm »
OK Patrice,

While you're still struggling with the AO jaggies, here's the info tip you wanted to see. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #233 on: November 25, 2018, 03:17:51 pm »
GL_GEOMETRY_SHADER is undeclared
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #234 on: November 25, 2018, 04:09:16 pm »
Ah yes,

Sorry, my bad. :-[

There were a hellofalotof things undeclared in gl2.h that relate to geometry shaders.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #235 on: November 25, 2018, 05:09:09 pm »
Thanks!
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #236 on: November 26, 2018, 09:05:58 am »
Awaiting your comments. ;)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #237 on: November 26, 2018, 10:24:02 am »
The info tip is now very close to the original (still one pixel offset missing ;) )

Would be very handy if while upon a specific mesh, we could (press on the ALT key for example) to hide all the other meshes for better inspection.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #238 on: November 26, 2018, 12:56:14 pm »
The info tip is now very close to the original (still one pixel offset missing ;) )

Which one, horizontal or vertical? Everything's perfectly all right for me under Win 7 empirically, and both offsets are the exact replicas of what I'm seeing in your "custom" tool tips over the ObjReader side panels.

Perhaps there are slight differences between the Win 7 and Win 10 arrow pointer images? (I didn't run any tests in my Win 10 box yet) That's exactly what I was talking about when saying that, in a general sense, we can never be sure about the exact outlines and metrics of system default cursor images, and consequently, about a pixel perfect vertical offset of their respective tool tips.

Quote
Would be very handy if while upon a specific mesh, we could (press on the ALT key for example) to hide all the other meshes for better inspection.

That's a very bright idea! Will do in the next patch for the mesh info tip mode: Alt press will hide the info tip and all other meshes except the one immediately under the cursor, and Alt release will respawn both the info tip and hidden meshes. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: Early WIP on v2.55
« Reply #239 on: November 26, 2018, 03:25:23 pm »
On the vertical, the tooltip should be 2 pixels lower.
Patrice
(Always working with the latest Windows version available...)