Gandi Posted May 18, 2010 Share Posted May 18, 2010 I spent the last day on creating a terrain-decal script for the LE Editor. the benefits of my system are: the density of vertices is depending on the scale of the terrain. So if the terrain has scale of 2meters my decal also got a scale of 2 meters. the vertices are updated on the cpu, but only if they are being manipulated. so after placing the decal no more computations are needed for it. FPS decrease when manipulating a big decal, but if you dont move/scale/rotate it theres no change of frames. Some Questions: How can i archieve, that when clicking on the decal it selects the decal, just like the road? €: Posted my code in the download section Please report any bugs to me. have fun Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted May 18, 2010 Share Posted May 18, 2010 That looks really cool Gandi ... nice work! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
wailingmonkey Posted May 19, 2010 Share Posted May 19, 2010 ↑ .....what he said! are you able to allow the decal to traverse(project) over multiple objects and the terrain at the same time? Quote Vista Ultimate SP1 64bit | Q6600 2.40 GHZ | 8GB RAM | 320MB Nvidia 8800GTS Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted May 19, 2010 Share Posted May 19, 2010 Wow this looks wonderful! will you be sharing this with the community? Quote Link to comment Share on other sites More sharing options...
Gandi Posted May 19, 2010 Author Share Posted May 19, 2010 ↑ .....what he said! are you able to allow the decal to traverse(project) over multiple objects and the terrain at the same time? This system is only meht to be used for terrain and the terrain also shouldnt be changed at runtime. you can apply it to objects because: the density of the mesh fits exactly to the terrain, so wont cover objects right the mesh takes the height values from the terrain for setting the vertex-positions. I will share the code when i get the selection to work. Quote Link to comment Share on other sites More sharing options...
wailingmonkey Posted May 19, 2010 Share Posted May 19, 2010 thanks for the extra info, Gandi ... looks to be quite a handy addition/option. Quote Vista Ultimate SP1 64bit | Q6600 2.40 GHZ | 8GB RAM | 320MB Nvidia 8800GTS Link to comment Share on other sites More sharing options...
fuego Posted May 28, 2010 Share Posted May 28, 2010 Please add me to your list of people who can't wait for you to share this code Quote Link to comment Share on other sites More sharing options...
ConradAlistair Posted May 28, 2010 Share Posted May 28, 2010 this would be really helpful Quote Link to comment Share on other sites More sharing options...
ESP Posted May 28, 2010 Share Posted May 28, 2010 Me too, this is just what I need. Robin Quote Programmer , Intel Quad core, NVIDIA GeForce GT 220, Windows 7 Pro, Galaxy Tab 2 ( 7" and 10"), LE2,LE3,3DWS Link to comment Share on other sites More sharing options...
cocopino Posted May 29, 2010 Share Posted May 29, 2010 Wow! Nice work! Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted May 30, 2010 Share Posted May 30, 2010 I know I already mentioned this two weeks ago, but... will you be sharing this with the community? Quote Link to comment Share on other sites More sharing options...
cocopino Posted May 30, 2010 Share Posted May 30, 2010 I know I already mentioned this two weeks ago, but... will you be sharing this with the community? + 1 Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
franck22000 Posted May 31, 2010 Share Posted May 31, 2010 Some Questions:How can i archieve, that when clicking on the decal it selects the decal, just like the road? I will share the code when i get the selection to work. This man need some help before Quote You guys are going to be the death of me. Josh Link to comment Share on other sites More sharing options...
cocopino Posted May 31, 2010 Share Posted May 31, 2010 "Some Questions: How can i archieve, that when clicking on the decal it selects the decal, just like the road? " That is indeed strange, it looks like you can select it from the righthand-menu, right? What happens when you make the decal "stick out" a little bit more from the terrain, like: TerrainHeight + [value]? Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
macklebee Posted May 31, 2010 Share Posted May 31, 2010 I think its going to depend on how he created the decal on whether clicking on it will make it selectable. Another method shown in the forum, used a premade plane model and that would have made the decal selectable. I assume gandi is making his decal via lua code inside an object script, so I don't think it will react when selected. Perhaps if 2.32 still had the ability to group entities together it would work? In any case gandi, this looks great. nice work as always! Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cocopino Posted May 31, 2010 Share Posted May 31, 2010 I think its going to depend on how he created the decal on whether clicking on it will make it selectable. Another method shown in the forum, used a premade plane model and that would have made the decal selectable. I assume gandi is making his decal via lua code inside an object script, so I don't think it will react when selected. That's what I thought too at first (at least that's the way I would tackle this problem), but then, how is he scaling and rotating the mesh(es) in the video? Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
macklebee Posted May 31, 2010 Share Posted May 31, 2010 That's what I thought too at first (at least that's the way I would tackle this problem), but then, how is he scaling and rotating the mesh(es) in the video? assuming he is creating the decal plane in code, I guess he is just taking the rotation and scale of the dummy mesh that he is selecting and copying those values to the decal plane... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gandi Posted May 31, 2010 Author Share Posted May 31, 2010 yes you are right macklebee and the reason i dont just create the surface on the same mesh as the model is is, that i dont move the vertices everytime i move the mesh, and im calculating the rotation/scale on my update code instead of really rotating the mesh.. Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 31, 2010 Share Posted May 31, 2010 are you by chance still using 2.31? if so, try using the Group commands and see if that helps... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cocopino Posted May 31, 2010 Share Posted May 31, 2010 "assuming he is creating the decal plane in code, I guess he is just taking the rotation and scale of the dummy mesh that he is selecting and copying those values to the decal plane... " "yes you are right macklebee" Doesn't that mean that you CAN select the dummy mesh? If so, can't you make the dummy mesh a bit bigger to make it selectable? I think the group command is for hiding/showing groups of meshes but not to actually group them together as one mesh (not sure though) Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
macklebee Posted May 31, 2010 Share Posted May 31, 2010 "assuming he is creating the decal plane in code, I guess he is just taking the rotation and scale of the dummy mesh that he is selecting and copying those values to the decal plane... " "yes you are right macklebee" Doesn't that mean that you CAN select the dummy mesh? If so, can't you make the dummy mesh a bit bigger to make it selectable? I think the group command is for hiding/showing groups of meshes but not to actually group them together as one mesh (not sure though) The dummy mesh that I am referring to is the invisible mesh like what the lights and emitters use. Its just a small sphere so you have something to select in the editor with the mouse. He is taking the rotation and scale of this mesh and applying them to the decal plane that he created in code. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cocopino Posted May 31, 2010 Share Posted May 31, 2010 Yes, I understand, but it doesn't matter what the dummy mesh is, so why not make the dummy mesh an invisible box (for instance) and make that box as large as your decal, making sure that some part of the box is always sticking out of the terrain to make it selectable? Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
macklebee Posted May 31, 2010 Share Posted May 31, 2010 that could work... it would mess up picks but it would work... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
cocopino Posted May 31, 2010 Share Posted May 31, 2010 Yes, for a large decal, especially on very slopey (is this a word?) terrain this would not be ideal for picks... Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
macklebee Posted May 31, 2010 Share Posted May 31, 2010 i personally think it would useable as it is right now since you could always just select it from the asset list on the rightside of the editor if you needed to move/rotate/scale it... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel 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.