1
$\begingroup$

I'm learning to use blender in order to get this result: when I push a button on pygame I'll have a solid, like a stone, appearing from the ground. on this "stone" I would have written a text from a file that changes every time I use this function. I would only ask if it's possible with blender to have this result, or it's better to give up and think something more easy to do? thanks for the help.

$\endgroup$
  • $\begingroup$ Do you want the text to be a texture on the stone or can it be a separate text object? $\endgroup$ – maddin45 Jun 11 '14 at 6:33
  • $\begingroup$ Is this an animation? Or are you using the BGE? $\endgroup$ – gandalf3 Jun 11 '14 at 6:34
  • $\begingroup$ @maddin45 - I would have a texture on the stone. $\endgroup$ – user3072083 Jun 11 '14 at 10:50
  • $\begingroup$ @gandalf3 - I don't know what is BGE but I would have the stone (or a box) come out the floor and some text printed on it (if possible!!) $\endgroup$ – user3072083 Jun 11 '14 at 10:53
1
$\begingroup$

It's not clear to me how this is related to pygame so I focus on this part of your question:

I would only ask if it's possible with blender to have this result

Yes, you could create an action with two keyframes (start and end position of z coordinate of your cube).

At the right side you see the action "CubeAction" in the Dope Sheet (set to Action Editor) At the bottom a Keyboard Sensor which is active when Space is pressed and an Action Controller which plays the animation stored in the action.

enter image description here

To dynamically create the text object one idea would be to copy it in the text-editor and use:

bpy.ops.text.to_3d_object(split_lines=True)

This function is probably not available while the game engine is running For how to load a text into the editor see: How to programmatically load a python script in Text Editor and launch it

How to port this to pygame isn't on topic here.

$\endgroup$
  • $\begingroup$ the suggestion for blender is just what I need, thanks. relating to pygame, I still have to verify but I think to use a button to launch my blender animation. $\endgroup$ – user3072083 Jun 11 '14 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.