Improved UV coordinates for Hull brushes

@zandyxr has reported issues with some hull brush UV coords for some workflows.
39 Replies
Zandy
Zandy10mo ago
The hulls with OB on export have poor UVs and won’t bake as is. Remapping in an external program is always necessary to bake and have textures apply correctly for unity projects/ world building If you do this in Blender the GLB will break once exported (especially if using animated brushes and smoke, etc) so fixing this issue will eliminate the need for Blender, etc to be used and we’d have no more glb issues with OB models/sketches
andybak
andybak10mo ago
What are you baking exactly? Lighting?
Zandy
Zandy10mo ago
Yes
andybak
andybak10mo ago
In Unity?
Zandy
Zandy10mo ago
Yes They only bake properly remapped And textures will not apply properly to hulls if you don’t The UVs on export as a whole aren’t great but hulls are the biggest issue
andybak
andybak10mo ago
The UVs are usually set up specifically for our shaders and materials. What materials are you using on Hulls when you bake?
andybak
andybak10mo ago
@zandyxr - try dropping this into this folder in the SDK:
Zandy
Zandy10mo ago
Do you want me to test hulls? I’ll be in the studio in about an hr so if you want me to test let me know
andybak
andybak10mo ago
this is only intended for hulls. it will probably do weird things to brushes that already have UV coordinates.
Zandy
Zandy10mo ago
Ok
andybak
andybak10mo ago
Unity uses the uv2 channel for baking lights. I think that's already used for other things for many brushes. i'd have to try
Zandy
Zandy10mo ago
There are a couple of other brushes that do better remapped (petal, lofted etc) but hulls are fried and are the biggest issue Doesn't work. It shows that they were added but no actual UVS are there... Pics below.
Zandy
Zandy10mo ago
Original export, no UV in panel
No description
Zandy
Zandy10mo ago
UV's for above....none are there
No description
Zandy
Zandy10mo ago
Imported model to Unity AFTER said file was added to TB editor folder. Exported as an FBX to see if it had UVS in blender. It says it was added (in inspector on the right under UV Maps, but UVs are not mapped)
No description
Zandy
Zandy10mo ago
Same model exported from unity unwrapped in blender. This is what the UVS should look like. This is a simple unwrap.
No description
Zandy
Zandy10mo ago
had to do this manually in blender So basically as is, OB doesn't have any UVS on hulls at all on export This is why you have to use blender, etc to generate them if you want to use OB models for big or professional projects ATM Sometimes I generate my own materials or apply textures (sandstone for example)
andybak
andybak10mo ago
i didn't tell you how to use it yet! Also - I have an improved version I'm just testing. It seems to struggle on huge meshes so test it on something small for now
Zandy
Zandy10mo ago
🤣 why not? this is a small piece you need smaller?
andybak
andybak10mo ago
It's locking up on the big mesh scene you sent me. So don't try that
Zandy
Zandy10mo ago
well that one is huge...lol remember we only got one part of her working before with large mesh exports 😉
andybak
andybak10mo ago
So - the thing is, you'd probably want different uvs for lightmaps vs texture maps. Currently I'm using lightmap uvs for both but try it:
Zandy
Zandy10mo ago
How are you generating lightmap UVS if unity doesnt give you the manual option with glbs on import?
andybak
andybak10mo ago
drop it in the same folder overwriting the previous one
Zandy
Zandy10mo ago
only fbx
andybak
andybak10mo ago
then right click on the root object you want to generate uvs for I'm calling the same method that unity uses for fbx
andybak
andybak10mo ago
There's two options on the right click menu:
No description
andybak
andybak10mo ago
the only different is "All" copies the lightmap uvs (uv2) to the regular uv channel as well
Zandy
Zandy10mo ago
ok so choose all?
andybak
andybak10mo ago
depends if you want to use texture maps as well as light baking.
Zandy
Zandy10mo ago
ok exporting now to see if it shows
andybak
andybak10mo ago
here's the pedestal from your big scene that i used as a test:
No description
Zandy
Zandy10mo ago
oh nice Is def showing now in blender
Zandy
Zandy10mo ago
No description
Zandy
Zandy10mo ago
showing 3 UV sets now Selected ALL: Nothing on UV Set 2. (0,1 shows UVS) So is this a good method to use temporarily? I should prob try a sample with petal or lofted as well. Maybe it'll fix the UVS there too. Its not pressing for those....they just bake better remapped....not as sloppy interesting how the UV mapping is different for both methods. Looks tighter on the unity method. Will prob bake better too. Tested a bake.....looks nice. Texture vs Material bake (same lighting, direction)
Zandy
Zandy10mo ago
No description
Zandy
Zandy10mo ago
No description
Zandy
Zandy9mo ago
This script add on for UVs is working great so far… been using it a lot. Sometimes have to group larger builds and do each separate but it’s a great addition to the workflow and does a great job with mapping UV’s