Jump to content

[SOLVED]Mantra Bad Viewport Good?


Atom

Recommended Posts

Hi All,

 

I occasionally run into this where the results that Mantra generates is inferior to the viewport.

 

What is the solution for this?

 

In this image I have a FBX character that I have imported into the scene. The render with the material looks fine at the FBX level. So I bake the agent and create the crowd sim. Somwhere in the crowd sim the agent matierals get lost and some kind of funk normals are applied.

 

I have tried applying a Facet after DOP import but that does not fix it. I also have a Facet with post compute normals turned on at the end of the FBX SOP chain. This way when I agent bake I know the normals are correct, and they look correct in the viewport and a test render.

 

The problem is just with the final material step of a crowd simulation. The materials are just boinked. It looks like there is some kind of reflection turned on and it is reflecting a black sky. But I have everything turned off in the Mantra Surface except diffuse map. It should essentially render just like a basic matte shader.

 

Has anyone else experienced a similar problem?

How do I fix the system so Mantra is at least as good as the viewport?

 

Viewport Render:

post-12295-0-88043700-1442452712_thumb.j

 

Mantra with default Skylight:

post-12295-0-59338300-1442452720_thumb.j

Edited by Atom
Link to comment
Share on other sites

Ok,

 

I think I have this as compact as I can get it a 5.49Mb. This is the scene, the baked clips, the original FBX and the Texture you see in the viewport. Let me know if I have left anything out. I set the diffuse texture to relative via the $HIP variable so it should load up automatically.

crowd_boy_mantra_issue.zip

Link to comment
Share on other sites

Edit: it looks like it works if you write out a .bgeo in '/obj/boy_with_backpack_walk_33_fbx/Character_1' and use that for when you agent_bake.

 

I'm wondering if there may be a bug - if you unpack the '/obj/boy_Agents' then use a NormalSOP then the render is fine.

post-8321-0-85058000-1442459854_thumb.pn

Edited by tar
Link to comment
Share on other sites

Thanks for taking a look at the scene I'll play around with those suggestions.

 

The model was created in Blender, but as I mentioned it renders fine as a FBX import. It is only when it goes through Houdini's crowd system that the ugliness appears.

post-12295-0-87735900-1442497840_thumb.j

 

 

I did place a Facet at the end of the FBX SOP chain and post computed the normals but I think that only affected the points. So you are saying there are primitive normals as well? How many normal types does Houdini support?

.

.

.

I am begining to wonder if Houdini is rendering two copies of each agent on top of one another. And the ugliness is what I call z-fighting. Two exact faces trying to occupy the same exact space. Also why is Mantra rendering the AXIS icon?

post-12295-0-95508000-1442498055_thumb.j

Edited by Atom
Link to comment
Share on other sites

Just wondered about the prim normals as we often have issues, especially if we get models from 3dsmax users, but if it renders fine on its own then they should be good.
Looking at the pic above, is almost seems there is double geo being rendered? I'm guessing thats why the axis is rendering to, maybe its a bug like Marty suggests..

Link to comment
Share on other sites

I tried Marty's suggestion of unpacking the geometry and adding normals and that does work. It drops the FPS to the floor, however. So only turn on those nodes after your simulations is complete.

 

I am still seeing Mantra rendering a locator axis for my agents. Does anyone know how to turn that off?

post-12295-0-04097800-1442500405_thumb.j

Link to comment
Share on other sites

The axis is /obj/boy_with_backpack_walk_33_fbx/Armature_1

 

Note that Unpacking and rebuilding normals is a temp workaround. 

 

EDIT: In trying to debug this, noticing that the the agentSOP has warped the Normals. (see attached)

*Note again that if you write out .bgeo after the deformSOp, then there is no problem.

 

EDIT2: Very cool! Looks to be fixed today in Houdini 14.0.459

https://www.sidefx.com/index.php?option=com_journal&Itemid=213&page=index&journal=default

post-8321-0-72097800-1442524081_thumb.pn

Edited by tar
Link to comment
Share on other sites

Thanks for looking into this. I did report it and it was fixed in one day as of 14.0.459. But your work around did work as well.

Now I have to download the new version and give it a try.

Edited by Atom
Link to comment
Share on other sites

You don't need a new build if you just promote your normals from vertex to point prior to the Deform SOP, and then bake. Or if you don't care about preserving the old ones, just insert a Normal SOP (set to create point normals) right before the Deform SOP.

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