Jump to content

Overview: Compute vertex solve (shadow generation)


GeneralCamo

Recommended Posts

Author: Jonwil

Skill level: 3

 

I have discovered how the "compute vertex solve" option in leveledit works and here are my findings:

 

1. The "Enable Filtering" and "Solve Selected Objects Only" checkboxes do nothing (probably why they are disabled)

 

2. The weather, sky and background settings under "Edit-Background Settings" in leveledit have no effect on the vertex solve what so ever.

 

3. The sunlight and ambient light settings under "lighting" in leveledit do affect the vertex solve. The ambient light in particular can be tweaked to give all the things in your level, dynamic objects/spawned items/etc included, a nice green or blue or red or whatever tint.

 

4. If the mesh has vertex colors set, they will be used. If the mesh has a material, it will use the diffuse and ambient settings from that material.

 

5. If the "occlusion enabled" checkbox is selected, some math happens that involves the vertex being lit, the position of the light currently being processed and possibly also the Far Attenuation settings. The results of this math (which I dont understand) are used to cast a ray into the scene. If the ray hits something, the vertex is not lit using that light. Seems to be to stop lights from lighting vertexes that they can't actually cast light onto because of obstructions in the way. This only checks for terrain or tiles that are in the way, not objects or anything else.

 

6. With the latest versions of scripts (dating back to somewhere in 2011 I think) you can now put Prelit=true into the "mesh user text" of a mesh (not sure exactly what that is in Max and I dont have Max running right now to check) to cause the lightmap code to not calculate shadows on that mesh. Note that the mesh will still be affected by ambient and diffuse(sun) lights.

 

7. With the latest versions of scripts (dating back to somewhere in 2011 I think) it will now correctly light meshes that have no vertex colors and that have an opacity of less than 1 (or 100% or whatever it is). This includes the glass for the renegade Hand of Nod and renegade Nod Airstrip, meaning you no longer need to hide those meshes before you light solve.

 

8. With the latest versions of scripts (dating back to somewhere in 2011 I think) it will now not apply lightmap data to mesh pieces that have bump mapping (this includes water on various stock Renegade levels and others, meaning you no longer need to hide those objects before you light solve). This fix is handled at load time meaning it works on all maps without even needing to re-run vertex solve or do anything special.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...