Jump to content
Sign in to follow this  
Andrea Raimondi

Text 3D is horrible

Recommended Posts

Hello!

 

I am sure I am doing something not very smart somewhere (or I just don't quite understand how 3D works, which is possible!) and my 3D text looks terrible and I don't know how to make it look right 😄 

 

Please find the currently really bad text attached. 

 

Anybody knows why it's that bad and not showing properly?

 

Thanks!

Text3D fail.PNG

Share this post


Link to post

First impressions, based solely on the visuals:

  • All sides have the same color, which gives you little to no contrast.
  • You don't have a highlighting color for the contour.
  • Perhaps slightly darker sides would help, and maybe a lighting source to enhance contrasts?

Share this post


Link to post

Hi!

 

This is my current DFM:

 

object Viewport3D1: TViewport3D
  Align = Top
  Size.Width = 640.000000000000000000
  Size.Height = 100.000000000000000000
  Size.PlatformDefault = False
  object Text3D1: TText3D
    WrapMode = Fit
    Position.X = 325.000091552734400000
    Position.Y = 44.999977111816400000
    Position.Z = 0.000061035156250000
    RotationAngle.X = 198.409103393554700000
    RotationAngle.Y = 95.915130615234380000
    RotationAngle.Z = 85.144851684570320000
    Width = 59.589870452880860000
    Height = 385.819519042968800000
    Depth = 17.276718139648440000
    Projection = Screen
    VisibleContextMenu = False
    TwoSide = True
    ZWrite = False
    Text = 'Snap&Share'
    Flatness = 1.000000000000000000
    Sides = [Front, Back, Shaft]
    Quanternion = 
      '(0.118859842419624,-0.110193893313408,-0.70152872800827,-0.69396' +
      '6567516327)'
  end
end
 

My final goal is:

1) Have a clearly 3D text, i.e. users can see it's 3D

2) When there's an action performed by the user (i.e. for example the click of a button) I want this text to rotate. 

 

So, what I want to obtain is a slightly inclined text that clearly shows it's already 3D as a first step. You know what I am talking about, right?

 

Thanks!

 

A

Share this post


Link to post

Possible starting point for playing:

unit FrmMain;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, System.Math.Vectors,
  FMX.Controls3D,
  FMX.Objects3D,
  FMX.Viewport3D,
  FMX.MaterialSources;

type
  TFormMain = class(TForm)
    Viewport: TViewport3D;
    procedure FormCreate(Sender: TObject);
  private
    Text: TText3D;
    Camera: TCamera;
    MS: TColorMaterialSource;
  end;

var
  FormMain: TFormMain;

implementation

{$R *.fmx}

procedure TFormMain.FormCreate(Sender: TObject);
begin
  ReportMemoryLeaksOnShutdown := True;

  Width := 800;
  Height := 600;

  Viewport.Position.X := 10;
  Viewport.Position.Y := 10;

  Viewport.Width := 640;
  Viewport.Height := 480;

  Camera := TCamera.Create(Self);
  Camera.Parent := Viewport;
  Camera.Position.Z := -100;

  Viewport.Camera := Camera;
  Viewport.UsingDesignCamera := False;

  MS := TColorMaterialSource.Create(Self);
  MS.Parent := nil;
  MS.Color := TAlphaColors.Dodgerblue;

  Text := TText3D.Create(Self);
  Text.Parent := Viewport;
  Text.WordWrap := False;

  Text.Stretch := False;
  Text.Depth := 3;
  Text.Height := 10;
  Text.Width := 100;
  Text.Scale.X := 1;
  Text.Scale.Y := 1;

  Text.Text := 'Sample Text';

  Text.RotationAngle.X := 20;

  Text.MaterialShaftSource := MS;
end;

end.

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×