Text or Logo in X3D

4 posts / 0 new
Last post
Hans75
Text or Logo in X3D

Hello, I am struggling with the following.

I would like to put a text or logo on an object in X3D, but the text should be not 'flat' text, but really embossed in or out..

This X3D should be sent to a 3D printer.. so it really must have depth.. in stead of the regular flat text of X3D.

Does anybody have an idea how to do this?

 

Visibility: 
Public - accessible to all site users
Edited by: babelx3d on 2015/02/02 - 23:25
artur
artur's picture
what app do you use? in

what app do you use? in vivaty studio, for example, you can create an editable text objet with depth and if needed convert it into an ifs node and export the whole object in x3d or other format.

Hans75
I need to create the object

I need to create the object from my own build ASP.NET application...

I know from Vivaty i can create 3D text.. and merge/extrude that with another object... but need to do this from our own ASP.NET app... so. the underlying API is needed, or a command line extrusion/merging tool or so...

vcard
vcard's picture
Hi,

Hi,

1) Probably because extruded text can be heavy to process, the standard specs do not provide an extrusion attribute but bs contact plugin has an extension to extrude the text node: vrml example  x3d example

extruded_text_demo

2a) Look at the comment in the code of this simple vrml example:

#VRML V2.0 utf8
#extruded text - using contact node extension

Shape {			 	
   appearance Appearance {
                 material Material { diffuseColor 1 0 0 }
   }
   geometry Text {
	   
   	string ["To be extruded or not to be extruded",
                "That is the question"]
        	fontStyle FontStyle {
                	family "SANS"
                    	style  "BOLD"
			style "EXTRUDE"		# attribute to define a text extrusion
			justify "MIDDLE"
                        size 1                       
                         }
            }
}

2b) A similar attribute defined in x3d will render in bs contact. Below is a modified code example.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile='Immersive' >
<head>
 <meta content='extruded.fxw'/>
</head>
<Scene>
<WorldInfo
 title='extruded'
 info='"vcard, 2012"'/>
<Group DEF='extruded_text_demo'>
 <Shape DEF='Text1'
  containerField='children'>
  <Appearance
   containerField='appearance'>
   <Material DEF='Red'
    containerField='material'
    ambientIntensity='0.200'
    shininess='0.200'
    diffuseColor='1 0 0'/>
  </Appearance>
  <Text
   containerField='geometry'
   string='"To be extruded or not to be extruded"
    "That is the question"'
   maxExtent='0.000'>
   <FontStyle
    containerField='fontStyle'
    family='SANS'
    style='EXTRUDE'
    justify='"MIDDLE"
     "BEGIN"'
    size='1.000'
    spacing='1.000'/>
  </Text>
 </Shape>
</Group>
</Scene>
</X3D>
 

3)One way to control the text extrusion depth is to use it inside a Transform node and there define the size Z parameter: example2

4) You need to know if the 3D printer software has such an extension to the standard specs and, if it does, change the asp.net code that generates the vrml text.

vcard