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

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #270 on: December 10, 2018, 07:27:50 pm »
OK Patrice,

I think you'll like what you'll see. I do. :D

You will probably have to fix an emissive material here and there (e.g. Tron's engines) but overall, the result is excellent and 100% correct. 8)

(I'm in love with your dragon. :) )
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: Early WIP on v2.55
« Reply #271 on: December 10, 2018, 09:42:25 pm »
Everything looks fine now, and we can again adjust the Ke emissive level. Thank you!

I have attached the wallpaper i am usig with the dragon.
And here is my material setup

Code: [Select]
#wallpaper @wallpaper.png
#multilight
#straylight 50

newmtl body
Ka 0.15 0.15 0.15
Kd 0.75 0.75 0.75
Ks 0.375 0.375 0.375
Ke 0.5 0.5 0.5
map_Kd dragon_d.png
map_bump dragon_n.png
map_Ks dragon_s.png
map_Ke dragon_e.png
Ns 1024
illum 2
« Last Edit: December 10, 2018, 09:44:06 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #272 on: December 10, 2018, 10:20:28 pm »
Thank you, Patrice.

Are the maps just renamed or different from what they were?

Strictly speaking, the Ns range should fall within [0,1000] according to the Wavefront OBJ specs.

I prefer the following settings:

Ks 0.475 0.275 0.175
Ke 0.75 0.75 0.75

« Last Edit: December 12, 2018, 11:41:04 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: 1983
    • zapsolution
Re: Early WIP on v2.55
« Reply #273 on: December 10, 2018, 11:16:14 pm »
They have been just renamed.

Take care of yourself my friend!
 
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #274 on: December 12, 2018, 11:40:01 am »
OK Patrice,

Just to get you out of your fruitless hibernation, here are some animated lights. 8)

It's almost Christmas time, after all! :D
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: Early WIP on v2.55
« Reply #275 on: December 12, 2018, 03:49:59 pm »
Mike

Light animation is another great feature, thank you!!!

I am thinking to use something more meaningfull that the button(s) "Render", perhaps like the GDImage FPS on/off used in the overlay control panel.
Or using a couple of overlapped WinLIFT skButtonImage (one for On, another for Off, and playing with the visual state accordingly)
Same as using a "Render On" and "Render Off"; see also my MTC64 project.
« Last Edit: December 12, 2018, 03:55:47 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #276 on: December 12, 2018, 04:02:13 pm »
Actually, I don't find the light balls very spectacular even if we change them to colored light bulbs or flares or anything. They are just a convenient instrument to fine tune the animation speed easily and then IMHO they should be turned off not to distract the user from the scene. :)
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 #277 on: December 12, 2018, 04:36:38 pm »
Patrice,

In the meantime, da ya haz teh codez to implement a splitter that would slide from the right-hand gray panel to the left of current viewport dragging the existing gP.hGL border along with it and thus leaving the underlying gP.hMain's areas unobscured?

I'm planning to experiment with a few of texture edit options in ObjReader soon, and I would like you to code such a feature for me, if your WinLIFT/GDImage framework provides such a splitter control preferably skinned to match the existing looks of the main window. 8)
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 #278 on: December 12, 2018, 08:21:50 pm »
Yet one more wish:
  • The Wavefront OBJ format defines grayscale map_d textures that are effectively alpha maps to complement the diffuse maps saved in the 24-bit RGB/BGR formats (BMP, JPG, GIF etc.). I've seen them used in OBJ files very often. It would be however wasteful to load and mipmap them as separate 32-bit textures because that way we'd be wasting exactly 4 channels in both maps (1 in the diffuse map, and 3 in the alpha map), i.e. a whole 32-bit map altogether.
  • There are also the so-called cavity maps that are effectively AO/shadow maps for the specular, rather than ambient/diffuse, component. They suppress specular highlights in deep recesses, cavities, cracks and slots in the model. While they are not conformant with the OBJ format, they are nonetheless used widely enough.
It won't be reasonable to load them all separately. I want to add them dynamically at model load time to the 4th (alpha) channel of diffuse and specular maps, respectively.

My question is: are there functions in GDImage to load, resize smoothly to the same size if needed, combine the pixel data with the alpha channel, and finally load from memory and mipmap such synthetic textures pretty much like we deal with the texture disk files now?

If yes, can you provide me with hints on such a practical toolchain using your GDImage facilities?
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: Early WIP on v2.55
« Reply #279 on: December 13, 2018, 10:54:36 am »
Yes, we can resize a bitmap on the fly, and/or manipulate the pixels using the GetDIBits either from a bitmap or from a DC.
See also ZI_CreateGLTextureFromFileEx.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #280 on: December 13, 2018, 11:02:04 am »
I do not want to create it from the file.

I want to load its pixel data as 32-bit array from the file, add the alpha channel from another grayscale pixel array, and then I want to use this 32-bit pixel data array with the new alpha channel to create a texture in a normal way. But not from the file as in ZI_CreateGLTextureFromFileEx but from the memory data array.

If there is no ready made ZI_CreateGLTextureFromMemoryEx in GDImage then I'm going to write my own texture loading function for this purpose.

Is it all right with you?
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: Early WIP on v2.55
« Reply #281 on: December 13, 2018, 02:01:12 pm »
Yep, there is no ready made ZI_CreateGLTextureFromMemoryEx in GDImage, thus it must be written for this purpose.
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: Early WIP on v2.55
« Reply #282 on: December 13, 2018, 03:25:32 pm »
Thank you, then I'll do that when needed.
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 #283 on: December 13, 2018, 03:28:31 pm »
Patrice,

In the meantime, da ya haz teh codez to implement a splitter that would slide from the right-hand gray panel to the left of current viewport dragging the existing gP.hGL border along with it and thus leaving the underlying gP.hMain's areas unobscured?

I'm planning to experiment with a few of texture edit options in ObjReader soon, and I would like you to code such a feature for me, if your WinLIFT/GDImage framework provides such a splitter control preferably skinned to match the existing looks of the main window. 8)

Patrice,

Any feedback on this message, please?
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: Early WIP on v2.55
« Reply #284 on: December 13, 2018, 03:52:10 pm »
Quote
leaving the underlying gP.hMain's areas unobscured
What do you mean exactly by unobscured?

Should it be a transparent layer (to see the underlaying desktop), and does this new layer should be a GDImage control to draw in?

Added
To create a splitter here is an example of code i am using for a vertical one, and the code is the same for horizontal except for that width and heigh size are inverted.

Code: [Select]
    // =============================================================================
    // TOP SPLITTER control
    Path_Combine(szResource, EXEresource(), L"splith.png");
    skPushButtonImage(gP.hMain, szResource, $NULL, -4, 128, CLIENT_WIDTH + 8, 8, IDC_SPLIT_TOP, 0);

I shall add one in the code, and send you a screen shot for your advice once done.
« Last Edit: December 13, 2018, 05:56:39 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)