faux bevels? 2004-04-05 - By Daniel Bachler
Back > [mailto:owner-xsi@(protected)] On Behalf Of Sam Cuttriss > ive been wondering if a shader could create the illusion of > microbeveling an object? > > when it comes to animating, UVing, adjusting form overall proportions > etc microbeveling is the bain of my life. > edge crease values are great for objects that are subdivided, but its > often preferable to leave geometry unsubdivided. > in these cases i would really like a shader that can distort normals > across specified edges constrained within a radius... > > that way geometry could be left nice and clean and the edges would > produce nice speculars. > is that a feasible idea?
Well if you know how to write MR shaders there might be a way to fake it. (Note that all this is theory, I have never written a MR shader myself, so there might be some obstacles that render this approach impossible or some shortcuts that make it a lot easier). Basically look up the bayocentric (sp?) coordinates of the triangle you are rendering, take a look to see if it is within a specified threshold with one of the selected edges and if yes twist the normal vector of the current intersection point so that lighting calculations think that there is no hard edge there. It might be a bit awkward to transfer the edge data to MR because AFAIK you cannot simply link to parameters within XSI in a MR shader, but you could pass it in a text field or text file or whatever. Also, one should probably transform the bayocentric coordinates into world space before evaluating the edge distance.
Feel free to correct me if I make no sense :)
Daniel
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|