giscodedev / PostGIS3DExplorer

Learn to visually use PostGIS 3D functions to create 3D models!
Other
9 stars 0 forks source link

Request: support Opacity #1

Closed dcalde closed 4 years ago

dcalde commented 4 years ago

Hi,

I am loving PostGIS3DExplorer. It is great for quick 3D visualisation but I could really use the ability to render transparent objects. I tried to update the code myself, but i couldn't find any documentation on RibbonColorChooser.

But as far as the actual rendering, it should suffice to add the following lines to SQLEditorControl.SetActorColor():

  double opacity = (double)rbtnFillColor.Color.A / 255;
  this.Actor.GetProperty().SetOpacity(opacity);

Thanks, Daniel

Ronald-Mulder commented 4 years ago

Hi Daniel,

Nice to hear you are loving it. This project felt a bit asleep, although I still use it myself from time to time. 😄 Your suggestion sounded useful and interesting. I also found I originally started work on this but had abandoned it, probably busy with other stuff...

Anyway I was also curious and decided to implement your suggestion. Let me know what you think!

Regards,

Ronald

Ronald-Mulder commented 4 years ago

Btw this it what it looks like:

afbeelding

dcalde commented 4 years ago

I downloaded the latest version and the transparency works perfectly. Just 1 suggestion... when loading existing projects, it defaults the opacity to 10%. This should probably be 100%.

dcalde commented 4 years ago

Thank you for making this change so quickly. Much appreciated!