I'd like to know if there's a way to turn Nuke's text (contained in Text node) into polygonal object and then extrude it along Z axis? It's possible in Blackmagic Fusion, it's even possible in Apple Motion 5. Who knows how to do it in Nuke via Python?
logoPlate = nuke.nodes.Text(name="forExtrusion")
logoPlate['font'].setValue("~/Library/Fonts/Cuprum-Bold.ttf")
logoPlate['xjustify'].setValue("center")
logoPlate['yjustify'].setValue("center")
logoPlate['box'].setValue([0,0,512,256])
logoPlate['translate'].setValue([-20, 50])
logoPlate['size'].setValue(48)
logoPlate['message'].setValue("TV Channel logo")
logoPlate.setInput(0,nuke.selectedNode())
I am not interested in using exported obj, fbx or abc from 3D packages or any third party plugins.
The only method to extrude a text at the moment (in NUKE version 10.5) is to trace a text logo with Polygon shape tool using ModelBuilder node.
modelBuilder = nuke.createNode('ModelBuilder')
camera = nuke.createNode('Camera2')
nuke.toNode('ModelBuilder1').setSelected(True)
nuke.toNode('Camera1').setSelected(True)
nuke.connectNodes(2, camera)
nukescripts.connect_selected_to_viewer(0)
n = nuke.toNode('ModelBuilder1')
k = n.knob('shape').setValue(6) #'Polygon' tool in dropdown 'shape' menu
k.execute()
After tracing the logo I used Extrude from ModelBuilder's context menu and then baked out a geometry. But you can use only straight lines due to nature of polygonal modeling in NUKE.
No NURBS geometry.
script = nuke.thisNode()['bakeMenu'].value()
eval(script)
Typically you would use a 3D modelling program like Modo, Maya, Cinema 4D, etc. Create and output your text as a model and import it into Nuke. To create 3D text directly in Nuke, you need the Geometry Tools plugin. Then simply use the PolyText node.
Documentation on PolyText
Download site for Geometry Tools
Related
Currently, I am trying to build a User Interface with python to visualize MRI images (in numpy) in 'tkinter' Graphic User Interface.
The feature of mouse scrolling from Matlab's imshow3d is essential but I was not able to find anything like this on web (ex.https://www.mathworks.com/matlabcentral/mlcdownloads/downloads/submissions/47463/versions/3/screenshot.jpg).
Does anyone have any idea how I can implement the mouse based slice browsing with tkinter?
or are there any other gui that I could use to build what I want.
I have (X,Y) coordinates of polygons as shown in the picture pores image. How can I import them to Abaqus and how to create a surface in a way that subtract the internal shapes (polygon1,poly2....) from the external shape (the frame (a rectangle)). Rectangle-poly1-poly2....
Try recording a macro. Manually create the model using Abaqus CAE. I assumed you're doing a 2-D model, so your geometry will probably be:
A solid rectangle.
2a. Planar cut on the rectangle created through a sketch.
2b. Alternatively, you can use the "create wire" feature to input your shape coordinates (right-click to read coordinates from a text file). Use merge scheme "Separate wire". Then, use the "Partition" tool to partition the holes, and then use "Geometry Edit" to remove the undesired faces.
Anyways, the macro recorder will help prototype the code that you will need to generate. Once you do that, you're going to need to do typical Python file open/read operations to read the input coordinates and develop the program to generate the model and mesh. Or, you can extruciatingly generate your model manually using the method I outlined above. There's a lot of ways to skin this chicken.
I have a custom object(a small circle) placed at some point inside a Gtk.Fixed() widget .Is there a way to drag this object around using the mouse. I am not able to map the Mouse Press/Release/Motion events to make this work.
I would prefer solution in Python using PyGobject but any other language will do also be fine if explanation is provided
More Details:
I am trying to make a font editor where these objects I mentioned above will be the control points of the bezier curves in the Glyph outlines
Here is an image of the concept design:
https://github.com/sugarlabs/edit-fonts-activity/blob/gh-pages/files/img/wireframe_concept_01_first_prototype.svg
I need to able to move the points shown to edit the outline of the letter shown
GtkFixed is not designed to do drawing work. It's made to locate widgets (such as buttons and such) on a fixed grid (รก la Windows).
If you would like to move elements of a drawing, have a look at eg. GooCanvas. Each element on a goocanvas can have events connected, which can then be used to move it around. You can even use CanvasGroup to group primitives (circle, rectangle etc), and move them together (even change other properties such as color, linewidth). The toolbox actually contains curves etc. It's easy to create a 'handle' using a small rectangle.
Here's an example of a simple goocanvas program, and you can find download links, references manuals and other useful stuff here.
I don't know if this is a tool you need, or just a learning exercise. If the former, then do have a look at FontForge, an open source font editor, and incredibly versatile.
I want to generate the texture (only color) of a mesh object in blender dynamically, such that the texture depends on time (or frame) in a animation. For example:
color(x,y,t) = cos(x+t)*sin(y+t)
I already found the video texture module in the API (bge.texture) but it is part of the blender game engine. As far as I know this can not be used to render animations.
By right-clicking on a colour swatch you have an option to Add Driver, you can then use python expressions to calculate the value to use. Drivers resemble keyframes but the values are calculated instead of fixed.
Once you have added the driver you use the graph editor to adjust it, in the graph editor header is a menu to chose between f-Curve Editor and Drivers. To see available functions you can use the python console Autocomplete to list them, you also have the option of adding your own functions to the namespace. You can also define variables that can extract values from other objects for you to use in your expressions.
I am working on a program for machine vision. I am trying to do the following:
Grab image at a certain zoom level and find borders.
Take that image and subdivide into a fixed sized grid (which is pre-determined).
Project the image+grid in a UI and allow a user to select/deselect individual grid boxes.
Currently I am using PyQt+Python2.7 with C++ for the computations. I am just wondering if there is a good tutorial for the UI grid section.
Use the Graphics View Framework. Add each grid item as a separate pixmap using scene->addPixmap. Make items selectable using item->setFlag(QGraphicsItem::ItemIsSelectable);. Use scene's selectionChanged signal and scene->selectedItems() to know about selected items.
You can use QPixmap::copy to cut off a rectangle.