Game Development Community

Yet another feature request thread

by Konrad Kiss · in pureLIGHT · 03/26/2010 (10:35 am) · 3 replies

pureLight is extraordinary! (In a very good way! :)

I've been hammering at it pretty intensely in the past few days (using only pL and T3D). I've assembled a list of features that would be very nice to have - hopefully some of them are not very hard to implement.

Hoping it helps you some, here's my list of welcome features:

- ability to rotate spot lights
- command line mode
- high level scripting language to do the most basic things (render, add lights, change bg color and other settings, etc..)
- graceful crashes when trying to convert a collada file (it's a pretty volatile format - if the parser can't handle some weirdness, perhaps make note about it, but more importantly let the user continue working with the rest of the objects in the scene)
- ability to convert any object into an LMM object even if the UV coords are outside of the 0-1 range
- tools for managing UV coords
- tools for snapping light sources close to (but not necessarily onto) geometry faces
- I'd love to be able to export my dts or dif from Torque 3D along with my selected dynamic lights and see them reappear in pL. At export time, the lights would not be exported, only the original objects. Having scriptable command line mode would make this easy.
- Torque 3D specific tutorials (for non-artists, use might be rather blurry at first for a newcomer - as it was for me. Someone who's only interested will probably check out the tutorials first, and not the docs.)

-- Konrad

#1
03/26/2010 (3:26 pm)
If you have a collada mesh that causes a crash, send it to support@purelighttech.com and we'll fix it. Nothing should be able to crash preLight, but, bugs do happen.

LMM objects need the lightmap uv coordinates to be inside the 0-1 range. The diffuse uv coordinates can be anything you want. Anything outside of that, means that your texture is tiling in some way, which is undesirable for lightmaps as the same texel will have multiple spatial locations and get lit really weirdly as a result.

What sort of tools for managing UV coords? preLight does give you a fairly high level of control over the lightmap unwrapping.

Snapping a light source close to geometry is a good idea. You don't want them to be right on the triangle face.

What sort of Torque 3D tutorial would be useful? We have a youtube channel with tutorials on operating pureLIGHT itself http://www.youtube.com/user/pureLIGHTTech#p/c/A4242A3FF269A80C

How/what would trigger the various scripts? And what sort of things did you have in mind for them?
#2
03/26/2010 (5:30 pm)
Thomas, thank you for the reply.


Crash:

You can reproduce the problem by creating a 0 byte .dae file. I'm looking into procedurally generating collada files, and I'm not sure the syntax your parser expects will always be right. I know this is probably not the most general use, still, thought I could just give it a try. The point was to avoid any crashes so it's easier to experiment (and work on).


LMM:

I have an object (exported via Torque 3D's "Export Interiors to Collada" feature) which does not have a second UV map defined. It has a huge number of separate textures on it.

To make it render faster, I was hoping to merge the diffuse texture and the lightmap with pureLight, and use the final lightmap and uv coords as the new diffuse for the object. It would give me a very significant performance increase, since the texture count in some cases would be above 20.

When I want to convert my collada file to an LMM from within preLight, it defaults to copying the diffuse map's uv coordinates. I understand what the problem is now that you have explained, but I'm not sure how to solve it. I was hoping preLight would give me a set of uv coordinates for the unwrapped map and use that by default for the lightmap.


UV tools:

Ok, this is probably not so important - it was just an idea. I was thinking of tools to manually modify the points on the unwrapped map.

pureLight does an amazing automatic job, but tweaking triangles could give you even more resolution on select faces. Pretty much the same you can already do via selecting a mesh and changing texel size for that entire mesh - except in this case on the lowest possible level.


Tutorial:

The tutorials for pureLight are perfect. I was hoping for one tutorial about getting an existing Torque 3D prop (one of the stock dts files preferably) from the engine into preLight and back. It would make it a lot easier for new Torque 3D users (especially non-artists) to get a grasp on the usage of preLight with Torque 3D. I'm sure almost everyone who's purchasing the tool through the TorquePowered website wants to do something like this, so I thought it would be a good idea.


Scripts:

I was hoping to pass an external script file name as a parameter to a command line executable. We create lots of procedurally generated content.

As an example, we have about 50 base corridor and room tiles. I have to light each of them individually in a manner that allows for positioning that does not betray their procedural placement. The mesh has every important information encoded into it in various ways - nodes, texture names, etc... Exact light positions, the types and colors of lights for each mesh, possible exits and their types are such examples.

I'd like to automate the generation of lightmaps for these objects. Being able to do this would leave me with enough time to experiment more and it would also rule out human error that becomes a factor with many meshes to handle.

If I was able to import a collada file from script, set the mesh texel size, background color, the depth of the iteration and other settings affecting lightmap quality, place lights one by one and finally export, then I wouldn't have to spend days doing all this manually.

I would in theory be able to create a script for all that work. Instead of spending days or maybe even a week on this, I could create such a script in an hour and let the lighting run overnight.

On top of that, regenerating lightmaps using the same method from a later version of pureLight (ie. because of a new cool filter or a new effect) would be a lot easier for everyone. I'm sure there would be many more uses to a simple scriptable extension.



I really appreciate the time you guys put into supporting pureLight and actually listening to feedback from the users.
#3
03/26/2010 (11:38 pm)
A 0 byte dae file, hmm, I'll have a look at that.


Merging the diffuse and lightmap textures together is a good way of boosting performance and reducing video memory costs. We do that on large terrain meshes, no sense in having 2 2048x2048 or 2 4096x4096 textures when the diffuse texture is uniquely mapped anyways. Its when the diffuse/lightmaps don't line up perfectly or start tiling that problems arise. You might be able to get a decent result by premultiplying the lightmap by a tiled diffuse texture, you'd lose some of the finer details on the diffuse texture doing this.


Modifying the lightmap uv coordinates manually does pose a problem at least for LM meshes. They are setup in a manner that actually lets us accelerate some of the raytracing code, tweaking those by hand would break that system.


No immediate promises on any sort of scripting, that starts getting fairly involved to implement. Though, it isn't overly complicated to dynamically load in scripts written in C# (or other .Net languages), still needs an api to access the internals of pureLIGHT to be created.


There is a command line mode coming for pureLIGHT in the next release, which will let you automate baking of scenes and run it on server's without a gpu.