티스토리 뷰
728x90
반응형
후디니 digital asset을 내보낸것을 불러와서
후디니 에셋 파라미터를 스크립트로 제어해보자
<후디니>
https://ing-min.tistory.com/179
unity_houdini_part1. houdini Engine Unity package
1. 유니티에서 이 패키지를 연다. error Unable to connect to the Houdini Engine server Unable to connect to the Houdini Engine server (socket mode). Make sure you started the HARS server located in Houdini. HARS was running: False ---------------
ing-min.tistory.com
후디니에서 디지털 에셋내보내기
저장경로 - 유니티 에셋
<유니티>
using UnityEngine;
using UnityEngine.UI;
using HoudiniEngineUnity;
public class Wave : MonoBehaviour
{
public Slider waveHeightSlider;
public Slider noiseScaleSlider;
public Slider noiseSeedSlider;
public HEU_HoudiniAsset houdiniAsset;
private void Start()
{
// Set initial values for sliders
waveHeightSlider.value = 0f;
noiseScaleSlider.value = 0f;
noiseSeedSlider.value = 0f;
// Add listeners to the sliders
waveHeightSlider.onValueChanged.AddListener(ChangeWaveHeight);
noiseScaleSlider.onValueChanged.AddListener(ChangeNoiseScale);
noiseSeedSlider.onValueChanged.AddListener(ChangeNoiseSeed);
}
private void ChangeWaveHeight(float newValue)
{
ChangeParameter("wave_height", newValue);
}
private void ChangeNoiseScale(float newValue)
{
ChangeParameter("noise_scale", newValue);
}
private void ChangeNoiseSeed(float newValue)
{
ChangeParameter("noise_seed", newValue);
}
private void ChangeParameter(string paramName, float newValue)
{
if (houdiniAsset == null)
{
Debug.LogError("Houdini Asset is not assigned in the inspector");
return;
}
// Set the value of the parameter
HEU_ParameterUtility.SetFloat(houdiniAsset,paramName, newValue);
// Recook the asset to apply the changes
houdiniAsset.RequestCook(bCheckParametersChanged: true, bAsync: true, bSkipCookCheck: false, bUploadParameters: true);
}
}
(옛날 버전이라 코드가 바뀜)
728x90
반응형
'후디니' 카테고리의 다른 글
Scientific Datasets in Houdini_01 (1) | 2023.12.28 |
---|---|
Houdini_Algorithmic Tutorial : Recursive Box (0) | 2023.07.24 |
unity_houdini_part1. houdini Engine Unity package (0) | 2023.07.06 |
후디니 _ mac FREE 라이센스 문제_houdini for unity (1) | 2023.05.13 |
houdini for unity (0) | 2023.05.12 |
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Unity
- opencv
- MQTT
- DeepLeaning
- colab
- Express
- imgtoimg
- sequelize
- three.js
- oculuspro
- docker
- 후디니
- 유니티
- ai image generator
- Java
- houdini
- Midjourney
- AI
- RNN
- VR
- Python
- CNC
- TouchDesigner
- ai film
- runwayai
- node.js
- google ai studio
- 라즈베리파이
- Arduino
- krea
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
글 보관함
반응형