Dolphin, the GameCube and Wii emulator - Forums

Full Version: displacement maps, subdivision surfaces?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

snk_kid

I've read that one of the dolphin graphics plug-ins has some initial support for texture replacement so I wanted to throw out an (obvious) idea I had recently, I've posted my thoughts/questions on here so please have read and let me know what you guys think.
It's feasible but a shitload of work. It could be done but I doubt it would ever happen.
Can't this cause inaccuracy/glitches ingame? Or are hitboxes independent of polygons?

Anyway I don't see this happening in many years...
(08-22-2010, 04:24 AM)NaturalViolence Wrote: [ -> ]* We know which textures are applied to which meshes.
No, we don't. We can just distinguish the textures from each other, and identify a specific texture with a hash code. This allows us to replace the texture with a hi-res one, for example. Replacing textures just works because the mesh doesn't care about the texture dimensions (texture coordinates range from 0.0 to 1.0 usually).
EDIT: ... alright, we of course do know what textures we need to apply to what vertex data... still, that won't help us though

(08-22-2010, 04:24 AM)NaturalViolence Wrote: [ -> ]* We know how to exchange textures.
wel... yeah, but that's really just a matter of simply using another texture instead of the one we're supposed to use, nothing magic about this Tongue

(08-22-2010, 04:24 AM)NaturalViolence Wrote: [ -> ]* We know how to extract meshes/models at run-time.
Uhm, no we actually don't. We can just export the whole scene drawn in a frame (assuming you're talking about using OGLE or sth like that), i.e. there's no simple way to get an _individual_ mesh. No way to distinguish a 3D-Mario from a simple clear quad (and we don't want HD clear quads Tongue).

(08-22-2010, 04:24 AM)NaturalViolence Wrote: [ -> ]* We have hardware tessellators, various types of shaders, most importantly tessellator and geometry shaders.
Well.. yeah, but those don't really help us because of the things I said before Wink

Anyway.. it WOULD be possible to implement something like HD-models, using a similiar caching mechanism like for textures. I don't know how well it would work there though, probably not at all. And creating 3d models is somewhat more complicated than creating hd-textures, so I doubt anyone would really use this feature...


EDIT: Note that all of this information is Dolphin-specific, not sure to what extent it applies to other emulators.

snk_kid

(08-22-2010, 05:02 AM)KHRZ Wrote: [ -> ]Can't this cause inaccuracy/glitches ingame? Or are hitboxes independent of polygons?

You have a good point but I don't see collision detection being a huge issue, if the game does per-primitive intersection tests it can only do them on the control level (original mesh), it wouldn't be able to do further tests on subdivided levels, it would be a bit inaccurate because of the smoothing applied to the vertices. Also displacement mapping would make it less accurate if you have large amount of displacement of-course.

(08-22-2010, 05:57 AM)NeoBrain Wrote: [ -> ]
(08-22-2010, 04:24 AM)NaturalViolence Wrote: [ -> ]* We know which textures are applied to which meshes.
No, we don't. We can just distinguish the textures from each other, and identify a specific texture with a hash code. This allows us to replace the texture with a hi-res one, for example. Replacing textures just works because the mesh doesn't care about the texture dimensions (texture coordinates range from 0.0 to 1.0 usually).
EDIT: ... alright, we of course do know what textures we need to apply to what vertex data... still, that won't help us though

I don't know all the technicalities involved in texture replacement in emulators I'm making a lot of assumptions so please bare with me Smile

What I meant was, we know by manual process, not automated one. From what I understand how a person goes about making a high-res texture pack, they dump textures from virtual vram and look at them, they can sort of guess what geometry it will be applied to, of-course there is no guarantee of a 1-to-1 mapping for all textures to geometry because textures can be shared.

Still someone looks at texture and notices e.g. "ah these textures are for Link's model" then they make there own textures and tells the emulator to use those is this correct? if so technically wouldn't you be able to use any kind of texture you want, such as displacement map? (of-course the emulator/plug-in needs add support for them) I guess you could also use these custom textures to mark out "hey do this to any geometry they uses these textures" if you see what I'm saying?

(08-22-2010, 05:57 AM)NeoBrain Wrote: [ -> ]
(08-22-2010, 04:24 AM)NaturalViolence Wrote: [ -> ]* We know how to extract meshes/models at run-time.
Uhm, no we actually don't. We can just export the whole scene drawn in a frame (assuming you're talking about using OGLE or sth like that), i.e. there's no simple way to get an _individual_ mesh. No way to distinguish a 3D-Mario from a simple clear quad (and we don't want HD clear quads Tongue).

Sorry I wasn't very clear here, I had a video link showing exactly what you describe that some how went missing. Yes that is what I meant but this is still useful for artist to making their custom textures, displacement maps out of high-resolution meshes, possibly marking out regions of information. Again I never meant to say this is an automated process!

(08-22-2010, 05:57 AM)NeoBrain Wrote: [ -> ]Anyway.. it WOULD be possible to implement something like HD-models, using a similiar caching mechanism like for textures. I don't know how well it would work there though, probably not at all. And creating 3d models is somewhat more complicated than creating hd-textures, so I doubt anyone would really use this feature...

I don't think it needs to be that complicated, if you have the original mesh ripped and 3d modeller, then do something like convert it to subdivision surface like catmull-clark, increase the level of detail and apply tweaks to the mesh. Then use tool that can generate displacement maps from the high-res version, use this in the emulator.

(08-22-2010, 05:57 AM)NeoBrain Wrote: [ -> ]EDIT: Note that all of this information is Dolphin-specific, not sure to what extent it applies to other emulators.

Yeah, I originally I wrote that in the context of N64 emulators but it applies to any. Just wanted to get a discussion going about it!