Vector displacement from arbitrary geometry : Houdini to Terragen

Started by paq, December 21, 2017, 02:55:09 PM

Previous topic - Next topic

Artice-3d

Dune mudbox is good, but for really good result this technique is much better.. When i'll finish, i'll show you what we can do with this !!!   8) :o ;D ;)

Artice-3d

Paq thanks for your answer, but...  ;D :o one more question -  When a pelted object i transfered it's uvs to mesh points by point node, but it's doesn't match with original object's position and orientation why?!!  Thanks you help me a lot!! At your image with dinosaur original object position and orientation look absolutely exactly as pelted!!

paq

Hi Artice-3d,

Here's my way to align the 2 geometries (attach .hip) :

- In a vop, I compute the angle between point 0 of mesh A and mesh B using the Align operator. I receive a transformation matrix that I can use to orient Mesh A (P * Matrix)
- For the size I use the matchsize sop.

(blendshapes_TEST_RESULT can be used to check if the transformation is right).

I still such a noob in Houdini, let me know if you find a easiest way  ;)
Gameloft

Artice-3d

Thanks Paq i'm very appreciate!!! I'm a square noob in houdini, if it's help to you  ;D ;D Your solution is too complicated for me  :o ;D  I did it different (use simple orientation option in UVpelt), but don't know if it will work at all.. Need an export to see...  So thanks for all your help - next question how to project colors from original mesh to uvpelted (mine all blue).. Tell me please that it's not as difficult as with orientation !!!  ;D ;D :o

paq

Hi Artice,

(1) (2) (3) (4)
Attribute wrangle

v@vdisp=point(1,"P",@ptnum)-@P;


In the input (1) : pelted (flatten) meshed
In the input (2) : original mesh point position (not flatten)


This way you will store an attribute called @vdisp, storing the vector displacement.

If you want to test the displace :

On the pelted mesh :

Point wrangler
@P+=v@vdisp;

About the pelt rotation,
Maybe a solution is to use the frame input (second input of the pelt operator), but I don't get yet how to use it to have a consistency in the pelt orientation.

//

Hopefully I'm on holiday next week, I will get some time to continue this vdisplace project  ;)


Gameloft

Artice-3d

Hello Paq, mine still blue !!  Something went wrong   :-\

paq

Gameloft

Artice-3d

Yep!!  ;)  Correct it please and send me back final version, i won't wanna bother you anymore ;D ;)  You help me a lot already!!!  ::) ;D  Thanks for that you're a man!!

paq

Ok, at that point you have to use @Cd=v@vdisp; to display the vector displacement, sorry for the confusion.
Gameloft

Artice-3d

Oh god thanks !!! And now you're just render it in .exr file and that's it ?!!!

paq

Yup.

But you need to avoid negative value (I can't manage to write signed .exr with Houdini).
So the model need to be moved (normalized) in 3d space between 0-1 ... and that's a bit annoying because if you need to push point below the level0, you need to refit the vector inside Terragen
https://www.planetside.co.uk/forums/index.php/topic,23958.0.html

I also did a bit of upscaling after this first pass,  using the divide operator, and the ray operator to re-project the fine detail.

Gameloft

Artice-3d

Paq 0-1 on x-z or y too?!!!  And thank you very much for all.. I'm happy with results... THANK YOU SO MUCH ONE MORE TIME  ;D 8) :o ;) ;) ;) ;)

paq

(you're welcome)

Now that's intriguing, because I had lot's of trouble exporting my .exr image.

How did you setup your render ? (it's my turn to learn something :) )
I have never touched Mantra, so I'm using one of those game baking tool, and maybe lot's of my problems are coming from that  :'(

Gameloft

Artice-3d

I used camera positioned vertically  90 degree than used mantra output to .exr file and rendered it to 3000*3000 px than import in terragen and make it beautiful!!!!
images for understanding below!!!


And one more - i used glow shader to luminance displacement !!!

paq

Ho nice, so simple ... and, as far as I can see, signed .exr is working, there is no need to refit the data.
Thanks a lot !

(Strata pig is cool  8) )

//edit

glow shader to luminance displacement  ?¿ ( I'm nowhere when it comes to render in Houdini)
Gameloft