Page 1 of 1

Face Me Script

Posted: 2017-03-13, 15:31
by arfur9
Would it be possible to have a script which turns a single plane object so its front face is always in line of sight?
Sketchup has Face Me components and I believe some game engines can do the same..
also a way to scatter a load of objects would be good :)

Its very useful for grass and tree billboards

Re: Face Me Script

Posted: 2017-03-14, 11:42
by Carsten
There is no readily available solution that works out of the box, but I think that the easiest is to hack the ParticleSystemOld component in order to achieve this. It's mostly likely not even particularly difficult, but it would take a bit time to implement it. Do you have some C++ developer who can help you?

Re: Face Me Script

Posted: 2017-03-14, 13:33
by arfur9
sadly I'm not a C++ programmer or know anyone that would be interested, I managed to do some projects than I'd already done in C# converted to QT/C++ but its not that difficult if its your own code

Re: Face Me Script

Posted: 2017-03-14, 14:30
by Carsten
Ok. Well, I can look into it, it may even help a bit with the GUI issue #157.

Can you describe a bit more detailed how your grass / trees are supposed to look like? That is, how many billboards do you have, how and where are they supposed to be used, etc.? Also a few sample textures/materials would be helpful.

Re: Face Me Script

Posted: 2017-03-14, 16:12
by arfur9
In Blender the "Face Me" can be done by passing the camera rotation value to the object, obviously some values are constrained
Sketchup the 2D model in the default template is also a face me component
Its also useful if you wanted a surveillance camera follow the character

I just looked at GameGuru and that uses a more basic approach they use 2 planes at 90 degrees to each other
Something like:
https://dl.dropboxusercontent.com/u/265 ... las_ms.rar
I just quickly did that, the material isn't right

Scattering stuff at a basic level its the ability to scatter objects on a named surface and maybe randomize rotation and scale and distances between each other

I just thought it would help if you plan to do terrains, I think Unity and GameGuru just use simple planes which can be adjusted depending on the quality setting and only visible in game

Re: Face Me Script

Posted: 2017-03-15, 11:22
by Carsten
Yes, you can use the 2-planes approach. That's how the plants are made in the TechDemo map:
https://www.cafu.de/images/gallery/techdemo/pic0000.jpg
https://www.cafu.de/images/gallery/techdemo/pic0005.jpg

Same technique, but with models not in Cafu, made by others:
https://www.cafu.de/images/gallery/outd ... thrawn.jpg
https://www.cafu.de/images/gallery/outd ... tops_1.jpg
https://www.cafu.de/images/gallery/outd ... tops_2.jpg

If you can do it like that, it is surely the simplest approach that gives the quickest results (because no coding is required) any may even look better than plain billboard sprites.

(An entirely different technique, from a project that I did at university and of which I wished I had finally time to implement it in Cafu: https://www.cafu.de/gallery/ --> select "outdoor" --> the orange morning sky)

Re: Face Me Script

Posted: 2017-03-15, 12:52
by arfur9
The skies look really nice :)

Did you do the clouds?

Re: Face Me Script

Posted: 2017-03-15, 20:44
by Carsten
While I can only vouch for the sky domes that ship with Cafu, I'm quite sure that all of them were made with Terragen, http://planetside.co.uk