-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|531|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> In-Development -> Light Map Editor Thing

Mon, 21 Aug 2017, 12:02

Light Map Editor Thing

So last week I started on an editor/light map tool thing. Think GTKRadiant (for now) - but eventually I want to develop it into something that work with Physically Based Rendering. Maybe add some animation tooling as well.

My first set of goals are:
- Write a tool that generates ray cast lightmaps
- Extend this to use radiosity
- Write a CSG editor

That will keep me occupied for a while

Mon, 21 Aug 2017, 12:58
That sounds complicated!
Good luck.
Tue, 22 Aug 2017, 15:38
Been a good day.

- So I have worked on getting mesh loading working.
- Added some more GUI elements.
- "Generate" a Lightmap texture - currently it is just a red checker board texture

Lightmapping usually uses a 2nd set of UV coordinates for referencing a lightmap texture. There are a number of reasons for this, but the main one is that geometry shouldn't (usually) share UV coordinates in the same lightmap.

Luckily for me, the robot model I am using has 1 set of coordinates with no overlaps - so for now I can use the UVs provided with the model for generating light maps. Later on I will need to figure out a way to generate a second set specifically for lightmap generation. You can see the UV nicely unwrapped in the image below.

Next step is to update the texture generation to actually generate a lightmap instead of just a checker board pattern.. yay.
Sat, 06 Jan 2018, 12:36
So I have made some progress into a slight diversion.. I have started building a ray tracer - which will eventually feedback into the light map generation stuff. Anyway, some screenshots:

Sun, 07 Jan 2018, 02:10
Got a first render of some spheres with perfect diffuse lighting.

Sun, 07 Jan 2018, 03:56
Thu, 11 Jan 2018, 15:53
A few more significant things done.

I refactored all of the ray casting code out of the ray tracer and into a collision detection system (which will also drive the physics system.. when I get around to that)

On the visible front:

- Linear fog
- Circle (on a plane)
- Depth sorting (Which is why the spheres get chopped in half by the circle!)

Fri, 30 Mar 2018, 10:34
With a fair bit of wrangling.. we have shadows:

In the image above you can see the "eye" ray and "shadow" ray. This is only diffuse at the moment. So there is no refraction/transmission or reflection (specular)
Fri, 30 Mar 2018, 16:33
Added support for axis aligned box primitives:

Sun, 01 Apr 2018, 16:07
Replaced the global directional light with place able point lights:

In this scene I have created a Cornell Box - which is a good setup for
testing how renders compare with real life.

Yes.. I will get around to changing the colours from red.. soon!
Thu, 21 Jun 2018, 15:37
Multiple lights work
I have added a sphere primitve
Super basic material's (Colour per primitive type)