Wireframed 3d quad-map

Started by brunotrodrigues, March 22, 2012, 04:21:35 PM

Previous topic - Next topic

brunotrodrigues

Hello, everyone! I'm new to jPCT so I have a question:

I need to draw a 3d quad-map (30 x 30 x 30 squares where I'm gonna place my markers) but I couldn't find a way to do it with jPCT. It needs to be a wireframe so that the user can see what is in the 3d space, and I need to control its transparency so that it doesn't make visualization of all the markers difficult. Can anyone give me a hand?

EgonOlsen

So...it should be wire frame or transparent or both?

brunotrodrigues

I just had an idea that might work. What if I draw 30 wireframed planes aligned to each axis?
But I don't know how to build a wireframed plane. Help?

@EgonOlsen: Both would be awesome, but I know it will be heavier in the end.

EgonOlsen

Do you have an image that shows what you have in mind? I'm not sure if i got it right...

brunotrodrigues

It is a three-dimensional grid. Simple as that. I could not find in the Object3D implementation anything able to show its wireframe.

EgonOlsen

That's because you can't do it that way. You can render a world in wire frame, i.e. you could everything you want to render as wire frame in another world instance than the objects that should be solid. However, you'll get diagonal lines, because the objects are made out of triangles, not quads. Maybe faking the wireframes with a transparent texture is the better idea!?

brunotrodrigues

Yeah, faking with texture might work.
That gave me another idea. Is it possible to make the texture repeat itself over an Object3D instead of stretching it? I want the user to be able to change the grid size without making the marker places bigger, i.e. increase the grid's size from 30 to 40 5.0f cubes.