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

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #15 on: October 25, 2018, 10:08:29 pm »
Here we are…

Put the "trebuc.ttf" font into the Reader folder.

For now, and for test purpose the toolwindow is currently visible at startup, but it should start hidden and get visible only when the Ctrl key is being used (not done yet).
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #16 on: October 26, 2018, 03:03:14 am »
Excellent!

In the meantime, here are a few lightweight fancy mode shaders with hardcoded parameters. I'm going to merge your tool window and then re-send the mods to you.

Thanks a million for your help! :)
« Last Edit: October 26, 2018, 03:19:12 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)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #17 on: October 26, 2018, 09:29:44 am »
Quote
Thanks a million for your help!
Thanks to you, for all the great work you are doing on the new features, but we are partners aren't we, and this project is the result of our common work, that is a real pleasure to work with you, and see OR becoming better and better.

About the new Tool window i did it using the WinLIFT features, because i thought it was easiest for you to customize things from the standard ToolProc callback, rather than using a transparent overlay and a GDImageCallBack.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #18 on: October 26, 2018, 11:04:39 am »
... i thought it was easiest for you to customize things from the standard ToolProc callback ...

You guessed right. GDImage remains a Pandora box for me. But I think that once we get it all up and running, we can discuss moving the toolbox functionality over to the overlay(s) just to maintain the uniformity of OR controls. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #19 on: October 26, 2018, 01:44:34 pm »
To fix the problem of material files using a qualified path, change this into Tools.h

Code: [Select]
//char* Path_CombineA(OUT char* zResource, IN char* path, IN char* combine) {
//    long offset = lstrlenA(path);
//    ClearMemory(zResource, MAX_PATH);
//    MoveMemory(zResource, path, offset);
//    MoveMemory(&zResource[offset], &combine[0], strlen(combine));
//    return zResource;
//}

char* Path_CombineA(OUT char* zResource, IN char* path, IN char* combine) {
    long offset = lstrlenA(path);
    ClearMemory(zResource, MAX_PATH);
    if (strstr(combine, "\\")) {
        strcpy(zResource, combine);
    } else {
        MoveMemory(zResource, path, offset);
        MoveMemory(&zResource[offset], &combine[0], strlen(combine));
    }
    return zResource;
}

Note: To detect the use of Ctrl key, you can use the built-in  ZI_IsCtrlKeyPressed() API.
« Last Edit: October 26, 2018, 01:55:06 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #20 on: October 26, 2018, 04:11:45 pm »
Thanks for the fix and tip, Patrice!
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #21 on: October 26, 2018, 04:43:51 pm »
Mike

I have written the Ctrl key detection to show or hide the toolwindow,
but i was forced to make a couple changes into the code of
1 - ToolWindow.h
2 - Main.cpp

I am performing the CTRL key detection directly inside of the main message pump, from
DetectCtrlKey(&msg);

That solves a focus conflict that could occure at startup, causing the main caption bar to stay grayed, and a Windows redraw problem of the toolwindow when switching between visible and hidden.
« Last Edit: October 26, 2018, 05:09:14 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #22 on: October 26, 2018, 09:48:20 pm »
Thanks for the update Patrice!

That solves a focus conflict that could occure at startup ...

Yet another reason to stay away from 3rd party black box frameworks. ;)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #23 on: October 26, 2018, 11:59:06 pm »
The X-Ray transparency is my favorite one!  8)
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #24 on: October 27, 2018, 09:45:45 am »
Yes, it helps to easily inspect the model's innards. :)

I'm planning on adding yet another shader (and render mode), the model slicer, to the menu Design section. It allows the model to be split interactively into visible/invisible quadrants along the X,Y,Z movable planes that pass through the model parallel to its axes, while rendering the model in its textured state. I think it's going to be even more handy for further inner inspection under more natural conditions. 8)

Regarding diffuse reflection (that's a classic Minnaert per vertex lighting shader, an alternative to OpenGL's built in lambertian lighting model), I've chosen to include it because it renders the model in shades of black, which sometimes gives more spectacular results than model inspection in its original or default material colors. The light spot size will be adjustable via the shader controller tool window. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #25 on: October 27, 2018, 10:00:35 am »
I find some of them useless (goosh, cartoon), but generally speaking anything that could help to better inspect the model is a great addition.

Note: With the latest VS2017 Community version i am able to run OR in debug mode, but i keep using VS2010 for code production because of  much smaller binary size...
« Last Edit: October 27, 2018, 11:14:13 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #26 on: October 27, 2018, 11:43:49 am »
I find some of them useless (goosh, cartoon), but generally speaking anything that could help to better inspect the model is a great addition.

Pretty much like your own model-wide "ambient reflection". :P ;)

No, I think the ability to get some aesthetic satisfaction from models with missing/unavailable MAT files is in fact great. There are other lightweight shaders like "polka dot" or "hatch" or "stripes" and similar -- those are really of low aesthetic value and that's why I didn't include them in the list. BTW this gooch is a deviation from classic; it misses black outlines of model overall shape. I'm going to replace this shader when I find some free to use classic one.

Quote
With the latest VS2017 Community version i am able to run OR in debug mode, but i keep using VS2010 for code production because of  much smaller binary size...

I'm not sure but probably yet smaller binary could be generated if the cplusplus-ish vectors are substituted with classic arrays, and the code is fixed in compliance with standard ANSI C that would incur just one dependency -- msvcrt.dll. :)
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: 753
Re: Early WIP on v2.55
« Reply #27 on: October 28, 2018, 12:06:10 pm »
Patrice,

I managed to get Z rotation up and running. It wasn't that easy due to numerous keyboard focus issues and as well as bloated viewport coords calc in ProcessMouseInput().

I fixed most focus issues but I decided to use the Design menu to launch the Z rotation mode, rather than the Alt or Z keyboard "hotkey" approach, for consistency with OR's current practices.

Do you want me to send you my fixes right away or can you wait till I finish off shader control via the new tool window?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 936
    • zapsolution
Re: Early WIP on v2.55
« Reply #28 on: October 28, 2018, 05:07:56 pm »
I can wait until you finish off shader control via the new tool window.
« Last Edit: October 28, 2018, 05:51:06 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 753
Re: Early WIP on v2.55
« Reply #29 on: October 28, 2018, 07:02:41 pm »
OK :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)