Polyextrude creating problems with the Asset

   4922   6   0
User Avatar
Member
4 posts
Joined: May 2017
Offline
Hello,
i've already searched in the forum, looked several tutorials but still i can't find an answer, so i've decided to open a topic in here.

As you can see from the attached pictures, the two objects are correctly showed in Houdini, but as soon as i create an asset with them, and i export this into UE4, the box is fine but the tower has some kind of a “reversed” view.
Also, this is altering the collision as well, because the character gets stuck inside.

(I'm facing the same problem even with a simple .fbx format.)
I think that the Polyextrude node is creating some trouble here, since the tower is all made out with it and the box is not.
Is there any workaround for this issue? Are you already aware of this problem?

I'm using Houdini 16.0.621 & UE4.16.1 (with the Houdini Engine correctly installed)

Thanks

Attachments:
TowerUE4.JPG (18.9 KB)
Tower.JPG (47.6 KB)

User Avatar
Member
4 posts
Joined: May 2017
Offline
I've discovered that this “wrong view” showed up only when the “distance” parameter of the poly extrude is negative. But, why i don't have the same result in Houdini?
User Avatar
Member
67 posts
Joined: May 2016
Offline
Have you checked your normals? In the Houdini viewport turn on “Show Primitive Normals” and ensure they are pointing “out”. You can also use the viewport display option (press ‘D’ in the viewport) Optmize > Remove Backfaces. That will let you see the geo the same way a game engine will see it.
User Avatar
Member
4 posts
Joined: May 2017
Offline
Thanks trojanfoe, with that option on i can now see in the same way UE4 sees it. I see here that the problem is with the “Back-face culling”, am i right?

Is this Culling defined by the Primitive's normals?

Now, even if i use a simple Wrangle that says: “@N *= -1;” (running over the primitives) i still see the lines going in the previous direction, but their values inside the spreadsheet is now reversed, how can it be? D:
User Avatar
Member
67 posts
Joined: May 2016
Offline
OK, first off I'm no expert but from my experience the front face is defined from the winding-order of the vertices. They need to be anti-clockwise (or maybe that's “counter-clockwise” where you live). I know this for sure as I recently created a “profile” to Sweep along a curve in order to make a wall. This is the code that works within a Detail-level Attribute Wrangler:

float height = ch("../height");
float top_width = ch("../top_width");
float bottom_width = ch("../bottom_width");

int pt0 = addpoint(0, set(bottom_width * -0.5,  0.0,    0.0));
int pt1 = addpoint(0, set(top_width * -0.5,     height, 0.0));
int pt2 = addpoint(0, set(top_width * 0.5,      height, 0.0));
int pt3 = addpoint(0, set(bottom_width * 0.5,   0.0,    0.0));

int prim = addprim(0, "poly");

addvertex(0, prim, pt0);
addvertex(0, prim, pt3);
addvertex(0, prim, pt2);
addvertex(0, prim, pt1);
addvertex(0, prim, pt0);

If I add the vertices as 0-1-2-3-0 then the normals are inverted and I needed to use a Reverse SOP to correct them (the usual way of fixing flipped normals).
Edited by trojanfoe - June 25, 2017 08:12:14
User Avatar
Member
4 posts
Joined: May 2017
Offline
Thanks again! Now it is very clear
User Avatar
Staff
550 posts
Joined: Sept. 2016
Offline
Hi,

Yes, this issue is due to inverted normals, and if you don't want double sided geometry, flipping them is the way to go!
The easiest way to invert them in houdini is by using the reverse SOP.
  • Quick Links