PDA

View Full Version : Render Errors ??? - Maybe a BUG ?



Lewis
02-15-2004, 05:53 PM
Hi guys !

This is problem i discovered last year but sinc ei found workaround i didn't bothe rmyslef too much but now i have time :)

I accidently turned on Double sides surface on one of CAR models (low poly but same thing happens to hi poly SubDs also) and when model is smoothed and double sided i get those black lines more liek cranks between polygons ?

I'll show you images to see better. Generaly i tested with very few poly objects and didn't see that but this one have about 40000 Quads and few triangles but it's not in subds.

When i turn off Double sided surface everything is smooth. Or when i make polygons as Triangles (in modeler hit T) then all is working fine but that's not good for SubD sobjects so i dont' do that and i needed soem wireframe render sin Quads so that' snot an option.

here is Normal Version where surface is Single Sided and smooth angles are form 25-55 (model is low poly on some areas so it has few smooth angles but it's same errro even if is only one)

Lewis
02-15-2004, 05:58 PM
This is SAME settings and scene but with Double sided surface turned ON for car paint material and smoothing angle is same as above (form 25-55)

See that ERRORS ?

Lewis
02-15-2004, 06:01 PM
Here is same thing but with LWs default smoothing angle of 89.53. Asy ou can see it's even worst but that's due low poy model and his not well placed polygons but same thing is one excellent models with hi quality SubDs.

Lewis
02-15-2004, 06:05 PM
I just forgot to nitice that bad quality model is OUT of picture 'coz model is fine (this particular one is build by 3D scanner and it's replica of real car in 3D scanner) and i can show you that on every advanced model. There is no unweled points or similar poly errors so that's not problem and even if that is problem then it would be visible on all versions and not only on Double sided.

I also tested this thing WITH radiosity, with area lights or with ditant lights and result is same - no deifference or to say you always can see those render errors.

I was also been so busy that i tryed in Lw 6.5b and i got same thing as on this 7.5c so there must be some problem in render technique but i didnt' find any such limits in manual ?

Anyone have LW 5.6 soemewhere on HDD to try that :)?


SO question would be WHY LW make such render errors on Quads and Traigles are free of that ?

Any help/explain is welcome.

Zafar Iqbal
02-16-2004, 01:46 AM
??? Must say WOW! .. Never experienced that myself

Lewis
02-17-2004, 12:36 PM
Anyone else ?

NewTek ?

I must sa that this is not my machine problem 'coz i tested on both machines i have and it's same errorr.

It would be nice to know reason for that ?

mattclary
02-17-2004, 12:47 PM
First of all, I bow to your superior skill :D , but are you sure there is no bad geometry like 2 point polys?

While I'm at it, how do you set up your backgrounds? Is it just a white plane with a white background?

Lewis
02-17-2004, 01:02 PM
Thanks matt :)!

And YES I'm super sure that model doesn't have any errors. But like i said it would have them on Single sides surface also if that's problem. I can show you this on 15 models if necesary. It's just thing with QUADS and i had to render these in Quads 'coz I needed wireframe quads renders for composition.

If is polyproblem it would be same with Triangles and when i hit Triple (T in modeler) problem disapears in Double side surfaces.

Maybe it has something with fact that LW renders ALL as triangles (SubDs quads are rendered as triangles if you try wireframe so if you wan't wireframe quads you need to freeze model to normal polys to get quads wire).

And Yes it's just white ground whit white background or you can just use white floor poly with white cube with fliped polys invard). Many ways to do so ).

cheers

mattclary
02-17-2004, 01:12 PM
OK, just checking. :) I'll try this out when I get home to LightWave.

mattclary
02-19-2004, 09:25 AM
Well, I think my tests confirmed what you are seeing. Have you submitted this to Newtek yet? You have to have "Raytrace Shadows" turned on to make it happen.

Lewis
02-19-2004, 12:43 PM
Heheh now i know i'm not going nuts :).

Thanks matt. No i didn't send this to NT since i first wanted to be absolutely sure in this 'coz i don't like to say it's BUG if is not or i don't know how ot us eit properly :).

I forgot to say that i have turned on shadows and reflections since i ALWAYS turn that on ;). Thanks for testing.

It looks like MAJOR problem (IMHO) and i wonder howcome nobody seen this earlyer 'coz i tryed in 6.5b and it's same erroor. I'd love to know if someone can try wiht 5.6c.

Thanks

P.S. I think that i'll post newtek this thread just when we got few more guys to participate.

WizCraker
02-19-2004, 12:49 PM
I dont use double sided often so I did not think much of it. But one of my models that I did I had DS on and kept getting this bug. At the time [version 6] I thought I was doing something wrong so I gave up on that model. I just relised that it was not a problem that I was doing.

earlye
02-19-2004, 07:12 PM
Bear in mind that I am not a NewTek insider by any stretch of the imagination, so I have no idea about specifics of their render engine, but...

<speculation>
It looks like what's happening is that double-sided polygons are being rendered as though they were actually two single-sided polygons facing in opposite directions. Furthermore, it seems as if the "far" polygon (the one facing away from the camera) ends up passing through the "near" polygon, probably due to floating-point roundoff.

Net result: in the areas where the far polygon ends up being closer to the camera, you see through that polygon and into the object, which is of course completely dark because the rest of the object casts a shadow.

Another possibility - you mentioned that this only happens with quads. If Lightwave triangulates during render, then the far poly could triangulate along one diagonal, while the near poly could triangulate along the other one. The result of that, if the original quad is not planar, is that the 4 resulting triangles (2 for the far and 2 for the near) would overlap each other and give wacky results. This is a distinct possibility, especially if the triangulation order has anything to do with each polygon's surface normal. It would also go away if you triangulate manually, because then the near/far would be the same triangle, and triangles are by definition perfectly planar.

In the first case (near/far polygon overlap), there probably isn't much LW could do, because the overlap would be due to floating-point roundoff.

In the second case (different triangulation for near/far polygon), this could be viewed as a model error because you would have to have quads that are not planar.
</speculation>

I obviously don't know if either of my hypotheses are accurate - they're only made based on my limited raytracer-writing experience. And as I said I know nothing about the implementation details of Lightwave's renderer, but...

Do you need 2-sided polys here? It seems to me that the model is a "closed object" so there should be no need for it to be double-sided, but perhaps I'm missing something about your process. So why not just turn off 2-sided and call it a day?

Lewis
02-19-2004, 08:03 PM
Thanks for participating earlye :)

I do understand what are you talking but in both cases to me it looks simple as BUG 'coz if i want Double side surface "quads" i need to convert quads in triangles which isn't solution. IF we can't use double sided surfaces when we want' what's the point of them then?

In this particualr case i don't need double sided but ONLY 'coz this model deosn't have transparent windows (duel lack of interior).

BUT when windows are transparent and car paint is only single sided you can see torugh car doors, window frames, tailights and everything what's facing opposite way than camera is looking :(. Then it's a BIG problem 'coz if model desn't have interior you have seetrough model.

I can show you that if you want ? Ill i just make windows of this car transparent.

Interesting thing is that when you render SubPatched models then it's all fine and doesn't bother if is Quads or triangles 'coz SubPatched models are rendered as triangles by native (atleast that's what wireframe shows when rendered). But if you freeze object manaual you also need to traingluate him to work properly with double sided surfaces :(.

And for this project I specificaly needed QUADS wireframe to overlay in postproduction over render (long story not important here) so untill i discoverd what's happening i saved all models two times. One for wireframe renders in Quads and other for color renderings trainglulated (until i discovered it's Double sided surface "thing"). Adn i was doing 10 cars at once so you can imagine what PITA was that to save them all twice :).

Nemoid
02-20-2004, 03:08 AM
Absolutely scaring prob, Lewis. not expert of this, but to me seems you have non planar quads, wich are bad in rendering when they aren't smoothed.

so a solution is obviously triangulate them as you tried, wich seems to me the best solution (remember Lw trangulates meshes for renderinng subpatches)

another attempt you can do is subdivide your model with smoothed or other systems and see what happen. maybe you can use also the smooth tool in modify tab, to make em even more planar here is pure speculation from me, but using more polygons may solfve some planarity probs (u will have tons of polys , though)

what i really don't understand is why this give errors with double sided, because Lw should create the exact opposite poly on the other side, giving no errors because of it. but maybe that with planar polys this don't happen.

mkiii
02-20-2004, 08:07 AM
Looks pretty normal to me unfortunately.

My only solution is to freeze the subd & triple any bad areas.

Raytraced shadows are also a major pita when it comes to stuff like this, and I tend to use Shadow maps to avoid these errors.

Lewis
02-20-2004, 12:30 PM
Hi guys :)

Look, i'm not searching workaround (i found it as you can see I have good and bad render of same thing), i just wanted to know is this happens to everyone and it seems it does no matter how good model is (look matt rendeeda SIMPLE sphere) :(.

Smoothing is NOT issue here 'coz i tested various smooth angles and it's not problem. It's just Double sided surfaces in non SubPatches and non trangle models :)

This model is not issue i can guarantee that 'coz it's pretty perfect mid-poly model (about 50k and it's 3D scaned form real car) and it works in other programs just fine.

Thanks for participating guys I'll wait few days more and then i'm sending this to NewTek bug reports.

I sure hope this is FIXED in LW8 since they advertised soem "rendering enhancments" ;).

earlye
02-20-2004, 04:00 PM
Originally posted by Lewis
I do understand what are you talking but in both cases to me it looks simple as BUG 'coz if i want Double side surface "quads" i need to convert quads in triangles which isn't solution. IF we can't use double sided surfaces when we want' what's the point of them then?

Note that in the first case, not being able to use double-sided would only be a problem in a closed object, where you don't need double sided anyway.

In the second case, you would need to be using non-planar polys, which will always lead to artifacts, double-sided or no. 3D math simply doesn't allow for non-planar polys to render in any sensible way. That's why if you have a non-planar poly in modeler and spin the camera around it, it looks all wacky. It isn't just OpenGL in that case - it's math.

In this particualr case i don't need double sided but ONLY 'coz this model deosn't have transparent windows (duel lack of interior).

BUT when windows are transparent and car paint is only single sided you can see torugh car doors, window frames, tailights and everything what's facing opposite way than camera is looking :(. Then it's a BIG problem 'coz if model desn't have interior you have seetrough model.

Of course, if it doesn't have an interior, do you really want to just show the inside-face of the skin? I'd imagine it would be better to model the thickness of the window frames, door, etc. In a pinch, I would just use the thickness plug-in I saw over at flay a while back.

I can show you that if you want ? Ill i just make windows of this car transparent.

Not necessary - I know what you're talking about.

Interesting thing is that when you render SubPatched models then it's all fine and doesn't bother if is Quads or triangles 'coz SubPatched models are rendered as triangles by native (atleast that's what wireframe shows when rendered). But if you freeze object manaual you also need to traingluate him to work properly with double sided surfaces :(.

This seems to suggest that the problem is that your polys are non-planar, in which case you're basically asking LW to do something that's impossible mathematically.

Lewis
02-20-2004, 04:52 PM
I get your point earlye but tell me then how that' snot problem in MAX with same model ???? I got model form client who was rendering smae thing in max and not having such problems :).

Aslo IF this is mathematical problem and not LWs then why we don't have part in manuals named "known issues" and listed this -coz in my eyes that's big problem.

You ask why i want' to show interior if ther eis none ? Well thing is this - when you are doing test renders you have better shadows (richer) if you use Double sided surfaces. Especialy in area under car. If polys are fliped and car (model) is not finsihed yet and doesn't have floor you will get none or very small amount of shadow under. That's just one of situations but there is many various things why i would like that.

Here is another - For instance i'm modeling car and i FINISHED whole interior and exterior so my car can be single sided. My camera (in animation) is moving from exterior to interior of car (let's say trough sunroof to be belivable ;)) and DANG i don't have windows anymore ?? Why - simply because windows are set to single sided polys instead Double sided. If they are double sided then problme won't be visible. And with Single sided windows i need to make them thick few milimeters which is simple wasting of polygons ad we all know how important is to save polys nowdays :)

What's the point of having DS surfaces if you can't use them or need to avoid them everday ;) ? Why we have ability to modle in Quads if they arent' good for rendering, So many questions then if this is "right way" of rendering it ;).

Thanks for your time but i think this really is a BUG - don't you ?

earlye
02-21-2004, 11:11 AM
Originally posted by Lewis
I get your point earlye but tell me then how that' snot problem in MAX with same model ???? I got model form client who was rendering smae thing in max and not having such problems :).

I don't know. Maybe max always triangulates polys before rendering them, meaning that they're always planar. I can only really speculate. What I do know is that a non-planar polygon is by definition no longer a polygon.

Aslo IF this is mathematical problem and not LWs then why we don't have part in manuals named "known issues" and listed this -coz in my eyes that's big problem.

Can't say. Perhaps the guys at NT viewed it as an "obvious" don't do that, i.e., maybe they thought "everybody knows that non-planar polys can't render correctly." Again, I can only speculate.

I can say that the mental ray manual specifically says that the results of rendering a non-planar polygon are unpredictable, so if this is a LW problem, LW's got good company.

You ask why i want' to show interior if ther eis none ? Well thing is this - when you are doing test renders you have better shadows (richer) if you use Double sided surfaces. Especialy in area under car. If polys are fliped and car (model) is not finsihed yet and doesn't have floor you will get none or very small amount of shadow under. That's just one of situations but there is many various things why i would like that.

For this, you could simply put a black plane directly beneath the windows, facing "up." This would close the bottom half of the car, shadows would behave as you would want, and you wouldn't see the skin if you looked through a window.

Here is another - For instance i'm modeling car and i FINISHED whole interior and exterior so my car can be single sided. My camera (in animation) is moving from exterior to interior of car (let's say trough sunroof to be belivable ;)) and DANG i don't have windows anymore ?? Why - simply because windows are set to single sided polys instead Double sided. If they are double sided then problme won't be visible. And with Single sided windows i need to make them thick few milimeters which is simple wasting of polygons ad we all know how important is to save polys nowdays :)

This one I could actually buy - although why would you make the whole *car* double sided in this instance? Why not just the glass? And would the glass show this issue, being that it would be translucent?

What's the point of having DS surfaces if you can't use them or need to avoid them everday ;) ? Why we have ability to modle in Quads if they arent' good for rendering, So many questions then if this is "right way" of rendering it ;).

I didn't say quads were bad for rendering. As you point out, they're very important for saving polygons. ( 1:2 quad-triangle ratio = pretty big savings ) What I said was that non-planars present math challenges, and I understand how double-sided could exacerbate those challenges.

Thanks for your time but i think this really is a BUG - don't you?

I would say that it's not that cut and dry.

If you feed the render engine something that produces mathematically undefined results, how can you expect it to give you the results you're hoping for? This is like getting upset that a program you wrote crashes if the one line of code in it is something like this:

/* divide y by zero and store result in x. so what if math explicitly forbids dividing by zero? */
x = y / 0;

Bear in mind, I have no idea if this is even what's causing your artifacts, and as I said, I'm only speculating. Are the quads even non-planar? If they're all planar, then this definitely isn't the cause of your issue :)

I guess the point I'm trying to make is that saying something is a "BUG" is pretty harsh, especially when you haven't ruled out the possibility that LW is simply doing the best it can with questionable data (assuming that the root cause is non-planarity).

BTW, you noted that one workaround you came up with was to simply save your model twice, one that was triangulated, and one that wasn't. Have you considered an L-script that would do the double-save for you? Pseudo-code would look like this:

save-as {original-basename}.lwo
triangulate
save-as {original-basename}_TRI.lwo
undo-triangulate

Sure, you'd still have to have two .lwo files, but at least one of them would be created automatically :p

mattclary
02-21-2004, 07:25 PM
This is not a case of non-planars. I created a simple sphere, made it double-sided then sub-patched it.

It IS a bug, or at the very least Newtek needs to be made aware of it and THEY can decide if it's a bug as it is reproducible.

Lewis
02-21-2004, 07:35 PM
Thank's matt :)

earlye - i'm very happy that we have people like you on forum who do know techical/mathematical side of this but as i already stated few times it's NOT model issue 'coz as you can see it can be reproduced with very simple models :). And i can repreduce it with many models.

Saving double objects even with LScript is just workaround and not real solution IMO :).

Thanks

BEDOFDOLLS
02-25-2004, 02:41 PM
I have just had a problem like this i think - (well someone said lewis is having the same problem) dont know if it is. u can see though the polys but only when double sided is turned on

BEDOFDOLLS
02-25-2004, 02:43 PM
but only on the phones lcd screen (its not transparent at all)

WizCraker
02-25-2004, 03:14 PM
That was me, so you did have Double Side turned on.

By the way forgot to say on the other post the phone looks really good.

mattclary
02-25-2004, 04:28 PM
Looks fantastic! Seems like the issue is a little different though. That's pretty wacky looking.

pixelinfected
02-26-2004, 02:38 AM
the know bug that appair when you apply shadow on poly with double side (sometimes) but often with double poligons (like with glass double poly) with are exactly in same space, is an error of z-buffer which not see correctly front and behind of poly.

an annoying bug from 6.5... if you need a glass you can resize the in or out surface of .01% or use g2, for other surface you can add a bit of depth and problem disappear.

often i see it with subpatch, be cause freezing by layout subpatch sometimes did that error with obj when you have double poly.