3D model doesn't work for some reason

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Bilbö Bägginson
Posts: 27
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

3D model doesn't work for some reason

Post by Bilbö Bägginson »

Hi guys, have some trouble with 3d model.


MODELDEF:

Code: Select all

Model A_Lake
{
   Path "models/lake"
   Model 0 "A_Lake.md3"
   Skin 0 "A_Lake.png"
   Scale 1.0 1.0 1.0

   FrameIndex ARTL A 0 0
}

DECORATE:

Code: Select all

Actor A_Lake 17877
{
 Radius 24
 Height 16
 scale 1.0
 +SOLID
 States
 {
  Spawn:
  ARTL A -1
  Stop
 }
}
The actor appears as an error sign in the game.
What can be wrong here?
You do not have the required permissions to view the files attached to this post.
Last edited by Bilbö Bägginson on Sun May 26, 2024 1:15 pm, edited 1 time in total.
User avatar
OddYokai
Posts: 12
Joined: Mon Jul 04, 2022 11:01 am
Preferred Pronouns: He/Him
Graphics Processor: ATI/AMD (Modern GZDoom)
Location: Hungary

Re: 3D model doesn't work for some reason

Post by OddYokai »

I can't view the file at the moment. does the model have triangulated faces?
User avatar
Bilbö Bägginson
Posts: 27
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: 3D model doesn't work for some reason

Post by Bilbö Bägginson »

OddYokai wrote: Sun May 26, 2024 12:56 pm I can't view the file at the moment. does the model have triangulated faces?
It didn't, but I've just tried to triangulate the model in Blender, didn't help.
Kzer-Za
Posts: 514
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: 3D model doesn't work for some reason

Post by Kzer-Za »

I've run into this as well: viewtopic.php?t=68760

TLDR: create a TEXTURES lump (or text file) that contains lines like

Code: Select all

sprite ARTLA0, 64, 64
for each "sprite" that your actor has.
User avatar
Bilbö Bägginson
Posts: 27
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: 3D model doesn't work for some reason

Post by Bilbö Bägginson »

It worked, thank you!
Kzer-Za wrote: Sun May 26, 2024 9:36 pm TLDR: create a TEXTURES lump (or text file) that contains lines like

Code: Select all

sprite ARTLA0, 64, 64
for each "sprite" that your actor has.
I thought that it was no longer necessary to define model "sprites" in TEXTRES, so I didn't even try.
Also, before I've made some 3d models that do work without any defining in TEXTURES. Is there any idea why could it be so?

[edit] Also I still can't see it in Builder (But in the game it's rendered)
You do not have the required permissions to view the files attached to this post.
Kzer-Za
Posts: 514
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: 3D model doesn't work for some reason

Post by Kzer-Za »

Bilbö Bägginson wrote: Mon May 27, 2024 12:37 am Also, before I've made some 3d models that do work without any defining in TEXTURES. Is there any idea why could it be so?
Perhaps, you were working with a model for an actor that replaced something in game rather than something new, unlike now? In that case, the game already had the information about the respective sprite.
User avatar
ramon.dexter
Posts: 1547
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: 3D model doesn't work for some reason

Post by ramon.dexter »

Bilbö Bägginson wrote: Mon May 27, 2024 12:37 am

Also, before I've made some 3d models that do work without any defining in TEXTURES. Is there any idea why could it be so?
Check the actor's definition. Either it uses TNT1A0 sprite, which is already included in gzdoom.pk3, or it replaces some sprite already present in one of the iwads. Models in gzdoom simply cannot work without a sprite, because sprite is the most important thing in gzdoom. Definition in modeldefs simply tells engine "replace sprite POSS frame A with above defined model". When the sprite is missing, gzdoom correctly displays nothing, as actor cannot work without a sprite. But as others mentioned, simple definition of blank sprite in TEXTURES lump is completely okay. I'm doing it that way, because it saves up space in pk3.

Return to “Scripting”