|
theguaz, Newbie
Posted: 02 November 2013 11:41 PM Total Posts: 8
Hi everyone, i was woorking a on a demo for my work and y bumped on a thing. At the follwing scene i will eventually have more than one “hotspot” representing a feature of the product. http://www.theguaz.com/xperia/
But now i realized that i need to hide/show the hotspots along with its projected title. I thought on using a pan&tilt; angle based system for that, but finally it does not make me any sense and started looking a way to implement sort of an occlusion detection.
Is there any documented solution on the core of the libraries?
Or a way that not involves too many GPU cycles?
regards.
|
Fabrice Closier, Administrator
Posted: 03 November 2013 08:44 PM Total Posts: 1265
[ # 1 ]
You could project mouse on a plane and let it react per rects, use mouse coordinates only, indeed pan, tilt… there are many ways to do this. You need be more specific about the hotspots and when/why they should popup/be hided.
It’s more a design/concept problem than a technical one.
|
theMightyAtom, Sr. Member
Posted: 04 November 2013 08:39 AM Total Posts: 669
[ # 2 ]
I think I understand what you mean. You want the hotspot texts to be visible only when the objects are visible. Personally for this simple example I would work out the cameras rotation in the x and y planes and use that to turn them on and off from pre-calculated values.
You could also check the distance to each hotspot and only show those with less distance than the main object.
Good Luck!
|
theguaz, Newbie
Posted: 04 November 2013 11:53 AM Total Posts: 8
[ # 3 ]
Fabrice, i may not explained my scene and problem very well but i will look your solutions and see what i can obtain from them.
MightyAtom, yes you are right on the problem i need to solve, i need that my movieClip/sprite is visible only when its corresponding 3D representation or 3Dpoint-coordinate is not hidden from camera or occluded by any other object in scene.
Now looking at both answers it became clearer to me that using a cameraController may not help me because in that case the distance from the camera to my objects is always constant.
I looked at frustrums and occlusion materials, do you think that could help me to make the process a little more automatic that using precalculated angles of vision and testing to determine when the objects are not seen anymore?
best regards and thenk’s a lot to both of u.
|
Fabrice Closier, Administrator
Posted: 04 November 2013 02:05 PM Total Posts: 1265
[ # 4 ]
As said its highly depending on designs, your model alignment and the ratio aspect of your elements compared to other elements. Reading at your reply, I think a simple angle camera forward vector, asset vector test could be what you’re after. If within range, show, else hide. You could then simply build a lookup up routine, when camera is being moved or when has moved.
like for each items, if(angle cam/itemvector>itemrange and angle cam/itemvector<itemrange) show else hide.
But again, all depends what the assets are, their concept importance.
Plus combos could be made. for instance if you have an asset displaying infos for “FRONT” and one “BACK”, indeed camera pan is enough.
As a side note, if you plan release for a broad audience, I would work on the performance side. The demo as is, is very demanding on my slightly old MBP.
|
theguaz, Newbie
Posted: 04 November 2013 02:39 PM Total Posts: 8
[ # 5 ]
Thank’s for your reply, i was toying around with dof filters and that may be the reason of the poor performance u detected on your macbook, now without that performs much better, i was compilling and testing on my work’s imac and not at my personal mbPro, thanks for that.
Fortunatelly is only a proof of concept to see if i could setup a scene like that from scratch in a few hours. Later i came with the overlay message that follows a point in space based in the messiMatrix site.
I will do a few tests today and come back with some news.
|
theguaz, Newbie
Posted: 14 November 2013 01:24 AM Total Posts: 8
[ # 6 ]
Ok, by the end i did not need the culling behavior but insstead we used the Bounds object to determine where it would project the final cellphone screen at the fineal site; i will post the full case study including Lightwave files and all the rest.
P.D. i will post and i will try to keep it awesome
|