Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex colors? #108

Open
insomniacUNDERSCORElemon opened this issue Apr 16, 2024 · 3 comments
Open

Vertex colors? #108

insomniacUNDERSCORElemon opened this issue Apr 16, 2024 · 3 comments

Comments

@insomniacUNDERSCORElemon
Copy link

insomniacUNDERSCORElemon commented Apr 16, 2024

From what I gather this is an issue with Raylib itself and code exists to read+display vertex colors from 3D models but between the language difference and time (plus my place at square 0 and no other reliable place to ask, particularly specific to Naylib) it is beyond me.

For some background, I generally want my art without textures (vertex color only).

Example:

planter_low

but in the model display example yaw_pitch_roll.nim I swap my model in (manually scaled up by x100, exported to .glb exported to .obj) and get this:

Screenshot_2024-04-16_19-32-02

EDIT: I just noticed this too for the .glb Color attribute data format not supported. Using .obj does not give this message but still does not have color (though the scaling during exporting actually gives a normal size unlike the .glb export). Exporting without a material makes no difference other than making it white rather than gray.

Also my exports do have vertex colors, visible by importing into Godot 3.X or re-importing back into Blender.

I don't want every object using a unique material (this is something to note with Godot and vertex colors), though it would be nice to have the ability to have objects that contain a matte and reflective material (and maybe glass too). Unshaded is not out of the question, 1 material only (+vertex lighting) is a step better.

Note: I am on Kbin, I often seem to have federation issues just talking about Nim (also for the threads I posted w/the art itself and asking questions), I'm not sure if there's somewhere better on the fediverse that might be more conducive for discussion of things like this. Forgive me if this is out-of-place.

@planetis-m
Copy link
Owner

Sorry I can't answer the question, but you can ask at the raylib discord, probably the feature request channel.

@insomniacUNDERSCORElemon
Copy link
Author

insomniacUNDERSCORElemon commented Apr 18, 2024

Sorry I can't answer the question, but you can ask at the raylib discord, probably the feature request channel.

I do not use Discord.

That and I would expect this to not work out directly when it comes to Nim/Naylib. It would probably be more likely if someone who understands both C and Nim could convert the code others have posted (assuming it can work here, and that it isn't too outdated).

EDIT: Although maybe it should just be working? I see raysan5/raylib#1790 but I am not sure if it needed additional code to work. But I did see the color format error with .glb, too ( raysan5/raylib#3890 ).

@planetis-m
Copy link
Owner

I should clarify I am not knowledgeable enough to answer your question. But if you use https://chat.lmsys.org/ (opus is the best one with less rate-limit exceeded errors) you can translate your code to any language. And then maybe create a new raylib issue, if that's what it is or get some help in the nim matrix server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants