odd triangle problems... never had them before

Blitz3D Forums/Blitz3D Beginners Area/odd triangle problems... never had them before

Nate the Great(Posted 2009) [#1]
im not sure if its my graphics card or what but when I have triangles on an untextured mesh it makes single triangles stand out for no reason... does anyone know how to solve this or what is happening? it is an incomplete and untextured truck model but that doesnt matter.



do you see the darkened triangle on the place where the back window of the truck should be? thats my problem because a lot of the triangles do that from different angles and it really looks bad


SLotman(Posted 2009) [#2]
Thatīs a problem in your model, nothing to do with code or the engine used, even less with your graphics card.

Try using something like "smooth normals" on your 3D application, it can reduce the problem. But the way it was modeled is the cause.


Nate the Great(Posted 2009) [#3]
oh ok... it was modeled in blender which has countless bugs and/or general confusion of how it works

edit

now it looks like there are random spotlites on it... not what I wanted... I never really liked blender any ways... maybe I should try 3dsmax or something similar


KillerX(Posted 2009) [#4]
Try remapping the texture coordinates.


Nate the Great(Posted 2009) [#5]
oh that might be the problem... there are no texture coordinates!


Drak(Posted 2009) [#6]
It looks worse than it is solely because it's all "model grey". Give it a texture or color and it shouldn't be as noticeable. I think it shows up worse on untextured models because all faces are the exact same color, so the way light affects it will be more noticeable.


Stevie G(Posted 2009) [#7]
Are you using updatenormals on the model?


Naughty Alien(Posted 2009) [#8]
..that might be bad triangulation or some of the vertices sharing same space..I had that few times when i received geometry from artists and i had to clear it up manually..every time i had that was problem with vertices..


GfK(Posted 2009) [#9]
You can enable flatshading which IIRC is a parameter of EntityFX (flag 4)?


Ross C(Posted 2009) [#10]
It looks like an unwelded vertex problem. But on closer inspection it looks like the back panel of the cab is welded to the side of the truck on both sides. And the corners of the backpanel triangles are not welded together. If they were. you'd get a smooth transition of light. Mail me the model and i'll sort it for you if you wish?


Nate the Great(Posted 2009) [#11]
Mail me the model and i'll sort it for you if you wish?


ok ross c thank you!

sorry since I made it in blender it seems to have many inverted polygons :p could you fix this as well? thank you very much ross c!


Ross C(Posted 2009) [#12]
Yeah, sure email me the model and i'll see what i can do.


Nate the Great(Posted 2009) [#13]
ok I sent it


big10p(Posted 2009) [#14]
I think the main problem here is that B3D uses smooth shading by default - attempting to smooth the light across the surface of each triangle. Sounds like what you want for the truck is flat shading. As Gfk says, B3D does have a flag to set flat shading, the downside being it's faked and doesnt work properly and generally looks awful. To get a proper flat shaded look you'll need to re-model the truck so that each flat surface is unwelded, and set it's normals to be surface normals.


Pongo(Posted 2009) [#15]
I always do this in my 3d programs so that things are exported properly, but if you want a Blitz solution, try this code from the code archives.

http://www.blitzbasic.com/codearcs/codearcs.php?code=273

I just tested it and it works fine.


Ross C(Posted 2009) [#16]
Ok, i've looked at it. The mesh has been built rather strangely, and has a few overlapping polygons. Your problem with the back of the cab is your using 3 triangles. 2 large ones and a very thin on down the diaganol middle. This triangle is taking most of the gradient shading of the light so it looks like there is a shading or normal problem.

I have fixed the triangle that do not attach to vertices too. Try and avoid triangles that run past a vertex.

I have emailed you the model back in .x and .b3d format. I couldn't convert it to .3ds at work :o)


Nate the Great(Posted 2009) [#17]
@Ross C ok thank you very much... sorry for my bad modeling skills but im new to blender and I dont have 3ds max in front of me right now. thanks again


Ross C(Posted 2009) [#18]
It's ok man :o) I used fragmotion to clean that up. Just make sure all your triangles join up to the surrounding vertices :o)