원시데이터 수집 시스템
선정목록으로

Neural Appearance Model for Cloth Rendering

관련 패션 · (24) 패션(코오롱FnC)

기본 정보

저자
  1. Gavin Soh — University of Manchester, United Kingdom
  2. Zahra Montazeri — University of Manchester, United Kingdom
DOI
10.1111/cgf.15156
저널
Computer Graphics Forum
발행년도
2024
발행기관
Wiley
피인용수
1
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1111/cgf.15156
토픽
Textile materials and evaluations
OpenAlex ID
W4400957197

평가 내용

관련도
관련
사업분야
패션 · (24) 패션(코오롱FnC)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '패션 > 패션(코오롱FnC)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Abstract The realistic rendering of woven and knitted fabrics has posed significant challenges throughout many years. Previously, fiber‐based micro‐appearance models have achieved considerable success in attaining high levels of realism. However, rendering such models remains complex due to the intricate internal scatterings of hundreds of fibers within a yarn, requiring vast amounts of memory and time to render. In this paper, we introduce a new framework to capture aggregated appearance by tracing many light paths through the underlying fiber geometry. We then employ lightweight neural networks to accurately model the aggregated BSDF, which allows for the precise modeling of a diverse array of materials while offering substantial improvements in speed and reductions in memory. Furthermore, we introduce a novel importance sampling scheme to further speed up the rate of convergence. We validate the efficacy and versatility of our framework through comparisons with preceding fiber‐based shading models as well as the most recent yarn‐based model.

본문 35,823자

본문 펼치기
Abstract The realistic rendering of woven and knitted fabrics has posed significant challenges throughout many years.Previously, fiberbased micro-appearance models have achieved considerable success in attaining high levels of realism.However, rendering such models remains complex due to the intricate internal scatterings of hundreds of fibers within a yarn, requiring vast amounts of memory and time to render.In this paper, we introduce a new framework to capture aggregated appearance by tracing many light paths through the underlying fiber geometry.We then employ lightweight neural networks to accurately model the aggregated BSDF, which allows for the precise modeling of a diverse array of materials while offering substantial improvements in speed and reductions in memory.Furthermore, we introduce a novel importance sampling scheme to further speed up the rate of convergence.We validate the efficacy and versatility of our framework through comparisons with preceding fiber-based shading models as well as the most recent yarn-based model. CCS Concepts • Computing methodologies → Reflectance modeling; Introduction Fabrics are important in our everyday lives and their virtual representation has long been a key focus in computer graphics research.Fabrics, with their detailed structure of fibers, plies, and yarns, present a unique hierarchical geometric structure at each aggregation level, offering a wide array of appearances for different cloth types. Introduction The challenge of accurately modeling the detailed geometry and scattering of fabrics has led to the development of different methods, mainly split into curve-based and surface-based shading models.Curve-based models, using the Bidirectional Curve Scattering Distribution Function (BCSDF), aim to explicitly represent individual elements like fibers [KSZ*15], plies [MGZJ20] and yarns [ZMA*23], similar to methods used in hair rendering.However, these models, while accurate, face challenges like long rendering times and high storage needs. Introduction Micro-appearance models focus on representing fabrics at the microscale, detailing each fiber using high-resolution volumes or fiber meshes [ZJMB11].These models are great at rendering with high detail but are limited in practical use due to their data-intensive nature and their challenges in manipulation and rendering. Introduction In contrast, surface-based models, which depict fabric as a 2D sheet and use specific reflectance models for appearance, are known for being lightweight and user-friendly e.g.[SBDJ13].These models, widely used in the computer graphics industry, can accurately reproduce the overall appearance of fabrics.However, they often fail to capture the fine details necessary for realistic close-up images. Introduction In this paper, we aim to combine the light scattering of a twisted yarn, made up of hundreds of fibers, by simulating the paths of many light rays into the yarn and analyzing their scattering properties.From this analysis, we show that the scattering can be described as three distinct components, and we introduce a new way to model each component using various neural networks and analytical solutions.Additionally, we derive an analytical importance sampling scheme that closely matches the combined scattering distribution.We demonstrate that our model is able to run up to 23 times faster while using up to 600 times less memory when compared to previous fiber-based methods.The memory gain is directly dependent on the fiber count which is often a few hundred.In summary, our main contributions include: Introduction • We introduce a novel neural framework for modeling the light scattering within a bundle of fibers in the yarns.By dividing the scattering into components, we can efficiently model various types of yarns across a broad range of parameters.Our proposed method runs significantly faster and uses substantially less memory.• We further improve on existing neural network approaches by using the channel-wise PReLU activation function to increase performance.We demonstrate its effectiveness by comparing its performance against various model architectures.• From our observations, we derive a new analytical fitting of the scattering for importance sampling.We have managed to derive a new observation-based empirical and invertible importance sampling scheme that matches the scattering distribution to further accelerate the rate of convergence. Prior Work Surface-Based Cloth Models -Cloth rendering has been a subject of extensive research, with various models being developed to achieve a balance between realism and computational efficiency.Micro-appearance Cloth Models -On the contrary, microappearance models have emerged, focusing on the fabric's microgeometry down to the fiber level, offering a high fidelity and detail [SKZ11; ZJMB11; KSZ*15; LN18; MXF*21; ACG*17].However, the high complexity of these models presents a significant challenge in rendering them efficiently.Various precomputation-based rendering methods have been developed to address this, such as the techniques proposed by [ZHRB13; KWN*17; LZB17] to improve performance and GPU-based methods developed by [WY17] for procedurally generated fabrics.Nevertheless, these methods often compromise either on performance or physical accuracy, as well as being difficult to edit and render. Prior Work Aggregation Based Techniques -In recent years, aggregationbased methodologies have been introduced to the domain of cloth rendering, aiming to model the multiple scatterings of a bundle of fibers implicitly.Montazeri et al. [MGZJ20; MGJZ21] pioneered an aggregated technique that encapsulates the light scatterings of individual fibers, approximating the overall appearance at the ply level for woven and knitted fabrics, respectively; later followed by the yarn-level extension [KZP*24].However, their model, while being fast and practical, is predominantly observation-driven and not efficient for yarns with a high number of plies. Zhu et al. [ZZW*22 ] advanced the field by proposing a technique to aggregate the scatterings of a bundle of straight fur fibers in a data-driven manner.They then parameterize the aggregated scattering by fitting analytical lobes, followed by the training of a neural network to predict the parameters for the lobes.This model does not accommodate twisted fibers and, being a far-field model, cannot represent yarn-level highlights at close-up views.In a subsequent study [ZMA*23], the authors introduced an analytical solution designed to accurately approximate the multi-scattering of yarn by utilizing dual scattering theory.However, this model relies heavily on the assumptions inherited from dual scattering theory and also imposes additional assumptions on the fiber shading model.In contrast, our work, while employing similar fiber scattering models and micro-geometry, presents a more generalized model capable of fitting any yarn without necessitating specific assumptions. Zhu et al. [ZZW*22 Neural BRDF Representation -[CNN22; SRRW21] was one of the firsts to leverage machine learning to represent BRDFs and achieve a high compression rate while preserving the fidelity of the BRDF.In this paper, we improve on Sztrajman et al.'s [SRRW21] framework to support aggregated yarn scattering, as we demonstrate that using their framework in a naïve manner do not produce optimal results. Preliminaries Every yarn is made up of twisted plies, which in turn consist of hundreds of strands called fibers.In our study, the primary aim is to aggregate a single-ply geometry while explicitly tracing interactions between plies for multi-ply yarn.The arrangement of the fibers around the yarn is characterized by the parameters N, ρ, and α.Here, N represents the number of fibers in the yarn, ρ represents the fiber density, and α describes the twist factor. Preliminaries where r is the fiber radius, R is the yarn radius, n is the number of revolutions, and l denotes the length along the yarn.Importantly, these parameters are defined such that they are invariant to the yarn's overall scale, allowing us to use our fitted model on all scales of the yarn with the same parameters, without having to re-train the neural networks or re-fit the parameters.The list of all parameters is detailed in Table 1. Fiber Shading Model In this paper, our fiber shading model is based on the method by Khungurn et al. [KSZ*15], where fibers are modeled as glass-like tubes and the scatterings are split into Reflection (R) and Transmission (TT) lobes. Fiber Shading Model where k = {R, T T }.The incident and outgoing directions ω i , ωo are parameterized into the longitudinal angle θ and azimuthal angle φ using the coordinate system defined in Marschner et al. Fiber Shading Model [MJC*03].M represents the scattering in the longitudinal plane, and N represents the scattering in the azimuthal plane.They are defined as: Fiber Shading Model where C R , C T T represents the attenuation of each component, β fR , β fTT represents the longitudinal roughness, and γ T TF represents the azimuthal roughness.ḡ is the normalized Gaussian function defined in Khungurn et al.[KSZ*15] and f denotes the von Mises distribution.Furthermore, F R is the Fresnel term and is approximated via Schlick's approximation [Sch94]: Yarn Shading Frame In this work, we found it useful to describe the light scattering in terms of two separate shading frames, the yarn shading frame, and the surface fiber shading frame.The yarn shading frame is defined as a traditional anisotropic surface shading frame on the yarn cylinder, with the incident and outgoing directions parameterized with longitudinal angle θ and azimuthal angle φ.The normal of the frame is aligned with the normal of the cylinder surface, while the tangent of the frame is aligned in the direction of the yarn tangent. Yarn Shading Frame We chose this in contrast to existing hair literature, where a longitudinal angle θ and an azimuthal offset h are used, to make the process of finding the surface fiber shading frame easier.The surface fiber shading frame describes the fiber shading frame on the surface of the yarn, and using the coordinates system of Marschner et al. [MJC*03] with φ = 0 • when pointing towards the surface normal.The frame is rotated around the surface normal due to the fiber twist.In our paper, we denote the directions relative to the yarn shading frame with ω i and ωo, while the directions relative to the surface fiber shading frame as ωi and ωo which can be defined as: Yarn Shading Frame where φ = tan −1 (πα).Derivation of the angle φ can be found in the appendix below. Our Aggregated Shading Model In alignment with the methodology proposed by Zhu et al. Our Aggregated Shading Model [ZZW*22], the aggregation of yarn fibers is achieved by encapsulating them within a closely bounded cylinder.We aggregate the yarn scattering by simulating many light rays into the yarn and recording their exiting radiance and direction to obtain the Radiance Distribution Map (RDM).The RDM is a 4-dimensional map of the exiting radiance for a given ω i and ωo and is parameterized by θ, φ.Further details on obtaining the RDM are given in §5.3. Our Aggregated Shading Model We then propose a framework to model the RDM by observation It might intuitively seem advantageous to model the RDM directly by fitting a neural network to it.However, our experiments suggest that this approach is not optimal.Initially, it was observed that at certain incoming angles, specifically at grazing azimuthal angles, a substantial amount of light traverses through the yarn cylinder without interacting with any fibers.In such instances, most of the light is directly transmitted and exhibits Dirac delta distribu- Furthermore, a considerable fraction of the brightness within the RDM is attributed to the paths characterized by a single bounce.These paths, interacting with a single fiber on the yarn's surface before exiting, create the highlights of the yarn and introduce abrupt alterations in brightness within the RDM.By isolating these paths into a distinct component, we achieved more precise highlights and facilitated the learning process for the neural network regarding the remaining data.Consequently, we introduce the subsequent shading model as a mixture of separate components T, R, and M, corresponding to the Direct Transmission Component, Direct Reflection Component, and Multi-Scattering Component respectively: Our Aggregated Shading Model where the T component models the light paths that directly pass through the yarn without intersecting many fibers, the R component models the light paths that hit a single fiber and are reflected away, and the M component models the multiple scattering of light within the yarn before exiting.The components T and M are more complex and hence modelled by a neural network, while the R component can be found analytically.By splitting the shading model into separate components, we can better fit each lobe more accurately, whilst using fewer parameters for the neural network, increasing computational efficiency.The first column in Fig. 2 illustrated the pathways associated with each component, followed by the visualization of the distributions of each component.Fig. 3 visualize the appearance of each component to showcase their contribution individually. Direct Transmission Component The Direct Transmission Component of our model represents the fraction of incoming light that directly passes through the yarn without intersecting any fibers, given a specific incident direction ω i .It becomes particularly prominent in yarn assemblies with lower fiber densities, where a high proportion of light rays pass through directly, resulting in a more translucent appearance.Its influence is also more pronounced at grazing azimuthal angles.Consequently, we incorporate this component into the final scattering function.This component can be mathematically expressed as: Direct Transmission Component where δ(ω i + ωo) is the Dirac delta distribution, which is zero except when ω i = −ωo.The probability P(T |ω i ) is multiplied with the Dirac delta distribution δ(ω i + ωo) to determine the radiance of the transmission component.Instead of fitting S T (ω i , ωo) directly with a neural network, we fit P(T |ω i ).This component is a twodimensional map and can easily be modelled by a lightweight neural network. Direct Reflection Component Since the Direct Reflection Component is the reflection of fibers with a single bounce, this component corresponds to a bright highlight on the yarn surface.Therefore, this component contributes to a sharp change in radiance in the RDM.Hence, it would be beneficial to model this component analytically as opposed to fitting it with a neural network as this would allow us to achieve more accurate highlights, while simultaneously allowing the neural networks to converge at a faster rate with the other parameters.We model this component as a single fiber scattering relative to the surface fiber shading frame on the upper hemisphere of the surface. Multi-Scattering Component The Multi-Scattering Component captures the detailed interactions among fibers within the ply or yarn and is represented as S M (ω i , ωo) in the scattering function.By using a neural network, we can effectively learn the distribution of these interactions, creating a robust multi-scattering model.This method is especially useful for modeling yarn aggregation to capture the scatterings of more complex yarn geometries, such as twist, a feature that the existing studies overlooked [ZZW*22].For more detailed information and specific details about the network, please refer to §5.3. Importance Sampling Given that pieces of cloth are composed of numerous yarns, the inter-reflection amongst the yarns significantly influences the overall visual appearance.It is important to employ an advanced importance sampling scheme to reduce variance as showcased in Fig. 4. Nonetheless, due to the complexity of light scattering within a yarn when utilizing a neural network in our approach, we are precluded from using the Bidirectional Scattering Distribution Function (BSDF) for importance sampling.Consequently, we chose to fit an invertible analytical approximation of the data to enhance the sampling of the distribution.Sztrajman et al. [SRRW21] utilized Blinn-Phong lobes to fit the distribution of their Neural BRDFs.However, given that the scattering of light within a yarn does not center around the half angle, the Blinn-Phong lobe is a poor fit for Uniform Sampling Importance Sampling our model.From our observations of the multi-scattering component, we found that the light mainly scatters around the upper half of the cone centered at the fiber tangent at the yarn surface.Thus, we propose the following importance sampling scheme: Importance Sampling • Sample lobe k -We sample the lobes proportional to the energy of their lobes.Since S T (ω i , ωo) is comprised of light passingthrough with a probability of P(T |ω i ), the proportion of energy can be described as P(T |ω i ) directly.The remaining portion of samples can be split proportionally according to the energy of S R (ω i , ωo) and S M (ω i , ωo), which can be approximated by a constant κ R which is pre-computed beforehand based on the computed RDM.• Compute the PDF -The PDF can be described as a mixture of the lobes and can be computed as: Importance Sampling Here, the PDF for each component is defined as: Importance Sampling with their proportions: Our Neural Approach Due to the intricate nature of light scattering within a yarn, we opted to model it using neural networks, inspired by the success of Sztrajman et al. [SRRW21] in accurately and efficiently modeling measured BRDFs.Additionally, this approach provides the generality and flexibility to model various yarn types without making assumptions about the underlying geometry.Beyond the enhancements described in §4 to boost the neural network's performance, we have also refined their base architecture to achieve higher accuracy with minimal runtime costs by employing the channel-wise Parametric Rectified Linear Unit (PReLU) [HZRS15] activation function instead of the Rectified Linear Unit (ReLU) [NH10] activation presented in their paper.A comparison with this model naïvely is shown in Fig. 5. Our Neural Approach In brief, channel-wise PReLU allows each channel of the input its own learnable parameter, which provides the model with additional flexibility to learn more complex representations without a substantial increase in computational cost and mitigates issues related to the "dying ReLU" problem.The "dying ReLU" problem refers to the phenomenon where neurons in a network become inactive and only output zero during training, essentially ceasing to learn or update and thereby reducing the capacity of the model.This often occurs when a large gradient flows through a ReLU neuron, updating the weights in such a way that the neuron will always output zero.PReLU helps to avoid this issue by maintaining active learning and adapting its negative slope to the learned features of the input data. Our Neural Approach Additionally, We chose the channel-wise PReLU activation function over ReLU because it introduces additional trainable parameters for the negative values of ReLU, allowing the neural network more flexibility to overfit with nearly no extra runtime cost, while avoiding the instability of the dying ReLU problem, which is more prevalent in smaller neural networks.Please refer to §6 for additional details on the performance of various neural network architectures and activation functions. Ours Reference [SRRW21] Figure 5: We compare our neural network approach with the naïve approach by contrasting them with the reference.Our method models each component of the RDM as described in §4, while the naïve approach models the RDM directly using the framework described in [SRRW21].Our approach successfully models the reference, including the subtle multi-scatterings, while the latter does not. Data Generation To generate data for computing the RDM and preparing the training data for the neural networks, we initially establish our foundational single-ply yarn geometry, as previously detailed in §3.A bounding cylinder is defined around the yarn, and light rays, each possessing an initial weight of 1, are projected at random directions ω i , uniformly distributed over a hemisphere, into the yarn.Monte Carlo random walks are subsequently utilized to trace the interactions of each ray with the fibers until it exits the yarn cylinder.For each sample, variables such as the incident angle, outgoing angle, outgoing weight, and the number of bounces (depth) are documented.Our dataset consists of 50-100 million sampled rays that are fully traced for each five yarn materials, with a maximum bounce depth of 200 on average.This sample collection process persists until convergence is attained. Direct Transmission Neural Network To acquire the training data for this network, we compute the probability of transmission for a given incoming direction with the gathered samples: Direct Transmission Neural Network We gather samples using the method outlined in §5.1, then organize the data into two 22x90 histograms, representing ω i with θ i and φ i bins across a range of 90x360 degrees.The first histogram calculates the number of direct transmission paths, while the second histogram counts the total number of paths.Subsequently, we Next, we train a lightweight neural network on the probability map.The network, which takes ω i as a unit Cartesian vector and predicts P(T |ω i ), is configured with two hidden layers and follows a 3-7-7-1 structure.The hidden layers utilize the channel-wise Parametric Rectified Linear Unit (PReLU) activation function, and the output layer employs the Sigmoid activation function.The model is trained using the Mean Squared Error (MSE) loss function, coupled with the Adam optimizer.Our network architectures are illustrated in the last column of Fig 2. Multi-Scattering Neural Network The neural network is trained on the multi-scattering component of the RDM.To prepare the data for the neural network, it is necessary to isolate the multi-scattering component from the collected samples.Initially, samples with a depth of 0 are removed to exclude the direct transmission samples, along with samples having a depth of 1 ∩ (ωo • n) > 0 to exclude the direct reflection samples.Subsequently, a weighted 4D histogram is computed from the remaining data into 22x90x45x90 bins of θ i , φ i , θo, and φo, each spanning across the respective ranges of 90x360x180x360 degrees.The data is then divided by the number of samples in each incident bin and the solid angle in each outgoing bin to obtain the radiance at each bin.With the multi-scattering component RDM available, samples are randomly drawn from it to generate our training data. Multi-Scattering Neural Network The neural network is configured to accept Cartesian unit vectors ω i and ωo as inputs and to output r, g, b radiance values.The model incorporates two hidden layers with a 6-21-21-3 structure.The hidden layers utilize channel-wise PReLU activation functions, while the final layer employs the exponential activation function.The model is trained using the Mean Squared Error (MSE) loss function and optimized with the Adam optimizer. Multi-Scattering Neural Network As previously noted in §4.3, the multi-scattering component is represented by S M (ω i , ωo).However, in practice, the neural network was configured to model the product of S M (ω i , ωo) and (ω i • n).Here, (ω i • n) represents the cosine foreshortening factor and is inherently included in the RDM as we record the radiance for each (ω i ) and (ωo) directly. Model Analysis and Ablation In this section, we perform an ablation study about the neural network used in the multi-scattering component by comparing the performance of the model with different architectures.The model is trained on polyester until convergence (40 epoch).Fig. 6 shows the final loss of various model architectures along with different activation functions.It can be seen that channel-wise PReLU consistently outperforms other activation functions with the same model architecture.This is due to the additional trainable parameters of channel-wise PReLU, which gives the model more flexibility at a negligible increase in runtime cost.It also can be seen that increasing the model weights from our base model to 6-21-64-64-21-3 increases the model size by 10.6 times while only offering a 9% decrease in loss.From this, we can see that the model does not need to be overly large, and performs well even with a smaller number of weights. Results In this section, we validate our model and evaluate its performance by comparing renderings with our model to reference images generated by rendering the explicit fiber geometry [KSZ*15] as well as the hierarchical yarn-based model [ZMA*23].For all the materials presented, besides polyester, we have used the fiber shading parameters given in Khungurn et al. [KSZ*15] which were computed by fitting the parameters to match real-life photographs.The parameters of polyester are determined ad hoc to demonstrate the flexibility of our framework.We then wrap these fibers into yarns with given fiber geometry parameters N, ρ, and α.A summary of the parameters can be found in Table 3.All images were rendered with path tracing on Mitsuba 3 [JSR*22], including neural network inference, using an Intel Core i7-10750H 6 Core Processor 2.60GHz machine, while neural network training was done on an NVIDIA GeForce RTX4080 (Mobile).The computation time required to gather the RDM is around a minute on an RTX4080 (Mobile).The average time it takes to train a neural network per material for the direct transmission and multi-scattering components are 30 seconds and 30 minutes respectively. Reference Comparisons 3-Ply Knitted Glove -In this section, we rendered a scene with a 3-ply knitted glove.The base yarn curves defining the glove were 6 -2 1 -6 4 -6 4 -2 1 -3 6 -2 1 -6 4 -2 1 -3 6 -2 1 -2 1 -3 6 -1 6 -1 6 -3 taken from [Yuk20; YKJM12; WY17] and wrapped with 3-plies.The plies are then wrapped with fibers procedurally to generate the ground truth image [ZLB16].For Fig. 1 we rendered the scene at a resolution of 1080x1080.Our model matches the ground truth very well and performs 23 times faster while using around 300 times less memory.The scene is lit with an environmental map along with two spherical lights on the top-right and bottom-left corners.We also rendered the scene with different fiber parameters in Fig. 7 to highlight the flexibility of our model. Reference Comparisons Close-up Yarn -In Fig. 8, we compare our model against the reference on a close-up view of a yarn with varying fiber parameters.The scene is rendered at a resolution of 512x512 and then cropped to an appropriate size.The reference is rendered at 1024 spp, while our model is rendered at 64spp and performs on average 30 times faster.Our model can match the overall yarn appearance despite not having explicit fiber geometry.Please note for a multi-ply yarn, our model aggregates the fiber bundle of a single ply and we rely on the renderer to take the ply-ply interactions into account. Reference Comparisons Woven and Knitted Fabric -In Fig. 9, we rendered our images using the dataset of yarn curves by Leaf et al. [LWS*18].The curves were interpolated and tiled into an appropriate size.All the images were rendered at a resolution of 720x720.All the reference images were rendered at 1024spp except for silk and cotton which were rendered at 4096spp as they take longer to converge due to their very high albedo.From our comparisons, our model matches the reference images very well and can accurately recreate yarn-level details even in the absence of explicit fiber geometry.However, although still visually accurate, we do note that cotton has difficulty matching the reference which is discussed further in the limitations section in §8.Our model performs around 11-17 times faster while using around 200-600 times less memory.Please refer to Table 2 for the full statistics. Comparisons with Zhu et al. 2023 As depicted in Fig. 10, we demonstrate that our approach not only achieves faster rendering speeds, as detailed in Table 2, but also more accurately replicates the reference fiber-based appearance model by Khungurn et al. [KSZ*15].Our model's superiority is due to our neural data-driven methodology that adapts more flexibly, allowing for an exact fit to the reference.In contrast, [ZMA*23] uses an approximated fiber appearance model, which does not model Fresnel effects, and often requiring manual adjustments to align with the reference model.Notably, we use the exact same set of parameters and values across the three models (reference, ours, and [ZMA*23]) without any post-tweaking. Conclusion and Discussion Limitations -Our final aggregated ply shading model assumes that the light scattering enters and exits from the same spot and does not exhibit subsurface scattering.Based on our experiments, this is true for most fabrics except for fibers with very high albedo (such as cotton with 0.999) as they exhibit significantly more bounces per sample and hence travel more throughout the yarn, causing the exit point to be far from the the enter point.While this assumption satisfies most of our cloth types, we left a more accurate distribution of the exit point as a future study.Furthermore, our model assumes the appearance of the yarn is not spatially varying, and is unable to handle spatially varying yarn colors such as dyed cloth.Lastly, our model requires re-training to alter the yarn parameters, which might limit its use in interactive design and modelling for artists. Conclusion and Discussion Future Works -Besides addressing the limitations above, a straightforward extension can include the training and fitting of more complex fiber distributions and scattering as the neural network has the potential to learn any complex distributions.Additionally, we would like to develop and leverage an auto-encoder architecture similar to [SRRW21] to instantly interpolate our fitted yarn models with different fiber parameters to provide additional flexibility to designers and artists.Although our model performs well with an analytically fitted importance sampling lobe, we are interested in seeing if neural importance sampling methods could be used to further improve convergence [XWH*23].We also would like to extend our method to support efficient level-of-detail simplification.This involves simplifying our model into a 3-dimensional BCSDF using a smaller neural network for far-field views, specifically when the width of the yarn is less than a pixel. Conclusion and Discussion Conclusions -In this paper, we presented a novel aggregated shading framework by leveraging the flexibility and generality of neural networks to model the light interactions with a bundle of fibers i.e. ply.Our model can replicate the appearance of many fabrics while running significantly faster and requiring less memory.Through observations of the RDM, we also derived an analytical approximation and importance sampling scheme to further improve the rate of convergence of our model.Finally, our fitted model can be applied to any yarn geometry instantly, providing greater flexibility in designing fabrics. Fleece Half ρ Double α Polyester Eurographics Symposium on Rendering 2024 E Garces and E. Haines (Guest Editors) COMPUTER GRAPHICS forum Volume 43 (2024), Number 4 Neural Appearance Model for Cloth Rendering G. Y. Soh and Z. Montazeri University of Manchester, United Kingdom Figure 1 : Figure 1: In this scene, we compare our neural aggregated model against the reference, which uses explicit fiber-based geometry and scattering model.The left shows the renderings side by side with equal quality (EQ) of the knitted fleece which is 23 times slower and requires 300 times more memory than ours.whereas the right shows the close-up crops to show the equal time (ET) is much noisier than ours. G . Y. Soh & Z. Montazeri / Neural Appearance Model for Cloth Rendering 3 of 13 Figure 2 : Figure 2: Overview of our pipeline.The first step is to explicitly trace the rays and label them into three components to gather the data (direct transmission T, direct reflection R, multi-scattering M).Next, collect them into Radiance Distribution Maps (RDM).Here, we separate each component of the RDM (T, R, M) to demonstrate the vastly different scales and distributions of each component and visualize for when θ i = 45 • and φ i = 0 • .Lastly, the networks to learn the T and M components are visualized while R is being computed analytically. Figure 3 : Figure 3: The contribution of each component (direct transmission T, direct reflection R, multi-scattering M) to the final appearance of the yarn. Figure 3 : . Soh & Z. Montazeri / Neural Appearance Model for Cloth Rendering Figure 4 : Figure 4: Comparison of uniform sampling vs our proposed importance sampling The images are rendered at 64spp and demonstrate that our importance sampling scheme significantly reduces the variance with less noise. • Sample outgoing direction -For the direct transmission component, we sample in the direction ωo = −ω i to simulate the light passing through the yarn.The direct reflection is sampled similarly to the fiber's distribution on the yarn surface.It is done by sampling the longitudinal angles via a normalized Gaussian around −θ i with the standard deviation corresponding to the fiber reflection's longitudinal roughness β fR , while the azimuthal angle is uniformly distributed on the upper cone in the range [−π/2, π/2].The remaining multi-scattering component is sampled via two lobes which are derived from careful observations of the RDM.The first lobe is comprised of a distribution similar to the direct reflection component but with a different longitudinal and azimuthal roughness.It is defined by a longitudinal Gaussian distribution g(θ i , −θo, β M ) and azimuthal von Mises distribution f (φ i , 0 • , γ M ), where azimuthal angle is zero at n.The second distribution is described by a simple uniform sphere to capture the remaining directions not covered by the first lobe.The two lobes are split with a parameter κ M .The parameters β M , γ M , and κ M are to be fitted beforehand. • 11) where g(θo; −θ i , β) represents a Gaussian normalized in the range [−π/2, π/2] with mean −θ i and standard deviation β. f (φo; 0 • , γ −2 M ) represents the von Mises distribution with mean 0 • and roughness γ M . • . Soh & Z. Montazeri / Neural Appearance Model for Cloth Rendering divide the first histogram by the second to derive the probability map P(T |ω i ). Figure 6 : Figure 6: The performance of various neural network architectures on the multi-scattering component.We demonstrate the effectiveness of channel-wise PReLU compared to common activation functions. Figure 7 :Figure 8 :Figure 9 :Figure 10 : Figure 7: Rendering results of a 3-ply glove with fiber parameters; fleece material; fleece with half of the fiber density ρ; fleece with double twist factor α; polyester material.Please refer to the supplementary video for a comprehensive overview. Figure 7 :Figure 8 :Figure 9 :Figure 10 : JWH*22; ZJA*23].While these surface-based models are lightweight and capable of producing high-quality results at mid-to-far distances, they typically lack the fine-grained details necessary for close-up views. Table 1 : List of important symbols for our neural yarn shading Table 2 : Performance Statistics for Fig.9.All rendering times were counted at equal quality (EQ).

섹션 본문 68문단 · 34,443자

Abstract

2The realistic rendering of woven and knitted fabrics has posed significant challenges throughout many years.Previously, fiberbased micro-appearance models have achieved considerable success in attaining high levels of realism.However, rendering such models remains complex due to the intricate internal scatterings of hundreds of fibers within a yarn, requiring vast amounts of memory and time to render.In this paper, we introduce a new framework to capture aggregated appearance by tracing many light paths through the underlying fiber geometry.We then employ lightweight neural networks to accurately model the aggregated BSDF, which allows for the precise modeling of a diverse array of materials while offering substantial improvements in speed and reductions in memory.Furthermore, we introduce a novel importance sampling scheme to further speed up the rate of convergence.We validate the efficacy and versatility of our framework through comparisons with preceding fiber-based shading models as well as the most recent yarn-based model.

CCS Concepts

3• Computing methodologies → Reflectance modeling;

Introduction

4Fabrics are important in our everyday lives and their virtual representation has long been a key focus in computer graphics research.Fabrics, with their detailed structure of fibers, plies, and yarns, present a unique hierarchical geometric structure at each aggregation level, offering a wide array of appearances for different cloth types.

5The challenge of accurately modeling the detailed geometry and scattering of fabrics has led to the development of different methods, mainly split into curve-based and surface-based shading models.Curve-based models, using the Bidirectional Curve Scattering Distribution Function (BCSDF), aim to explicitly represent individual elements like fibers [KSZ*15], plies [MGZJ20] and yarns [ZMA*23], similar to methods used in hair rendering.However, these models, while accurate, face challenges like long rendering times and high storage needs.

6Micro-appearance models focus on representing fabrics at the microscale, detailing each fiber using high-resolution volumes or fiber meshes [ZJMB11].These models are great at rendering with high detail but are limited in practical use due to their data-intensive nature and their challenges in manipulation and rendering.

7In contrast, surface-based models, which depict fabric as a 2D sheet and use specific reflectance models for appearance, are known for being lightweight and user-friendly e.g.[SBDJ13].These models, widely used in the computer graphics industry, can accurately reproduce the overall appearance of fabrics.However, they often fail to capture the fine details necessary for realistic close-up images.

8In this paper, we aim to combine the light scattering of a twisted yarn, made up of hundreds of fibers, by simulating the paths of many light rays into the yarn and analyzing their scattering properties.From this analysis, we show that the scattering can be described as three distinct components, and we introduce a new way to model each component using various neural networks and analytical solutions.Additionally, we derive an analytical importance sampling scheme that closely matches the combined scattering distribution.We demonstrate that our model is able to run up to 23 times faster while using up to 600 times less memory when compared to previous fiber-based methods.The memory gain is directly dependent on the fiber count which is often a few hundred.In summary, our main contributions include:

9• We introduce a novel neural framework for modeling the light scattering within a bundle of fibers in the yarns.By dividing the scattering into components, we can efficiently model various types of yarns across a broad range of parameters.Our proposed method runs significantly faster and uses substantially less memory.• We further improve on existing neural network approaches by using the channel-wise PReLU activation function to increase performance.We demonstrate its effectiveness by comparing its performance against various model architectures.• From our observations, we derive a new analytical fitting of the scattering for importance sampling.We have managed to derive a new observation-based empirical and invertible importance sampling scheme that matches the scattering distribution to further accelerate the rate of convergence.

Prior Work

10Surface-Based Cloth Models -Cloth rendering has been a subject of extensive research, with various models being developed to achieve a balance between realism and computational efficiency.Micro-appearance Cloth Models -On the contrary, microappearance models have emerged, focusing on the fabric's microgeometry down to the fiber level, offering a high fidelity and detail [SKZ11; ZJMB11; KSZ*15; LN18; MXF*21; ACG*17].However, the high complexity of these models presents a significant challenge in rendering them efficiently.Various precomputation-based rendering methods have been developed to address this, such as the techniques proposed by [ZHRB13; KWN*17; LZB17] to improve performance and GPU-based methods developed by [WY17] for procedurally generated fabrics.Nevertheless, these methods often compromise either on performance or physical accuracy, as well as being difficult to edit and render.

11Aggregation Based Techniques -In recent years, aggregationbased methodologies have been introduced to the domain of cloth rendering, aiming to model the multiple scatterings of a bundle of fibers implicitly.Montazeri et al. [MGZJ20; MGJZ21] pioneered an aggregated technique that encapsulates the light scatterings of individual fibers, approximating the overall appearance at the ply level for woven and knitted fabrics, respectively; later followed by the yarn-level extension [KZP*24].However, their model, while being fast and practical, is predominantly observation-driven and not efficient for yarns with a high number of plies.

Zhu et al. [ZZW*22

12] advanced the field by proposing a technique to aggregate the scatterings of a bundle of straight fur fibers in a data-driven manner.They then parameterize the aggregated scattering by fitting analytical lobes, followed by the training of a neural network to predict the parameters for the lobes.This model does not accommodate twisted fibers and, being a far-field model, cannot represent yarn-level highlights at close-up views.In a subsequent study [ZMA*23], the authors introduced an analytical solution designed to accurately approximate the multi-scattering of yarn by utilizing dual scattering theory.However, this model relies heavily on the assumptions inherited from dual scattering theory and also imposes additional assumptions on the fiber shading model.In contrast, our work, while employing similar fiber scattering models and micro-geometry, presents a more generalized model capable of fitting any yarn without necessitating specific assumptions.

13Neural BRDF Representation -[CNN22; SRRW21] was one of the firsts to leverage machine learning to represent BRDFs and achieve a high compression rate while preserving the fidelity of the BRDF.In this paper, we improve on Sztrajman et al.'s [SRRW21] framework to support aggregated yarn scattering, as we demonstrate that using their framework in a naïve manner do not produce optimal results.

Preliminaries

14Every yarn is made up of twisted plies, which in turn consist of hundreds of strands called fibers.In our study, the primary aim is to aggregate a single-ply geometry while explicitly tracing interactions between plies for multi-ply yarn.The arrangement of the fibers around the yarn is characterized by the parameters N, ρ, and α.Here, N represents the number of fibers in the yarn, ρ represents the fiber density, and α describes the twist factor.

15where r is the fiber radius, R is the yarn radius, n is the number of revolutions, and l denotes the length along the yarn.Importantly, these parameters are defined such that they are invariant to the yarn's overall scale, allowing us to use our fitted model on all scales of the yarn with the same parameters, without having to re-train the neural networks or re-fit the parameters.The list of all parameters is detailed in Table 1.

Fiber Shading Model

16In this paper, our fiber shading model is based on the method by Khungurn et al. [KSZ*15], where fibers are modeled as glass-like tubes and the scatterings are split into Reflection (R) and Transmission (TT) lobes.

17where k = {R, T T }.The incident and outgoing directions ω i , ωo are parameterized into the longitudinal angle θ and azimuthal angle φ using the coordinate system defined in Marschner et al.

18[MJC*03].M represents the scattering in the longitudinal plane, and N represents the scattering in the azimuthal plane.They are defined as:

19where C R , C T T represents the attenuation of each component, β fR , β fTT represents the longitudinal roughness, and γ T TF represents the azimuthal roughness.ḡ is the normalized Gaussian function defined in Khungurn et al.[KSZ*15] and f denotes the von Mises distribution.Furthermore, F R is the Fresnel term and is approximated via Schlick's approximation [Sch94]:

Yarn Shading Frame

20In this work, we found it useful to describe the light scattering in terms of two separate shading frames, the yarn shading frame, and the surface fiber shading frame.The yarn shading frame is defined as a traditional anisotropic surface shading frame on the yarn cylinder, with the incident and outgoing directions parameterized with longitudinal angle θ and azimuthal angle φ.The normal of the frame is aligned with the normal of the cylinder surface, while the tangent of the frame is aligned in the direction of the yarn tangent.

21We chose this in contrast to existing hair literature, where a longitudinal angle θ and an azimuthal offset h are used, to make the process of finding the surface fiber shading frame easier.The surface fiber shading frame describes the fiber shading frame on the surface of the yarn, and using the coordinates system of Marschner et al. [MJC*03] with φ = 0 • when pointing towards the surface normal.The frame is rotated around the surface normal due to the fiber twist.In our paper, we denote the directions relative to the yarn shading frame with ω i and ωo, while the directions relative to the surface fiber shading frame as ωi and ωo which can be defined as:

22where φ = tan −1 (πα).Derivation of the angle φ can be found in the appendix below.

Our Aggregated Shading Model

23In alignment with the methodology proposed by Zhu et al.

24[ZZW*22], the aggregation of yarn fibers is achieved by encapsulating them within a closely bounded cylinder.We aggregate the yarn scattering by simulating many light rays into the yarn and recording their exiting radiance and direction to obtain the Radiance Distribution Map (RDM).The RDM is a 4-dimensional map of the exiting radiance for a given ω i and ωo and is parameterized by θ, φ.Further details on obtaining the RDM are given in §5.3.

25We then propose a framework to model the RDM by observation It might intuitively seem advantageous to model the RDM directly by fitting a neural network to it.However, our experiments suggest that this approach is not optimal.Initially, it was observed that at certain incoming angles, specifically at grazing azimuthal angles, a substantial amount of light traverses through the yarn cylinder without interacting with any fibers.In such instances, most of the light is directly transmitted and exhibits Dirac delta distribu- Furthermore, a considerable fraction of the brightness within the RDM is attributed to the paths characterized by a single bounce.These paths, interacting with a single fiber on the yarn's surface before exiting, create the highlights of the yarn and introduce abrupt alterations in brightness within the RDM.By isolating these paths into a distinct component, we achieved more precise highlights and facilitated the learning process for the neural network regarding the remaining data.Consequently, we introduce the subsequent shading model as a mixture of separate components T, R, and M, corresponding to the Direct Transmission Component, Direct Reflection Component, and Multi-Scattering Component respectively:

26where the T component models the light paths that directly pass through the yarn without intersecting many fibers, the R component models the light paths that hit a single fiber and are reflected away, and the M component models the multiple scattering of light within the yarn before exiting.The components T and M are more complex and hence modelled by a neural network, while the R component can be found analytically.By splitting the shading model into separate components, we can better fit each lobe more accurately, whilst using fewer parameters for the neural network, increasing computational efficiency.The first column in Fig. 2 illustrated the pathways associated with each component, followed by the visualization of the distributions of each component.Fig. 3 visualize the appearance of each component to showcase their contribution individually.

Direct Transmission Component

27The Direct Transmission Component of our model represents the fraction of incoming light that directly passes through the yarn without intersecting any fibers, given a specific incident direction ω i .It becomes particularly prominent in yarn assemblies with lower fiber densities, where a high proportion of light rays pass through directly, resulting in a more translucent appearance.Its influence is also more pronounced at grazing azimuthal angles.Consequently, we incorporate this component into the final scattering function.This component can be mathematically expressed as:

28where δ(ω i + ωo) is the Dirac delta distribution, which is zero except when ω i = −ωo.The probability P(T |ω i ) is multiplied with the Dirac delta distribution δ(ω i + ωo) to determine the radiance of the transmission component.Instead of fitting S T (ω i , ωo) directly with a neural network, we fit P(T |ω i ).This component is a twodimensional map and can easily be modelled by a lightweight neural network.

Direct Reflection Component

29Since the Direct Reflection Component is the reflection of fibers with a single bounce, this component corresponds to a bright highlight on the yarn surface.Therefore, this component contributes to a sharp change in radiance in the RDM.Hence, it would be beneficial to model this component analytically as opposed to fitting it with a neural network as this would allow us to achieve more accurate highlights, while simultaneously allowing the neural networks to converge at a faster rate with the other parameters.We model this component as a single fiber scattering relative to the surface fiber shading frame on the upper hemisphere of the surface.

Multi-Scattering Component

30The Multi-Scattering Component captures the detailed interactions among fibers within the ply or yarn and is represented as S M (ω i , ωo) in the scattering function.By using a neural network, we can effectively learn the distribution of these interactions, creating a robust multi-scattering model.This method is especially useful for modeling yarn aggregation to capture the scatterings of more complex yarn geometries, such as twist, a feature that the existing studies overlooked [ZZW*22].For more detailed information and specific details about the network, please refer to §5.3.

Importance Sampling

31Given that pieces of cloth are composed of numerous yarns, the inter-reflection amongst the yarns significantly influences the overall visual appearance.It is important to employ an advanced importance sampling scheme to reduce variance as showcased in Fig. 4. Nonetheless, due to the complexity of light scattering within a yarn when utilizing a neural network in our approach, we are precluded from using the Bidirectional Scattering Distribution Function (BSDF) for importance sampling.Consequently, we chose to fit an invertible analytical approximation of the data to enhance the sampling of the distribution.Sztrajman et al. [SRRW21] utilized Blinn-Phong lobes to fit the distribution of their Neural BRDFs.However, given that the scattering of light within a yarn does not center around the half angle, the Blinn-Phong lobe is a poor fit for Uniform Sampling Importance Sampling our model.From our observations of the multi-scattering component, we found that the light mainly scatters around the upper half of the cone centered at the fiber tangent at the yarn surface.Thus, we propose the following importance sampling scheme:

32• Sample lobe k -We sample the lobes proportional to the energy of their lobes.Since S T (ω i , ωo) is comprised of light passingthrough with a probability of P(T |ω i ), the proportion of energy can be described as P(T |ω i ) directly.The remaining portion of samples can be split proportionally according to the energy of S R (ω i , ωo) and S M (ω i , ωo), which can be approximated by a constant κ R which is pre-computed beforehand based on the computed RDM.• Compute the PDF -The PDF can be described as a mixture of the lobes and can be computed as:

33Here, the PDF for each component is defined as:

34with their proportions:

Our Neural Approach

35Due to the intricate nature of light scattering within a yarn, we opted to model it using neural networks, inspired by the success of Sztrajman et al. [SRRW21] in accurately and efficiently modeling measured BRDFs.Additionally, this approach provides the generality and flexibility to model various yarn types without making assumptions about the underlying geometry.Beyond the enhancements described in §4 to boost the neural network's performance, we have also refined their base architecture to achieve higher accuracy with minimal runtime costs by employing the channel-wise Parametric Rectified Linear Unit (PReLU) [HZRS15] activation function instead of the Rectified Linear Unit (ReLU) [NH10] activation presented in their paper.A comparison with this model naïvely is shown in Fig. 5.

36In brief, channel-wise PReLU allows each channel of the input its own learnable parameter, which provides the model with additional flexibility to learn more complex representations without a substantial increase in computational cost and mitigates issues related to the "dying ReLU" problem.The "dying ReLU" problem refers to the phenomenon where neurons in a network become inactive and only output zero during training, essentially ceasing to learn or update and thereby reducing the capacity of the model.This often occurs when a large gradient flows through a ReLU neuron, updating the weights in such a way that the neuron will always output zero.PReLU helps to avoid this issue by maintaining active learning and adapting its negative slope to the learned features of the input data.

37Additionally, We chose the channel-wise PReLU activation function over ReLU because it introduces additional trainable parameters for the negative values of ReLU, allowing the neural network more flexibility to overfit with nearly no extra runtime cost, while avoiding the instability of the dying ReLU problem, which is more prevalent in smaller neural networks.Please refer to §6 for additional details on the performance of various neural network architectures and activation functions.

Ours Reference [SRRW21]

38Figure 5: We compare our neural network approach with the naïve approach by contrasting them with the reference.Our method models each component of the RDM as described in §4, while the naïve approach models the RDM directly using the framework described in [SRRW21].Our approach successfully models the reference, including the subtle multi-scatterings, while the latter does not.

Data Generation

39To generate data for computing the RDM and preparing the training data for the neural networks, we initially establish our foundational single-ply yarn geometry, as previously detailed in §3.A bounding cylinder is defined around the yarn, and light rays, each possessing an initial weight of 1, are projected at random directions ω i , uniformly distributed over a hemisphere, into the yarn.Monte Carlo random walks are subsequently utilized to trace the interactions of each ray with the fibers until it exits the yarn cylinder.For each sample, variables such as the incident angle, outgoing angle, outgoing weight, and the number of bounces (depth) are documented.Our dataset consists of 50-100 million sampled rays that are fully traced for each five yarn materials, with a maximum bounce depth of 200 on average.This sample collection process persists until convergence is attained.

Direct Transmission Neural Network

40To acquire the training data for this network, we compute the probability of transmission for a given incoming direction with the gathered samples:

41We gather samples using the method outlined in §5.1, then organize the data into two 22x90 histograms, representing ω i with θ i and φ i bins across a range of 90x360 degrees.The first histogram calculates the number of direct transmission paths, while the second histogram counts the total number of paths.Subsequently, we Next, we train a lightweight neural network on the probability map.The network, which takes ω i as a unit Cartesian vector and predicts P(T |ω i ), is configured with two hidden layers and follows a 3-7-7-1 structure.The hidden layers utilize the channel-wise Parametric Rectified Linear Unit (PReLU) activation function, and the output layer employs the Sigmoid activation function.The model is trained using the Mean Squared Error (MSE) loss function, coupled with the Adam optimizer.Our network architectures are illustrated in the last column of Fig 2.

Multi-Scattering Neural Network

42The neural network is trained on the multi-scattering component of the RDM.To prepare the data for the neural network, it is necessary to isolate the multi-scattering component from the collected samples.Initially, samples with a depth of 0 are removed to exclude the direct transmission samples, along with samples having a depth of 1 ∩ (ωo • n) > 0 to exclude the direct reflection samples.Subsequently, a weighted 4D histogram is computed from the remaining data into 22x90x45x90 bins of θ i , φ i , θo, and φo, each spanning across the respective ranges of 90x360x180x360 degrees.The data is then divided by the number of samples in each incident bin and the solid angle in each outgoing bin to obtain the radiance at each bin.With the multi-scattering component RDM available, samples are randomly drawn from it to generate our training data.

43The neural network is configured to accept Cartesian unit vectors ω i and ωo as inputs and to output r, g, b radiance values.The model incorporates two hidden layers with a 6-21-21-3 structure.The hidden layers utilize channel-wise PReLU activation functions, while the final layer employs the exponential activation function.The model is trained using the Mean Squared Error (MSE) loss function and optimized with the Adam optimizer.

44As previously noted in §4.3, the multi-scattering component is represented by S M (ω i , ωo).However, in practice, the neural network was configured to model the product of S M (ω i , ωo) and (ω i • n).Here, (ω i • n) represents the cosine foreshortening factor and is inherently included in the RDM as we record the radiance for each (ω i ) and (ωo) directly.

Model Analysis and Ablation

45In this section, we perform an ablation study about the neural network used in the multi-scattering component by comparing the performance of the model with different architectures.The model is trained on polyester until convergence (40 epoch).Fig. 6 shows the final loss of various model architectures along with different activation functions.It can be seen that channel-wise PReLU consistently outperforms other activation functions with the same model architecture.This is due to the additional trainable parameters of channel-wise PReLU, which gives the model more flexibility at a negligible increase in runtime cost.It also can be seen that increasing the model weights from our base model to 6-21-64-64-21-3 increases the model size by 10.6 times while only offering a 9% decrease in loss.From this, we can see that the model does not need to be overly large, and performs well even with a smaller number of weights.

Results

46In this section, we validate our model and evaluate its performance by comparing renderings with our model to reference images generated by rendering the explicit fiber geometry [KSZ*15] as well as the hierarchical yarn-based model [ZMA*23].For all the materials presented, besides polyester, we have used the fiber shading parameters given in Khungurn et al. [KSZ*15] which were computed by fitting the parameters to match real-life photographs.The parameters of polyester are determined ad hoc to demonstrate the flexibility of our framework.We then wrap these fibers into yarns with given fiber geometry parameters N, ρ, and α.A summary of the parameters can be found in Table 3.All images were rendered with path tracing on Mitsuba 3 [JSR*22], including neural network inference, using an Intel Core i7-10750H 6 Core Processor 2.60GHz machine, while neural network training was done on an NVIDIA GeForce RTX4080 (Mobile).The computation time required to gather the RDM is around a minute on an RTX4080 (Mobile).The average time it takes to train a neural network per material for the direct transmission and multi-scattering components are 30 seconds and 30 minutes respectively.

Reference Comparisons

473-Ply Knitted Glove -In this section, we rendered a scene with a 3-ply knitted glove.The base yarn curves defining the glove were 6 -2 1 -6 4 -6 4 -2 1 -3 6 -2 1 -6 4 -2 1 -3 6 -2 1 -2 1 -3 6 -1 6 -1 6 -3 taken from [Yuk20; YKJM12; WY17] and wrapped with 3-plies.The plies are then wrapped with fibers procedurally to generate the ground truth image [ZLB16].For Fig. 1 we rendered the scene at a resolution of 1080x1080.Our model matches the ground truth very well and performs 23 times faster while using around 300 times less memory.The scene is lit with an environmental map along with two spherical lights on the top-right and bottom-left corners.We also rendered the scene with different fiber parameters in Fig. 7 to highlight the flexibility of our model.

48Close-up Yarn -In Fig. 8, we compare our model against the reference on a close-up view of a yarn with varying fiber parameters.The scene is rendered at a resolution of 512x512 and then cropped to an appropriate size.The reference is rendered at 1024 spp, while our model is rendered at 64spp and performs on average 30 times faster.Our model can match the overall yarn appearance despite not having explicit fiber geometry.Please note for a multi-ply yarn, our model aggregates the fiber bundle of a single ply and we rely on the renderer to take the ply-ply interactions into account.

49Woven and Knitted Fabric -In Fig. 9, we rendered our images using the dataset of yarn curves by Leaf et al. [LWS*18].The curves were interpolated and tiled into an appropriate size.All the images were rendered at a resolution of 720x720.All the reference images were rendered at 1024spp except for silk and cotton which were rendered at 4096spp as they take longer to converge due to their very high albedo.From our comparisons, our model matches the reference images very well and can accurately recreate yarn-level details even in the absence of explicit fiber geometry.However, although still visually accurate, we do note that cotton has difficulty matching the reference which is discussed further in the limitations section in §8.Our model performs around 11-17 times faster while using around 200-600 times less memory.Please refer to Table 2 for the full statistics.

Comparisons with Zhu et al. 2023

50As depicted in Fig. 10, we demonstrate that our approach not only achieves faster rendering speeds, as detailed in Table 2, but also more accurately replicates the reference fiber-based appearance model by Khungurn et al. [KSZ*15].Our model's superiority is due to our neural data-driven methodology that adapts more flexibly, allowing for an exact fit to the reference.In contrast, [ZMA*23] uses an approximated fiber appearance model, which does not model Fresnel effects, and often requiring manual adjustments to align with the reference model.Notably, we use the exact same set of parameters and values across the three models (reference, ours, and [ZMA*23]) without any post-tweaking.

Conclusion and Discussion

51Limitations -Our final aggregated ply shading model assumes that the light scattering enters and exits from the same spot and does not exhibit subsurface scattering.Based on our experiments, this is true for most fabrics except for fibers with very high albedo (such as cotton with 0.999) as they exhibit significantly more bounces per sample and hence travel more throughout the yarn, causing the exit point to be far from the the enter point.While this assumption satisfies most of our cloth types, we left a more accurate distribution of the exit point as a future study.Furthermore, our model assumes the appearance of the yarn is not spatially varying, and is unable to handle spatially varying yarn colors such as dyed cloth.Lastly, our model requires re-training to alter the yarn parameters, which might limit its use in interactive design and modelling for artists.

52Future Works -Besides addressing the limitations above, a straightforward extension can include the training and fitting of more complex fiber distributions and scattering as the neural network has the potential to learn any complex distributions.Additionally, we would like to develop and leverage an auto-encoder architecture similar to [SRRW21] to instantly interpolate our fitted yarn models with different fiber parameters to provide additional flexibility to designers and artists.Although our model performs well with an analytically fitted importance sampling lobe, we are interested in seeing if neural importance sampling methods could be used to further improve convergence [XWH*23].We also would like to extend our method to support efficient level-of-detail simplification.This involves simplifying our model into a 3-dimensional BCSDF using a smaller neural network for far-field views, specifically when the width of the yarn is less than a pixel.

53Conclusions -In this paper, we presented a novel aggregated shading framework by leveraging the flexibility and generality of neural networks to model the light interactions with a bundle of fibers i.e. ply.Our model can replicate the appearance of many fabrics while running significantly faster and requiring less memory.Through observations of the RDM, we also derived an analytical approximation and importance sampling scheme to further improve the rate of convergence of our model.Finally, our fitted model can be applied to any yarn geometry instantly, providing greater flexibility in designing fabrics.

Fleece

54Half ρ Double α Polyester

Eurographics

55Symposium on Rendering 2024 E Garces and E. Haines (Guest Editors) COMPUTER GRAPHICS forum Volume 43 (2024), Number 4 Neural Appearance Model for Cloth Rendering G. Y. Soh and Z. Montazeri University of Manchester, United Kingdom

Figure 1 :

56Figure 1: In this scene, we compare our neural aggregated model against the reference, which uses explicit fiber-based geometry and scattering model.The left shows the renderings side by side with equal quality (EQ) of the knitted fleece which is 23 times slower and requires 300 times more memory than ours.whereas the right shows the close-up crops to show the equal time (ET) is much noisier than ours.

G

57. Y. Soh & Z. Montazeri / Neural Appearance Model for Cloth Rendering 3 of 13

Figure 2 :

58Figure 2: Overview of our pipeline.The first step is to explicitly trace the rays and label them into three components to gather the data (direct transmission T, direct reflection R, multi-scattering M).Next, collect them into Radiance Distribution Maps (RDM).Here, we separate each component of the RDM (T, R, M) to demonstrate the vastly different scales and distributions of each component and visualize for when θ i = 45 • and φ i = 0 • .Lastly, the networks to learn the T and M components are visualized while R is being computed analytically.

Figure 3 :

59Figure 3: The contribution of each component (direct transmission T, direct reflection R, multi-scattering M) to the final appearance of the yarn.

60. Soh & Z. Montazeri / Neural Appearance Model for Cloth Rendering

Figure 4 :

61Figure 4: Comparison of uniform sampling vs our proposed importance sampling The images are rendered at 64spp and demonstrate that our importance sampling scheme significantly reduces the variance with less noise.

•

62Sample outgoing direction -For the direct transmission component, we sample in the direction ωo = −ω i to simulate the light passing through the yarn.The direct reflection is sampled similarly to the fiber's distribution on the yarn surface.It is done by sampling the longitudinal angles via a normalized Gaussian around −θ i with the standard deviation corresponding to the fiber reflection's longitudinal roughness β fR , while the azimuthal angle is uniformly distributed on the upper cone in the range [−π/2, π/2].The remaining multi-scattering component is sampled via two lobes which are derived from careful observations of the RDM.The first lobe is comprised of a distribution similar to the direct reflection component but with a different longitudinal and azimuthal roughness.It is defined by a longitudinal Gaussian distribution g(θ i , −θo, β M ) and azimuthal von Mises distribution f (φ i , 0 • , γ M ), where azimuthal angle is zero at n.The second distribution is described by a simple uniform sphere to capture the remaining directions not covered by the first lobe.The two lobes are split with a parameter κ M .The parameters β M , γ M , and κ M are to be fitted beforehand.

6311) where g(θo; −θ i , β) represents a Gaussian normalized in the range [−π/2, π/2] with mean −θ i and standard deviation β. f (φo; 0 • , γ −2 M ) represents the von Mises distribution with mean 0 • and roughness γ M .

64. Soh & Z. Montazeri / Neural Appearance Model for Cloth Rendering divide the first histogram by the second to derive the probability map P(T |ω i ).

Figure 6 :

65Figure 6: The performance of various neural network architectures on the multi-scattering component.We demonstrate the effectiveness of channel-wise PReLU compared to common activation functions.

Figure 7 :Figure 8 :Figure 9 :Figure 10 :

66Figure 7: Rendering results of a 3-ply glove with fiber parameters; fleece material; fleece with half of the fiber density ρ; fleece with double twist factor α; polyester material.Please refer to the supplementary video for a comprehensive overview.

67JWH*22; ZJA*23].While these surface-based models are lightweight and capable of producing high-quality results at mid-to-far distances, they typically lack the fine-grained details necessary for close-up views.

Table 1 :

68List of important symbols for our neural yarn shading

Table 2 :

69Performance Statistics for Fig.9.All rendering times were counted at equal quality (EQ).

참고문헌 25건

  1. Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification 2015 10.1109/iccv.2015.123
  2. Real-time rendering of woven clothes 2003 10.1145/1008653.1008663
  3. A Volumetric Approach to Predictive Rendering of Fabrics Computer Graphics Forum · Wiley · 2011 10.1111/j.1467-8659.2011.01987.x
  4. Stitch meshes for modeling knitted clothing with yarn-level detail ACM Transactions on Graphics · Association for Computing Machinery · 2012 10.1145/2185520.2185533
  5. A practical microcylinder appearance model for cloth rendering ACM Transactions on Graphics · Association for Computing Machinery · 2013 10.1145/2451236.2451240
  6. An Inexpensive BRDF Model for Physically‐based Rendering Computer Graphics Forum · Wiley · 1994 10.1111/1467-8659.1330233
  7. Specular reflection from woven cloth ACM Transactions on Graphics · Association for Computing Machinery · 2012 10.1145/2077341.2077352
  8. Matching Real Fabrics with Micro-Appearance Models ACM Transactions on Graphics · Association for Computing Machinery · 2015 10.1145/2818648
  9. Fitting procedural yarn models for realistic cloth rendering ACM Transactions on Graphics · Association for Computing Machinery · 2016 10.1145/2897824.2925932
  10. Real-time fiber-level cloth rendering 2017 10.1145/3023368.3023372
  11. Fast rendering of fabric micro-appearance models under directional and spherical gaussian lights ACM Transactions on Graphics · Association for Computing Machinery · 2017 10.1145/3130800.3130829
  12. A new microflake model with microscopic self‐shadowing for accurate volume downsampling Computer Graphics Forum · Wiley · 2018 10.1111/cgf.13346
  13. Interactive design of periodic yarn-level cloth patterns ACM Transactions on Graphics · Association for Computing Machinery · 2018 10.1145/3272127.3275105
  14. Mechanics-Aware Modeling of Cloth Appearance IEEE Transactions on Visualization and Computer Graphics · Institute of Electrical and Electronics Engineers · 2019 10.1109/tvcg.2019.2937301
  15. A practical ply-based appearance model of woven fabrics ACM Transactions on Graphics · Association for Computing Machinery · 2020 10.1145/3414685.3417777
  16. Building volumetric appearance models of fabric using micro CT imaging ACM Transactions on Graphics · Association for Computing Machinery · 2011 10.1145/2010324.1964939
  17. NeuMIP: Multi-Resolution Neural Materials arXiv (Cornell University) · Cornell University · 2021 10.48550/arxiv.2104.02789
  18. Neural BRDF Representation and Importance Sampling Computer Graphics Forum · Wiley · 2021 10.1111/cgf.14335
  19. Invertible Neural BRDF for Object Inverse Rendering IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2021 10.1109/tpami.2021.3129537
  20. Computer Graphics Forum Computer Graphics Forum · Wiley · 2021 10.1111/(issn)1467-8659
  21. Light scattering from human hair fibers ACM Transactions on Graphics · Association for Computing Machinery · 2003 10.1145/882262.882345
  22. Practical level-of-detail aggregation of fur appearance ACM Transactions on Graphics · Association for Computing Machinery · 2022 10.1145/3528223.3530105
  23. Woven Fabric Capture from a Single Photo 2022 10.1145/3550469.3555380
  24. A Realistic Surface-based Cloth Rendering Model 2023 10.1145/3588432.3591554
  25. NeuSample: Importance Sampling for Neural Materials 2023 10.1145/3588432.3591524