Jump to content

Weather System Digital Asset, Otl


vrljc

Recommended Posts

Hi All-

Tinkering around with my first digital assest which is basically a basic weather system which can creat rain, snow, or hail. You can choose your emitter and collision object. (might have to add the option to choose multiple collision objects).

Overall, it still needs some more work done, but what options would you like to see in this weather system to make it better?

Weather OTL Zip

Jon

P.S. Lemme know if it doesnt work. :blink:

Link to comment
Share on other sites

very cool...well done

this will make a great basis for a tool that can grow and grow...very usefull

!

Hi All-

Tinkering around with my first digital assest which is basically a basic weather system which can creat rain, snow, or hail. You can choose your emitter and collision object. (might have to add the option to choose multiple collision objects).

Overall, it still needs some more work done, but what options would you like to see in this weather system to make it better?

Weather OTL Zip

Jon

P.S. Lemme know if it doesnt work.  :blink:

21801[/snapback]

Link to comment
Share on other sites

couple thoughts/issues:

-collision and source links aren't set up right.. they just point to your grids as opposed to referencing the string in the otl.. so setting a custom source/collision can't be done as of now..

-wind direction, why not have y direction as well? maybe access to some of the noise as well..

-would be nice to use your own models for rain/snow/hail.. could be nice to have say 5 models and be able to randomize them on the particles with a seed parameter.. (probably would need inputs though)

-master position and scale is nice, but would like to have parms for pos/scale of source and collision independantly..of course, access to custom source/collision would prob just be fine.. just label the parms master to be more clear..

other than that, i can't think of much else.. nice work for a first otl..

Link to comment
Share on other sites

Thanx guys for the input. As for the collision and emitter objects, I want the user to be able to select their own particle emitter and collision objects so that they wont be using the simple grids (just a default). So I guess I will need to add the option to add in multiple collision objects.

arctor- I will add in the option to decide if you want to use either geometry or sprites. Good idea. This will work perfectly for the snow actually. Use a basic flat box with an image texture with an alpha, right? Then use maybe 3 or 4 different snow image textures to randomize?

deecue- good ideas! I will go nuts with adding in more controls.

-jon

Link to comment
Share on other sites

I have a question about embedding image files into either a .hip or .otl file. Because I am adding in a sprite option for the snowflakes, I have five different snowflake images that will be used for the sprites. Is there any way that I can embed the image files into the .otl? Similar to how you can embed an outside geometry file into a .hip file?

-jon

Link to comment
Share on other sites

yes you can..

pop open the operator type manager and hunt down your otl.. right click on it and hit edit contents.. you should see an add file button which allows you to embed anything you want really.. images, scripts, etc..

to reference the embeded file, you will use the opdef command (opdef:/table/operator?section) anywhere a file string is applicable..a search in the help and on the forums should have more info as well..

Link to comment
Share on other sites

yes you can..

pop open the operator type manager and hunt down your otl.. right click on it and hit edit contents.. you should see an add file button which allows you to embed anything you want really.. images, scripts, etc..

to reference the embeded file, you will use the opdef command (opdef:/table/operator?section) anywhere a file string is applicable..a search in the help and on the forums should have more info as well..

21841[/snapback]

Now thats just too cool! Houdini ceases to amaze me. Thanx for showing me that.

-jon

Link to comment
Share on other sites

Here is the Weather SOP v2. I added in more controls and cleaned them up a bit. Among the new controls, especially for the snow, you can choose to have either polygon snowflakes or sprites.

The sprites option is not totally hooked up right now as I am having some problems. With deecue's help, I was able to embed the sprite's textures into the .otl, but the sprite's are not rendering correctly.

I am really baffled as to what is happening. At first I was selecting a snowflake texture off of my harddrive and the sprites rendered fine, showing up in the alpha. Then when I embeded the textures into the otl, the textures were still showing up in the snowflake VOP and SHOP, just as they did when referened off of the harddrive. But then when I rendered them they suddenly disappeared not showing up in the alpha, even though they are showing up perfectly fine in the shader.

Anybody have some light they can shed on this? Also, lemme know if anything else should be added to this digital asset.

-jon

Link to comment
Share on other sites

Here is the Weather SOP v3.

I fixed the previous sprite issue. Apparently with an otl that contains textures, you have to install the .otl somewhere on a local drive, and not just in the .hip file itself. It has to do with how mantra accesses the otl, because it is a seperate program from Houdini. But that issue is fixed.

I cleaned up the controls a bit and also added in a Bake feature. You can now bake out your particles , all within the this one single SOP. All you have to do is toggle the Bake Particles button, specify where you want to save your .bgeo seq, then hit bake. Pretty easy.

I am about to call this digital asset done. Is there anything anybody can see that should be changed before I upload it to the Exchange?

-jon

Link to comment
Share on other sites

Very cool idea for an asset! I'm having one problem though. I'm not getting the snow sprites showing up, either in the viewport or in a mantra render (I just got white squares). It took a lot of fiddling to get it mostly working. I had to assign UVs to the snowflake geometry, Set the OpenGL layer 1 texture map for all the snow_sprite SHOPs, And modify the snow_sprite VOP Network to feed the output of the texture map into the diff input of the lighting model, and connect the texture map output to the Af input of the Output VOP. I'm not sure if all those changes were really necessary, but that's everything I did and now it looks right in mantra, but in the viewport I'm still not seeing any transparency (though that may be a Houdini issue or a video card issue). Am I mising something? should the sprites work out of the box? This is all with the V3 asset posted above, by the way.

Thanks,

Mark

Link to comment
Share on other sites

Very cool idea for an asset! I'm having one problem though. I'm not getting the snow sprites showing up, either in the viewport or in a mantra render (I just got white squares). It took a lot of fiddling to get it mostly working. I had to assign UVs to the snowflake geometry, Set the OpenGL layer 1 texture map for all the snow_sprite SHOPs, And modify the snow_sprite VOP Network to feed the output of the texture map into the diff input of the lighting model, and connect the texture map output to the Af input of the Output VOP. I'm not sure if all those changes were really necessary, but that's everything I did and now it looks right in mantra, but in the viewport I'm still not seeing any transparency (though that may be a Houdini issue or a video card issue). Am I mising something? should the sprites work out of the box? This is all with the V3 asset posted above, by the way.

Thanks,

Mark

21861[/snapback]

Interesting. Perhaps this is what is happening. Play out the sim for about 50 frames, then zoom in on a few flakes, render, and look @ your alpha channel in mantra. It should show up there. Also, under the snow shading tab, did you select he sprite option under the menu?

Lemme know what happens.

-jon

Link to comment
Share on other sites

Here is Weather SOP v4.

I added in the life expectency and life variance attributes. Added in a meta option for the rain so you can have either metaball or primitive sphere rain droplets.

I also worked on the Bake feature, but I am still having issues with this though. Here is what is happening:

After I set the location of the baked out particles, I hit the bake button and nothing happens. To get the bake button to work, I have to enter inside the Weather Sop, and click on the geometry ROP to select it. Then I hit the bake button and it will work. Does anyone know why I have to enter inside the SOP and click on the ROP node every time?

Other than that one issue, I am calling it done. Unless someone wants to see some other features.

-jon

Link to comment
Share on other sites

Here is Weather SOP v4.

I added in the life expectency and life variance attributes. Added in a meta option for the rain so you can have either metaball or primitive sphere rain droplets.

I also worked on the Bake feature, but I am still having issues with this though. Here is what is happening:

After I set the location of the baked out particles, I hit the bake button and nothing happens. To get the bake button to work, I have to enter inside the Weather Sop, and click on the geometry ROP to select it. Then I hit the bake button and it will work. Does anyone know why I have to enter inside the SOP and click on the ROP node every time?

Other than that one issue, I am calling it done. Unless someone wants to see some other features.

-jon

21887[/snapback]

I don't know what the proper solution to this problem but I had the same thing happen to me with I made a rendertools otl. To get around this all I did was make a button in my otl that wasn't linked to anything, all it did was call a hscript "opparm -c /mantra1/execute" or something like that. When I get back to work on monday I can post the proper code if you like.

If I were to link my button to the mantra1 ROP's execute parameter (instead of calling opparm), I would experience exactly what you have, where you have to dive into the network and select the ROP.

Link to comment
Share on other sites

I don't know what the proper solution to this problem but I had the same thing happen to me with I made a rendertools otl. To get around this all I did was make a button in my otl that wasn't linked to anything, all it did was call a hscript "opparm -c /mantra1/execute" or something like that. When I get back to work on monday I can post the proper code if you like.

If I were to link my button to the mantra1 ROP's execute parameter (instead of calling opparm), I would experience exactly what you have, where you have to dive into the network and select the ROP.

21888[/snapback]

That was exactly the problem. I used a relative path opparm script just as you had mentioned and problem solved. Thank you!

So here is the Final Weather SOP. It will also be available on the codex here on odforce, and on SideFX's exchange. Enjoy!

-jon

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...