Author Topic: Wireframed 3d quad-map  (Read 2942 times)

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Wireframed 3d quad-map
« on: March 22, 2012, 04:21:35 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Wireframed 3d quad-map
« Reply #1 on: March 22, 2012, 08:39:16 pm »
So...it should be wire frame or transparent or both?

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Wireframed 3d quad-map
« Reply #2 on: March 22, 2012, 08:53:56 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Wireframed 3d quad-map
« Reply #3 on: March 22, 2012, 09:00:18 pm »
Do you have an image that shows what you have in mind? I'm not sure if i got it right...

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Wireframed 3d quad-map
« Reply #4 on: March 22, 2012, 09:10:27 pm »
It is a three-dimensional grid. Simple as that. I could not find in the Object3D implementation anything able to show its wireframe.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Wireframed 3d quad-map
« Reply #5 on: March 22, 2012, 09:13:41 pm »
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!?

Offline brunotrodrigues

  • byte
  • *
  • Posts: 20
    • View Profile
Re: Wireframed 3d quad-map
« Reply #6 on: March 23, 2012, 12:50:56 pm »
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.