Texture and normal map baker

The second scenario is if you only have one mesh that you simply want to bake out material color from, then you can use the baker's bake onto self functionality (where you have no BG layer selected). In that case it will more or less render out the polys directly and there should never be any missed areas.

This would be a great addition! Just a simple baking out process with no fuss and no post ps work. Thanks again for looking into this.

Here's a complete breakdown of dDo. Pbtexture baker already do some of what xnormal does so that's another time saver.
 
This would be a great addition! Just a simple baking out process with no fuss and no post ps work. Thanks again for looking into this.

I'm sorry if I was a bit confusing. The bake onto self functionality is already in the current version. It can't be used when you're baking a high-res mesh to low-res mesh though. It's only useful if you're working a single mesh. To try it you only need a UV mapped poly/object and make sure no BG layers are selected, then run the baker.


If you're working with the more common hi- to low-poly baking (as showcased in the video above) you have to bake it the traditional way which involves raycasting.

The baker has some functionality which can help reduce issues in certain circumstances, when you have an object consisting of multiple parts in both high- and low-poly mesh (see "Grouping Geometry" in the user guide). This helps avoid "phantom" ray hits between parts. Dumb example, but say you had a car, then the wheel could be isolated by geomtry grouping so that when the wheel is baked no ray will accidentally hit any car geometry, and vice versa.

But otherwise you have to work with tweaking the front/back trace distances to get optimal results if you have a tricky object. A hole inside a baked poly usually means that a trace distance was too short, so the ray hit nothing. Missed areas along object edges can be not enough smoothing on the low-poly mesh so that the ray directions don't "wrap" nicely around. If the trace distances are too long (on complex objects) they might also accidentally hit the wrong part so you get parts of another surface.


I'll look at a material color randomizing script now.
 
Sorry I didn't know about bake into itself feature. Just tried it and its great! I wonder if this still produces holes, etc or does it completely fill a mesh with no errors since this is not referencing any other mesh. Have to try on more complex mesh.
The video was just to show how colormaps are used in dDo. But it shows maya and its baker which is still not good. In all appz I've tested, only 3dmax max has the capability of baking out a clean colormap without post work using RTTassist http://vertexbee.com/rttassist.htm . It explodes the mesh so there's no occlusion very clever little plugin.
Anyway if lightwave can export out colormaps without occlusion or holes it would really speed up work with dDo.
 
Barring any bugs or concave polygons, I'd think that the bake onto self feature should be guaranteed hole-free. That's because no ray tracing is involved when doing that, it just straight up renders out the polygons on the baked image.
 
I've made a color randomizer script. It's available in the "LScript Snippets" section of my web page.
 
Hi! I'm using PB Texture Baker, but whenever I use a node texture with LW 11 or 11.5, I get a Missing Plugin error. It says it's looking for LW Object Info 9. This error freezes the program.

Any chance you can fix this quickly?
 
Are you using the standard LW image node? If so, could you try the PB Image(/NormalMap) counterparts found under PB_Nodes and see if you get the same problem there?
 
Okay, that fixed the immediate issue. Thanks!

But what do I do if I need to use a cubic map with nodes? The PB_Image node only works for UVs...
 
I have to see if I can debug against LW11 (I have to work with the trial version) and see if there's anything I can do to make the native image node work. It works fine in LW9 and 10. However Image nodes with UVs never worked (as noted in the baker's user guide), that's the reason I had to add the PB Image node.

If you have time maybe you could quickly check what happens when you try a native Image node with cubic map. Considering that LW9 and 10 would also crash when using Image node with UVs, maybe it was the same error in 11, even though the "LW Object Info 9" message suggests that somethign else is going on as well.
 
I've made a color randomizer script. It's available in the "LScript Snippets" section of my web page.

Thanks just tried the randomizer this will really save a lot of time!!!
However I'm getting some errors. Please see attachment. There's some colors in there that pbtexture bakes that are incorrect. When using surfacing baking camera though it gets correct results from the same model. I would rather use pbtexture though since its really fast.

attachment.php
 

Attachments

  • testbake.jpg
    testbake.jpg
    1 MB · Views: 716
Hmm. I supposed it could be a bug with some poly id mixup, but I would first make sure there are no duplicate polys that occupy the same UV space and that the material assignment is the same as the surrounding area.

To debug could select the polys (in the UV viewport) of the area that I attached below (so you have both the yellow polys and some of the surrouding pink ones to compare with), and then delete all other polys on the model. Then bake only that area. Do you still get the error then? If yes, would it be possible that you post an lwo (of that area only)?


Edit: Oh and I assume you're using the latest baker version from december? It had a fix for bake onto self.
 

Attachments

  • testbake-debug.jpg
    testbake-debug.jpg
    33.9 KB · Views: 310
Last edited:
Checked the model and still error. I did find a "fix". I'll pm you the model. I'm using current version of pbtexture.
 
I ran the model without doing any changes and strangely enough it works fine when I try in LW9 and 10, both 32-bit and 64-bit versions. It would seem that it's something related or triggered by LW11. I'll try to test it on an LW11 trial on another computer.
 
I just had an idea. In case there's some threading problem in LW11. Try running the baker set to 1 thread and see if that makes any difference.

Edit: Confirmed that it bugs out on LW11.5 (not related to threading). If you happen to have LW10 or 9 installed in parallell then you could bake out from there to avoid the problem. I'll try to figure out why 11 behaves like that.

Edit2: Found the (silly) bug. It was thread related in a way, but not as one would expect. The bugfix I made in the last version should have been applied in two places, one for threaded and one fur unthreaded. I missed the unthreaded one. I'll put up a new version within the next one or two hours.
 
Last edited:
Just tried the new version. Thanks works perfect! Didn't even know about the multi-threaded option. :D
 
If you have time maybe you could quickly check what happens when you try a native Image node with cubic map. Considering that LW9 and 10 would also crash when using Image node with UVs, maybe it was the same error in 11, even though the "LW Object Info 9" message suggests that somethign else is going on as well.
I just checked: It works perfectly using cubic map nodes, so (one can infer) it's only the UV nodes it gives the error for.
 
It's again time to dust this thread off a bit. There's a new update.

I fixed a crash when working with layers from multiple LWOs at once (supported via the Layers Panel), and added support for blocker geometry (described in section 4.4 in the User Guide).
 
Back
Top