OC置换可以混合、相乘、相加吗?多个置换贴图叠加

OC置换在节点编辑器中直接混合或相乘无效,建议在PS预处理或使用烘培纹理合并贴图。OC2020引入置换混合器节点,支持最多16个图层混合,通过调整混合强度控制置换范围和高度。若无高级版本,可通过复制模型并分别应用置换实现类似效果。
摘要由CSDN通过智能技术生成

《C4D的十万个为什么》首发于 公众号:苦七君

免费搜索查看更多问题:kuqijun.com


问题:

OC置换可以混合、相乘、相加吗?多个置换贴图叠加


答案:

在oc的节点编辑器里面,正常两个纹理混合或者相乘后给置换节点,是没有效果的。

如果不闲麻烦的话,可以先在ps里面把两个置换贴图混合或者叠加等,做成新的置换贴图后,再放到oc里面去置换。

 

或者直接在oc节点编辑器里面,在混合纹理后,添加一个烘培纹理。这个烘培纹理的作用,可以理解成就是把前面两个贴图变成单独的一个贴图了。这样就省掉了ps的操作。

 

当然这样混合纹理其实意思并不是那么大,因为本来科技或者山脉置换,纹理就比较复杂,这样混合到一起,可能纹理更复杂了,不能单独的去控制其中某一个纹理的高度。

 

如果用oc2020的话,在节点编辑器里面,有个新功能叫置换混合器节点。

在节点的基本属性里面,修改数字可以增加置换图层的个数,最大16。

操作方法只要把原来的置换节点,

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
当然可以,以下是 Objective-C 版本的代码实现: 1. 在 info.plist 文件中添加蓝牙权限: - NSBluetoothPeripheralUsageDescription:描述了应用程序需要使用蓝牙的原因。 - NSMicrophoneUsageDescription:描述了应用程序需要使用麦克风的原因。 2. 创建一个 AVAudioSession 实例并设置它的类别为 AVAudioSessionCategoryRecord: ``` AVAudioSession *audioSession = [AVAudioSession sharedInstance]; NSError *error; BOOL success = [audioSession setCategory:AVAudioSessionCategoryRecord error:&error]; if (!success) { NSLog(@"Failed to set audio session category: %@", error.localizedDescription); } ``` 3. 设置 AVAudioSession 实例的输入源和输出源: ``` NSArray<AVAudioSessionPortDescription *> *bluetoothInputs = [audioSession.availableInputs filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(AVAudioSessionPortDescription * _Nullable input, NSDictionary<NSString *,id> * _Nullable bindings) { return input.portType == AVAudioSessionPortBluetoothHFP || input.portType == AVAudioSessionPortBluetoothA2DP; }]]; if (bluetoothInputs.count > 0) { NSError *error; success = [audioSession setPreferredInput:bluetoothInputs.firstObject error:&error]; if (!success) { NSLog(@"Failed to set preferred input: %@", error.localizedDescription); } } AVAudioSessionPortDescription *currentOutput = audioSession.currentRoute.outputs.firstObject; success = [audioSession setPreferredOutput:currentOutput error:&error]; if (!success) { NSLog(@"Failed to set preferred output: %@", error.localizedDescription); } ``` 4. 初始化 AVAudioRecorder 对象并开始录音: ``` NSURL *audioURL = // Specify the URL where you want to save the recorded audio. NSDictionary *audioSettings = @{AVFormatIDKey: @(kAudioFormatMPEG4AAC), AVSampleRateKey: @(44100), AVNumberOfChannelsKey: @(2)}; NSError *error; AVAudioRecorder *audioRecorder = [[AVAudioRecorder alloc] initWithURL:audioURL settings:audioSettings error:&error]; if (!audioRecorder) { NSLog(@"Failed to initialize audio recorder: %@", error.localizedDescription); } else { [audioRecorder prepareToRecord]; [audioRecorder record]; } ``` 这样就可以从蓝牙设备的麦克风录制音频了。希望对您有所帮助!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

苦七君

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值