houdini 2 unity $F point color?

   3826   13   1
User Avatar
Member
217 posts
Joined: March 2006
Offline
Hi,
I'm new to unity but all tutorials looks so easy;o)
I hope someone can help me. Houdini and Unity the latest versions.
1) simple asset in Houdini OK
2) importing into unity OK
3) I animate some spheres to color another geo

But nothing happens. The only thing I animate a filter expression in a delete Sop ($F-1== ($PT%8))
What can I do?

Thanks for help.

Detlef
Edited by winkel - March 26, 2018 10:31:24

Attachments:
test_pipes.hda (33.9 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
There is no direct way to drive frame-based animation to an HDA via Unity, as you want. What you can do instead is to replace the $F with another parameter that you expose on the HDA. Then from UI or code you can change that parameter, recook, and the baked geo will have the updated vertex colours.

The performance-friendly way to do this is to simply have a shader that updates vertex colours based on time or some other animation-driven value. This is more on the Unity side of things than Houdini Engine. What is it that you are trying to achieve via Houdini?
User Avatar
Member
217 posts
Joined: March 2006
Offline
Hi Seelanv,
I'm working on some augmented reality things for my customers and use Houdini to import big models. I wrote some python scripts to reduce the model and need to illustrate warm and cold water with blue/red pipes with a texture that shows the flowing directions.
Because I worked with Houdini since Prisms, it's my choice of doing such things;o)
But thanks for your ideas. I will try to change the vertex colours in unity.
Have a nice day
Detlef
User Avatar
Member
217 posts
Joined: March 2006
Offline
Hi again,
can't find a solution for me, because all tutorials and examples worked with different versions
I've used the latest game tools in Houdini but can't find the shaders used in the examples… f.e. where can I put my pos file, that was made by the “vertex_animation_texture” tool?
So I have to find my own way?
Detlef
Edited by winkel - March 27, 2018 03:28:39
User Avatar
Member
217 posts
Joined: March 2006
Offline
Hi,

If anyone can help me - please!

1) getting an error:

InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at Cbuildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:202)
HoudiniAsset.build (Boolean reload_asset, Boolean unload_asset_first, Boolean serialization_recovery_only, Boolean force_reconnect, Boolean is_duplication, Boolean cook_downstream_assets, Boolean use_delay_for_progress_bar) (at Assets/Houdini/Scripts/HoudiniAsset.cs:1270)
HoudiniAssetOTL.build (Boolean reload_asset, Boolean unload_asset_first, Boolean serialization_recovery_only, Boolean force_reconnect, Boolean is_duplication, Boolean cook_downstream_assets, Boolean use_delay_for_progress_bar) (at Assets/Houdini/Scripts/HoudiniAssetOTL.cs:145)
HoudiniAsset.OnEnable () (at Assets/Houdini/Scripts/HoudiniAsset.cs:759)

2) How can I change the parameter with my script?


Detlef
Edited by winkel - March 27, 2018 07:48:19

Attachments:
houdiniUnity.jpg (69.3 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
Check out this video and tutorial for using the vertex animation texture tool in Unity: https://www.sidefx.com/tutorials/unity-shaders-for-vertex-animation-export-tools/ [www.sidefx.com]

The exported files (fbx, images) need to go into your Unity project's Assets folder.

1) The error is a bug for using the plugin in playmode which I just put in a fix for (should be available in tomorrow's build).
I recommend moving to version 2 of the plugin recently released in beta: https://www.sidefx.com/forum/topic/54483/ [www.sidefx.com]

2) If you still want to use version 1 of the plugin, take a look at HoudiniApi/Scripts/HoudiniApiAssetAccessorExample.cs to see an example of how you can manipulate parameters via script.

For version 2, I have just added an example scene and script that shows how to manipulate parameters via script. The example scene can be found in Plugins/HoudiniEngineUnity/Scenes/ParamModifierExample.unity
User Avatar
Member
217 posts
Joined: March 2006
Offline
Thanks a lot!
I've checked the video but can't find the point to place the “pos” file. It's not there.
Houdini writes the file.
Because Mantra is still rendering, I check the new version at the weekend.

have a nice day - here it is 17:37 and it's time for dinner;O)

Do you still think that this course is working with newer versions?
Link to course [www.sidefx.com]

Detlef
Edited by winkel - March 27, 2018 11:38:48
User Avatar
Member
571 posts
Joined: May 2017
Offline
That course is for the old version of the plugin.

Is the pos file being generated at all?
User Avatar
Member
217 posts
Joined: March 2006
Offline
Yes it's build by Houdini. But I can't find the “vertex_soft_body_shader” where I can insert the PositionMap.
User Avatar
Member
571 posts
Joined: May 2017
Offline
Those shaders are here: https://github.com/sideeffects/GameDevelopmentToolset/tree/Development/unity/shaders [github.com]
User Avatar
Member
217 posts
Joined: March 2006
Offline
Hi again,

sorry after installation can't find “Plugins/HoudiniEngineUnity/Scenes/ParamModifierExample.unity”
The “New Curve Asset” work fine but adding another script:

1) Assets/scripts/HoudiniApiAssetAccessorExample.cs(49,27): error CS0246: The type or namespace name `HoudiniApiAssetAccessor' could not be found. Are you missing an assembly reference?

and I always get a warning:
Assets/Plugins/HoudiniEngineUnity/Scripts/Render/HEU_MaterialFactory.cs(348,5): warning CS0618: `UnityEngine.ProceduralMaterial' is obsolete: `Built-in support for Substance Designer materials has been deprecated and will be removed in Unity 2018.1. To continue using Substance Designer materials in Unity 2018.1, you will need to install a suitable third-party external importer from the Asset Store.'

Detlef
User Avatar
Member
217 posts
Joined: March 2006
Offline
and…
importing the shader brings up:

“Shader warning in ‘vertex_fluid’: Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)”
And no field for importing my textures are there…
User Avatar
Member
571 posts
Joined: May 2017
Offline
The issues you are coming across leads me to believe that you are mixing version 1 and 2 of the plugin. I recommend you pick one and use that in your project, ideally version 2.

Assets/Plugins/HoudiniEngineUnity/Scenes/ParamModifierExample.unity only exists in version 2. Note that currently it is missing the Evergreen HDA which will be fixed in tomorrow's build.

Assets/scripts/HoudiniApiAssetAccessorExample.cs is only available in version 1, and does not work with version 2.

The warning you are getting about Substance support is harmless if you are not using Substance Designer materials. Unity is warning that support for importing Substance materials automatically is being deprecated in future versions of Unity. This will fixed be in the near future once Substance releases their own Unity plugin.

As for the last post about the shader warning, which project platform are you using in Unity? You can find this by going into to File -> Build Settings. Also, what graphics card are you using? It seems either the platform setting or your current graphics card does not support the shader. It could be as simple as changing the platform to the correct one, or changing the shader.
Edited by seelan - April 2, 2018 10:02:23
User Avatar
Member
217 posts
Joined: March 2006
Offline
Hi,
thanks a lot for your support!
I've deleted the Houdini folders as in your description. I'll do it again tomorrow;o)
My build settings are “PC, Mac, Linux standalone”
Target Platform: Windows X86 64
My graphic card is a AMD FirePro W5100… not enough?

Again thanks
Detlef
  • Quick Links