You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
The same obj file, it display perfect in Deep Exploration, but not correct in Irrlicht, I don't know what's the reason, someone can give me some advice? thanks.
In Deep Exploration
In Irrlicht
In Irrlicht by set material to EMT_TRANSPARENT_ALPHA_CHANNEL [/img]
yeah thats bc the meshbuffer of the books is drawn before the shelve...
u should not set material emt_transparent on the whole object.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
The chariot seems to lack back faces. Sinc .obj does not handle backface culling, you'll have holes instead of faces on the inside. You can disable backface culling on your mesh, which should help already. However, there seems to be some transparent materil on the chariot as well, which does not look correct. Don't know what would be intended and why it uses transparency at all, maybe some wrong material assignment?
I couldn't reproduce the problem with the drink glasses.
I personally find that forcing ZWriteEnable does help in these cases.
You'll have to get the scene parameters using ISceneManager::getParameters(), and then set the Allow Z Write Enable on Transparent setting to true.
The issue with this is that you have to manually set this on all transparent materials that need to disable ZWrite to false.
What sudi was trying to say is that you should split the mesh into seperate meshbuffers, the transparent parts and solid parts, and this should save you a lot of trouble. You may still need to enable ZWrite in certain situations though.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
I've disabled backculling, the chariot looks correct now, but the transparent effect is not good as I expect.
I need to get a similar render effect like Deep Exploration, but I donnot konw how to adjust irrlicht, I hope someone can give me some advices about this.
Thanks for your reply, but disable ZWite doesnot work.
It's a obj file, I want to iterate all the children nodes but found it has no children nodes, do you have another method to split the mesh except using getChildren() method?
BlindSide wrote:I personally find that forcing ZWriteEnable does help in these cases.
You'll have to get the scene parameters using ISceneManager::getParameters(), and then set the Allow Z Write Enable on Transparent setting to true.
The issue with this is that you have to manually set this on all transparent materials that need to disable ZWrite to false.
What sudi was trying to say is that you should split the mesh into seperate meshbuffers, the transparent parts and solid parts, and this should save you a lot of trouble. You may still need to enable ZWrite in certain situations though.
na i meant that when the mesh is loaded their is a meshbuffer for every material. But when u use setMaterialType with the scenenode all meshbuffers use the same material. that is not good when the material is not transparent.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
The material difference is due to your bump mapping. Try to remove the bump settings in the material file. This should come in a later step, as there's currently no way to get a proper bumpmap import with the values you set in oyur modelling tool. Some values are simply fixed to a value which might be improper for the current mesh.
The glass seems to have a high specular value with very low shininess, such that the brightness is far too high. Try to set shininess to 0 (to disable it for now). Also make sure that you set normalize_normals when scaling your mesh, because all lighting equations depend on proper normals.
Thanks for your reply, but disable ZWite doesnot work.
I just tried it and it helps (Btw I said to enable ZWrite, not disable...), see the difference (With all materials set to EMT_TRANSPARENT_ALPHA_CHANNEL):
The important thing to notice is that the books are not incorrectly behind the cabinet wood, and the cabinet glass is correctly behind the cabinet wood.
Try to use a SOLID material for the bull, this will render this one first, and hence get the correct impression. Using a transparent material on things which are not using any transparent effect will only slow down the rendering.
Hybrid, thanks you for your help, but the render quality is more important than speed for me in this project.
All the objects displayed in screen is one whole model, I donnot know how to change the bull's material separately. My project is a 3D Viewer, this means I cannot modify the model.
I wanted using ISceneNode's getChildren method to get the childs nodes, but I found this model has no child.
hybrid wrote:Try to use a SOLID material for the bull, this will render this one first, and hence get the correct impression. Using a transparent material on things which are not using any transparent effect will only slow down the rendering.