Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Mo 11.10.10 09:28 
Moin Forum,

wenn ich mit TGLFreeForm.LoadFromFile(dateiname) eine Datei lade, dann wird alles in der GLFreeForm-Komponente in grau dargestellt.
Ich habe die Formate *.ply, *.stl sowie *.3ds ausprobiert.
Wenn ich diese Dateien mit dem Programm 3D-Tool öffnen, dann sind die Farben vorhanden.

So lade ich die Datei:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
    with MyGLFreeForm do begin
      LoadFromFile(s);
      Position.X := 0;
      Position.y := 0;
      Position.z := 0;
      Scale.X    := 0.1;
      Scale.Y    := 0.1;
      Scale.Z    := 0.1;
      ShowAxes   := false;
      TurnAngle  := 0;
      PitchAngle := -90;
      RollAngle  := 0;
    end;

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mo 11.10.10 09:52 
Farben oder Texturen?

Letztere muss man irgendwie von Hand laden.
Erstere... sollten gehen. War das GLScene, wo es dieses schöne Dolphin-Sample gab?

Stichwort dürfte hier Material sein; was genau man damit machen muss, kann ich dir so aber nicht sagen, GLScene hatte ich nur mal kurz benutzt, wurde dann irgendwann zu unflexibel.

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."