-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create light-map SDK example #16
Comments
Extending the PLY importer from the Sandbox tool to include textures would make this reasonably easy. |
Tried real-time shading to textures together with normal maps and specular light, and it can do the shading smoothly on background threads using swap chains while rendering. Because texture interpolation is the heavy part and aligned 2D filters are fast, using high-resolution lightmaps combined into the same image as the diffuse material colors is both faster and better looking. Maybe this can be used as the high quality setting with realtime specular light up close and then just passively update diffuse light of nearby rooms in a low setting for laptops. |
This would be a good place for testing new occlusion shapes in complex scenes with large moving occluding objects. |
There is already functions for generating normal and position maps for polygon models, and lightmaps from normal and position maps, but generating UV2 coordinates still needs an automatic unwrapping algorithm to simplify the workflow. Once normal and position maps are generated from smoothed vertex normals for a highly detailed model, one can apply a polygon reduction algorithm for displaying it from far away using the same normal map. The highly detailed asset could also be excluded from the final game to save space. Static instances of a model could pre-transform their own normal and position maps, used to generate both a static and a dynamic lightmap. Dynamic instances do matrix transforms while updating lightmaps. Very large surfaces in outdoor scenes could use blend maps to avoid wasting space on large lightmaps. |
The use of light-maps in the Cube example is quite ugly, because the secondary texture layer is generic rather than a baked light-map for the model. Importing levels with light-maps from an existing tool or creating light-maps dynamically would allow creating a much better example together with documentation of the workflow.
The text was updated successfully, but these errors were encountered: