Jump to content

Ocean Shorewave


uferi

Recommended Posts

Hi Everyone!

Decided to start a new topic (sorry about that) that is connecting to my previous one, but I coludn't modify or delete that.

Now I have the permission to share the details about the shader and the exact problem a have.

I'm just building a shader that displacing shore waves to a simple grid. Driven by a point cloud sequence, where every point representing a hole wave, containing all the attributes that need to specify the shape, phase,direction,rnd etc. The displacement part is mostly done, but with the surface is that I stucked with. I'm at that phase I can get that part of the micropolys that have foam on them, so I can that put onto. But my problem is that how can I accumulate those positions that once had foam on them, and when, so I could fade out the foam slowly, and a wave could make a foamtrail like something. I must collect those info in the shader at render time, because the waves are not existing in the scene (at geo level) but are building up during the displacement phase.

So that's the reason I tried to scatter points onto the sea plane and tried to write back the special data into that point cloud to use it in the surface shader later time as the anim advances. -- still with no success :(

Is it possible at all to update(modify) data(attribute value) in a point cloud that is allready on disk (without making new one - of course)?

Or any idea to handle it in an other way, or just keep on trying to solve the pcexport issue?

If any of you could wire a vopvex with working pcexport in it would be my champion! :)

thx.

Feri

shorewave_foam_test_a.MOV

Edited by uferi
Link to comment
Share on other sites

Hi Everyone!

Have been proven again, sidefx has one of the best (if not the best) support all over. I've got the answer, but with not the easiest solution:

"This will not be possible with pcexport(), since the pcexport() operation only saves data for use within the same render - it does not write data back to the point cloud file. Also, to use pcexport(), it is necessary to use pcunshaded() and not pciterate() - since pcunshaded will ensure that each point is only looped over once."

"...You'll probably need to write your own VEX SOP ..." :(

Anyway... an ida came up: I've been reading community forums a lot to find solutions for any of my problems, but rarely helped out others ('couse of many sily excuses like - ...no time for this... - and etc.) sorry about that. But if I'm trying to retrace, I found that there is quite few material accessible around to deepen our knowledge in houdini (inspite of the endless possibilities of the software - or just because of this). So I can offer you - if you interested in, and you find it valuable enough - some tutorial-like stuff. Some kind of houdini way of thinking, aproaching problems and trying to tacke obstacles. I'm not the most experienced or as experienced as others, but I know that I missed when I switched to houdini. Of course I cannot tell you the most sophisticated ideas, but working examples.(maybe) :)

I would start with making a deformer that can be usefull for deforming a grid into an approaching shorewave.

So let me know if any of you interested in, and the hole of this not will become a shouting into vacuum.

Feri

post-3039-125957136581_thumb.jpg

Link to comment
Share on other sites

So let's get started

01 - Basic Concept

I think always a neccesery step before you start to implement a new tool, to look around what have been already done on the subject to try to prevent to reinventing the weel. After reading several siggraph papers(ex. Tessendofr, Surf's up) ,surfing on the web and some experiment (based on them) I found that the phisical correct calculation to make an 'intelligent' profile to use for copy-stamping and lofting the surface is too time consuming. To populate a coast with many waves easily, cried for quite fast math that can be done in a single vopsop that can work multithreaded, too to gain more speed.

Finally I found Psyop's xsi plugin: Making of 'Milk' - Rigging the Waves

To be honest some intuition was needed here. There came up an idea of a 'transform field' that can deal with the main part of the deformation. The hip bellow shows the process, how can you define a custom shape of a wave profile. (We will use only one profile for the hole wave so custom meens that you can define your own, but not a bunch of changing profiles.)

The hip can be seperated into three parts. Setting the field - visualising it ( not neccesery but can help) - and checking it on a curve how it works.

The main input of the deformation is the center of the transformation. Everything depends on the distance of the actual point to that center.Based on the distance a value must be defined that can drive the amount of the transform. I haven't got any idea of those values, so built up an interactive system. On the SET_FIELD null you can set those values with an animation curve between 0-10. With storing those values on a curve ($FIELDVALUE) we can easily plug it into a vopsop's second input and can access of the data in the vop network when we need.

This process is nothing special but at the end we'll have got a line with certain values on it that we can use for building-transforming the wave as we need. Later we can lock the curve into the asset if we don't want to modify any further and keep it as small as it could be. But maybe you can leave it as it is, because when we'll make the braking part of the wave there could be usefull to alter the shape a bit.

ps.: I don't know how deep I should go into the details of the vopsop nodes and calculations, but I don't want you to get bored. Although if there is any question don't hesitate! Ask it!

(btw. sorry for my bad english, and I hope you will be satisfied with this hole thing - also comment if don't) :)

thanks,

Feri

01_basic_concept.hip

Edited by uferi
Link to comment
Share on other sites

  • 1 year later...

Hi Everyone!

First of all I am sorry about my irresponsible statements. I regret to say, I didn't have enough time to make the planned series. The future seems to be the same so I share a not so confusing solution that anyone can use to learn from it.(It was even hard to find this file, because it was already in acrhives - what a shame - sorry again)

ocean_shorewave.hip

An asset that behaves like a deformer would be more elegant, but you surely can modify this hip to fit your purposes.

Feri

Link to comment
Share on other sites

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...