События

Создание материалов 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 и пары математических узлов для регулирования маски Френеля.

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

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

Комментарии
06 ноя. 2024 17:33
Согласны с мнением о компании Leader Delivery. Мы тоже отмечаем высокое качество их услуг и надежность в доставке грузов. Обращаясь к ним, можно рассчитывать на быстрое и аккуратное выполнение заказа. Подробности можно узнать по ссылке <a href=https://forum.rarib.xyz/viewtopic.php?f=71&t=124047&p=874002#p874002>здесь</a>. Также, здесь <a href=https://www.livekavkaz.ru/index.php?cstart=8&newsid=36427>нашел отзывы</a> на компанию, а вот еще <a href=https://forum33.realyoga.ru/phpBB2/viewtopic.php?p=200240#p200240>отзывы</a> других клиентов.
07 ноя. 2024 01:06
Согласны с мнением о компании Leader Delivery. Мы тоже отмечаем высокое качество их услуг и надежность в доставке грузов. Обращаясь к ним, можно рассчитывать на быстрое и аккуратное выполнение заказа. Подробности можно узнать по ссылке <a href=https://forum.rarib.xyz/viewtopic.php?f=71&t=124047&p=874002#p874002>здесь</a>. Также, здесь <a href=https://www.livekavkaz.ru/index.php?cstart=8&newsid=36427>нашел отзывы</a> на компанию, а вот еще <a href=https://forum33.realyoga.ru/phpBB2/viewtopic.php?p=200240#p200240>отзывы</a> других клиентов.
29 ноя. 2024 21:22
http://lifervpldestroy.atspace.co.uk/index.htm
https://www.poliklinika.lt/gydytojas-psichiatras/
http://stealer.coolpage.biz
psychiatrysait.260mb.net http://parkonline.unaux.com/
http://monarchy.freevar.com/
https://psychiatrysait.narod.ru/
https://antipsychiatry.ru
Лечение в Германии, Литве.
02 дек. 2024 15:28
A year on from Qatar 2022, what’s the legacy of a World Cup like no other?
<a href=https://bs2webat.com>спрут зеркало</a>
The 2022 World Cup final will go down as one of the most exciting, dramatic and memorable matches in the history of the game.

It was the scene of Lionel Messi’s greatest moment on a soccer pitch, in which he cemented his legacy as the best player of his generation after finally guiding Argentina to World Cup glory.

It was, for many, the perfect, fairytale ending to a tournament which thrilled well over a billion fans around the world. So good, perhaps, that many forgot it bookended the most controversial World Cup in history.
https://btrhbfeojofxcpxuwnsp5h7h22htohw4btqegnxatocbkgdlfiawhyid.org
блэк спрут
Rewind to the start of the tournament and the talk was all about matters off the field: from workers’ rights to the treatment of the LGBTQ+ community.

Just hours before the opening match, FIFA President Gianni Infantino launched into a near hour-long tirade to hundreds of journalists at a press conference in Doha, where he accused Western critics of hypocrisy and racism.

“Reform and change takes time. It took hundreds of years in our countries in Europe. It takes time everywhere, the only way to get results is by engaging <>] not by shouting,” said Infantino.

At one point, the FIFA president challenged the room of journalists, stressing FIFA will protect the legacy for migrant workers that it set out with the Qatar authorities.

“I’ll be back, we’ll be here to check, don’t worry, because you will be gone,” he said.

So, a year on from the World Cup final, what is the legacy of the 2022 World Cup?
03 фев. 2025 12:20
Medical staff on the front line of the battle against mpox in eastern Democratic Republic of Congo have told the BBC they are desperate for vaccines to arrive so they can stem the rate of new infections.
<a href=https://blacksprut2clear.net>блэк спрут ссылка</a>
At a treatment centre in South Kivu province that the BBC visited in the epicentre of the outbreak, they say more patients are arriving every day - especially babies - and there is a shortage of essential equipment.
blackspfgh3bi6im374fgl54qliir6to37txpkkd6ucfiu7whfy2odid.onion
https://blsp2tor.com

Mpox - formerly known as monkeypox - is a highly contagious disease and has killed at least 635 people in DR Congo this year.
Even though 200,000 vaccines, donated by the European Commission, were flown into the capital, Kinshasa, last week, they are yet to be transported across this vast country - and it could be several weeks before they reach South Kivu.
“We've learned from social media that the vaccine is already available,” Emmanuel Fikiri, a nurse working at the clinic that has been turned into a specialist centre to tackle the virus, told the BBC.
He said this was the first time he had treated patients with mpox and every day he feared catching it and passing it on to his own children - aged seven, five and one.
“You saw how I touched the patients because that's my job as a nurse. So, we're asking the government to help us by first giving us the vaccines.”
The reason it will take time to transport the vaccines is that they need to be stored at a precise temperature - below freezing - to maintain their potency, plus they need to be sent to rural areas of South Kivu, like Kamituga, Kavumu and Lwiro, where the outbreak is rife.
The lack of infrastructure and bad roads mean that helicopters could possibly be used to drop some of the vaccines, which will further drive up costs in a country that is already struggling financially.
At the community clinic, Dr Pacifique Karanzo appeared fatigued and downbeat having been rushed off his feet all morning.
Although he wore a face shield, I could see the sweat running down his face. He said he was saddened to see patients sharing beds.
“You will even see that the patients are sleeping on the floor,” he told me, clearly exasperated.
“The only support we have already had is a little medicine for the patients and water. As far as other challenges are concerned, there's still no staff motivation.”



<a href=https://bsp2web4.shop>блэкспрут даркнет</a>
15 фев. 2025 12:53
A federal judge on Tuesday afternoon temporarily blocked part of the Trump administration’s plans to freeze all federal aid, a policy that unleashed confusion and worry from charities and educators even as the White House said it was not as sweeping an order as it appeared.
kra27 cc
The short-term pause issued by US District Judge Loren L. AliKhan prevents the administration from carrying through with its plans to freeze funding for “open awards” already granted by the federal government through at least 5 p.m. ET Monday, February 3.
kra29 cc
The judge’s administrative stay is “a way of preserving the status quo” while she considers the challenge brought by a group of non-profits to the White House plans, AliKhan said.
http kra17 cc
“The government doesn’t know the full scope of the programs that are going to be subject to the pause,” AliKhan said after pressing an attorney for the Justice Department on what programs the freeze would apply to. AliKhan is expected to consider a longer-term pause on the policy early next week.
https kra17 at
The White House budget office had ordered the pause on federal grants and loans, according to an internal memorandum sent Monday.

Federal agencies “must temporarily pause all activities related to obligation or disbursement of all Federal financial assistance,” White House Office of Management and Budget acting director Matthew Vaeth said in the memorandum, a copy of which was obtained by CNN, citing administration priorities listed in past executive orders.
https kra17 cc

https://kra29-at.ru
24 фев. 2025 01:37
Former US President Joe Biden, a self-professed Catholic, has joined an African-American Masonic lodge as a ‘Master Mason’. The Vatican takes a dim view of Freemasonry, and Catholics who join the fraternal order face excommunication.
<a href=https://kra29-at.com>kra22.at</a>
Biden was inducted into the Most Worshipful Prince Hall Grand Lodge in South Carolina on Sunday, one day before he left office. In a private ceremony, the lodge’s grand master, Victor C. Major, granted Biden “Master Mason membership with full honors,” according to a statement published by the organization last weekend that circulated online on Friday.
<a href=https://kra27-cc.ru>кракен сайт купить</a>
”To be a Freemason is to be part of a brotherhood dedicated to personal growth, service to others, and the pursuit of knowledge and truth,” the lodge wrote. Biden’s service, the statement added, “reflects the core values” of this brotherhood.
kra26 cc
https://kpa27.at
03 мар. 2025 22:44
Look of the Week: Kendrick Lamar’s Super Bowl pants signal the return of flares
<a href=https://kra27s.cc>kraken</a>
This year’s Super Bowl halftime show was hardly a fashion extravaganza, with headliner Kendrick Lamar keeping things simple in a backwards cap and motorbike-style varsity jacket, which he kept on throughout.

And without the costume-change roulette we’ve come to expect of halftime shows, the internet fixated on one item in particular: his jeans.

While not quite the bell-bottoms of decades past (the 1970s and the 2000s, specifically), the Compton-born rapper’s washed denim pants flared out at the knee and dragged beneath his heels along the stage at Caesars Superdrome in New Orleans. His silhouette stood in stark contrast to that of record producer Mustard, who made a brief cameo in a pair of outsized jeans straight from the West Coast hip-hop playbook.
Opinions were, as ever, divided on social media. Some users described Lamar’s flares as “women’s jeans” and “Hannah Montana pants,” earning him comparisons to everyone from Jennifer Aniston to country singer Lainey Wilson. Others joked that their moms were looking for a similar pair or that they nodded to millennials, for whom flares were a teenage staple.

But those suggesting his style was outdated, or gender-inappropriate, may not have been paying attention to the recent resurgence of flares — in both womenswear and menswear. After all, Lamar’s jeans were designed by one of the most influential figures in modern fashion, Celine’s former creative director Hedi Slimane, before he departed the French label in October.
04 мар. 2025 00:51
Look of the Week: Kendrick Lamar’s Super Bowl pants signal the return of flares
<a href=https://kra27s.cc>kraken зайти</a>
This year’s Super Bowl halftime show was hardly a fashion extravaganza, with headliner Kendrick Lamar keeping things simple in a backwards cap and motorbike-style varsity jacket, which he kept on throughout.

And without the costume-change roulette we’ve come to expect of halftime shows, the internet fixated on one item in particular: his jeans.

While not quite the bell-bottoms of decades past (the 1970s and the 2000s, specifically), the Compton-born rapper’s washed denim pants flared out at the knee and dragged beneath his heels along the stage at Caesars Superdrome in New Orleans. His silhouette stood in stark contrast to that of record producer Mustard, who made a brief cameo in a pair of outsized jeans straight from the West Coast hip-hop playbook.
Opinions were, as ever, divided on social media. Some users described Lamar’s flares as “women’s jeans” and “Hannah Montana pants,” earning him comparisons to everyone from Jennifer Aniston to country singer Lainey Wilson. Others joked that their moms were looking for a similar pair or that they nodded to millennials, for whom flares were a teenage staple.

But those suggesting his style was outdated, or gender-inappropriate, may not have been paying attention to the recent resurgence of flares — in both womenswear and menswear. After all, Lamar’s jeans were designed by one of the most influential figures in modern fashion, Celine’s former creative director Hedi Slimane, before he departed the French label in October.
04 мар. 2025 01:57
Look of the Week: Kendrick Lamar’s Super Bowl pants signal the return of flares
<a href=https://kra27s.cc>кракен даркнет</a>
This year’s Super Bowl halftime show was hardly a fashion extravaganza, with headliner Kendrick Lamar keeping things simple in a backwards cap and motorbike-style varsity jacket, which he kept on throughout.

And without the costume-change roulette we’ve come to expect of halftime shows, the internet fixated on one item in particular: his jeans.

While not quite the bell-bottoms of decades past (the 1970s and the 2000s, specifically), the Compton-born rapper’s washed denim pants flared out at the knee and dragged beneath his heels along the stage at Caesars Superdrome in New Orleans. His silhouette stood in stark contrast to that of record producer Mustard, who made a brief cameo in a pair of outsized jeans straight from the West Coast hip-hop playbook.
Opinions were, as ever, divided on social media. Some users described Lamar’s flares as “women’s jeans” and “Hannah Montana pants,” earning him comparisons to everyone from Jennifer Aniston to country singer Lainey Wilson. Others joked that their moms were looking for a similar pair or that they nodded to millennials, for whom flares were a teenage staple.

But those suggesting his style was outdated, or gender-inappropriate, may not have been paying attention to the recent resurgence of flares — in both womenswear and menswear. After all, Lamar’s jeans were designed by one of the most influential figures in modern fashion, Celine’s former creative director Hedi Slimane, before he departed the French label in October.
Пожалуйста, зарегистрируйтесь или войдите под своей учетной записью , чтобы оставлять сообщения.