-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How can I render a 3d model "shadelessly" (with no lighting) ? #84
Comments
@angshine Sure this is possible. You can create a custom shader to do this (also see A shader can be composed in different ways and you can choose the steps involved e.g. texturing, lighting, blending. For your use case - it seems you only need to interpolate the vertex colors. Do you need only the forward pass for rendering? Or do you plan to do a backward pass as well? This will affect the choice of blending function. If you only need the forward pass then for each pixel you can assign the color of the closest face e.g. use Here is a simple Shader which only does vertex color interpolation with hard blending.
To get started with creating a renderer try the tutorials on rendering a textured mesh. |
@nikhilaravi Thanks for the detailed explanation!
So far this shader works well, but I wonder if these two implementation leadings to the same rendering result? |
@angshine that looks correct for use with texture maps instead of vertex rgb colors. |
@angshine do you need more help with this issue or can it be closed? |
@angshine I am closing this issue. If you have more questions feel free to reopen it. |
It seems that the interpolate_vertex_colors() and interpolate_texture_map() are removed in the new version. I tested the following piece of code and it works for me.
|
❓ How can I render a 3d model "shadelessly" (with no lighting) ?
Are there ways to project a 3d model to a 2d image which its pixel color just interpolated from the original color assigned per-vertex / per-face in the 3d model? Or, in other words, just render the 3d model without lighting?
The text was updated successfully, but these errors were encountered: