Как стать автором
Обновить

Комментарии 2

Пример обводки как пример сойдет, но у него есть недостатки: например если рисуемый объект вытянутой формы то обводка будет разной ширины в разных направлениях. Мне было бы интересна статья как делается такая приятная обводка как в Left4Dead, CS:GO или Deus Ex Human Revolution
Это обсуждается в комментариях к оригинальному посту:
Вопрос
Thank you for this great tutorial very much. I followed this and made it work. However, my result is not exactly what I expected before. This outline should perfectly wrap the shape of our model, right? The thickness of outline should keep the same, right? However, in my implementation, when viewing the model in different direction, the outline changes its thickness. And actually, I didn't find one view that can show the outline correctly. Some part of outline is apparently thicker than other parts. And some parts even disappear. I think this results from wrong scaling, but I have no idea about how to fix it. Do you have some ideas? Or do you think this method only works for some regular primitives?
image

Ответ
Hi Zheka,
I have the same thoughts as yours. This method works for the tutorial because the cube is a regular mesh. However, for the bunny, scaling works somehow incorrectly in some directions.
Actually, I fixed this problem in another method. The basic idea is that we scale the bunny by moving all vertices outwardly along the normal direction. Here is my result by this method.
image
Зарегистрируйтесь на Хабре, чтобы оставить комментарий

Публикации

Изменить настройки темы

Истории