Hello!
i create game with isometric view(like diablo game).
i were thinking a lot about buildings/elements and character hidden by them.
I plan to make multifloor buildings as objects(not a new map where character enter). it is needed for gameplay we designed.
but the problem is with hidden character inside buildings, so i need idea how to solve it
let’s take an old fallout game:
http://i.imgur.com/a0Vx0.jpg
here is a solution to hide pixels that hide character
how to make openGL hide portion of objects? or maybe JME have something like this?
certainly it is idea, but too hard to implement IMO.
i think there is better idea.
I rather think to mix 2 viewPorts… but dont know how to clean certain pixels.
You are going to need more intelligence anyway to make it look good. You don’t just want to display your character alone in front of the wall, you need to fade out an area of the wall around the character.
You know where your “important” characters are…and you know where your camera is.
One option would be to run through all the objects in between your camera and the characters and adjust transparency accordingly?
you could always go for the sims approach.
and just do a model swap.
Could this help you?
Advanced Clipping Techniques
I looked over this and wanted to implement this into one of my game projects this would allow the player to look into an object without actually deforming the objects mesh. Like if you used something like.
Marching cubes
I have also looked at this but it seems like this would be harder to implement.
yeah, i think it’s the best way to do it.
there is also a problem with detection what model to swap/hide, becouse i dont have GRID system like sims have.
but i will make it this way, becouse i see no other way.
thanks for help!
@oxplay2 said:
yeah, i think it's the best way to do it.
there is also a problem with detection what model to swap/hide, becouse i dont have GRID system like sims have.
but i will make it this way, becouse i see no other way.
thanks for help!
That shouldn't matter if bolth meshes have the sam oredgional origen scale and rotation.
I would look into depth rendering and using a SceneProcessor to transparency-mask anything in front of your target object. Depending on distance from target, you could adjust the alpha settings (i.e. the further away the objects are from the target object, the more transparent they become).
I guess I should also mention… this thought was off the top of my head… I haven’t looked into whether or not a Scene Processor is the appropriate way of doing this.
I would look into depth rendering and using a SceneProcessor to transparency-mask anything in front of your target object. Depending on distance from target, you could adjust the alpha settings (i.e. the further away the objects are from the target object, the more transparent they become).
I guess I should also mention… this thought was off the top of my head… I haven’t looked into whether or not a Scene Processor is the appropriate way of doing this.
i dont know if i understand you and zarch correctly.
you have idea to make Objects(that one between camera and player) to become transparent?
if i good understand i think it will look ugly when i will have buildings created from smaller Objects, then there would be visible "seams" or spaces between this small Objects.
Yeah, any depth-based solution I thought of required that the scene get rendered twice… so I didn’t say anything.
A custom shader might be able to do this as well.
Use the shader for all your objects, then have it check the angle between screen, and the VIP…the closer to the line you are then the more transparent you go.
That would have one huge disadvantage though…making every object in the scene potentially transparent would be bad for performance… so you would still need a step first to determine what stuff is potentially transparent.
i watched diablo 3 solution(even if they dont have multiplatform buildings), and it seem they set a bounding Volume for room, so if character go into that volume, then specyfic elements become hidden.
so its similar to sims solution.
i think i will need to build a separate system for buildings where need to set Levels(and boundings for them) + what to hide per level + hide upper levels.
In the long run it will save you more time to write an algorithm to work out what to hide than it will be having to specify for every room what to show/hide.
true, even Server won’t need to send data to client about specified of items.
but how to, when there can be “really” custom shapes of buildings.
maybe just make floor as interactive, so when character is on floor then algoritm check what objects are walls and are inner this floor bound, so then hide them.
For what it’s worth… here is the “render multiple layers” approach that basically has no artistic interaction with your scene… at a high level:
render the scene clipped to a Z aligned with the character
render the character
render a circle around the character at a really near Z
then render the whole scene again
You can get fancier with how you render that second pass if you want to feather the edges or stuff and there are a few approaches to that of varying complexity. zarch’s idea of a custom shader might be the easiest though it should be possible to have a post filter that pulls from the first render pass and then you don’t even need the near Z circle rendered.