Digital Art Zone

 
   
2 of 3
2
How do I get smooth curves?
Posted: 13 November 2012 04:22 PM   [ Ignore ]   [ # 16 ]
New Member
Total Posts:  23
Joined  2012-08-02

A-Ha! Yes afreaginname, that’s it. I understand the principle, but I have no idea how to get rid of it!  But I rendered this with Luxrender, at 2000X2000 and left it to cook 8 hours… eeek! 
So, do you happen to know what I should do to get that antialiasing? I use Daz Studio / Reality 2.2 / Luxrender

Profile
 
 
Posted: 13 November 2012 04:35 PM   [ Ignore ]   [ # 17 ]
Member
Rank
Total Posts:  250
Joined  2009-01-27

You can’t get rid of it. “Smoothness” on a digital rendering is an illusion. You can only mitigate its effects, and this is where antialiasing comes in. I also added a “PS” to my previous note mentioning how color also greatly enhances the appearance of smoothness and also how monochramatic images are affected more severely by jaggies than colored images are.

I don’t know if there’s a rendering engine out there that DOESN’T use antialiasing, but I’ve seen some where you can adjust it’s aggressiveness or turn it off completely. I don’t know if this feature is available in DS or the other renderers you mentioned or not.

We need some users of these engines to chime in here…  smile

 Signature 

For any arguments or illustrations I give, my system specs are:
Hexagon version 2.5.1.79,  XP pro 32 bit,  pentium core2 duo,  ATI radeon 3870, 2 gigs ram

Profile
 
 
Posted: 13 November 2012 04:54 PM   [ Ignore ]   [ # 18 ]
Member
Rank
Total Posts:  250
Joined  2009-01-27
kzamor - 13 November 2012 04:22 PM

...I rendered this with Luxrender, at 2000X2000 and left it to cook 8 hours…

This just hit me!

2Kx2K isn’t that large an image. The only way it would take 8 hours is if you had every bell and whistle the rendering progarm had to offer turned up full blast. Raytracing, shadowing, reflections and god knows what else can easily eat math processors alive!

Henceforth you might want to render this thing with these settings turned down or off so that it renders in only a few minutes. That should give you enough image render information to let you know whether there are aesthetic flaws of some kind in the imagery.

PS:

Just went dox hunting…  smile

Luxrender is quite complex. Here’s a link to their “render settings” page that will take you awhile to wade through, but I suspect it could help you clean up your render. Two areas that my gut tells me would help a lot are section 3 “sampler” and section 7 “filter”. Also section 1 “Introduction to LuxRender’s rendering process” would probably be of value.

http://www.luxrender.net/wiki/LuxRender_Render_settings

 

 Signature 

For any arguments or illustrations I give, my system specs are:
Hexagon version 2.5.1.79,  XP pro 32 bit,  pentium core2 duo,  ATI radeon 3870, 2 gigs ram

Profile
 
 
Posted: 14 November 2012 03:05 AM   [ Ignore ]   [ # 19 ]
Member
Rank
Total Posts:  60
Joined  2009-09-16
kzamor - 13 November 2012 03:40 PM

Please forgive my ignorance, but what is a low poly cage?

Low poly cage and then the same cage with 2 levels of subd (smoothing)

The low poly shape is created by extruding edges with Ctl+drag then apply 2 levels of smoothing to round it off.  Where you put your low poly edges determines how smoothing affects the shape.

Further reading and understanding of subdivision modelling here http://en.wikipedia.org/wiki/Subdivision_surface which is what I am talking about. Or here http://cg.tutsplus.com/tutorials/autodesk-3d-studio-max/an-introduction-to-subdivision-high-poly-modeling-tools-and-techniques/ Turbosmooth in max is the same as smoothing in Hex.

 

Image Attachments
LP.JPGHP.JPG
Profile
 
 
Posted: 14 November 2012 09:44 AM   [ Ignore ]   [ # 20 ]
New Member
Total Posts:  23
Joined  2012-08-02

Thanks for the tips guy, I will read and post my progress!

Profile
 
 
Posted: 14 November 2012 10:17 AM   [ Ignore ]   [ # 21 ]
New Member
Total Posts:  23
Joined  2012-08-02
Roygee - 13 November 2012 02:42 PM

You mean something like this?

Used a rectangle with chamfered corners as a profile, a circle with 36 points as the sweep path.  Smoothed level 1 gives 4032 polys.

I tried this, but ended up with a weird bump in the circle. Could you tell me how you got rid of it?

Image Attachments
twistedtorus.jpg
Profile
 
 
Posted: 14 November 2012 01:21 PM   [ Ignore ]   [ # 22 ]
Power Member
Avatar
RankRankRank
Total Posts:  1483
Joined  2008-01-01

Yeah, so did I:)

Got rid of it with a light brushing with the soften tool - under the UV & paint tab.

Hopefully some guru can explain to us how not to have that bump in the first place?

Profile
 
 
Posted: 14 November 2012 02:57 PM   [ Ignore ]   [ # 23 ]
Member
Rank
Total Posts:  60
Joined  2009-09-16

You need to adjust the twist rotation amount until the two end profiles align (currently they do not)

Profile
 
 
Posted: 14 November 2012 10:24 PM   [ Ignore ]   [ # 24 ]
Power Member
Avatar
RankRankRank
Total Posts:  1483
Joined  2008-01-01

Is there a “rule of thumb” formula, or is it trial and error?

Profile
 
 
Posted: 15 November 2012 12:26 AM   [ Ignore ]   [ # 25 ]
Member
Rank
Total Posts:  250
Joined  2009-01-27
Roygee - 14 November 2012 10:24 PM

Is there a “rule of thumb” formula, or is it trial and error?

It appears that the “twist” numbers refer to degrees.

The cross-sectional shape at the start of the shape remains fixed in position and the “twist” tells how much that shape should be rotated in degrees at the end of the sweep.

Oddly, this scheme works on a closed line (like the above circle) ONLY for one complete rotation: 360

One complete rotation would make the starting square and the ending square mate perfectly (all the edges ending up in their original positions), and it seems to do that. But 90, 180 and 270 should also work for a square and give a twist of 1/4, 1/2 and 3/4 turns respectively.

But they don’t.  :(

Here’s a circle with a square cross section with 360 applied to the twist:

 

Image Attachments
asd.JPG
 Signature 

For any arguments or illustrations I give, my system specs are:
Hexagon version 2.5.1.79,  XP pro 32 bit,  pentium core2 duo,  ATI radeon 3870, 2 gigs ram

Profile
 
 
Posted: 15 November 2012 12:56 AM   [ Ignore ]   [ # 26 ]
Member
Rank
Total Posts:  250
Joined  2009-01-27

Oh wow!! This “twist” algorithm is BUGGY!!! I’d give my left arm to examine the code!

Here are 4 circles with square cross-sections, with twists of 360, 720, 1080 and 1440 applied (1,2,3 and 4 complete rotations of the square).

I now see that even 360 has a flaw, although possibly tolerable.

But beyond that, the flaw seems cumulative and even 720 is immediately intolerable.

Image Attachments
buggy!.jpg
 Signature 

For any arguments or illustrations I give, my system specs are:
Hexagon version 2.5.1.79,  XP pro 32 bit,  pentium core2 duo,  ATI radeon 3870, 2 gigs ram

Profile
 
 
Posted: 15 November 2012 02:13 AM   [ Ignore ]   [ # 27 ]
Power Member
Avatar
RankRankRank
Total Posts:  1483
Joined  2008-01-01

Thanks - now that we know it refers to degrees, it makes sense.  Possibly the reason that 1/4 and 1/2 doesn’t work on a square is because the square is not precisely square?

Found that it does work well with 720 and 1080 if you harden the edges and smooth.

Profile
 
 
Posted: 15 November 2012 05:14 AM   [ Ignore ]   [ # 28 ]
Member
Rank
Total Posts:  250
Joined  2009-01-27
Roygee - 15 November 2012 02:13 AM

Thanks - now that we know it refers to degrees, it makes sense

Yes, it SHOULD make sense…but I’ve made some oddball discoveries while playing around which seems to belie it after all. I’m starting to think that hexagon has an evil spirit intent on making me out to be a liar…  smile

Possibly the reason that 1/4 and 1/2 doesn’t work on a square is because the square is not precisely square?

No, it turns out that it’s connecting the “wrong” faces. This’ll take an explanation…  smile

Imagine a square as the cross section. In your mind label the edges clockwise as A,B,C and D.
After sweeping, the end square is rotated according to the twist setting. At 360 degrees, the original square and the terminal square are both aligned A:A, B:B, C:C and D:D; exactly as if it hadn’t been rotated at all.

But at 90 degrees, the original and terminating squares are aligned A:B, B:C, C:D and D:A. At 180 degrees, they’re aligned A:C, B:D, C:A and D:B.

Now here’s the problem: After the sweep, hexagon bridges the original square’s edges to the terminating square’s edges by connecting A-A, B-B, C-C and D-D in EVERY CASE. So the ONLY case where that comes out “evenly” is with complete 360 degree rotations; everything else has the faces stretched and twisted between the “namesake” edges instead of connecting to the edge nearest to it.

And now about those “degrees”...  oh oh

I was playing around with high rotations and discovered that instead of using 1440, I got a really nice result using 1390! By dividing that number by 4, I got 347.5.

Odd number, but I played further and found that either 347 or 348 achieved as nice or better result than 360 did!
Likewise, 694/696 worked better than 720, 1941/1944 better than 1080 and of course, 1388 or 1392 works better than 1440.

And it’s still not over…

I reasoned that “shaving” the numbers worked because of the gap between starting squares and the terminal squares. If they were touching (as they should), then 360/720/1080/1440 would work perfectly. But in my examples, I used circles with 32 points in them, so the starting squares and the terminal squares were actually a tad over 11 degrees apart. By “shaving” the twist, I was effectively UNrotating the terminal square to a position where the edges would be bridged properly.

Following this reasoning, I made a circle using 256 points and tried the same trick. And as I suspected, the numbers I used for the 32 pt circles didn’t work for the 256 pt circles because now the separation was only about 1.4 degrees. For the 256 pt circle I only had to shave them a tiny bit to achieve perfection: 1434 replaced 1440.

And here is where I learned that the twist factor would accept decimals! Dividing 1434 by 4 gave me 358.5, which I entered into the twist instead of 360, and the 256 pt circle came out perfectly again! Likewise 717 and 1075.5 gave me perfection over 720 and 1080.

So the problem is the algorithm used to calculate a closed loop array. The math SHOULD be calculated as though the starting square and the terminating square occupied the same position. But they don’t. The terminating square is instead assumed to be located at a position APART from the origin depending on how dense the closed line is, and this space is then bridged which is a bit sloppy, IMO.

This actually creates a problem where a closed loop array MUST be tweaked depending on both the number of points in the closed loop, as well as the shape of the cross section.

But if you understand the problem as I laid it out (and I know it’s complicated and makes for tedious reading), at least you can figure out how to tweak it.

Here are the 256 pt circles with 358.5 | 717 | 1075.5 | 1434 degree twists

 

Image Attachments
x1.jpgx2.jpg
 Signature 

For any arguments or illustrations I give, my system specs are:
Hexagon version 2.5.1.79,  XP pro 32 bit,  pentium core2 duo,  ATI radeon 3870, 2 gigs ram

Profile
 
 
Posted: 15 November 2012 06:44 AM   [ Ignore ]   [ # 29 ]
Member
Rank
Total Posts:  250
Joined  2009-01-27
Roygee - 14 November 2012 10:24 PM

Is there a “rule of thumb” formula, or is it trial and error?

HA!!!!!!!!!!!!!!!!!!!!!  YES!!! I GOT IT!!!!!!!!!!!!!!!!!!!!!!!!!!

After re-reading my last post, I got to thinking….

And I came up with a formula….

A given circle has “x” points. The default is 20, my first bunch had 32, and my last one had 256.

On a circle, that means that each point is 360/x degrees apart. For a 20 pt circle, that’s 18 degrees.

Since the cross-sectional shapes align themselves on each point, then that is also the separation distance between the starting square and the terminal square…

.....soooo….that distance also happens to be the number to subtract from 360 degrees to know what number to enter into the “twist” setting!

EZ!!  smile

so that means that “T” (twist) is found this way:

T = 360 - (360/x)

“Ya follow me, camera guy?”

For the default 20 pt circle, that means that T = 360 - (360/20) = 342

For my 32 pt circles, it’s 360 - (360/32) =  348.75

And for my 256 pt circles, the actual number is 360 - (360/256) = 358.59

So this brings us full circle now, and with this solution I can finally give a precise answer to Kzamor’s query in comment #21:

Kzamor followed Roy’s lead with a 36 pt circle. So what he needs to put in as a “twist” value is:

360 - (360/36) = 350

Kzamor, type the number “350” into your “twist” option, and that kink will disappear completely!  smile


PS:
Whenever you derive the twist value in this way, it represents ONE full twist. For multiple full twists, simply multiply your T value by the number of twists you want and it will also work perfectly.

 Signature 

For any arguments or illustrations I give, my system specs are:
Hexagon version 2.5.1.79,  XP pro 32 bit,  pentium core2 duo,  ATI radeon 3870, 2 gigs ram

Profile
 
 
Posted: 15 November 2012 01:12 PM   [ Ignore ]   [ # 30 ]
Active Member
Avatar
RankRank
Total Posts:  388
Joined  0
afreaginname - 15 November 2012 06:44 AM
Roygee - 14 November 2012 10:24 PM

Is there a “rule of thumb” formula, or is it trial and error?

HA!!!!!!!!!!!!!!!!!!!!!  YES!!! I GOT IT!!!!!!!!!!!!!!!!!!!!!!!!!!

After re-reading my last post, I got to thinking….

And I came up with a formula….


Excellent explanation!

This post is definately getting a bookmark.

 

 Signature 

-Dean

DAZ Gallery: http://www.daz3d.com/gallery/#users/1922/

Profile
 
 
   
2 of 3
2