Jump to content

CreateSurface() vs CreatePlane()


Recommended Posts

CreatePlane() I would have to say.


Unless you want to add specific vertex positions and/or triangles for the surface with AddVertex()/AddTriangle(). Which also has been provided by Josh in the Framewerk Renderer as "CreatePatch(xsegments, zsegments)," which is used for the water plane.

Link to comment
Share on other sites

Guest Red Ocktober

I honestly don't know. Either he'll have to answer that or someone else who would know would have to.


I was going to eventually start working on water myself so I'll be curious how far you get. For now I'd use CreatePatch() and CreatePlane() for testing purposes.

Link to comment
Share on other sites

I have a decent start on it. I just can't figure out why when I scale the plane it turns black and any material I had on it doesn't show because it's all black. But it's very cool to just drag in a water plane, place it where it makes sense and have it waving. I need better water textures and probably a better shader. I'm just using the leaf sway shader.


The cool thing about this is that you can have multiples of these at any height and any size. So I could have puddles even if I wanted to. Plus give that freedom I can make a weather object and link all the puddles/body of waters to the weather object so when it's "raining" it can move the plane up to a certain level to simulate the water rising and when it's dry move it down a certain level over a given interval to simulate drying up.

Link to comment
Share on other sites

  • 3 weeks later...
Guest Red Ocktober

i'm also on the quest for ocean waves....


i've got a patch created, but can't seem to scale it past what it was originally set to...


this is what i'm doing...


Local patch:TEntity=fw.Renderer.CreatePatch(22,22)

PositionEntity patch,[0.0,-1.0,2.0]


PaintEntity patch,material




question - does createpatch(22,22) create a surface with 22 x 22 vertices?






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.

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.


  • Create New...