Hey!
I'm trying to create a 3D window in a 2D animation. I don't know how to make this work... Any ideas?
I'm using the proscene library to make the 3d part of the animation...
I dont know exactly what you mean. It used to be possible to draw over 3d regardless of z depth by using the hint function but the hint function does not appear to be working right now i have no idea.
Should it stand up more? I made it sticky and top-most topic, but apparently lot of newcomers miss it, just posting in the first / default category (apparently, not much people read the category descriptions...).
Anyway, moving this topic from Using Processing to How To...
I'm terribly sorry, PhiLho... Yes, the topic is visible and doesn't need to stand up more. I don't know about the others newcomers, but i guess i didn't read very carefully the intructions, even with the title saying "read attentively"... Thanks for pointing it out and sorry again =(
About my question... It's like the examples page from the processing website. If my PApplet is the page, then the little window with the animation it would be like a 3d PGraphic or something.
I didn't write the above to make you feel bad, it was just genuine concern, since you are not the only one missing the instructions. But thanks for the feedback. :-)
If you use P2D as the sketch's renderer, then you cannot do any 3D rendering in the main window. However, if you want to somehow a 3D scene into a 2D drawing, you could create a PGraphics offscreen surface using P3D as its renderer and then compose it into the main 2D surface as an image:
Notice that in addition to the PGraphics' beginDraw()/endDraw() calls, you also need to enclose the offscreen rendering code between Scene.beginDraw() and Scene.endDraw().
Answers
I dont know exactly what you mean. It used to be possible to draw over 3d regardless of z depth by using the hint function but the hint function does not appear to be working right now i have no idea.
Just a question to gmellocmr.
Is the topic To newcomers in this forum: read attentively these instructions not visible when you come to the forum?
Should it stand up more? I made it sticky and top-most topic, but apparently lot of newcomers miss it, just posting in the first / default category (apparently, not much people read the category descriptions...).
Anyway, moving this topic from Using Processing to How To...
I'm terribly sorry, PhiLho... Yes, the topic is visible and doesn't need to stand up more. I don't know about the others newcomers, but i guess i didn't read very carefully the intructions, even with the title saying "read attentively"... Thanks for pointing it out and sorry again =(
About my question... It's like the examples page from the processing website. If my PApplet is the page, then the little window with the animation it would be like a 3d PGraphic or something.
I didn't write the above to make you feel bad, it was just genuine concern, since you are not the only one missing the instructions. But thanks for the feedback. :-)
And the PGraphics and P2D renderer do not play well topic might be relevant to your problem.
If you use P2D as the sketch's renderer, then you cannot do any 3D rendering in the main window. However, if you want to somehow a 3D scene into a 2D drawing, you could create a PGraphics offscreen surface using P3D as its renderer and then compose it into the main 2D surface as an image:
Is this what you have in mind?
Yes, exactily codeanticode, thanks!
But my problem is using the ProScene library in this 3D PGraphic...
You can attach a Scene object from ProScene to a PGraphics3D offscreen surface:
Notice that in addition to the PGraphics' beginDraw()/endDraw() calls, you also need to enclose the offscreen rendering code between Scene.beginDraw() and Scene.endDraw().
Thank you codeanticode! This solved my problem =)