События

Создание материалов Blend4Web. Кожа и стекло

2017-12-12

Мы продолжаем делиться своими секретами по созданию качественных материалов. Первый урок был посвящен простым матовым материалам. В прошлый раз вы узнали о приемах создании материалов меди и хромированной стали. Настало время поработать над стеклом и кожей.

Работа с эффектом Френеля

Известно, что не все материалы равномерно отражают окружающее пространство и это зависит от угла зрения. К ним относятся: кожа, дерево, пластик, резина и другие.

Материал кожи с эффектом Френеля

Наиболее простым примером может служить материал кожи из нашей библиотеки. Рассмотрим его создание.

Упрощенное ядро материала кожи

Для удобства изучим состав ядра в упрощенном виде. Если вы изучали предыдущий урок, то увидите несомненное сходство ядра с материалом меди.

Здесь есть карта нормалей (1) для имитации неровностей кожи, где альфа-канал текстуры содержит черно-белую базовую текстуру. В дальнейшем она окрашивается в нужный цвет с помощью ноды ColorMix (4). Таким образом, мы экономим трафик пользователей.

Главная особенность данного материала в том, что используется нода Fresnel (3), которая позволяет получить маску смешивания из кубической карты отражения (2) и базового цвета материала (4).

Для регулирования бликовой части используется карта Specular, которая создана на основе черно-белой маски. Посмотрите видео создания ядра материала кожи.

Прозрачность и отражение

Материал стекла из библиотеки Blend4Web

Давайте усложним задачу и создадим более интересный материал, где будут использоваться прозрачность, отражение и эффект Френеля. Начнем с простого стекла небольшой толщины. В некоторых случаях лучше обойтись без преломления, так как это достаточно ресурсоемкая операция для бюджетных мобильных устройств.

Упрощенное ядро материала стекла

В основе материала стекла находится кубическая карта отражения (1), которая слегка подкрашивается в зеленый цвет (4). Для воссоздания реалистичных бликов здесь используется простая текстура Matcap (2). Эффект Френеля подается на вход ноды Material и таким образом обеспечивается неоднородная прозрачность, которая зависит от угла зрения.

Предлагаем посмотреть еще одно видео, где демонстрируется создание прозрачного материала. Кстати, здесь вы еще найдете важные подробности о некоторых удобных настройках вьюпорта Blender.

Прозрачность и преломление

Материал рифлёного стекла из библиотеки Blend4Web

Давайте рассмотрим способ создания рифлёного стекла, где используется прозрачность с преломлением. Для создания эффекта преломления требуется специальная нода, которая была разработана нашей командой.

B4W_Refraction - специальная нода Blend4Web

Все, что от вас требуется — это подключить ко входу ноды B4W_Refraction нормали геометрии или карту Normal Map. Степень преломления указывается числовым значением. К сожалению, действие этой ноды видно только во вьюпорте Blend4Web.

Материал с прозрачностью использующий ноду Refraction

На рисунке выше, вы видите работу ноды Refraction в чистом виде. Чтобы получить более значимый результат требуется подключить карту нормалей.

Материал с прозрачностью использующий карту нормалей

Теперь, благодаря карте нормалей, видно, как изменяются контуры объектов внутри шара. Для полного воссоздания эффекта стекла не хватает отражений с эффектом Френеля.

Материал с прозрачностью использующий карту нормалей и отражение с эффектом Френеля

Стекло выглядит уже лучше, так как присутствует отражение и это подчеркивает неровность поверхности. Но, если подмешать цвет к результату преломления, то мы получим уже цветное стекло.

На рисунке ниже показан окончательный вариант ядра материала. Цвет был создан при помощи ноды ColorMix и пары математических узлов для регулирования маски Френеля.

Материал с добавлением цвета к прозрачности

В следующий раз мы поговорим о создании многослойных материалов.

Комментарии
25 июн. 2024 04:29
Ready to mix your coins?
<a href=https://yomix-1.com/>YoMix mixer</a>
It will take only a few minutes to upgrade your privacy
https://yomix-1.com/
YoMix mixer
YoMix.io runs on the Darknet and is one of the most popular Bitcoin toggle switches. This dark service uses new technology, it doesn’t just clean up your coins, you get brand new coins that have never been on the dark web. The cleaning process can take no more than 4 hours. To carry out cleaning on Helix in the basic version of Grams, you need to register, in the versions of Helix Light and Helix Market this is not necessary.
If you still decide to use the Grams version, you will have to pay an entrance fee of 0.01 BTC. Helix has an additional feature (Auto-Helix) that allows you to specify which addresses your coins will be mixed with when they are credited to your account. Helix also enforces a “no log” policy, all logs are deleted automatically after 7 days or by the user immediately after completion of the output. Helix has a third party server not connected to Grams. A number of Bitcoin client programs that he uses are located on a completely separate server from Helix and Grams. Even if Grams is attacked or compromised, Helix will not be affected.
25 июл. 2024 03:19
A series of cosmic outbursts
<a href=https://www.btrhbfeojofxcpxuwnsp5h7h22htohw4btqegnxatocbkgdlfiawhyid.com>сайт спрут</a>
Pons-Brooks recently captured the attention of astronomers after exhibiting intriguing behavior that caused the comet to have a horned appearance and soar through our solar system.
The comet has experienced a number of outbursts during the past eight months, causing it to eject gas and dust. While such releases are not uncommon in comets and a crescent or Pac-Man shape has been observed in other ones, it’s difficult to tell what is normal for Pons-Brooks.
https://www-blacksprut2rprrt3aoigwh7zftiprzqyqynzz2eiimmwmykw7wkpyad.com
bs2site2.at
“I would say it’s somewhat unusual in the number of outbursts it’s been having,” Schleicher said. “On the other hand, it’s not like you have good records from the past to really let you know what is typical. And I suspect given the fairly large number of outbursts that have happened over the last eight months, that this is very clearly a usual occurrence for Pons-Brooks.”

Comets are chunks of dust, rock and ice, essentially frozen remnants from the formation of the solar system. They also contain frozen elements such as carbon dioxide and carbon monoxide.

Comets heat up and brighten as they approach the sun, and some of the frozen gases stored in comets don’t need to warm up much before they begin to turn into vapor, Schleicher said.
25 июл. 2024 03:19
Elon Musk has been getting Trumpier. A direct line to Trump may be next
<a href=https://blspr2web2.net>блэк спрут onion</a>

Elon Musk has sought to accumulate political capital commensurate with his extravagant wealth. In the past year, Musk has publicly opined on global conflicts, met with numerous world leaders and US senators to discuss artificial intelligence and his space and satellite technologies. And he has courted senior Chinese officials on their home turf.

Now he is reportedly exploring what could be his next political project: Becoming an adviser to Donald Trump, the presumptive Republican nominee for president, according to a report from the Wall Street Journal.
https://bs2shops.net
bs.gl
Musk has discussed advising Trump should he win the 2024 election, the Journal reported, citing unnamed sources. Musk called Trump directly via cellphone to explore a role that could potentially give Musk significant influence over US policies. It’s not clear based on the Journal’s reporting which party initiated conversations about the potential role.

The Trump campaign did not respond to CNN’s requests for comment; Musk also did not respond to the Wall Street Journal, but Brian Hughes, a Trump campaign spokesperson, told the outlet: “President Trump will be the only voice of what role an individual plays in his presidency.”

Musk pushed back on the Journal report in a post on X Thursday, saying: “There have not been any discussions of a role for me in a potential Trump Presidency.”

However, a potential role in a future Trump administration could expand upon the role that Musk played in the previous Trump administration, when he served on two business advisory councils before quitting them over Trump’s decision to pull out of the Paris climate agreement.

The privilege of whispering in Trump’s ear, should he win reelection, could give the billionaire – who is increasingly steeped in the rhetoric and imagery of the conservative culture wars – even more power on the global stage. Reporting that Musk and Trump’s relationship has improved comes after Musk’s politics have become more aligned with Trump’s.

Musk has made supporting right-wing causes — and extremism, in some situations — increasingly central to his identity. He has vocally opposed Covid-19 lockdowns and embraced anti-vaccine ideology. He has elevated conservative speech on X, the platform formerly known as Twitter that he purchased in 2022. And he has pushed racist conspiracy theories about immigration.
03 авг. 2024 13:07
Why a rare image of one of Malaysia’s last tigers is giving conservationists hope
mega555netX.com
Emmanuel Rondeau has photographed tigers across Asia for the past decade, from the remotest recesses of Siberia to the pristine valleys of Bhutan. But when he set out to photograph the tigers in the ancient rainforests of Malaysia, he had his doubts.

“We were really not sure that this was going to work,” says the French wildlife photographer. That’s because the country has just 150 tigers left, hidden across tens of thousands of square kilometers of dense rainforest.

https://me35ga.at
m3ga.gl

“Tiger numbers in Malaysia have been going down, down, down, at an alarming rate,” says Rondeau. In the 1950s, Malaysia had around 3,000 tigers, but a combination of habitat loss, a decline in prey, and poaching decimated the population. By 2010, there were just 500 left, according to WWF, and the number has continued to fall.

The Malayan tiger is a subspecies native to Peninsular Malaysia, and it’s the smallest of the tiger subspecies in Southeast Asia.

“We are in this moment where, if things suddenly go bad, in five years the Malayan tiger could be a figure of the past, and it goes into the history books,” Rondeau adds.

Determined not to let that happen, Rondeau joined forces with WWF-Malaysia last year to profile the elusive big cat and put a face to the nation’s conservation work.

It took 12 weeks of preparations, eight cameras, 300 pounds of equipment, five months of patient photography and countless miles trekked through the 117,500-hectare Royal Belum State Park… but finally, in November, Rondeau got the shot that he hopes can inspire the next generation of conservationists.

https://m3ga-gl.net
m3ga

“This image is the last image of the Malayan tiger — or it’s the first image of the return of the Malayan tiger,” he says.
Пожалуйста, зарегистрируйтесь или войдите под своей учетной записью , чтобы оставлять сообщения.