Jump to content

Ivy


L B
 Share

Recommended Posts

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.

Link to comment
Share on other sites

I think I'll use the usual Sponza model for testing (usually used in GI algorithms tests):

Sponza00GI.jpg

 

The results could try reproducing this image:

Alejandro_Ruano_01.jpg

 

For the branch, I could use OpenGL to draw 3D lines instead of polygons - think it's a good idea?

Link to comment
Share on other sites

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.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

Great that we all struggle with the same ideas rolleyes.gif - 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).

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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

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

Link to comment
Share on other sites

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.

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

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.

Link to comment
Share on other sites

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.

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

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.

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

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Nice topic, I used the Ivy stuff all few years again. ;)

Lately in 2009 in a real-time project:

 

transformator.jpg

 

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. :)

Pure3d Visualizations Germany - digital essences

AAA 3D Model Shop specialized on nature and environments

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...