Sculptie distortion - or me?

Hi again, all.

Hopefully someone will give me some advice - once more!

I've been trying to model a section of parapet with a rounded top for a Build in SL using a cyclinder sculpt mesh as the basis. I'm trying to get a clean sharp 45 degree intersection for the corner junction.

Baked first short bit (1.5m long) using the 64 x 64 map and uploaded it successfully and it looks just the way I expected. I then made a copy from this original master for a longer section as simply scaling/stretching it in world doesn't keep the 45 degree cut needed for the junction.

The second section is 13.5m long so I used a 15m megaprim as the basis with one vertex extended from the 13.5 length to get the correct visible appearance in world. So far so good! However, when I upload it the angled end has serious sawtooth distortion and I'm at a loss to how to resolve it.

Presumably it's something to do with the LOD issue but I scrunched up (note the highly technical jargon) as many of the vertices on LODs 1, 2 and 3 to try get a clean edge with no success. Is it a function of excessive length that I'm stuck with or am I approaching the challende incorrectly?

Blend file and image of the in-world short and long parapets is attached.

Thanks for any advice.

 

AttachmentSize
parapetX.blend375.96 KB
parapet distortion.jpg41.33 KB
Domino Marama's picture

Megaprim sculptie baking

Make the sculpt mesh exactly as you want it - do not use an extended vertex to trick the baker. Add a cube (just a normal one) and scale to the size of the megaprim. Do a UV Reset on the cube to add a UV Layer. This will be called "UVTex", rename it to "sculptie" but do not add an image. Select the cube and the sculptie and bake. This will give you a sculpt map that will give the 13.5m length when applied to the megaprim inworld.

 

Hi Domino. Been trying your

Hi Domino.

Been trying your guide for odd size sculptie applied to a megaprim and got it working successfully. Thankyou!

However. From my test it appears that the sculptie is always centred on the megaprim. Is there any way of offsetting the sculpt mesh against the prim during the bake so that I can be specific about where I have the bounding box problem on the inworld object - e.g. the 15m bounding box overruns the 13.5m parapet at one end only?

Domino Marama's picture

Offset megaprim

Yes, you can use "Keep Center" for this. Position your sculpt mesh inside the cube. Select the cube and do shift-s "cursor to selection", then select the sculpt mesh and press "Center Cursor". Now select both and do the bake with "Keep Center" enabled.

Thanks once again. Still

Thanks once again. Still having a problem, though. Need your help again.

Been trying repeatedly to put a simple piece of parapet 10.75 x 2 x 0.25m into a 12 x 2 x0.25m metaprim and cannot get the length to be the dimension that is adjusted.

The oject rotation (par) of the sculpt mesh is 0,90,0 and I've tried what feels like every permutation of dims and rotation on the cube but seem to keep getting the width as the dimesnsion which is reducing.

I even tried rotating the mesh in the UV mapp;ing window through 90 degrees.

It's got to be something to do with the axes but it's eluding me. Steer me in the right direction, please?

 

AttachmentSize
parapetprob2.blend 277.79 KB
Domino Marama's picture

Keep Center bug

There's a bug in Keep Center in versions 0.9.17 and 0.9.18 that I just found trying this.. I missed updating this feature when I converted the baker to world space. Watch this space!

Domino Marama's picture

Fixed Keep Center and Scale

I've commited fixes for Keep Center and Keep Scale. Multibake still isn't behaving quite as I'd expect - I'll keep investigating.

Still worrying at this

Still worrying at this megaprim size adjustment issue, Dom.

As a quick aside - is there any reason I have 2 Bake options under Render? One is titled Bake Sculpt Meshes and the second is Bake Second Life Sculpties. The former brings up a dialogue - ref. Primstar 0.9.14 in my case which will not readily cancel if I change my mind and want to do something else before baking, while the latter brings up a simpler dialogue box which quite happily cancels itself if I click elsewhere on the screen.

Is this anything to do with having a Jass scripts folder alongside the Primstar folder within the specialist scripts folder I created or is it deeper legacy issues indicating I should wipe everything Blender related and do a clean install?

Domino Marama's picture

Two bake options

It's most likely due to the Jass installation that you are seeing two bake options. Basically it means that there are two sets of scripts in the paths that Blender uses. So removing the extras should sort that out. On Linux I've seen menu options remain after scripts have been removed, clicking on "re-evaluate scripts" next to the Python user directory in preferences fixes that. You'd get a file not found selecting the menu in those cases though.

I'm still working on the multibake problem that's affecting megaprims. I used to spend about two hours testing each release, but with my wrist problems meaning I get about 10 minutes mouse use before I need to rest for 20, I just can't do that at the moment. So we have the situation where releases come more quickly but aren't fully tested. Handing the testing to the user community lets me get more coding done, it'd have taken me another year to get to this point on my own. The downside is that sometimes people forget the -git releases aren't stable releases and it can look at times like I'm making a right old mess of things Smile

The good news is that the 0.9.x series is feature complete, so as each section is tested and fixed if needed, we should see the scripts become stable. I'm expecting this to take a couple of weeks then there will be a non-development release of 0.9.x to encourage wider use and testing. From there it should just be a matter of weeks before the code is stable enough to move to a 1.0.0 release.

So when I agree that's something is broken (like multibaking for megaprims), I wouldn't worry about trying to figure it out until I post that it's fixed in version x.x.x - then upgrade and test and hopefully script bugs won't distract you from figuring things out.

Domino Marama's picture

Multibake fixed

This blend works correctly in Primstar 0.9.20 so you should be able to figure things out now Wink

Thanks again, Dom. The

Thanks again, Dom.

The comment about looking at the megaprims thing was in no way a hassle - I just meant I'm still trying to get my head around a fraction of all the stuff you handle as second nature.

I can only sympathise on the carpal tunnel thing if that's what the wrist problem is - I've experienced occasional pains in wrists and arms after too long a period at the keyboard/mouse  but to have it to the extent you have must be seriously disruptive of your whole lifestyle and all those things you are obviously highly skilled at.

I really am most appreciative of all your work.

 

 

Domino Marama's picture

Baking rotations

Object mode rotations are kept as primitive parameters, so when using multibake these rotations are ignored. Generally speaking you should design your sculpties at zero rotation and only do object mode rotations to position them. For items like these, I'd apply the rotation so that it's baked into the sculpt map and the wall is aligned correctly by default.

Thanks for that, Dom. There

Thanks for that, Dom.

There was me thinking I'd been smart and devious to get the sculpt length I wanted from the nearest available megaprim size!

Any suggestion as to the distortion problem? - Not that I'm hustling you!

Domino Marama's picture

Aliasing distortion

Well 13.5 / 255 = 0.05294 per step. The width of the mesh is 0.25, so there's about 5 steps available where you'll get approximately a 45 degree angle. You'd need to sacrifice a lot of the curved top to get close to a 45 degree smooth edge on that model. Unless you are going for gaps at the joins, it's probably better to turn the corner and do a flat joint. Fake the angled one with texturing (bake selected to active is useful for that as you can bake a modelled corner to the fake one). Even that might be tough to get smooth where the "join" is though.

Ok, many thanks again. I

Ok, many thanks again.

I didn't appreciate the math - still don't fully comprehend - but understand where it's coming from. Working with AutoCAD and vectors etc. I'm just expecting the nth degree of precision.

I had originally considered 'turning the corner' before, but had decided that the corner would be better for concealing the junction between prims than a straight butt joint. I guess I'll work back towards that solution.

As for baking/rendering, /me scurries back to his new birthday pressie - Blender for Dummies. haven't got to that bit yet! Can you recommend any good on-line tutorials about the various render alternatives?

 

Cheers!

Domino Marama's picture

Available angles

A sculpt map is 8 bit RGB, so each direction can be one of 256 positions. In the same way that 9 vertices gives 8 faces, those 256 positions give 255 steps. So to find the smallest change possible, you divide the length in a direction by 255 (which means it's worse than I suggested - I should have divided 15 not 13.5 by 255). I posted a picture of available angles on a four by four grid before, and looking at that a 45 degree angle is equal steps in two directions. So when you have a long thin sculpt mesh, you really restrict what angles are available. If the grid in the picture was four times the size in X, then the 45 degree angle becomes 4 steps in Y for 1 step in X. So instead of being able to use 4 faces on that line, we can now only use one.

It won't be until Primstar 2.0 when I make handling this easier. For the Blender 2.5 rewrite I intend adding a digitisation modifier, so you can set that to 8 bit and get real time feedback on what the bake will do to the sculpt mesh. Even then you'll still need to work around it, you just won't need to get the calculator out to do it ;)

Texture baking is a massive topic as it covers all the material options, lighting options etc. There's no one tutorial to point at as it's something you learn a bit at a time and experimentation is the best tutor once you get the basics.

Many thanks - I appreciate

Many thanks - I appreciate your patience with my learning curve.

Domino Marama's picture

Thank you for asking for

Thank you for asking for clarification. It helps me find the best ways to explain things when I'm told my previous attempt wasn't good enough Smile It'll make the Primstar manual better than if everyone was afraid to ask for help.

Thinking a little more about your design, I'd probably leave the walls open ended - use a cylinder on it's side and not close the holes. Then have a set of smaller sculpties to add on as the corner pieces, wall ends etc as needed. The hard part would be figuring out the scales to use to get seamless alignment across the different sizes. Multibaking wouldn't work because of the large discrepancy in the sizes.

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