L B Posted January 19, 2012 Share Posted January 19, 2012 I'm going to try generating ivy in Leadwerks, in real-time. The beauty of IV comes from its individual leaves, so I'm asking for some optimisation tips. Here is a beautiful ivy renderer: http://graphics.uni-.../ivy_generator/ Obviously this is not RT. I'm thinking I can harvest the power of Leadwerks instancing to achieve the result. 1 triangle per leaf is possible (with the right UV setup). The problem might be the massive amount of entities. How do you suggest I do that? Of course I can use billboards in the distance, but again, the entity count will be high. Perhaps I should avoid entites, but I don't know how. I don't need tips on the actual generation algorithms, I'm getting pretty good at this. Just on the performance aspect. EDIT: Actually, it's open-source, so I might just port it to Leadwerks. It's even allowed for commercial projects. Quote Link to comment Share on other sites More sharing options...
L B Posted January 19, 2012 Author Share Posted January 19, 2012 I think I'll use the usual Sponza model for testing (usually used in GI algorithms tests): The results could try reproducing this image: For the branch, I could use OpenGL to draw 3D lines instead of polygons - think it's a good idea? Quote Link to comment Share on other sites More sharing options...
DaDonik Posted January 19, 2012 Share Posted January 19, 2012 My guess performance wise would be to generate a bigger portion of a vine as a single mesh. You can easily create an empty mesh with LE and then add surfaces to it, as your vine grows. That way a generated vine would be just one entity which will make it much faster to render. I can't comment on the OpenGL 3D line, as i never used OpenGL 3D commands directly. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
L B Posted January 19, 2012 Author Share Posted January 19, 2012 My guess performance wise would be to generate a bigger portion of a vine as a single mesh. You can easily create an empty mesh with LE and then add surfaces to it, as your vine grows. That way a generated vine would be just one entity which will make it much faster to render. I can't comment on the OpenGL 3D line, as i never used OpenGL 3D commands directly. I'm afraid what what we gain by decreasing the entity-count, we lose by not using the same 1-polygon mesh instanced multiple times (which Josh keeps saying is as fast as it gets). I'd be curious to know what Mr. thinks of this. Quote Link to comment Share on other sites More sharing options...
L B Posted January 19, 2012 Author Share Posted January 19, 2012 I get around 45KT initially for a small vine. This might be -15KT for the roots, /2 for the 1poly/leaf, so ~15KT for a small vine. Definitely not viable if we want to have a diversity of vines. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 19, 2012 Share Posted January 19, 2012 You could make a couple different branch models that are very low poly and are smaller segments. Load one instance of each in as your base models. Maybe give them bones at their ends. Store them in a list and when you add a new segment (the vine grows) you place the bone on the new one at the bone of the one in list next to it. Some of the models would have bends in it so the bones give a nice position marker to connect them. I guess instead of a list you could use a tree structure to branch things off. You could also add leave bones also and have a leaf model that you randomly place on each segment. This would give you instancing benefits anyway. So now all you have to do is place a starting place for it to grow and it will. It won't be a smooth growing but it'll grow segment by segment which if there are enough leaves I'm guessing people won't notice all that much as it's more background than anything. It's one of those things you notice once enough have grown but not notice as it's doing it. The next trick would be to get it to hug other objects, like the wall in your picture. Just thinking outloud here to maybe help keep the ideas coming. Quote Link to comment Share on other sites More sharing options...
L B Posted January 19, 2012 Author Share Posted January 19, 2012 The generation code is already provided. I'm just wondering how to make the display of the ivy possible in real-time. P. S. : I don't think you get benefits of instancing with bones. The main reason is that entities will geometrically differ. On static entities, LE sends the matrix information to the GPU instead of the poly information, which is why we get instancing benefits (I think). Again, if Josh could enlighten us... Quote Link to comment Share on other sites More sharing options...
L B Posted January 20, 2012 Author Share Posted January 20, 2012 Interesting part at 23 seconds: Vine is probably arranged in bunches, which seems to be enough precision for games. Perhaps this is the way to go. Quote Link to comment Share on other sites More sharing options...
tournamentdan Posted January 21, 2012 Share Posted January 21, 2012 Unreal engine 3 supports tessellation. I am guessing thats how it is done in that video and most likely the only way to get exactly what you want. Quote Link to comment Share on other sites More sharing options...
flachdrache Posted January 21, 2012 Share Posted January 21, 2012 Great that we all struggle with the same ideas - i got an generator for this, which grows the ivy on the objModel[part] ... i then put it in zBrush, reTopologise the roots of evil and project that on the new(lowpoly)mesh which then should ouput the normalmaps too ... there was an topic @doom3world some years ago in which this was discussed too. Iam bound to something else, atm, again but the fun part might be how to light that this with deferred rendering (backside & halftransparency). Quote AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3 zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5 Xxploration FPS in progress ... Link to comment Share on other sites More sharing options...
L B Posted January 21, 2012 Author Share Posted January 21, 2012 Unreal engine 3 supports tessellation. I am guessing thats how it is done in that video and most likely the only way to get exactly what you want. Tesselation is also the only way to calculate the velocity of an african swallow, as well as finding God and the true meaning of life. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 21, 2012 Share Posted January 21, 2012 Unreal engine 3 supports tessellation. I am guessing thats how it is done in that video and most likely the only way to get exactly what you want. Tessellation only subdivides quads, and won't help here. Think of it as really good parallax mapping. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tournamentdan Posted January 21, 2012 Share Posted January 21, 2012 Tessellation only subdivides quads, and won't help here. Think of it as really good parallax mapping. Actually it will help here. Because you would not use the single plane for each leaf. You would create a whole mesh for the ivy and use a displacement map and then control the amount of tessellation from the distance of the camera. Take a look at this video. Instead of the stone path, imagine what it could look like if it was ivy. @ Lazlo Well thats great. All you have to do now is find God and you will be able to have ivy in a scene. Or maybe it was a African swallow that knows the true meaning of life. One or the other should be suffice Quote Link to comment Share on other sites More sharing options...
Josh Posted January 21, 2012 Share Posted January 21, 2012 I have programmed tessellation shaders exactly like what you posted, and I don't think it would be useful for this. You're not going to get complex arbitrary 3D detail out of them, just displacement of a surface. With ivy like this, you will have many leaves on top of one another. Of course you can argue that tessellation will make it possible to use many planes with displacement, but that's more a matter of looking for an excuse to use it, rather than it really being an appropriate tool. You could use a tessellation shader on a surface like this, but it's not going to improve the appearance really. It tends to work best for big chunky details like rocks and bricks. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tournamentdan Posted January 22, 2012 Share Posted January 22, 2012 I have programmed tessellation shaders exactly like what you posted, and I don't think it would be useful for this. You're not going to get complex arbitrary 3D detail out of them Here is an example of complex arbitrary 3D detail done with tessellation on the fly. It starts at 1:30 Edit: I know that thay do not mention it but they are also tessellating the terrain. I think we have had that conversation before. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 22, 2012 Share Posted January 22, 2012 The spikes are coming straight out of the surface. It's exactly what I was saying. They put a lot of effort into the artwork to make it look nice, but you can't have layers over layers of geometry. They're also confusing it with animation and texture writing to make a nicer demo. You can even do offsets along the X/Y axes, but demos like the one above strike me as a solution looking for a problem. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Scott Richmond Posted January 22, 2012 Share Posted January 22, 2012 You should be able to get decent performance with instancing. You'll just need to make sure you disable/group occlusion culling as it'll take up a lot of time, more than it would to just render. Quote Programmer, Modeller Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64 Visual Studio 2008 | Photoshop CS3 | Maya 2009 Website: http://srichnet.info Link to comment Share on other sites More sharing options...
tournamentdan Posted January 22, 2012 Share Posted January 22, 2012 Ok, so maybe the stone path video was not a good example about what I am talking about. It is only confusing you more. I am not talking about using single planes like you would model leaves for a tree. I am also not talking about placing a displacement map on a flat surface or terrain and have it magically create the multiple layers of ivy leave and vines you have mentioned. I guess what I am trying to say a modeler would make some three dimensional ivy leaves and vines. Then uv unwrap them and place a displacement map on them. You would only have to model a few and then you could place them together quickly creating the patterns that you need. I know it would create a lot more polys but with tessellation and good occlusion culling it should be good enough to render fast enough. Quote Link to comment Share on other sites More sharing options...
tournamentdan Posted January 22, 2012 Share Posted January 22, 2012 Ok. I changed my mind. I can do that right? I now think that it is a better idea to tessellate multiple planes. Instead of creating a single plane for each leaf. Make a larger plane with 8,9, or 10 leaves on it. Then with the displacement map make the leaves higher in the middle than the leaves on the edges. Then make another plane doing the opposite(higher on the outside). And now you can overlap the planes a little so that when the ivy tessellates it will create multiple levels of leaves. So when the camera is far away you will have large planes,and when the camera gets close you can have singular leaves with multiple levels. Quote Link to comment Share on other sites More sharing options...
L B Posted January 22, 2012 Author Share Posted January 22, 2012 This video still is the only interesting use I've seen of tesselation, but I won't be going down that path. I'll try grouping ivy models in patches of ~2K-5K triangles, then instance these. Quote Link to comment Share on other sites More sharing options...
Michael Betke Posted January 22, 2012 Share Posted January 22, 2012 Nice topic, I used the Ivy stuff all few years again. Lately in 2009 in a real-time project: I had to do this small Ivy groings there which I did with the GW Ivy plugin: http://guruware.at/main/ivy/index.html Its the same like you use but integrated into 3dsmax. I also had to do a large fencing with grown ivy. Around 500m long. I solved it in two parts: A: Grow the ivy on my object (the transforamtor house as a unique object or at one fence which I used later modular) B: Bake the wood/roots to a texture. They are the most highpoly elements. I used the planes without modification. C: Now I had my baked root texture and my leaf planes which I used as a main model in realtime. D: For Lod1 I baked the original grown Ivy to a texture which switched in a certain distance. Like a Ivy-Billboard of the complete plant. For me it worked very well for the project. You can fine tune the leaves if you dupicate or delete some of them and use different material-ids. Quote Pure3d Visualizations Germany - digital essences AAA 3D Model Shop specialized on nature and environments Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.