Blitz3D ugly shading prob (help)

Blitz3D Forums/Blitz3D Programming/Blitz3D ugly shading prob (help)

Danny(Posted 2007) [#1]
Hi All,

Does anyone of some way to get rid of this default dead ugly "smooth-shading" you get with un-textured models?!

In any 3d program or model viewer, these near-flat surfaces look ... well.. flat! (see picture on the right)
But Blitz applies this really ugly semi-smooth shading (see picture on the left).
Any idea's to get rid of that so that it looks more like the picture on the right?!
I receive external models that have been converted to 3ds format.
And whatever smooth-group settings I use during conversion, it keeps looking like the picture on the left. Which is not acceptible.
I've tried Rob's DX7 lib to see the difference between flat/gouraud/phong shading, but all look yuck!

Any help appreciated!
Danny.




degac(Posted 2007) [#2]
EntityFX entity,4


Danny(Posted 2007) [#3]
I wish it was as simple as that, but Blitz still gives an ugly shading where you can almost see every polygon. Even though the model's topology is fine, vertices are welded, etc.!

I was hoping you can influence a triangle's shading by tinkering with it's normals?!?! But I got no clue how (IF?) that is true or works at all....

any other idea's most welcome..
d.


QuickSilva(Posted 2007) [#4]
I seem to remember having the same problem and got around it by making each surface seperate in my 3D program. It`s been a while but worth trying. Possibly smoothing groups related.

Jason.


Naughty Alien(Posted 2007) [#5]
its not up to Blitz...if you using 3Dsmax, try to apply Xform modifier on to mesh and then collapse it in to Editable mesh and then export and it will be gorgeus within blitz


Pinete(Posted 2007) [#6]
However, while I'm reading the post... the people is always surprising..., oh my god... The first thing they do is to baptize the blitz's shadows as "crap", and that without having #~@! idea about the basic rules about how to export just a polygon!... before ask, before try, before anything... first thing they do is say shadows are crap. surprising.

regards.


Vorderman(Posted 2007) [#7]
It'll be your smoothing groups, or lack of - if you have a mesh with just 1 smoothing group then it will look exactly as you have it - Blitz will attempt to shade smoothly across all polys, resulting in a mess.

Simply apply nice clean smoothing groups to cure the problem - in Max do it manually or apply an autosmooth modifier with the angle set to 45degrees or less and then you'll find it will look perfect in B3D.

I assume other modellers have smoothing groups also, AC3D certainly has, which is my preferred cheap modeller.


Paolo(Posted 2007) [#8]
I'm using 3DStudioMax and I have never been able to export
correctly the smoothing-groups in a .3DS format,
for me, a .3DS model is always loaded in Blitz with a default
value of 180º for the smooth shading,

two solutions,
- look for a .X exporter, the Panda_DirectX_exporter works good
and it exports the smoothing groups correctly,
- try using the "UpdateNormals" command with your model
after loading it, this can solve the problem in some situations.

Paolo.


jfk EO-11110(Posted 2007) [#9]
I had similar problems with a extruded 3d text mesh. I tried a lot with the smoothin groups as well. After all I saved the flat front and back parts as one surface and the extrusion sides as an additional surface.

The house should however look ok if you set it flatshaded, using entiyfx 4. (If loaded using LoadAnimMesh you need to set its children's fx recursively!)


Chroma(Posted 2007) [#10]
It'll be your smoothing groups


/agree

If you're using Milkshape3d, you have to save to .ms3d, load into Unwrap3d with reweld vertices checked, then export to .b3d and smoothing groups will be intact.


Gabriel(Posted 2007) [#11]
I receive external models that have been converted to 3ds format.
And whatever smooth-group settings I use during conversion, it keeps looking like the picture on the left. Which is not acceptible.

Then stop using 3ds format. It doesn't support smoothing groups. No point blaming Blitz for not loading information which isn't in the file you're giving it ;)

If you insist on using the 3ds format, you'll have to manually break the vertices wherever you want a different smoothing group, and it might work, but it's far from ideal. Far better to just use a format that actually supports smoothing groups. B3D ideally.


Danny(Posted 2007) [#12]
Thanks everybody!

The problem is that I'm getting these models from an external source that was originally a MAYA model, and there are no resources (people) available to start cleaning up these models, do complex conversions or manually tweak or set smoothing groups, etc.

So I would have to find a solution where I can 'correct' this problem AFTER the facts. Which is far from ideal - I know but that's the reality I gotta deal with..

I agree with several of you that I should check what other formats could be delivered and how they behave in this case..

I've got plenty of experiences with smoothing groups etc using lightwave. But what I never understood from Blitz is that it tries to apply smoothing between poly's that are on the same 2D plane! A sphere or cylinder getting smoothed out makes perfect sense to me; but a flat surface that happens to be made up from multiple poly's?! I don't understand why it smooths every individual poly, instead of over the entire surface.

That's why I'm asking this question in the hope to learn something about these things senor Pinete (btw, I was talking about shading, not shadows)..

cheers,
Danny.


b32(Posted 2007) [#13]
Are the normals correct ? I think they are causing this. Maybe try Stevies MeshNormal function in this topic:
http://www.blitzbasic.com/Community/posts.php?topic=64797
It needs the mesh to be unwelded, he posted another function for that further below.


Danny(Posted 2007) [#14]
Appreciated b32! I'll check it out...


Stevie G(Posted 2007) [#15]
@ Danny - until I saw b32's post I was going to post them for you. These are the functions I use to get nice flatshading so they should work for you.

Stevie


Danny(Posted 2007) [#16]
You the man Stevie G! MeshNormals() certainly did the trick.

Thanks again,
Danny