Hello, I would like to know if anyone know a way to send specification to the Shader about how to react to certain vertex group. I m actually using Tessellation and Vertex Displacement on a single Texture but the roof as to act differently if i want it to merge correctly with the rest of the model.
I know that i could make a specialize Shader with pre define Vertex Coord Condition but i would like to be able to tell the Vertex what to do for more flexibility with the same shader.
Yea I understand that it s hard to know what i m trying to do.
You see I m Tessellating all my building in my game and since it s a builder game, I need to add a roof. But i would like that roof to be part of the same material for each building to make the game Lighter. At the moment i am Displacing the Z axis of each building face and I would like to make an exception for the Roof so the border would displace in x,y instead(Yea my coord are messed up since i used the Basic Quad class and did a rotation )
So at the moment all my wall displace just fine, but the roof would only displace on one side.
So my question is, Can i assign a special VertexBuffer and how could I get the Bufffer data in the .vert Shader if possible?
Also if you want the Shader i made to be add as OpenSource in the engine i don’t mind, People may want to do some Tessellation Quick on basic Surface like road, I Also have a Bezier base RoadMesh Generator which build road from a List of 4 vector(start, Control Point 1, Control Point 2,end) with no Stretching and easy to resize. It support Tessellation and no Tessellation. Also it generate a Single Model.
So if you guys think it could be nice to have this kind of Shader/Custom Mesh let me know
Unfortunately, JME doesn’t allow custom vertex buffers, so you’ll have to use an existing one. Can feel a bit of a hack but you don’t have any choice.
I suggest you use one of the TexCoord (not the first one though :p). For example if you use the TexCoord3, and set it as a 3 float component you’ll be able to use in your vertex shader
oh yea, the start and end point, I don’t know if i got this fix yet. Maybe i fix it while fixing the curve low distance… Btw Height is Road segment length, Width is how large the road is. Smaller length and larger width give better result in road precision. also you can add hole in the path and use a HeightMap to lift the road and keep the hole lower :P, I don’t think physic will apply correctly although
Mine support the Lighting, but not the shadows, I don’t know if it was only adding the Material code or more so i left it on the side. You could probably still try to add a shadow and test the Tessellation Shader to see for your self
Or i could also just add shadow to my own building… lol
Sorry, im not really on top of all the words for textures/material things.
I just gave this a quick Unshaded.j3md to get it work and show up.
I won’t be able to test the tessellation shader or the shadows until about 8 hours from now, but it looks like the j3md file contains the shadow fields but the .vert or the .frag don’t.