plane baking issue with primstar 0.9.16, 0.9.20

Fizz Savira's picture

I have sculpted a shoe insole using an oblong plane. When I bake the sculpt using the primstar baker, the resulting sculpt is messed up, the left and right sides are misalinged and the top of the front part of the mesh is no longer flat.

When I bake it using the last release of the Jass scripts, 1.41, the result is correct...

I don't know if this matters or not, but I had to create the original plane sculpt using Jass, because of the Mac issues with primstar.

AttachmentSize
plane-bug.zip69.08 KB
Fizz Savira's picture

So I did some more testing,

So I did some more testing, and the issue I'm running into isn't just planes. It seems that primstar is "interpreting" my mesh somehow and coming up with a new mesh that is similiar to, but not the same as the one I made.

This is very very distressing, because I've gone to great efforst to line things up precisely, to addess things such as LOD and texture even-ness.

I'm wondering if these issues I'm seeing are due to creating the meshes using Jass instead of Primstar?

Any help would be appreciated Smile

 

Manny's picture

wondering

"I'm wondering if these issues I'm seeing are due to creating the meshes using Jass instead of Primstar?" check this out. (Mr. Forums is your friend) Posting and commenting is as important as reading it.

 

Fizz Savira's picture

Thanks for the link :) I did

Thanks for the link :) I did some more testing and decided that you have to add the sculpt from primstar for primstar to bake it properly. That's my translation of whatever in the world that link you give above was trying to say Smile

And I did skim the one page of forum titles before posting, and like I said, the title (to me...) had nothing at all to do with my issue. Mind you, I have very little notion of how this baking magic occurs Smile

Domino Marama's picture

I'm not sure what you are seeing.

I've just tried baking the insole and it looks fine to me. I've attached the result. What options are you using for the bake?

AttachmentSize
insole.tga 15.34 KB
Manny's picture

added the insole .blend file

I was curious and checked too, it works.

Green is the Preview version.

Opened; selected; baked.

(Map's image size corrected: 32x128)

 

AttachmentSize
insole_test_32x128.blend 117.38 KB
Domino Marama's picture

Aliasing problem

I've looked a little closer at your model, and it's not fully grid aligned. I'm not sure what version of the baker Jass uses, but the latest in Primstar is the most accurate one I've done. When you want exact, then you really do have to make the mesh exact. I've resized the mesh to 1.0, 1.0, 1.0 and added a grid mesh with 256 x 256 vertices to show how the alignment is off. This gives the slight bumps across the sole when the mesh is baked and thus aligned with the grid.

Blender sculptie grid alignment

If Jass bakes it how you want, then importing a baked sculpt map is probably the easiest way to get the mesh for use with Primstar.

PS: Manny, it should be a 32 x 128 map not a 64 x 64 Wink

Manny's picture

oh yeah, sorry

Yeap, you are right Domino, when I saw the UVs I likely thought about that but then instantly forgotten, added a new image and baked, happens, my bad.

 

Fizz Savira's picture

Well, you're right of course

Well, you're right of course about the verticies not being aligned. I usually do that step, after I've pretty much finished the shape of the model. Then I go through and fine tune the verticies after scaling the model up to 2.55 in each dimension, as per Gaia's video tutorial.

That being said, it's still the case that your bake and Gaia's bake generate very different results. And, by recreating my mesh from scratch by using Primstar 100% (oh how I wished I had known about the rebuild from sculpt feature), I stopped seeing the artifacts.

I've attached two images that are baked, the first with Jass, the second with Primstar. In both cases, the defaults for the baking dialogs was used (don't keep center, don't keep scale, etc.). If you look closely at the left edge of the bake, you'll see in the jass version a set of 4 faces stacked vertically. Look at the primstar version, and you'll only see 3 (on the left edge, 4 on the right edge, with one of them shortened...

For the primstar case, what really surprises me is that the row of vertices that should be a part of the left edge, end up moved interior to the front of the insole, even though they are stacked vertically above the other rows...The right edge does something very different. Odd...

Mind you, primstar is baking everything else much better, so I'm not going back to Jass Smile

I did one more test, before posting this. I tried using the mesh-script update from sculptie, and that yeilds a different answer than the images I've attached. What worked, to recover my work and get it into a form that primstar would bake correctly, was to do this:

Bake it with jass, then use the UV->Image->Import as Sculptie menu item.

After I do that, the resulting object in blender is a bit broken (!). The Transform properties shows a ZERO value for the Z dimension. Then by going into edit mode on that object, and then back out, it gets fixed magically, and then all is well. I can rescale the mesh to match the original's dimensions, and bake with Primstar and get the expected results (which means the mesh doesn't budge because the import as sculptie already dealt with the precision issues that sculpties have...)

Hopefully that's enough of a recipe to help debug this out...

 

AttachmentSize
jass-bake.png 27.08 KB
primstar-bake.png 32.59 KB
Domino Marama's picture

It's the UV layout

Enable Snap to Pixels and Constrain to Image in UVs. Then select all vertices in the UV Image editor and press g to grab. You won't be able to move them, so just click to update.

I'm not sure why it's messed up, but the UV Layer isn't exact - snapping to pixels like this makes it exact and the bake goes cleanly.

Fizz Savira's picture

That trick works great,

That trick works great, thanks Smile

I managed to create another object with the same issue, and that trick solved it as well. 100% built using primstar, so that's good news (in that it means it's not the jass=>primstar sillyness, but something about primstar itself, so the issue is more localized and hopefully solvable).

I have a funny feeling that this issue is actually what's behind the primstar vs. jass baking issue. Does that make sense? And it makes me then wonder if there is a way for your logic to do what I'm doing manually in realigning the UV grid, or maybe figuring out how it's getting out of alignment in the first place.

The tools I'm using in blender to make my shapes are a pretty small set (more get added as I learn...):

move, scale, rotate, all 3 with proporitional on and off

warp

smooth

sometimes I do that in multires to approximate a shape, and then clean it up, sometimes I've tried it in subdivision mode, but that usually turns out poorly. In addition, I've used lattices to deform meshes.

That's all that I can think of right now...

Hope this helps!

 

Fizz Savira's picture

I just had a thought about

I just had a thought about what might be screwing up the UV maps.

For ease of LOD handling, one of my "tricks" is to get rid of multires when I'm ready, select the entire UV mesh, and replace the image with one of the LOD images out there (usually a 512x512 image). Later on, before I bake, I switch back to a UV map with the correct dimensions...

I know that's just the image, and not the UV coordinates, but maybe somehow this is affecting things?

 

Domino Marama's picture

Applying subsurf or multires

It does seem to be Blender itself messing it up when multires or subsurf is applied. It's not something I can work around without breaking other functionality, snapping the points to pixels isn't something you'd always do if you've unwrapped a traditional model or are using a high resolution mesh.

I'll make sure I mention it when I get to the modelling section of the user manual.

 

Not baking now

I don't understand. I can't bake now my objects now. It's too complicated now. Can I get the old version back?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <pre>
  • Lines and paragraphs break automatically.
  • Project issue numbers (ex. [#12345]) turn into links automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options