Baking with simple baker and Cage object - please help.

   6820   14   2
User Avatar
Member
12 posts
Joined: July 2014
Offline
Hello,
I am trying to use Simple baker for one project - preparing a lot of parts for realtime - and all is fine and well up to a point where I want/need to use Cage to get rid of some artifacts (and hopefully also controll distance for baking locally - cage is usually used for this too).
But when I do input a cage all I get is a blank render, and nothing at all that I tried seems to change it … Could someone please help me to get a working bake with cage?
(My approach was to tune it all how I need without using cage … then I just peak my lowpoly after smoothing its normal and feed the peak node into cage field… I also tried saving it to disk .. puting it into a different OBJ … changing parameters that might affect it … but really all I get is nothing when I plug in a cage … up to that point all works well and bakes well)
Thank you
User Avatar
Member
12 posts
Joined: July 2014
Offline
Please if anybody knows how to make it work, I am really stuck without a clue now, but I need it working really fast for the final quality bakes.
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Hi,

> But when I do input a cage all I get is a blank render,

… without having even the faintest idea of what you are doing, this *sounds* as if the “bake” (render) is looking in the wrong direction. If your cage is larger than the geometry you want to capture, the virtual camera placed on every cage-polygon (“face”) needs to point towards the high-resolution mesh, if the cage is smaller, the camera needs to point outwards.

But if what you say is true - that you tried *everything* - then this cannot be the problem, obviously. If you really tried *everything*, I am lost and apologize.


Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
12 posts
Joined: July 2014
Offline
malbrecht
But if what you say is true - that you tried *everything* - then this cannot be the problem, obviously. If you really tried *everything*, I am lost and apologize.

Ok .. well … I have just been really frustrated and my everything ment fiddling with exposed parameters of simple baker and also diving into the asset and trying to find some solution there, and also saving the cage and highres mesh to disk and loading from there. Also I did try to use just some testmesh (pighead) and - I did bake something (as oposed to nothing) using that but with lots of baking errors that should not be there. so .. not EVERYTHING … more like everything I was able to think about and try, right?

I understand what you mean - but I just used peak on the lowpoly mesh to make cage .. all the normals of the polys are facing the same way as the were on lowpoly. I may try reversing them (which I did not do yet) though it sounds weird - the cage should (from description in docs) be used to make a new direction to be used for projection instead of regular normal … and that new direction is made from coresponding points on cage and lowpoly … and those should be moved outwards (from docs description).

Also … because with the pighead it kinda worked … without reverting … I guess I should not be the case. Kinda worked but never really worked .. always had defects and errors in the render that were not present in bake without a cage.



The documentation does not say too much about it … and (probably because I am very new to houdini) I feel like its ment to be really easy to use yet it never works for me so I think I just dont understand some part correctly and use it in a wrong way.
User Avatar
Member
12 posts
Joined: July 2014
Offline
I can not share the hip - as I am under NDA. If I am too hopeless I will try to make some sample that does not show anything important and post it, but simply put I have higpoly and lowpoly … use simple baker … lowpoly had UVs made … and softened normals with the tool from gamedev toolset. I tune all I need this way and baking works well .. with some issues that I want to solve by cage. So - I peak outwards the lowpoly with fully softened normals to make a cage .. and “throw” the peak node into cage field of simple baker. Then it breaks
User Avatar
Member
12 posts
Joined: July 2014
Offline
So I just thought - as baking is this regular part of game asset creation - that someone with more experience with using houdini game baking tools will be able to point me in the right direction. I really know very little about Mantra and rendering pipeline in Houdini … I am used to do so in different packages so I have lots of experience there but Houdini is so much different that cant analyze using some deeper knowledge there.
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Hi, Pavel,

I am quite sure that a test scene would be helpful. If you can reproduce the problem with some random geometry, it should be easy enough to spot what is going wrong.

Unfortunately, I do not use Houdini often enough to just say “click there and all is well” - I merely believe to have a basic understanding of how baking is supposed to work

Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
240 posts
Joined: Nov. 2012
Offline
Hey Pavel,

Something to play with before resulting to the cage is the Ray Bias setting. Usually that helps with the projections.
Luiz Kruel
Senior Technical Artist
SideFX
User Avatar
Member
240 posts
Joined: Nov. 2012
Offline
Fixed a bug on the games baker and simple baker, they weren't respecting the cage properly. If you get tomorrow's daily game development toolset (should be 1.36) it will have the fix for you.

Thanks for bringing this to our attention
Luiz Kruel
Senior Technical Artist
SideFX
User Avatar
Member
12 posts
Joined: July 2014
Offline
Hello Luiz,
great - thank you very much, it will help me a lot if I could use cage to correct the baking errors.
May I ask few questions so that I know I understand it all well? (Ray bias I did use but I have so much variation in the highpoly that I would need to have it defined per point in attribute, which I tried but was not able to make it work)

The cage should change the direction from the lowpoly mesh normal … so I can do a full smooth and offset to make a cage and get rid of discontinuity problems - right? That is a description in docs …

Does the cage also work to change the distance (Ray Bias ? ) according to how much I offset the points? That how a cage was used in other SW for baking so I hope I can use it too to correct some problematic areas that need high/low bias …

What is a correct way to get better quality AO? For now what I do is I unlock the asset foch editing, dive like three levels deep and change sampling from 2 2 to like 8 8 and get much smoother ao with way less noise. But I still think I am not seeing the propper way to do it that would not need edits inside the HDA and would use parameters exposed? I tried but did not get anything less noisy …

Thank you
Pavel
User Avatar
Member
12 posts
Joined: July 2014
Offline
Oh … and two more questions

Should I be able to get groups, parts, selection sets when importing fbx? So far I am able to get in only materials, but not other attributes (though they are exported and when I check the file they are there - exporting to fbx from Modo) ..

And - cage and Ray Bias … how the Ray Bias works when cage is used? Does it multiply the cage offset or overwrite it?

Thank you once again
Pavel
User Avatar
Staff
444 posts
Joined: Sept. 2016
Offline
Cage mesh is primarily used to avoid discontinuities in the baked texture when using vertex normals. Please see http://wiki.polycount.com/wiki/Texture_Baking#Cages [wiki.polycount.com] for a nice illustrative description of the problem.
In mantra, cage mesh only manipulates the ray direction, not the starting point, so it doesn't change the way ray bias works.
User Avatar
Member
12 posts
Joined: July 2014
Offline
Thank you for clarification. I understand that part and its just half of the baking artifacts I am trying to get rid of, the other half is connected with variable Ray Bias needs of the mesh - could you please point me to a way how do you manipulate the ray bias per point please? I tried to create an attribute, but totally failed trying to feed it into Ray Bias field.
User Avatar
Staff
444 posts
Joined: Sept. 2016
Offline
You might be able to switch to “Trace Closest Surface” Unwrap Method (in the Bake Texture ROP) and get better results, provided there aren't any overhanging details in the high-res object, otherwise you'll have to manipulate the points on the low-res object temporarily for the purpose of baking (although it will make the resulting displacement texture unusable, and may cause some distortions in the tangent normal maps).

If you're comfortable with vex scripts, changing the ray origin according to cage mesh is certainly possible (by editing/overriding the UV Lens shader. You can create one in shop network and look at its code under type properties).
Edited by dlee - Aug. 20, 2018 11:40:56
User Avatar
Member
12 posts
Joined: July 2014
Offline
Thank you - I guess this is way past my current abilities, but I will try to dive into it and understand what you wrote here.

To Luiz Kruel - something went a lot wrong after I installed the latest version. Not too sure about what it is, but I have now two simple bakers, one is Gamedev toolkit and one in digital assets … and the one in gamedev toolkit does not bake correctly now (working on other project that does not use cages today and yesterday.. so not sure yet how about cage use) .. the one in digital assets works as it used to do.

I guess it should work as it used to do without a cage, with fixed behavior when cage is used … so not really sure whats happening with it now.
  • Quick Links