Ooops
January 27, 2021, 08:02:07 AM

Author Topic: testing OpenGL UV stuff...  (Read 5493 times)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
testing OpenGL UV stuff...
« on: January 16, 2018, 10:46:35 AM »
Here's a quick shot of something I'm slowly working on...


I'm testing static UV stuff in the hope of correcting everything that went wrong last time ;)

Offline col

  • Sr. Member
  • ****
  • Posts: 474
Re: testing OpenGL UV stuff...
« Reply #1 on: January 16, 2018, 11:00:36 AM »
Heh,

I use the same image for testing too, except the colours are slightly different and includes white  :)
Very handy to see where things aren't correct.
To be is to be perceived.

https://github.com/davecamp

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #2 on: January 16, 2018, 11:16:36 AM »
Yep, the only way to know exact positions.
Here's an animated shot of the finished thing in testing with live update of the input image


This is the start of external lighting calculations

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #3 on: January 16, 2018, 12:33:38 PM »
And here with a 'light grid' applied

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #4 on: January 16, 2018, 02:32:57 PM »
Just done a quick windows compile and all runs smoothly - YAY!!!!

Offline Derron

  • Hero Member
  • *****
  • Posts: 3333
Re: testing OpenGL UV stuff...
« Reply #5 on: January 16, 2018, 02:48:10 PM »
Whats that image in "Reply #2" showing: something to create an epileptic fit?

Hope this time things run on Win, Mac and Linux.

bye
Ron

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #6 on: January 16, 2018, 02:52:53 PM »
Yep, running brilliantly on Windows and Mac. Linus is currently a non starter as I cant get monkey to actually run on linux yet!!!

The Linux thing is a whole mess of pain which Monkey2 does NOTHING to help matters. There is NO help whatsoever about how to install and actually run it. the only words I have so far in regard to Linux is : PAIN IN THE ASS!

The fit image... was a test to see about having a separate canvas which could be drawn onto with full 2d and updated offscreen. it is then used as an input image for the 3d - hence animated!

Offline col

  • Sr. Member
  • ****
  • Posts: 474
Re: testing OpenGL UV stuff...
« Reply #7 on: January 16, 2018, 10:04:58 PM »
Quote
testing with live update of the input image
Do you mean you're rendering to ( or modifying ) the texture that's applied to a model already?
To be is to be perceived.

https://github.com/davecamp

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #8 on: January 17, 2018, 06:03:35 AM »
Quote
Do you mean you're rendering to ( or modifying ) the texture that's applied to a model already?
yep, exactly that

Offline col

  • Sr. Member
  • ****
  • Posts: 474
Re: testing OpenGL UV stuff...
« Reply #9 on: January 17, 2018, 08:03:24 AM »
And each red part that's flickering is an an area of influence for a single light? You'll sum each one for a final lighting calculation?
To be is to be perceived.

https://github.com/davecamp

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #10 on: January 17, 2018, 08:24:06 AM »
mmmm, sort of.
here's a look with the first light calculations in place


there are 3 lights added and a set of light blockers forming a right angle (I think you can see where they are?)

in essence you add some lights, and light blockers. then run the simulation. The light will sort of flow around until it meets a blocker and then will go around them. of more blockers are used, then you will get a sort of wall effect where the light will cast shadows where the light can't get around.

It gives a sort of soft area light affect with shadows as a by-product

Offline col

  • Sr. Member
  • ****
  • Posts: 474
Re: testing OpenGL UV stuff...
« Reply #11 on: January 17, 2018, 10:53:28 AM »
That sounds and looks quite an interesting technique 8)

Could you also post separate pics of the same scene which shows a break down of the process?
Such as showing the area(s) as red, the 'blockers' and also the final image, all with the camera from the same position, so to clarify how it all fits together.
To be is to be perceived.

https://github.com/davecamp

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #12 on: January 17, 2018, 12:45:28 PM »
no problem. Here's a gif showing the addition of lights and blocks


if you look to the right where there is an opening, you can see the light bleeding through as lights are added/removed.
Sorry about the gif compression...

I've used very defined light colors to show how they mix and are affected by the blocks

Offline col

  • Sr. Member
  • ****
  • Posts: 474
Re: testing OpenGL UV stuff...
« Reply #13 on: January 17, 2018, 05:03:16 PM »
Thanks,

In the example where you show 'shadows', there isn't a visible blocker (wall?) there - it's just for illustration purposes to show the effect working here yes? In a real world scene I assume you would place some sort of geometry, a wall or similar, there?

I was just confused as to why there is a 'shadow' or 'blocker' without visible geometry or am I going completely mad and the whole world really is turning upside down, inside out for me :p

It's a good effect  8)
To be is to be perceived.

https://github.com/davecamp

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2063
Re: testing OpenGL UV stuff...
« Reply #14 on: January 18, 2018, 11:37:31 AM »
Don't forget that the actual light processing is not done in 3d, but is all done in code and fed into the 3d.
So... That's why there are no actual 3d objects blocking things. But you can still see them!

In practice, you will need to update the light systems separately from the 3d system!

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal