Surface Baking
14592 14 3- protean
- Member
- 72 posts
- Joined: 7月 2006
- Offline
Hello again.
I've looked at the Shader Unwrap stuff on the odwiki and some posts here but I'm not able to get a proper bake of a surface. It seems the baked render depends on the camera position or something.
Perhaps I'm taking a too simplisitic overview of the process but I would have thought the camera would have nothing to do with texture baking.
Anyway, attached is a file that should illustrate my problem.
Cheers
John
I've looked at the Shader Unwrap stuff on the odwiki and some posts here but I'm not able to get a proper bake of a surface. It seems the baked render depends on the camera position or something.
Perhaps I'm taking a too simplisitic overview of the process but I would have thought the camera would have nothing to do with texture baking.
Anyway, attached is a file that should illustrate my problem.
Cheers
John
john @ hydrastudios
- gyepes
- Member
- 28 posts
- Joined: 7月 2005
- Offline
Hey John,
I used this technique a few years back and it worked awesome for baking out some GI passes, but I tried it again and ran into the same issues you're having…
Turns out the problem is caused by the surface shader which at some point runs a call to frontface(), which is not desirable for a UV render. Simple solution is just to use a material from the Material Palette, like Plastic or Basic Surface and assign that to your object. Then dive into the vopnet of that material (then shader) and find the Lambert VOP, you'll see an option called “ensure faces point forward”, uncheck that. Then you're set!
It sounds like a bit of a hack, but once you know the issue it shouldn't be much of a pain… I've modified your .hip file to work and I'm attaching a sample render.
hope this helps!
I used this technique a few years back and it worked awesome for baking out some GI passes, but I tried it again and ran into the same issues you're having…
Turns out the problem is caused by the surface shader which at some point runs a call to frontface(), which is not desirable for a UV render. Simple solution is just to use a material from the Material Palette, like Plastic or Basic Surface and assign that to your object. Then dive into the vopnet of that material (then shader) and find the Lambert VOP, you'll see an option called “ensure faces point forward”, uncheck that. Then you're set!
It sounds like a bit of a hack, but once you know the issue it shouldn't be much of a pain… I've modified your .hip file to work and I'm attaching a sample render.
hope this helps!
gregory yepes | http://www.GregoryYepes.com [www.gregoryyepes.com]
- jason_iversen
- Member
- 12649 posts
- Joined: 7月 2005
- Offline
This should be logged as a BUG, as I believe the baking process would override such functions as frontface() with bake-friendly versions on the fly.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
- Serg
- Member
- 511 posts
- Joined:
- Offline
Another anoyance is baking shaders with displacement… it does a really weird inflated effect (like a peak Sop), rather than displace in the view direction.
So to bake stuff you need to turn Off “True Displacements”, which often defeats the purpose of baking in the first place (shadows and occlusion).
S
So to bake stuff you need to turn Off “True Displacements”, which often defeats the purpose of baking in the first place (shadows and occlusion).
S
- Allegro
- Member
- 696 posts
- Joined: 3月 2006
- Offline
- houdiniuser42
- Member
- 42 posts
- Joined: 11月 2006
- Offline
- gyepes
- Member
- 28 posts
- Joined: 7月 2005
- Offline
Just to get you going it seems that checking the “backface removal” toggle on your object node appears to work:
sphere_object1/Render/Geometry/Backface Removal
I'm not convinced it should be necessary to do this, so I'd like to keep looking into this…
sphere_object1/Render/Geometry/Backface Removal
I'm not convinced it should be necessary to do this, so I'd like to keep looking into this…
gregory yepes | http://www.GregoryYepes.com [www.gregoryyepes.com]
- Allegro
- Member
- 696 posts
- Joined: 3月 2006
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: 8月 2006
- Offline
- houdiniuser42
- Member
- 42 posts
- Joined: 11月 2006
- Offline
thanks everybody! appreciate it.
FYI, i wasn't using the “mantra -u” explicit setup, but the “other one” mentioned off the odforce wiki post [odforce.net] about adding the extra params to mantra. same method, just a different way of getting there.
FYI, i wasn't using the “mantra -u” explicit setup, but the “other one” mentioned off the odforce wiki post [odforce.net] about adding the extra params to mantra. same method, just a different way of getting there.
- Allegro
- Member
- 696 posts
- Joined: 3月 2006
- Offline
- houdiniuser42
- Member
- 42 posts
- Joined: 11月 2006
- Offline
Allegroi was going to reply that they are the same, at least visually, but when i went to run a binary comparison i noticed the files had a 90 byte size difference.
I didn't know about that method…
Is there a difference between the results?
what's the preferred method for comparing 2 images to see if they are identical? even if the file sizes are slightly different?
other than that, with the “edit param interface” method one gets to tell it what uv attribute to use. does the “mantra -u” method have such a feature?
- probbins
- Member
- 1145 posts
- Joined: 7月 2005
- Offline
In the mplay window load the two images and then turn on the comparison tool “Diff”. If you don't see that toolbar go to the Profiles and make sure the Diff is Open rather than Hidden.
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
“everything is coincident”
“Love; the state of suspended anticipation.”
- jlautret
- Member
- 34 posts
- Joined: 6月 2008
- Offline
hi,
I'm wondering how I can bake a texture projected from a camera.
I read on odwiki something about VEX, but since I totally suck at shader writing it's more than a pain…
I'm looking fro a simple similar operation as “load texture map as projection” in Maya's hypershade if you will
for now I'm projecting using a uvTexture SOP but I want to bake the texture following the Polar UVs from the UVproject SOP.
Anyone has an idea??!
thank you!!!
I'm wondering how I can bake a texture projected from a camera.
I read on odwiki something about VEX, but since I totally suck at shader writing it's more than a pain…
I'm looking fro a simple similar operation as “load texture map as projection” in Maya's hypershade if you will
for now I'm projecting using a uvTexture SOP but I want to bake the texture following the Polar UVs from the UVproject SOP.
Anyone has an idea??!
thank you!!!
- jlautret
- Member
- 34 posts
- Joined: 6月 2008
- Offline
anyone?!
maybe I didn't make myself clear…
what I read on the odwiki wasn't very explicite.
http://odforce.net/wiki/index.php/LightAndCameraProjections [odforce.net]
I don't get how I'm supposed to assign the camera I want to the texture projection.
I'm really stucked here
and I don't get why this operation which is very simple in Maya or Nuke is getting that kind of proportions in Houdini.
thank you everyone
regards
maybe I didn't make myself clear…
what I read on the odwiki wasn't very explicite.
http://odforce.net/wiki/index.php/LightAndCameraProjections [odforce.net]
I don't get how I'm supposed to assign the camera I want to the texture projection.
I'm really stucked here
and I don't get why this operation which is very simple in Maya or Nuke is getting that kind of proportions in Houdini.
thank you everyone
regards
-
- Quick Links