Surface Baking

   14592   14   3
User Avatar
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

Attachments:
texturebake.hip (269.8 KB)

john @ hydrastudios
User Avatar
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!

Attachments:
texturebake_680_GY.hipnc (385.8 KB)
texturebake_680_GY.jpg (8.9 KB)

gregory yepes | http://www.GregoryYepes.com [www.gregoryyepes.com]
User Avatar
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]
User Avatar
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
User Avatar
Member
696 posts
Joined: 3月 2006
Offline
Currently our baking is limited to polygons. I'll leave the bug submission for automatic overrides on mantra -u ip to you now that we have that option on the website :wink:
Stephen Tucker
VFXTD
User Avatar
Member
42 posts
Joined: 11月 2006
Offline
i'm trying to get a clean shader unwrap, but i appear to be getting artifacts too.

i've made my own VOP Vex Shop that fits N to 0..1 and pipes that into Cf.

is there a setting or something that i'm missing?

hip and my unwrapped shader texture map attached.

Attachments:
baking_05b.hipnc (196.5 KB)
baked_normal_C.jpg (43.4 KB)

User Avatar
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…

Attachments:
baking_05b.png (1017.9 KB)

gregory yepes | http://www.GregoryYepes.com [www.gregoryyepes.com]
User Avatar
Member
696 posts
Joined: 3月 2006
Offline
IIRC,
yes, it is necessary to:
- use polygons
- not have overlapping uvs
- not render backfaces

mantra -u is a beta that unfortunately doesn't seem to have ever gone past the beta stage
Stephen Tucker
VFXTD
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
It would be nice to see this feature finished

rob
Gone fishing
User Avatar
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.
User Avatar
Member
696 posts
Joined: 3月 2006
Offline
I didn't know about that method…

Is there a difference between the results?
Stephen Tucker
VFXTD
User Avatar
Member
42 posts
Joined: 11月 2006
Offline
Allegro
I didn't know about that method…

Is there a difference between the results?
i 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.

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?
User Avatar
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.”
User Avatar
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!!!
User Avatar
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
  • Quick Links