Jump to content

Multi-object handling in PLight?


Michael Betke
 Share

Recommended Posts

As far as I understand the purelight concept it bakes GI to my models.

The GI seems to be bound to a material.

 

How does it handle the following scenario:

 

Let's say I have a small object like a lamp hanging in two rooms.

One room is lit the other one is dark. This would result in two different lightmaps for one object. One dark and one bright.

But as far as I know my lightmap is material bound.

 

So I would have to

 

A.) Do a different material for every re-used lamp in my level with a unique lightmap for each lamp. This would be pretty much work for a simple re-used prop plus how would the LE load the texture? Would it load the lightmaps (which is ok) but also load the texture of my lamp over and over again and my Vram will be filled with it?

 

B.) Don't use Purelight on small objects which would be silly because big objects are also reused, like lets say a pile of crates or palletes in a storage level.

 

 

What does Purelight do in such a simple situation? Does it bake all geometry to one or more huge Lightmaps where every lamp-UV will get its own spot?

Pure3d Visualizations Germany - digital essences

AAA 3D Model Shop specialized on nature and environments

Link to comment
Share on other sites

Lightmapping requires unique texcoords on all geometry. pureLIGHT would export the whole scene as a single collapsed GMF file. It will export materials itself.

 

But this would limit me to 60.000 tris because of the format. So I have to split it in some situations.

 

Plus what about using one texture in several materials? Would your engine load the texture with each material again, or does it check if a texture is loaded already but only change material properties? I hope you know what I mean.

Pure3d Visualizations Germany - digital essences

AAA 3D Model Shop specialized on nature and environments

Link to comment
Share on other sites

As far as I understand the purelight concept it bakes GI to my models.

The GI seems to be bound to a material.

 

How does it handle the following scenario:

 

Let's say I have a small object like a lamp hanging in two rooms.

One room is lit the other one is dark. This would result in two different lightmaps for one object. One dark and one bright.

But as far as I know my lightmap is material bound.

 

So I would have to

 

A.) Do a different material for every re-used lamp in my level with a unique lightmap for each lamp. This would be pretty much work for a simple re-used prop plus how would the LE load the texture? Would it load the lightmaps (which is ok) but also load the texture of my lamp over and over again and my Vram will be filled with it?

 

B.) Don't use Purelight on small objects which would be silly because big objects are also reused, like lets say a pile of crates or palletes in a storage level.

 

 

What does Purelight do in such a simple situation? Does it bake all geometry to one or more huge Lightmaps where every lamp-UV will get its own spot?

 

It depends on how you set your scene up. If each lamp is a seperate object, you will end up with 2 lightmaps and 2 seperate materials (the only difference being the lightmap that they reference). I am assuming that LE will only load the texture on the lamp once (Josh would be the one able to confirm that). Alternatively, if both lamps are the same object they would be baked into a slightly larger lightmap and share the same material.

 

There's nothing wrong with using pureLIGHT on small objects. You may find it more convenient to group together your small objects into one mesh to bake. Also, really small objects, you are probably better off using vertex-lighting on them (depends on the geometry of the mesh of course).

pureLIGHT lead programmer

Link to comment
Share on other sites

But this would limit me to 60.000 tris because of the format. So I have to split it in some situations.

 

Plus what about using one texture in several materials? Would your engine load the texture with each material again, or does it check if a texture is loaded already but only change material properties? I hope you know what I mean.

 

The 60000 tri limit is per-mesh and not per-scene. pureLIGHT itself has no limitations on mesh/scene size (barring physical memory of course).

pureLIGHT lead programmer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...