3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: 1 [2]

Author Topic: backface culling  (Read 4203 times)

« Reply #15 on: September 28, 2009, 03:28:06 PM »
looking at the first picture, I think the use of imposters and LOD (level of detail) would greatly improve the performance. if you use a single skinmesh for all the vegetation those palm far away in the background gonna have a very unnecesary high level of detail that will punish with an iron fist  :P your framerate.

i would use imposters and level of detail, because those far far away palms, in my opinion, could even be billboards and no body would notice... and you could use the extra polys for other things.
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!
« Reply #16 on: September 29, 2009, 03:22:03 AM »
Transparency sorting is actually already supported. You can find the details in the Skinmesh object help file (see 'Depth sorting' section).

This however, as it happens in all engines out there except a few very expesive ones, is only supported 'per-object' and not for individual triangles within a single mesh (eg one single SkinMesh).

Transparency sorting is more complex than it seems at a first look, but 3D Rad provides all the tools you need to minimize preoblems related to it, as long as you understand how rendering in a real-time enviroment happens. A good document about it is here. Note it is for OpenGL, but it does apply to DirectX (which 3D Rad uses) as well.

For a tree-related transparency discussion, please see also

http://www.3drad.com/forum/index.php?topic=1123.0

« Reply #17 on: September 29, 2009, 06:59:13 AM »
No need to apologize SUNCHIRP  :)

As for doubleface rendering, it could be a new option for the Skinmesh object.

Still keep in mind that the usual way to deal with this is simply duplicating the polygons for your mesh, only where you need two-face rendering. The drawback of a new option for this is that it would force you to use two different Skinmesh for an object that requires two-face redenring for some polygons only, in order to avoid processing a lot of triangles that will never be rendered anyway (eg the inner side of a tree trunk).
« Reply #18 on: September 29, 2009, 09:11:24 AM »
Crossed polygons are the unsolvable transparency case unfortunately. There si no way properly set a priority for them because both may be in fron and behind the other at the same time.

Avoiding crossing polygons may not help a lot though anyway, if they belong to the same mesh and you can't find a z-buffer based solution (see links bove) because per-polygon sorting isn't supported nor practical to implement unfortunately, as mentioned above.
« Reply #19 on: September 29, 2009, 10:15:48 AM »
I tried to explain it above, but that's not easy, sorry  :-\

All engines that are based on z-buffer rendering have this problem. It's not just 3D Rad.

Solutions exist in 3D Rad, but require that you make your models with the limitations I mentioned above in mind. Using the 'no-zbuffer' option in the SkinMesh property dialog usually helps, even for single meshes with overlapping transparent surfaces that cannot be solved witht the 'Depth sorting' option alone.
« Reply #20 on: September 30, 2009, 07:08:48 AM »
I would suggest a demo scene that shows how to use the correct drawing order?
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #21 on: September 30, 2009, 07:44:59 AM »
You can also solve this in 3D RAD, just use 4 sprites instead of 2. Cut your two sprites in halves. Then 3D RAD should sort them correctly.
« Reply #22 on: September 30, 2009, 09:39:15 AM »
Quote
just use 4 sprites instead of 2
it works... I didnt think it would work, but it does! yeah, it doubles the polycount :( but the texture can be cut by half so maybe you can save there. not the ideal solution, of course, but.. well, what the hell!  :P

btw, I totally support your suggestion about vertex colours, that would really rule -sooo much!- to shadows and lights!
« Last Edit: September 30, 2009, 09:45:09 AM by loop »
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!
« Reply #23 on: September 30, 2009, 10:12:14 AM »
well, looking at the optimist side  :P if your plant have large leaves, then half texture would square so if the texture for the large  :P plant that before you would need 512x256 now can be 256x256.

recently I saw a topic talking about -and later experiment it- a problem with sprites, that get redimensioned to a square size, so I dont think 3DRad works differently. about DDS, I think there are different modes to save the images, and if I recall correctly some modes support not square size, but the resultant files are far heavier than the square ones.

-----------------------------
this is what I did:
created a box and deleted the 4 faces so I get 2 oposites planes. textured it and save as .x file. then, in 3DRad, import it as skinmesh and cloned it 4 times, so then I got the "X" form for the plant. I have 4 skinmeshes for the "X" form, my x.file (each skinmesh) is just one side, "|", not and "X". pretty laborious  :P
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!
« Reply #24 on: September 30, 2009, 11:00:28 AM »
Weird!! I dont know what to say, because as I see it... it works from every possible angle.
Im attaching my project and the skinmesh, try it yourself.
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!
« Reply #25 on: September 30, 2009, 11:12:58 AM »
I would definitely like to see this addressed more thoroughly in the future, as well as vertex colours, and an ability to render double sided or not.

Vertex colors will be possible when we have a way to create new shaders (at 3drad user level). This will be on the donation board soon.

As for transaprency sorting, it isn't a matter of rewriting the rendering engine unfortunately. It is a problem related to the way z-buffer based rendering works at hardware level. There is no easy solution. However you can always find workarounds or tricks to minimize it, like the default trees case or the suggestion by loop.

Pages: 1 [2]